his week some of my sites started to have a strange error with the roksprocket plugin. I can not add new posts or pages to a RokSprocket Item, when I click in add I just see a blank space, and the error_log.txt has also a strange error code:
[26-Jan-2022 22:37:07 UTC] WordPress database error Unknown column 'Array' in 'where clause' for query SELECT p.ID as post_id, p.post_author, p.post_date, p.post_content, p.post_title, p.post_excerpt, p.post_status, p.post_password, p.post_name, p.post_name, p.post_modified, p.guid, p.post_parent, p.menu_order, p.post_type, p.comment_count, u.user_nicename, u.display_name, pm.meta_value AS thumbnail_id, CONCAT_WS(",", t.name) AS tags, CONCAT_WS(",", t2.name) AS categories, CONCAT_WS(",", t2.term_id) AS category_ids FROM wp_posts as p LEFT JOIN wp_postmeta as pm ON (pm.post_id = p.ID AND pm.meta_key = "_thumbnail_id") LEFT JOIN wp_term_relationships as tr ON tr.object_id = p.ID LEFT JOIN wp_term_taxonomy as tx ON (tx.term_taxonomy_id = tr.term_taxonomy_id AND tx.taxonomy = "post_tag") LEFT JOIN wp_terms as t ON t.term_id = tx.term_id LEFT JOIN wp_term_relationships as tr2 ON tr2.object_id = p.ID LEFT JOIN wp_term_taxonomy as tx2 ON (tx2.term_taxonomy_id = tr2.term_taxonomy_id) LEFT JOIN wp_terms as t2 ON t2.term_id = tx2.term_id LEFT JOIN wp_users as u ON u.ID = p.post_author WHERE ((p.ID IN (Array,Array,Array,Array,Array,Array,Array,Array,Array,Array,Array,Array,Array,Array,Array,Array,Array,Array,Array,Array,Array) AND ((p.post_type = "post" OR p.post_type = "page" OR p.post_type = "attachment") AND (p.post_status != "auto-draft" AND p.post_status != "inherit")))) GROUP BY p.ID made by do_action('wp_ajax_roksprocket'), WP_Hook->do_action, WP_Hook->apply_filters, roksprocket_admin_ajax, RokCommon_Ajax::run, RokCommon_Ajax_AbstractModel->run, RokSprocketAdminAjaxModelWPArticles->getItems, RokSprocket::getItemsWithFilters, RokSprocket::getItems, RokSprocket_Provider_AbstarctWordpressBasedProvider->getItems
I'd also suggest that you make sure you are using the latest versions of all plugins too.
You didn't say what Gantry version or template that you are using either?
Also, I should point out that roksprocket is nearing the end of it's life. It won't work with PHP8+ - so check you PHP version.
Regards, Mark.
Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
I already did a database repair but the error keeps happening.
Also, there is another E_WARNING in logs:
[27-Jan-2022 21:12:42 UTC] E_WARNING Array to string conversion on /home/bestcasi/public_html/wp-content/plugins/wp_roksprocket/lib/RokSprocket/Provider/Wordpress/Filter.php line 100
But, strangely, the error is just hapenning in half of my websites that use gantry 4 and RokSprocket.
Will you able to help me to solve this issue if I buy a subscription?
So, my recommendation is that you downgrade your PHP version to PHP 7.3.x.
Unfortunately we will not be updating roksprocket any further to deal with this issue. You will see that in that PHP program alone that there are hundreds of uses of that statement that would need to be changed. So, no, I won't be able to fix this for you.
I suspect that the database error happens as a consequence of this issue.
Regards, Mark.
Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
If you fix that line you are then going to have to change hundreds of other lines in the rest of roksprocket.
implode(',', $data)
becomes:
implode($data, ',')
After you change those hundreds of places you then have to repair the database too.
Regards, Mark.
p.s. just changing to PHP 7.3.x won't fix it unless you then repair the database too.
Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.