• Resolved reiseblitz

    (@reiseblitz)


    I am trying to switch my site to a new theme. I could reproduce the initial issue on my live site as well but did all the following testing in my local staging environment.

    Issue: As long as I stick with the current theme, the Customizer works just fine. However, as soon as I switch to another theme, the customizer stops working. It only shows a blank page in the live preview and no options in the left-side menu bar.

    Here is what I have tried/found so far:

    1. WordPress is on version 6.1
    2. Issue occurs in Brave, Chrome and Firefox browsers
    3. Issue occurs on PHP 7.4, 8.0 and 8.1 alike
    4. Cleared all caches
    5. Deactivated all plugins
    6. Resaved permalink settings
    7. The issue also occurs with WordPress standard themes (I tried 2019 and 2021).
    8. The Health Check Plugin did not show any issues or errors
    9. Script Debug did not solve the problem
    10. Replaced wp-admin and wp-includes files with files from a fresh WP install without effect
    11. The JavaScript console does not show any errors

    I get the following error in the PHP error log:

    [12-Nov-2022 12:20:08 UTC] PHP Fatal error:  Uncaught TypeError: parse_url(): Argument #1 ($url) must be of type string, array given in […]\wp-includes\media.php:5098
    Stack trace:
    #0 […]\wp-includes\media.php(5098): parse_url(Array)
    #1 […]\wp-includes\customize\class-wp-customize-upload-control.php(59): attachment_url_to_postid(Array)
    #2 […]\wp-includes\customize\class-wp-customize-cropped-image-control.php(78): WP_Customize_Upload_Control->to_json()
    #3 […]\wp-includes\class-wp-customize-control.php(337): WP_Customize_Cropped_Image_Control->to_json()
    #4 […]\wp-includes\class-wp-customize-manager.php(4985): WP_Customize_Control->json()
    #5 […]\wp-includes\class-wp-hook.php(308): WP_Customize_Manager->customize_pane_settings('')
    #6 […]\wp-includes\class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
    #7 […]\wp-includes\plugin.php(517): WP_Hook->do_action(Array)
    #8 […]\wp-admin\customize.php(292): do_action('customize_contr...')
    #9 {main}
      thrown in […]\wp-includes\media.php on line 5098

    Unfortunately, I cannot make sense of it myself. Hence, any support would be greatly appreciated. Thank you so much!

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • My guess is that the theme you are currently using is storing an invalid value in a common configuration field that the customizer uses. This prevents other themes from loading the Customizer settings.

    Since the theme you are using, Newspaper, is a commercial theme, I’m afraid I can’t tell you more about this. Please contact their support: https://themeforest.net/item/newspaper/5489609/support – questions about commercial themes are not allowed here in the forum.

    Thread Starter reiseblitz

    (@reiseblitz)

    Thank you very much for your super quick response! As the issue persisted even when I completely wiped the Newspaper theme from my staging environment (including all related plugins and database tables) I wouldn’t have thought that the problem could still be caused by it. I will try to go further down that route then.

    Would you know about any general documentation on the Customizer I could use to dig deeper myself here?

    Thanks again!

    The Customizer is described in more detail in the developer’s manual: https://developer.www.ads-software.com/themes/customize-api/

    If you also work with development systems you could also try to install the theme in a fresh WordPress installation, do not change anything in the customizer and then change the theme to a standard theme. If there is a problem in this case as well, it is definitely due to the theme you are using.

    Thread Starter reiseblitz

    (@reiseblitz)

    I quickly tried this and in the first moment things still seem to work. However, that approach is certainly worth exploring further. I’ll play around in my staging and will try to recreate some of the design adjustments I made to see if it breaks at a certain point. I’ll also check with the theme developer’s support and the customizer docs in the meantime.

    Thanks again for pointing me in this direction! This at least turned my dead end into a possible through road again ??

    Thread Starter reiseblitz

    (@reiseblitz)

    Unfortunately, this trace did not lead anywhere. I was not able to recreate the issue in a fresh WordPress install, it only occurs in the live site and its staging copy.

    The theme support meanwhile has also confirmed that they do not use any features from the Customizer.

    Hence, the problem seems to be unrelated to the current theme and I am out of ideas again.

    Thread Starter reiseblitz

    (@reiseblitz)

    I’ve tried quite a bit further meanwhile and the issue does not seem to be related to my current theme. In my staging I have tried out a plugin to completely reset all Customizer setting and I manually deleted all theme files and database tables that seemed to refer to the theme. Still the problem persists with the very same PHP error message as above.

    I created another staging site where I started from scratch to get the Customizer working. I then used WinMerge to compare all files line by line. However, the tool didn’t find any differences that pointed towards this error. All files mentioned in the error message above are exactly identical to the fresh install where things work.

    Hence, I am really out of ideas now and would be super grateful for further traces i could follow or try – thank you to anyone who might have any idea.

    Thread Starter reiseblitz

    (@reiseblitz)

    After a very long time trying and fiddling I finally found a solution to this issue! I tried out several Customizer Reset Plugins and came across this one. Once installed I deleted all the database theme settings it found (there was an unnamed one which I suspect was the culprit). After deleting them all and clearing my browser cache the Customizer screen was back! Can’t tell how happy I am – thus I thought I’d post this here in case anyone else comes across this issue.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Customizer shows blank page’ is closed to new replies.