‘Customize’ broken
-
Suddenly (not after an upgrade) the ‘Customize’ option is broken.
When clicking on ‘Customize’ only the ‘Widgets’ come up, see screenshot:
.. and when clicking on ‘Widgets’ to edit settings it is not actually possible ti edit anything, instead only this message appears:
In the browser tab there is this notification: ‘Customize: Loading…’
If I go directly to ‘Widgets’ from Appearance in the Menu, I can edit the Widgets section; and I can also edit ‘Menus’ that way.
….but if I go to ‘Header’ or ‘Background’ directly from ‘Appearance’, then I end up in the same broken ‘Customize’ as shown in the screenshot above.
Steps taken to repair (NB: PHP is v. 7.4):
*Re-installed WP 5.4.2
*Activated default theme (Twenty Twenty)
*Deactivated all plugins
*Deleted cache
*Tried Chrome (using Firefox normally)What else can I try?
PS: I have sites on same server with same theme and same plugins that work fine.
The page I need help with: [log in to see the link]
-
The Customizer is mostly Javascript, so any error in WP, theme, or plugin can kill the whole thing. Please read https://wordpress.org/support/article/using-your-browser-to-diagnose-javascript-errors/
Thanks, Joy.
# SCRIPT_DEBUG did *not* fix the error
# It is not browser specificThe error console output is below (but probably easier to read in this screenshot: https://subsistencematters.net/wp-content/uploads/2020/07/error_console.png
I am not sure what I am looking for here, though!?
[Exception... "Favicon at "https://mk0ecommerceplac6hta.kinstacdn.com/favicon.ico" failed to load: Not Found." nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: resource:///modules/FaviconLoader.jsm :: onStopRequest :: line 227" data: no] FaviconLoader.jsm:227:22 onStopRequest resource:///modules/FaviconLoader.jsm:227 Unsupported content type POPUP url-filter-rule.js:457 uncaught exception: Object Unsupported content type POPUP url-filter-rule.js:457 Unsupported content type POPUP url-filter-rule.js:457 Security Error: Content at https://smhttp-nex.nexcesscdn.net/803313/static/websites/nexcess/img/blog-app-wordpress.svg attempted to load https://smhttp-nex.nexcesscdn.net/803313/static/websites/nexcess/img/A321BE964DD430A.png, but may not load external data when being used as an image. 2 [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIContentSniffer.getMIMETypeFromContent]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: resource:///modules/FaviconLoader.jsm :: onStopRequest :: line 284" data: no] FaviconLoader.jsm:284:24 Unsupported content type POPUP url-filter-rule.js:457 Unsupported content type POPUP url-filter-rule.js:457 Unsupported content type POPUP url-filter-rule.js:457 Unsupported content type POPUP url-filter-rule.js:457 Error: Can't find profile directory. 2 XULStore.jsm:66:15 load resource://gre/modules/XULStore.jsm:66 XULStore resource://gre/modules/XULStore.jsm:24 TypeError: PrecompiledScript.executeInGlobal: Argument 1 is not an object. 2 ExtensionContent.jsm:567:25 TypeError: PrecompiledScript.executeInGlobal: Argument 1 is not an object. 2 ExtensionContent.jsm:567:25-
This reply was modified 6 years, 2 months ago by
Yui. Reason: please use CODE button for proper formatting
Debug doesn’t fix errors, it simply shows more information so you can figure out what is happening.
OK, I think you didn’t follow the instructions quite right. The errors you are showing are from the browser console, instead of the javascript console. These are things that the script doesn’t have any control over (browser internals) and shows everything the browser is doing in all windows. It may help you figure out something about your favicon, but that’s not what you are dealing with now.
What you need to see is called “Console” and it shows the warnings and errors from the Javascript on that one page.Thanks a lot for your help, though I feel rather certain that I followed the instructions on the page you linked to:
Step 1: Try Another Browser – /done!
Step 2: Enable SCRIPT_DEBUG – /done!
Step 2b: Check to see if you are still having an issue – yes, issue persists.Step 3: Diagnosis – Go to the screen where you are experiencing the error. In Firefox, navigate to Tools > Web Developer > Error Console or press Ctrl + Shift + J. – /done!
The console that comes from “Ctrl + Shift + J.” is the one I copied here. There is another console – Web console – which has the short-cut “Ctrl + Shift + K.”
This is the output: https://subsistencematters.net/wp-content/uploads/2020/07/web-console-CTRL-ShiftK.png – also pasted here:
This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. customize.php JQMIGRATE: Migrate is installed with logging active, version 1.4.1 jquery-migrate.js:23:17 Layout was forced before the page was fully loaded. If stylesheets are not yet loaded this may cause a flash of unstyled content. jquery.js:3:25903 JQMIGRATE: jQuery.fn.load() is deprecated jquery-migrate.js:45:12 console.trace() jquery-migrate.js:47:13 jQuery 2 <anonymous> https://subsistencematters.net/wp-content/themes/esotera/cryout/js/customizer-controls.js?ver=1.1.1:7 Uncaught SyntaxError: '' string literal contains an unescaped line break template Underscore template https://subsistencematters.net/wp-includes/js/wp-util.js?ver=5.4.2:39 renderContent https://subsistencematters.net/wp-admin/js/customize-controls.js?ver=5.4.2:4039 inject https://subsistencematters.net/wp-admin/js/customize-controls.js?ver=5.4.2:3703 jQuery 2 inject https://subsistencematters.net/wp-admin/js/customize-controls.js?ver=5.4.2:3699 jQuery 2 when https://subsistencematters.net/wp-includes/js/customize-base.js?ver=5.4.2:537 jQuery 2 when https://subsistencematters.net/wp-includes/js/customize-base.js?ver=5.4.2:522 instance https://subsistencematters.net/wp-includes/js/customize-base.js?ver=5.4.2:368 magic https://subsistencematters.net/wp-includes/js/customize-base.js?ver=5.4.2:98 inject https://subsistencematters.net/wp-admin/js/customize-controls.js?ver=5.4.2:3697 embed https://subsistencematters.net/wp-admin/js/customize-controls.js?ver=5.4.2:3710 gatherSettings https://subsistencematters.net/wp-admin/js/customize-controls.js?ver=5.4.2:3618 initialize https://subsistencematters.net/wp-admin/js/customize-controls.js?ver=5.4.2:3622 Class https://subsistencematters.net/wp-includes/js/customize-base.js?ver=5.4.2:104 child https://subsistencematters.net/wp-includes/js/customize-base.js?ver=5.4.2:43 child https://subsistencematters.net/wp-includes/js/customize-base.js?ver=5.4.2:43 child https://subsistencematters.net/wp-includes/js/customize-base.js?ver=5.4.2:43 child https://subsistencematters.net/wp-includes/js/customize-base.js?ver=5.4.2:43 <anonymous> https://subsistencematters.net/wp-admin/js/customize-controls.js?ver=5.4.2:7859 each jQuery <anonymous> https://subsistencematters.net/wp-admin/js/customize-controls.js?ver=5.4.2:7855 jQuery 4 underscore.min.js:23:36 MouseEvent.mozPressure is deprecated. Use PointerEvent.pressure instead. tinymce.min.js:2:9108
Thank you for the detail. I will ask the docs team if that page has the wrong instructions (wrong console).
This latest information is much more useful. It says that your theme has an old call to a jQuery function. And it might be the cause of the SyntaxError that is reported, but that line of code is deep in the basics of the Customizer and you said you had the problem with the default theme also. So, since the code is simply outputting Customizer controls and complaining about a line break, did you set anything like title or something that both themes have in common, to contain a line break? Did you process the content somehow, with import or some plugin that changes data directly (like search/replace)?Edit: I had the thought that you might have a browser extension that was causing an error (shown in the first error log), but then I remembered you said that the browser didn’t matter.
-
This reply was modified 6 years, 2 months ago by
Joy.
Thanks so much, Joy, you put me in the right direction and I suspected the format of the site title and, indeed, that was the issue. That’s not a feature, though, I would say, but rather a bug, isn’t it? Or enlighten me, please!? 🙂
This is the case:
If the site title is: ‘/:subsistence matters:\’ – then Customize is broken.
If the site title is: ‘subsistence matters’ – then Customize is fine.
And to triple check I did:
(i) changed it back to ‘/:subsistence matters:\’ using the Menu/General Settings and the problem returned.
(ii) changed back to ‘subsistence matters’ and all is fine
(iii) changed it back to ‘/:subsistence matters:\’ using the Customize menu: Customizing ▸ Site Identity -> Site Title – and the problem returns.
(iv) Changed it back to a site title without the use of ‘/:” and ‘:\’ and all is fine.
(v) Finally, just out of curiosity I tried this ‘Site Title’ (with an added space between each respective symbols and the text): ‘/ : subsistence matters : \’ and the bug returns.
Odd isn’t it?
You are probably not aware that
\is a special character. In both PHP and Javascript and CSS, it means to treat the next character differently than if the\wasn’t there. In programming jargon, it is the escape character.
So to get a literal\, you could try to put\\.
No promises, because core already call the strip_slashes function on all the input.Well, I am aware of that, in principle, but I am more than surprised that any character is treated like code in the Site Title field.
It’s not that the character is treated like code. It’s that all the options like site title are saved in the database and then displayed in a browser, using PHP and Javascript (for Customizer), and that content has to be in variables that use these conventions to indicate special characters.
I tried putting a single
\in the title and I see that it causes the problem in Customizer. But when I put\\it shows both of the slashes instead of just one, and there is no problem. This is confusing, but sort of makes sense with what that code is doing: using a regular expression to output the content in Javascript.I will write a Trac ticket for this. My workaround of two slashes fixes the crash, but outputs two slashes instead of one, so do what works for you until they get it fixed.
I created the ticket: https://core.trac.wordpress.org/ticket/50563
You can check back with it to see when a fix happens.
Be sure to remove DEBUG mode if this is a production site.OK, thanks a lot for your help!
DEBUG has been removed, thanks! 🙂
-
This reply was modified 6 years, 2 months ago by
The topic ‘‘Customize’ broken’ is closed to new replies.