• Resolved bastien31

    (@bastien31)


    Hi,

    I encounter a critical error when I am changing and saving the highlight theme. Very strange. Before to start to change themes and pause plugins, I wanted to understand if this error makes some sense for you.

    Thanks

    The error:

    Error Details
    =============
    An error of type E_ERROR was caused in line 68 of the file /home/cs/git/www.example.com/wordpress/wp-content/plugins/prismatic/inc/settings-validate.php. Error message: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in /home/cs/git/www.example.com/wordpress/wp-content/plugins/prismatic/inc/settings-validate.php:68
    Stack trace:
    #0 /home/cs/git/www.example.com/wordpress/wp-includes/class-wp-hook.php(305): prismatic_validate_highlight()
    #1 /home/cs/git/www.example.com/wordpress/wp-includes/plugin.php(189): WP_Hook->apply_filters()
    #2 /home/cs/git/www.example.com/wordpress/wp-includes/formatting.php(4907): apply_filters()
    #3 /home/cs/git/www.example.com/wordpress/wp-includes/option.php(602): sanitize_option()
    #4 /home/cs/git/www.example.com/wordpress/wp-includes/option.php(463): add_option()
    #5 /home/cs/git/www.example.com/wordpress/wp-admin/options.php(314): update_option()
    #6 {main}
      thrown
Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Jeff Starr

    (@specialk)

    Thanks for reporting. I’ve not seen this error before, but would like to resolve if possible. What are the steps to repeat the error on *default* WordPress install?

    Thread Starter bastien31

    (@bastien31)

    Thanks for the quick reply. I didn’t take the time to try it on a free wordpress install.

    On our website, I just did
    – install the plugin and go to settings
    – select highlight.js in the first tab
    – select any theme and save => critical error each time

    I think the problem is on my side because I am the only one to encounter it. It will maybe be hard to reproduce on a fresh wordpress install.

    Plugin Author Jeff Starr

    (@specialk)

    Thanks. Tried the steps but zero errors or issues. Seems to working normally on default WordPress. Probably is interference from another plugin or theme.

    Plugin Author Jeff Starr

    (@specialk)

    Hi @bastien31, just wanted to follow up with this. It’s been awhile with no reply, so I hope the issue is resolved? Or if there is anything I can do to help, please let me know. Thank you.

    Hello @specialk

    I am having the same exact issue on a fresh install of WordPress running on DigitalOcean with no other plugins or themes installed. The active theme is the default Twenty Nineteen. Hopefully this helps. Let me know if there is any other info I can provide that would be useful to you. Thank you!

    [04-Dec-2021 15:11:56 UTC] PHP Warning:  Undefined variable $theme in /var/www/html/wp-content/plugins/prismatic/inc/settings-callbacks.php on line 131
    [04-Dec-2021 15:11:56 UTC] PHP Fatal error:  Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in /var/www/html/wp-content/plugins/prismatic/inc/settings-validate.php:68
    Stack trace:
    #0 /var/www/html/wp-includes/class-wp-hook.php(305): prismatic_validate_highlight()
    #1 /var/www/html/wp-includes/plugin.php(189): WP_Hook->apply_filters()
    #2 /var/www/html/wp-includes/formatting.php(4907): apply_filters()
    #3 /var/www/html/wp-includes/option.php(602): sanitize_option()
    #4 /var/www/html/wp-includes/option.php(463): add_option()
    #5 /var/www/html/wp-admin/options.php(314): update_option()
    #6 {main}
      thrown in /var/www/html/wp-content/plugins/prismatic/inc/settings-validate.php on line 68

    Hello @specialk,

    Just wondering if you saw my update from a week ago and had a chance to look at it yet?

    Thank you.

    Plugin Author Jeff Starr

    (@specialk)

    Yes but not sure if there is anything I can do about it. So far I have not been able to replicate either of the errors on *default* WordPress install. If you have the steps to do so, let me know and I’ll take a look and try to resolve asap.

    Plugin Author Jeff Starr

    (@specialk)

    Still trying to replicate the error on default WP. Do you know which version of PHP is running on the server? That may have something to do with it.

    @specialk – it is version 8.0.11

    Plugin Author Jeff Starr

    (@specialk)

    Thanks for that. I’ll try one more time to replicate the reported error, so far no luck.

    Plugin Author Jeff Starr

    (@specialk)

    Just to follow up, this issue is resolved in the next version (3.0) of Prismatic. Thank you @bastien31 and @fatherofinvention for your help and reporting.

    Great news, thanks Jeff @specialk !

    Plugin Author Jeff Starr

    (@specialk)

    You are very welcome!

    If you get a second (and have not yet done so), please rate the plugin — it really helps to keep the plugin going strong.

    • This reply was modified 2 years, 3 months ago by Jeff Starr.
    Thread Starter bastien31

    (@bastien31)

    That’s great Jeff. Thanks a lot for all this work. I will rate the plugin.

    Was it a tricky bug? It seems it was not easy to replicate.

    Plugin Author Jeff Starr

    (@specialk)

    It was just a bug due to changes in PHP 8.1 and possible previous versions. An easy fix for sure (once I found it lol). Even so a rating would be great πŸ™‚

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Critical error when changing highlight theme’ is closed to new replies.