• Resolved cbacchini

    (@cbacchini)


    This plugin is fundamental for me, but i have a problem.
    Since sometime (i don’t know exactly when, I tried today for the first time),
    the appearance -> customize admin menu gives an error 500.
    Disabling NavMenuRoles the theme customization page reappears.

    I need NavMenuRoles running (more than theme customization), but if I have to change something in the theme I must temporarily disable the plugin, which is not particularly amusing… also because the menu items hidden via NavMenuRoles appear for all useers in this time lapse…

    Any idea how to fix this ?
    Wordpress version:: 5.6.40

    • This topic was modified 3 years, 1 month ago by cbacchini.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author HelgaTheViking

    (@helgatheviking)

    What theme are you using? And can you reproduce this error with a default theme? Can you turn on WP_DEBUG and WP_DEBUG_LOG see: https://codex.wordpress.org/WP_DEBUG

    Can you check in your browser’s developer console, specifically in the network tab. Anything appear there when the error occurs?

    a 500 error is unfortunately pretty generic so you may need to debug more to provide some insight that I can use to diagnose the issue.

    Gotta say I only got the customizer working with a lot of outside help so it’s not my area of expertise.

    You can use the Health Check plugin to disable NMR only for your user while you edit the theme.

    Thread Starter cbacchini

    (@cbacchini)

    I have upgraded my site to php 7.2.34, and WordPress to 5.7.
    Now everything works, except that activating WP:DEBUG these warnings are displayed:

    Warning: Cannot modify header information – headers already sent by (output started at /home/bacchi5/public_html/massnew2/wp—content/plugins/nav—menu—roles/inc/customizer.php:164) in /home/bacchi5/public_html/massnew2/wp-includes/funclions.php at line 6352

    Warning: Cannot modify header information – headers already sent by (output started at /home/bacchi5/public_html/massnew2/wp—content/plugins/nav—menu—roles/inc/customizer.php:164) in /home/bacchi5/public_html/massnew2/wp-admin/includes/misc.php line1310

    Warning: Cannot modify header information – headers already sent by (output started at /home/bacchi5/public_html/massnew2/wp—content/plugins/nav—menu—roles/inc/customizer.php:164) in /home/bacchi5/public_html/massnew2/wp-admin/customize.php at line 126

    In any case now th plugin works and also the customization.
    Thanks for your help !

    • This reply was modified 3 years, 1 month ago by cbacchini.
    Plugin Author HelgaTheViking

    (@helgatheviking)

    Glad to hear everything is working!

    Could you tell me what screen you are viewing when that notice appears? Looking at line 164 of nav—menu—roles/inc/customizer.php there’s nothing jumping out at me.

    georgemgr

    (@georgemgr)

    Hi

    For informational purposes :

    I am getting the same error – on wp 4.7.19 and php 7.2.34 when I attempt to use the theme customizer it produces a 500 error. When I deactivate the plugin it works ok.

    The error log shows :

    [06-Apr-2021 09:47:13 UTC] PHP Fatal error: Uncaught Error: Call to undefined method WP_Customize_Manager::settings_previewed() in /home/**mysite**/wp-content/plugins/nav-menu-roles/inc/customizer.php:161

    The theme is salient.

    Thanks.
    George

    • This reply was modified 3 years ago by georgemgr.
    georgemgr

    (@georgemgr)

    Just to add in case it helps – I have two sites with the exact same specs – on the other site where the plugin is at version 1.10.2 – this problem does not manifest itself.

    Plugin Author HelgaTheViking

    (@helgatheviking)

    Looks like settings_previewed() was not introduced until WordPress 4.9. https://developer.wordpress.org/reference/classes/wp_customize_manager/settings_previewed/#changelog

    Current version of WP is 5.7 so I would suggest you update your version of WordPress and I will need to update my minimum required version and/or version test the Customizer feature.

    georgemgr

    (@georgemgr)

    Cool, I thought it would be something of the sort, its no biggie for my case, but wanted to let you know since I came up to it.

    Thank you for all the efforts 🙂 Much appreciated.

    Plugin Author HelgaTheViking

    (@helgatheviking)

    I am version testing that particular feature so it should not produce any fatal errors as of the new version.

    Would you consider leaving a review if you like the plugin?
    https://wordpress.org/support/plugin/nav-menu-roles/reviews/

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘theme customization gives error 500’ is closed to new replies.