Support » Theme: Reiki » Customizer adds cuztomize_changeset to URL on live site

  • Beautiful theme, but I’m getting something very wacky.

    When I edit the site using the Customize option (Reiki Companion), URLs all have the following bit added to them:
    ?customize_changeset_uuid=UUIDHERE&customize_messenger_channel=preview-0

    The even weirder part is that if I go and get rid of that from the first link on the page, it’ll stick. However, if I edit it off of multiple links, the removal will only stick with the last link I edit. Every other link will have that bit added to it, which returns the following message when someone who isn’t logged in attempts to access the page:
    Unauthorized. You may remove the customize_messenger_channel param to preview as frontend.

    A workaround for my front page was to edit the page itself using WordPress’ WYSIWYG editor. Those changes stuck. However, there are two buttons that are only accessible through the Reiki customize menu and I can only get one of those to work properly.

    It’s incredibly frustrating.

    I’m going to attempt to edit the database directly to fix this issue so my live retreat center site doesn’t look like it was built by an idiot, but I’m hoping someone else has seen and knows of a way to fix this.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter kainewynd2

    (@kainewynd2)

    UPDATE: Attempts to manually remove that link from my website have backfired and it instead reset the header… which meant I had to reconfigure… which caused it to set the links back.

    The site is amretreats.com and the last, annoying link in question is the Learn More button on the front page if you’d like to look at it.

    I have the exact same problem with my website and I posted a thread for it (yours have more information though!). https://wordpress.org/support/topic/customize_changeset_uuid-added-when-using-the-customizer/

    I currently made a ugly fix until the issue is fixed.

    Create a new file named fix-customizer.js (script below) and put it in /assets/js/ of the theme. Then add the following code to the function reiki_scripts() in the functions.php of the theme.

    functions.php

    
    wp_enqueue_script( 'fix-customizer', get_template_directory_uri() . '/assets/js/fix-customizer.js', array('jquery'), false, true );
    

    fix-customizer.js

    
    (function( $ ) {
        // Grab the current url and the url of the homepage
        var currentUrl = document.location.href,
            homepageUrl = ""; // Put the main website url
    	
        // If we are on the homepage
        if(currentUrl === homepageUrl) {
            // Every « a » tag with the class « button, primary_button, secondary_button, white_button »
            $("a.button, a.primary_button, a.secondary_button, a.white_button").each(function() {
                // Grab the current href attribute
                var $this = $(this),
                    btnUrl = $this.attr('href');
    			
                // Split the href with the caracter « ? » and keep only the first part
                btnUrl = btnUrl.split("?")[0];
                // Update the link url with the new one
                $this.attr('href', btnUrl);
            });
        }
    })( jQuery );
    
    Thread Starter kainewynd2

    (@kainewynd2)

    Cool. I’ll give that a shot.

    I am loathe to mark this as answered, though, since it’s obviously a workaround. Would you agree?

    Yes, definitely a workaround. Should not be used after the problem is fixed.

    Thread Starter kainewynd2

    (@kainewynd2)

    I think I’m being dense about something, too…

    What is the exact format of this supposed to be?
    homepageUrl = ""; // Put the main website url

    Is it?
    homepageUrl = "www.example.com"; // Put the main website url

    Or:
    homepageUrl = "https://www.example.com"; // Put the main website url

    You can copy paste from the browser url and it should give you something like this

    http://www.exemple.com/

    Thread Starter kainewynd2

    (@kainewynd2)

    Well crap. For whatever reason it isn’t working. I’ve copied my copy and the path used below for verification. I am using CloudFlare SSL, so maybe the link rewrites are nuking it.

    If nothing pops out at you, I think I have to wait for the author to get back to me. :-\

    Thanks for the help.

    $ cat wp-content/themes/reiki/assets/js/fix-customizer.js
    (function( $ ) {
        // Grab the current url and the url of the homepage
        var currentUrl = document.location.href,
            homepageUrl = "https://www.amretreats.com/"; // Put the main website url
    
        // If we are on the homepage
        if(currentUrl === homepageUrl) {
            // Every « a » tag with the class « button, primary_button, secondary_button, white_button »
            $("a.button, a.primary_button, a.secondary_button, a.white_button").each(function() {
                // Grab the current href attribute
                var $this = $(this),
                    btnUrl = $this.attr('href');
    
                // Split the href with the caracter « ? » and keep only the first part
                btnUrl = btnUrl.split("?")[0];
                // Update the link url with the new one
                $this.attr('href', btnUrl);
            });
        }
    })( jQuery );

    Did you put the required code in the functions.php? Without this little line, WordPress will not be loading the script therefore it is useless.

    Put this code inside the function « reiki_scripts() » found in the file functions.php around the line 180
    wp_enqueue_script( 'fix-customizer', get_template_directory_uri() . '/assets/js/fix-customizer.js', array('jquery'), false, true );

    Hope it helps! 🙂

    Thread Starter kainewynd2

    (@kainewynd2)

    Yep. So odd.

    function reiki_scripts() {
        wp_enqueue_style('reiki_fonts', 'http://fonts.googleapis.com/css?family=Lato:300,400,700,900|Open+Sans:400,300,600,700|Source+Sans+Pro:200,normal,300,600,700');
        wp_enqueue_style('reiki_style', get_stylesheet_uri());
        wp_enqueue_script( 'fix-customizer', get_template_directory_uri() . '/assets/js/fix-customizer.js', array('jquery'), false, true );
        wp_enqueue_style('reiki_font-awesome', get_template_directory_uri() . '/assets/font-awesome/font-awesome.min.css');
        wp_enqueue_script('reiki_ddmenu', get_template_directory_uri() . '/assets/js/drop_menu_selection.js', array('jquery-effects-slide'), false, true);
        wp_enqueue_script('comment-reply');
    }
    

    I can’t look into it right now but email me and I’ll gladly help you later tonight. [email removed]

    • This reply was modified 4 years, 7 months ago by bdbrown.
    Thread Starter kainewynd2

    (@kainewynd2)

    Thanks for all the help @marcandretrahan! This workaround works for now, though it’s definitely not a fix, as you mentioned.

    My issue ultimately ended up being permissions based, so your fix *is* working!

    Thanks again!

    I assume this is only with INTERNAL links on the same website. External links work fine for me.

    I figured out, that a workaround is to use “http://WWW.example.com/some_deep_link” for internal links. My settings are: homepageUrl = “example.com”;

    So if the URL differs from the homepageUrl (adding the subdomain “www”) the Customizer works without that issue. This might help to find a solution.

    • This reply was modified 4 years, 6 months ago by .

    This is still an issue for me and @devnul’s workaround isn’t happening for me. Any chance of an official response do we think? Any workarounds for someone who is wary of heading into functions.php?

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Customizer adds cuztomize_changeset to URL on live site’ is closed to new replies.