• Hi, we’re getting this error in the Activity log since the update:

    [2023-07-26 09:07:04] Setting up
    [2023-07-26 09:07:05] Error: (1) Uncaught TypeError: explode(): Argument #2 ($string) must be of type string, array given in /home/xxx/xxx/wp-content/plugins/simply-static/src/tasks/class-ss-fetch-urls-task.php:271
    Stack trace:
    #0 /home/xxx/xxx/wp-content/plugins/simply-static/src/tasks/class-ss-fetch-urls-task.php(271): explode()
    #1 /home/xxx/xxx/wp-content/plugins/simply-static/src/tasks/class-ss-fetch-urls-task.php(61): Simply_Static\Fetch_Urls_Task->find_excludable()
    #2 /home/xxx/xxx/wp-content/plugins/simply-static/src/class-ss-archive-creation-job.php(142): Simply_Static\Fetch_Urls_Task->perform()
    #3 /home/xxx/xxx/wp-content/plugins/simply-static/vendor/a5hleyrich/wp-background-processing/classes/wp-background-process.php(514): Simply_Static\Archive_Creation_Job->task()
    #4 /home/xxx/xxx/wp-content/plugins/simply-static/vendor/a5hleyrich/wp-background-processing/classes/wp-background-process.php(335): WP_Background_Process->handle()
    #5 /home/xxx/xxx/wp-includes/class-wp-hook.php(308): WP_Background_Process->maybe_handle()
    #6 /home/xxx/xxxm/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    #7 /home/xxx/xxx/wp-includes/plugin.php(517): WP_Hook->do_action()
    #8 /home/xxx/xxx/wp-admin/admin-ajax.php(188): do_action()
    #9 {main}
      thrown in /home/xxx/xxx/wp-content/plugins/simply-static/src/tasks/class-ss-fetch-urls-task.php on line 271

    No static files are created anymore…

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Rolf Allard van Hagen

    (@ravanh)

    Update: I found the following weird thing in the plugin settings.

    No idea how that got there (maybe a conversion issue after an upgrade?) but after clearing the field, the fatal error has gone…

    Please make sure to sanitize user input ??

    Plugin Author patrickposner

    (@patrickposner)

    Hey @ravanh,

    thanks for your report!

    It seems the auto-migration wasn’t finished on your installation, but I’m glad you found one of two ways to handle that.

    The other, more “official” way would have been using Simply Static -> Settings -> Utilities-> Migrate Settings.

    We do escape all input on saving settings, but we switched the field type of that particular setting from a nested array of objects to just an array.

    We also convert it on migration, but if that one doesn’t trigger, we don’t have a way to touch the setting otherwise ??

    Cheers,
    Patrick

    Thread Starter Rolf Allard van Hagen

    (@ravanh)

    Ok, I wish I’d known about the manual migration option before. This happened on a WordPress Multsite where the plugin is active on a sub-site and auto-updating is activated on the network level.

    So I would guess that would explain the upgrade process being skipped on the sub-site?

    In what DB table/entry is that setting stored? I might be able to retrieve the old setting from a backup without having to revert all other tables and loose new posts and page modifications…

    Plugin Author patrickposner

    (@patrickposner)

    Hey @ravanh,

    it should auto-upgrade, but we already got some reports where this might have failed for that particular field.

    The old value is stored in the option “simply-static” with the key “urls_to_exclude”

    You can clear it like this:

    $options = get_option('simply-static');
    
    unset($options['urls_to_exclude']);
    update_option('simply-static', $options );
    Thread Starter Rolf Allard van Hagen

    (@ravanh)

    Hi Patrick, thanks ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Uncaught TypeError: explode()’ is closed to new replies.