• Resolved wpadmi

    (@wpadmi)


    Hello,
    We got a fatal error when we tried to edit and save the dynamic widget:

    Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, string given in /data/web/virtuals/83224/virtual/www/wp-content/plugins/dynamic-widgets/dynwid_admin_save.php:313 Stack trace: #0 /data/web/virtuals/83224/virtual/www/wp-content/plugins/dynamic-widgets/dynamic-widgets.php(664): require_once() #1 /data/web/virtuals/83224/virtual/www/wp-includes/class-wp-hook. php(324): dynwid_init(“) #2 /data/web/virtuals/83224/virtual/www/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #3 /data/web/virtuals/83224/virtual/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #4 /data/web/virtuals/83224/virtual/www/wp-settings.php(643): do_action(‘init’) #5 /data/web/virtuals/83224/virtual/www/wp-config. php(90): require_once(‘/data/web/virtu…’) #6 /data/web/virtuals/83224/virtual/www/wp-load.php(50): require_once(‘/data/web/virtu…’) #7 /data/web/virtuals/83224/virtual/www/wp-admin/admin. php(34): require_once(‘/data/web/virtu…’) #8 /data/web/virtuals/83224/virtual/www/wp-admin/themes. php(10): require_once(‘/data/web/virtu…’) #9 {main} thrown in /data/web/virtuals/83224/virtual/www/wp-content/plugins/dynamic-widgets/dynwid_admin_save.php on line 313

    The dynamic widget was changed to static after this error and there is no way back.

    Eventually, we found the solution by downgrading the PHP version on our development site to 7.4. After this downgrade, the problem disappeared.

    Here is our production site setting:
    WP: 6.4.3
    PHP: 8.1.1.4
    Dynamic Widgets: 1.6.2

    https://www.dropbox.com/scl/fi/dqg9t27wmd8imhy423xsg/server-3.png?rlkey=hnhoubi5peej5afa25v6dqmlz&dl=0

    https://www.dropbox.com/scl/fi/do4cyolzppbe820blppht/dynamic-widgets.png?rlkey=lk2yeeiik1fuf6cegb5e7h2yw&dl=0

    Can you please fix this error?

    Thank you very much.

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author vivalex

    (@vivalex)

    We will take a look, thanks for the detailed write-up. Do you have any idea when (date) the Dynamic Widgets 1.6.2 plugin was first installed?

    • This reply was modified 8 months, 3 weeks ago by vivalex.
    • This reply was modified 8 months, 3 weeks ago by vivalex.
    Thread Starter wpadmi

    (@wpadmi)

    Hello,
    The 1.6.2 version was updated more than a month ago, but as our colleague confirmed, this problem was also present in the previous version and has been around for a long time.

    Many thanks for your help.

    Thread Starter wpadmi

    (@wpadmi)

    Hello, do you have any update/info? Thank you.

    Plugin Author vivalex

    (@vivalex)

    Hi, we’ve had a chance to take a look and can’t reproduce the issue. Here’s the specs of the testing platform (very similar):

    PHP: 8.2
    WP: 6.4.3
    Dynamic Widgets: 1.6.2

    I’m wondering exactly what options you are using for the widget. Can you share the minimal case and and the dump from /wp-admin/themes.php?page=dynwid-config page?

    Additionally, you may try deactivating the plugin and actually deleting it’s files (if you have server access) then reinstalling it. Please confirm if you’ve tried this.

    Thanks,
    Alex

    Plugin Author vivalex

    (@vivalex)

    Hi,

    We’ve rolled out the fix in 1.6.3, please update and let us know if you have any further issues.

    Thanks,
    Alex

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fatal Error with PHP 8.1’ is closed to new replies.