• Resolved damianhay

    (@damianhay)


    Hello,
    on new WP page without content I get fatal error when I try to add new css or js code:

    “Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /szkola/wp-content/plugins/custom-css-js/includes/admin-screens.php:1436 Stack trace: #0 /szkola/wp-includes/class-wp-hook.php(287): CustomCSSandJS_Admin->edit_form_before_permalink(Object(WP_Post)) #1 /szkola/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(”, Array) #2 /szkola/wp-includes/plugin.php(484): WP_Hook->do_action(Array) #3 /szkola/wp-admin/edit-form-advanced.php(532): do_action(‘edit_form_befor…’, Object(WP_Post)) #4 /szkola/wp-admin/post-new.php(75): require(‘/szkola/wp-admi…’) #5 {main} thrown in /szkola/wp-content/plugins/custom-css-js/includes/admin-screens.php on line 1436″

    I tried to reinstall plugin but that doesn’t help. I use Astra theme with Elementor. On other pages that works fine.
    Kind regards, Damian.

    • This topic was modified 3 years, 2 months ago by damianhay.

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Diana Burduja

    (@diana_burduja)

    Does the error show up only when changing the permalink or does it show up also when leaving the permalink to the default?

    Thread Starter damianhay

    (@damianhay)

    It show up on default as well in same line (admin-screens.php on line 1436).

    Plugin Author Diana Burduja

    (@diana_burduja)

    I’m afraid I cannot replicate the issue no matter what I do.

    On the 1436 line there are only two variables used. Theoretically the error shows up because one of the variables should be an array, but it is a string instead. So I’ve manipulated the two variables to be strings on my test computer and tried to see the error with PHP5, PHP7 and PHP8. Everything works alright. Installed Elementor and Astra theme, everything works alright.

    Could you give me more information about your website? WordPress, PHP and Apache versions.

    Could you download an older version of the plugin from here, for example 3.0, and see if that works?

    Getting the same issue.

    Running WordPress 5.6.2 with PHP 8.0.2 on IIS 10.

    Using version 3.0 works, but the current version gives the same fatal error as OP.

    Thread Starter damianhay

    (@damianhay)

    I installed version 3.33 and error was:
    Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /szkola/wp-content/plugins/custom-css-js/includes/admin-screens.php:1428 Stack trace: #0 /szkola/wp-includes/class-wp-hook.php(287): CustomCSSandJS_Admin->edit_form_before_permalink(Object(WP_Post)) #1 /szkola/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(”, Array) #2 /szkola/wp-includes/plugin.php(484): WP_Hook->do_action(Array) #3 /szkola/wp-admin/edit-form-advanced.php(532): do_action(‘edit_form_befor…’, Object(WP_Post)) #4 /szkola/wp-admin/post-new.php(75): require(‘/szkola/wp-admi…’) #5 {main} thrown in /szkola/wp-content/plugins/custom-css-js/includes/admin-screens.php on line 1428

    I changed theme on Twenty one and it doesn’t help.
    My server php: 8.0.2
    Apache on Linux 2.6.32-ogcopenvz042stab141.3 x86_64

    Thread Starter damianhay

    (@damianhay)

    On version 3.0 works fine.

    Plugin Author Diana Burduja

    (@diana_burduja)

    In the plugin’s 3.36 version the error should be fixed.

    Thread Starter damianhay

    (@damianhay)

    Thank you 😉

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘admin-screens.php fatal error’ is closed to new replies.