Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Our site also crashed after update to 3.1.4. I removed the plugin for now, hoping the error will be fixed soon. We got the same TypeError….:

    [14-Dec-2023 02:52:35 UTC] PHP Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, string given in /home/lvbhb/public_html/wp-content/plugins/post-expirator/src/Modules/Settings/Models/SettingsPostTypesModel.php:41
    Stack trace: 0 /home/lvbhb/public_html/wp-content/plugins/post-expirator/src/Modules/Settings/Models/SettingsPostTypesModel.php(41): array_map() 1 /home/lvbhb/public_html/wp-content/plugins/post-expirator/src/Modules/Expirator/Models/PostTypesModel.php(29): PublishPress\Future\Modules\Settings\Models\SettingsPostTypesModel->getPostTypesSettings() 2 /home/lvbhb/public_html/wp-content/plugins/post-expirator/src/Modules/Expirator/Controllers/BulkActionController.php(68): PublishPress\Future\Modules\Expirator\Models\PostTypesModel->getActivatedPostTypes() 3 /home/lvbhb/public_html/wp-content/plugins/post-expirator/src/Modules/Expirator/Controllers/BulkActionController.php(55): PublishPress\Future\Modules\Expirator\Controllers\BulkActionController->addHooks() 4 /home/lvbhb/public_html/wp-content/plugins/post-expirator/src/Modules/Expirator/Module.php(128): PublishPress\Future\Modules\Expirator\Controllers\BulkActionController->initialize() 5 /home/lvbhb/public_html/wp-content/plugins/post-expirator/src/Core/Plugin.php(115): PublishPress\Future\Modules\Expirator\Module->initialize() 6 /home/lvbhb/public_html/wp-content/plugins/post-expirator/src/Core/Plugin.php(108): PublishPress\Future\Core\Plugin->initializeModules() 7 /home/lvbhb/public_html/wp-content/plugins/post-expirator/post-expirator.php(126): PublishPress\Future\Core\Plugin->initialize() 8 /home/lvbhb/public_html/wp-includes/class-wp-hook.php(308): PublishPress\Future{closure}() 9 /home/lvbhb/public_html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters() 10 /home/lvbhb/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() 11 /home/lvbhb/public_html/wp-settings.php(632): do_action() 12 /home/lvbhb/public_html/wp-config.php(102): require_once(‘/home/lvbhb/pub…’) 13 /home/lvbhb/public_html/wp-load.php(50): require_once(‘/home/lvbhb/pub…’) 14 /home/lvbhb/public_html/wp-blog-header.php(13): require_once(‘/home/lvbhb/pub…’) 15 /home/lvbhb/public_html/index.php(17): require(‘/home/lvbhb/pub…’) 16 {main}

    thrown in /home/lvbhb/public_html/wp-content/plugins/post-expirator/src/Modules/Settings/Models/SettingsPostTypesModel.php on line 41

    Thread Starter Klaus Spithost

    (@spithost)

    Hi W,

    Thanks for the reply!

    Checking the existance of the wp_postmeta.meta-column was the first thing I checked and the column exists (I use phpMyAdmin by the way).

    After that I looked at the complete query that is done: SELECT wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.post_type = ‘post’ AND ((wp_posts.post_status = ‘publish’)) ORDER BY wp_postmeta.meta_value+0 DESC, wp_posts.post_date DESC LIMIT 0, 3.

    If you look at the first part of the query: SELECT wp_posts.ID FROM wp_posts, you can see that only wp_posts.ID is asked from the database, and then “ORDERing” the results on a field that isn’t asked in the original query doesn’t seem very logical.

    So THAT’s why I entered my question here. To find out exactly where the query is coming from and get the developers to expand the query to also take the corresponding fields from the wp_postmeta table (which then propably also will have to be JOINed in some way to the ID’s from the wp_posts-table) to get all nessesary fields in the result.
    Because there’s mentioning of WooCommerce as “part of” the codepiece that produces the error, I suspect a ommision in WooCommerce somewhere but I’m not sure….

    After enabling debugging like stated above, I discovered the problem was in a Yith-plugin which caused the error.
    After disabling the (apparent) faulty Yith-plugin, everything worked like a charm.

Viewing 3 replies - 1 through 3 (of 3 total)