0
Welcome Guest! Login
0 items Join Now

RokSprocket Widget

    • Adam's Avatar
    • Adam
    • Newbie
    • Posts: 12
    • Thanks: 0

    RokSprocket Widget

    Posted 2 years 2 months ago
    • 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

      do you have an idea of what It can be?
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: RokSprocket Widget

    Posted 2 years 2 months ago
    • Your subscription appears to have expired. Support does require a current subscription.

      So your database seems to have an error - https://kinsta.com/knowledgebase/wordpress-repair-database/

      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.
    • Adam's Avatar
    • Adam
    • Newbie
    • Posts: 12
    • Thanks: 0

    Re: RokSprocket Widget

    Posted 2 years 2 months ago
    • Hello,

      Gantry version 4.1.21

      RokSprocket Version 2.1.28

      Chapelco Theme

      PHP version 7.4

      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?
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: RokSprocket Widget

    Posted 2 years 2 months ago
    • It's your PHP version that had triggered this behaviour (I presume that you recently updated that)

      If you see the PHP manual for implode here you will see that the parameters for implode have been reversed over what they were previously https://www.php.net/manual/en/function.implode.php .

      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.
    • Adam's Avatar
    • Adam
    • Newbie
    • Posts: 12
    • Thanks: 0

    Re: RokSprocket Widget

    Posted 2 years 2 months ago
    • Hi,

      the website is hosted is a shared hosting. I try to enable PHP 7.3.33 but the issue keeps hapening.

      the Filter.php line 100 have this content:

      $this->article_where[] = 'p.ID IN (' . implode(',', $data) . ')';

      do you have an idea of how it need to be for work with this news PHP rules and temporally fix this issue?
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: RokSprocket Widget

    Posted 2 years 2 months ago
    • 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.

Time to create page: 0.051 seconds