• Resolved sugapablo

    (@sugapablo)


    Wordpress 5.3
    Yoast 12.6.1, 12.6.2, 12.7
    Classic Editor 1.5

    Editor tabs for Posts (but not Pages) will not work when Yoast is activated. Tested on three different versions of Yoast.

    Deactivate Yoast and all works fine.

    Screenshot: Pages work – https://pasteboard.co/IKOuHIH.png
    Screenshot: Posts do not – https://pasteboard.co/IKOviES.png

    [Error] TypeError: Object is not a constructor (evaluating 'new URL(a)')
    	(anonymous function) (analysis-1270.min.js:21:1862777)
    	(anonymous function) (analysis-1270.min.js:21:1862860)
    	(anonymous function) (wp-seo-post-scraper-1270.min.js:5:104710)
    	(anonymous function) (wp-seo-post-scraper-1270.min.js:5:118372)
    	i (load-scripts.php:2:27368)
    	fireWith (load-scripts.php:2:28123)
    	ready (load-scripts.php:2:29926)
    	J (load-scripts.php:2:30282)
    
     [Error] TypeError: null is not an object (evaluating 'a')
    	(anonymous function) (analysis-1261.min.js:21:1878542)
    	(anonymous function) (analysis-1261.min.js:21:1874503)
    	(anonymous function) (analysis-1261.min.js:21:1871276)
    	(anonymous function) (analysis-1261.min.js:21:1869062)
    	(anonymous function)
    	z (analysis-1261.min.js:1:37083)
    	(anonymous function) (analysis-1261.min.js:21:1868991)
    	(anonymous function) (analysis-1261.min.js:21:1872465)
    	(anonymous function) (analysis-1261.min.js:14:259172)
    	(anonymous function)
    
Viewing 4 replies - 1 through 4 (of 4 total)
  • It breaks WP Bakery Page builder editor as well. If I turn off yoast, it works fine. If it’s enabled, I can’t enable the editor, and clicking on the default editor (showing shortcodes) causes the content to go blank.

    Thread Starter sugapablo

    (@sugapablo)

    12.7.1 did NOT solve the problem. Issue remains with this release.

    @sugapablo

    We are running WordPress 5.3.2, Yoast SEO v12.7.1 and Classic Editor v1.5 and we are unable to reproduce the issue. The editor tool bar still renders. See image: https://pasteboard.co/IMaDsq4.png.

    We are not sure why you are still experiencing the issue but it sounds like a plugin or theme conflict. We ask that you please Check for conflicts.

    If there is a conflict with a plugin or a theme, you can create a new GitHub issue?for our developers. Please report the issue to a third party developer as well.

    If you didn’t find any conflicts or errors, we think the issue is specific to your site. We’d need to investigate further but are unable to do so on these forums. You can purchase Yoast SEO Premium?and receive our Premium email support and we can help you further.

    Thread Starter sugapablo

    (@sugapablo)

    I have solved this, and the fix might help others who are reporting this issue.

    The error reported was here:

    
    Object.defineProperty(e, "__esModule", {
                value: !0
            }), e.default = function(a) {
                if (! function(a, e) {
                        return a = new URL(a, window.location.origin), e = new URL(e, window.location.origin), a.hostname === e.hostname && a.port === e.port && a.protocol === e.protocol
                    }(window.location, a)) return i(a);
                var e = null;
                try {
                    e = new Worker(a)
                } catch (t) {
                    try {
                        e = i(a)
                    } catch (a) {
                        throw a
                    }
                }
                return e
            }
    

    Saying that:

    TypeError: Object is not a constructor (evaluating ‘new URL(a,window.location.origin)’)

    Going through all of the code, since ‘a’ and ‘window.location.origin’ were validf, I realized the only way this error could happen was if some other code had created an object named ‘URL’ previous to this.

    I went through the theme (that came from ThemeForest) and indeed found a wp_localize_script (https://codex.www.ads-software.com/Function_Reference/wp_localize_script) function call that was setting $name as ‘URL’.

    Changing this in the theme to ‘URLb’ was enough to get everything working again.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Yoast is breaking editor’ is closed to new replies.