• Hi Aurorata

    I’ve been using your excellent plugin for a while now and it’s been working great for us.

    However today any category I visit displays a bunch of PHP warnings (below).

    I’m trying to troubleshoot it. I updated a few plugins today, which included WooCommerce to 4.9.0. However just downgraded that back to 4.8.0 but the warnings still persists.

    It’s obviously something to do with categories (terms)… any idea where I should look to troubleshoot?

    Many thanks

    
    Warning: Illegal string offset 'terms' in /plugins/reorder-post-within-categories/public/class-reorder-post-within-categories-public.php on line 130
    
    Warning: count(): Parameter must be an array or an object that implements Countable in /plugins/reorder-post-within-categories/public/class-reorder-post-within-categories-public.php on line 130
    
    Warning: Illegal string offset 'terms' in /plugins/reorder-post-within-categories/public/class-reorder-post-within-categories-public.php on line 130
    
    Warning: count(): Parameter must be an array or an object that implements Countable in /plugins/reorder-post-within-categories/public/class-reorder-post-within-categories-public.php on line 130
    
    Warning: Illegal string offset 'terms' in /plugins/reorder-post-within-categories/public/class-reorder-post-within-categories-public.php on line 130
    
    Warning: count(): Parameter must be an array or an object that implements Countable in /plugins/reorder-post-within-categories/public/class-reorder-post-within-categories-public.php on line 130
Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter tictok

    (@tictok)

    Just want to report that I decided to hide PHP warnings for now, but the re-ordering doesn’t actually work on the front end.

    However downgrading your plugin back down to 2.9.0 (from the recent 2.9.1 update) fixed the issue for me. PHP warnings gone and re-ordering works again.

    Plugin Author Aurovrata Venet

    (@aurovrata)

    thank for reporting this. I notice a small bug which could be at the origin of these warnings.

    I am releasing a fix shortly, v2.9.2. Let me know if it fixes it.

    Thread Starter tictok

    (@tictok)

    Hi there – thanks for the bug fix!
    Unfortunately there are still issues ??

    The Warning: count(): Parameter must be an array or an object warnings are now all gone, so that’s good.

    However the Warning: Illegal string offset 'terms' in /plugins/reorder-post-within-categories/public/class-reorder-post-within-categories-public.php on line 130 warning remains and the sorting doesn’t work. (I can sort in the back end, but changes don’t display on the front end, and the PHP warnings are visible).

    I’ve tried with nothing other than the default 2021 theme, WooCommerce and your plugin. Nothing else installed or active, just the two plugins.

    Back to 2.9.0 for me. Just thought I’d let you know!
    Thanks

    Screenshots:
    https://snipboard.io/3HwFBN.jpg
    https://snipboard.io/sjTaQX.jpg

    • This reply was modified 3 years, 10 months ago by tictok.
    • This reply was modified 3 years, 10 months ago by tictok.
    Plugin Author Aurovrata Venet

    (@aurovrata)

    Warning: Illegal string offset ‘terms’

    shouldn’t be triggered, unless you have a non-std way of building your queries.

    Can you tell me how you are building your queries which are triggering this warning?

    Thread Starter tictok

    (@tictok)

    Hi there Aurovrata –

    In the example yesterday there was nothing out of the ordinary. No special queries (un-modified/fresh templates), no plugins, default wordpress theme, empty functions.php.

    I wonder if your plugin no longer works with WooCommerce product categories, but I believe they’re really just a standard custom taxonomy.

    A couple of the product categories do have hierarchy… i.e a few categories are children of a parent category.

    I’ll test again on a fresh install today.

    Like I mentioned though, everything works perfectly in 2.9.0 (sorting works as expected, no php warning) –?something changed in more recent versions.

    Many thanks

    Plugin Author Aurovrata Venet

    (@aurovrata)

    I wonder if your plugin no longer works with WooCommerce product categories

    shouldn’t be the case, warning messages are not errors per say. Are you not able to see your products ranked properly?

    I will try to run some test on a WooCommerce setup

    Plugin Author Aurovrata Venet

    (@aurovrata)

    are you still facing this issue?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Warning: Illegal string offset ‘terms’’ is closed to new replies.