General Cookie Accept does not activate youtube embeds

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #10039027
    rappid
    Participant

    Hey Okler team,

    First of all: Really nice that you have this GDPR feature added to Porto!

    But I find it quite non standard that if a user clicks on accept the youtube, vimeo etc block is not also deactivated. Wouldn´t it make sense that if i accept the cookies that those once which I would find under preferences are automatically activated?

    Right now, when I click on acceppt (what 99% of all users will do) the youtube embeds are still not showing. Is there an easy way for me to change that? I want that if the users presses accept, everything is accepted.


    #10039033
    Support
    Keymaster

    Hello, thanks for the message.

    You are right about that, I’ve made a quick change in the script and it will work as you described:

    FILE: js/theme.js (line 4585). Change the “Agree” function:

    FROM:

    // Agree Trigger
    self.options.wrapper.find('.gdpr-agree-trigger').on('click', function(e){
    	e.preventDefault();
    
    	$.cookie( 'porto-privacy-bar', true );
    
    	self.removeCookieBar();
    });

    TO:

    // Agree Trigger
    self.options.wrapper.find('.gdpr-agree-trigger').on('click', function(e){
    	e.preventDefault();
    
    	$('.gdpr-preferences-form').find('.gdpr-input').each(function(){
    		if( $(this).is(':checkbox') || $(this).is(':hidden') ) {
    			$(this).prop('checked', true);
    		}
    	}).trigger('submit');
    
    	self.removeCookieBar();
    });

    Please try that and let me know if you need further assistance.

    Kind Regards,

    Jonas


    #10039038
    rappid
    Participant

    Hey Jonas,

    thanks for the quick reply. I tried it and it does what it should but there is still a problem.
    When I click on accept now it will show the cookie preferences for a second. This is confusing for the user and cannot be the final solution.

    Best
    Christian


    #10039045
    Support
    Keymaster
    This reply has been marked as private.
    #10039047
    rappid
    Participant

    Hello Jonas,

    unfortunately this did not solve the problem of the appearing preferences window for a second after clicking on accept.
    It is all like before.

    Best
    Christian


    #10039049
    Support
    Keymaster
    This reply has been marked as private.
    #10039053
    rappid
    Participant

    It works now. I am just wondering if a reload after the acceptance of the cookies is a desired effect?
    The cookie consents I know usually work without a reload of the page. I fear a reload of the whole page is not very convenient for the user.


    #10039056
    Support
    Keymaster

    Hello, we will add that in our list to be improved and not require the reload, at the moment the plugin we are using works this way unfortunatelly.

    Kind Regards,

    Jonas


    #10039063
    Support
    Keymaster

    Hi, we have made a few changes in the script.

    Update the file js/theme.js using this: https://pastebin.com/raw/TuMJ5gwE

    Please try that one and let us know if it works the way you want.

    Kind Regards,

    Jonas


    If you are satisfied with Porto HTML and our support, please leave your comment and rating on ThemeForest downloads page. That helps us a lot: https://themeforest.net/downloads


    #10039064
    rappid
    Participant

    Looks really good now. Thanks.
    Just for me to know… will this change be included in the next update of porto?

    Best
    Christian


    #10039065
    Support
    Keymaster

    Yes, next version will be released exactly like that.

    Jonas


Viewing 11 posts - 1 through 11 (of 11 total)

This topic is marked as "RESOLVED" and can not rceive new replies.