• Resolved frenchoid

    (@frenchoid)


    Hi,
    I have 2 websites both with Parallax Pro, and have recently been simplifying/updating both – removing or replacing Google Maps and other GDPR-unfriendly elements (the law in Germany is very strict).

    One website has worked out fine but the other is now throwing an error every time I hit ‘Save’ anywhere in ‘Appearance/Theme Options’:

    “There has been a critical error on this website. Please check your site admin email inbox for instructions.”

    I can get into the Admin tool no problem, I can add/activate/deactivate plug-ins no problem, and the public-facing site is working just fine. However I cannot do anything in ‘Appearance/Theme Options’ without that error getting thrown.

    The resulting mail gives this:

    An error of type E_ERROR was caused on line 115 of file /mnt/web008/c2/84/5379784/htdocs/klargehn/wp-content/themes/accesspress_parallax_pro/inc/options-framework/includes/class-options-sanitization.php. Error message: Uncaught TypeError: Cannot access offset of type string on string in /mnt/web008/c2/84/5379784/htdocs/klargehn/wp-content/themes/accesspress_parallax_pro/inc/options-framework/includes/class-options-sanitization.php:115
    Stack trace:
    
    0 /mnt/web008/c2/84/5379784/htdocs/klargehn/wp-includes/class-wp-hook.php(287): of_sanitize_multicheck()
    
    1 /mnt/web008/c2/84/5379784/htdocs/klargehn/wp-includes/plugin.php(212): WP_Hook->apply_filters().
    
    2 /mnt/web008/c2/84/5379784/htdocs/klargehn/wp-content/themes/accesspress_parallax_pro/inc/options-framework/includes/class-options-framework-admin.php(267): apply_filters()
    
    3 /mnt/web008/c2/84/5379784/htdocs/klargehn/wp-includes/class-wp-hook.php(289): Options_Framework_Admin->validate_options().
    
    4 /mnt/web008/c2/84/5379784/htdocs/klargehn/wp-includes/plugin.php(212): WP_Hook->apply_filters().
    
    5 /mnt/web008/c2/84/5379784/htdocs/klargehn/wp-includes/formatting.php(4934): apply_filters()
    
    6 /mnt/web008/c2/84/5379784/htdocs/klargehn/wp-includes/option.php(369): sanitize_option()
    
    7 /mnt/web008/c2/84/5379784/htdocs/klargehn/wp-admin/options.php(314): update_option()
    
    8 {main}
    
    thrown
    

    By the way – the diagnostic email gives the following sys info:

    WordPress-Version 5.6.11
    Aktuelles Theme: Accesspress Parallax Pro (Version 4.0.1)
    Aktuelles Plugin:? (Version )
    PHP-Version 8.0.28

    => I have actually updated WP to version 6.2.2 today but there has not been an updated diagnostics mail
    => there is no option to update the Theme, though my other site is on version 4.0.5

    Can anyone help here please? Many thanks in advance!

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

Viewing 1 replies (of 1 total)
  • Thread Starter frenchoid

    (@frenchoid)

    An update: in the meantime I downloaded that php file and corrected the error via another means (ChatGPT!)

    Line 115 originally had this:
    $output = ”;

    ChatGPT said:

    “The error seems to be related to the $output variable, which is initially declared as an empty string ('') and later assigned as an array. This can cause a “TypeError” when trying to access an offset of a string, as the error message indicates.

    To fix the issue, you should initialize $output as an empty array ($output = array();) instead of an empty string.”

    So I made that small edit to the faulty line, and everything now works!

Viewing 1 replies (of 1 total)
  • The topic ‘Critical Error on Theme’ is closed to new replies.