• Hi,
    I have some issues using Table of Content and Content Filter, hoping you could help me.

    1. The first issue is with the Table of Content; I get this error message in my blog

    `Warning: array_filter() expects parameter 1 to be array, null given in /home/qwinstah/public_html/wp-content/plugins/ultimate-blocks/src/blocks/table-of-contents/block.php on line 10

    Warning: array_values() expects parameter 1 to be array, null given in /home/qwinstah/public_html/wp-content/plugins/ultimate-blocks/src/blocks/table-of-contents/block.php on line 10

    Warning: Invalid argument supplied for foreach() in /home/qwinstah/public_html/wp-content/plugins/ultimate-blocks/src/blocks/table-of-contents/block.php on line 18`

    I also get “The block has encountered an error and cannot be previewed” when editing the blogpost.

    This disabled my Table of Content for the blog post.

    2. My second issue is with the Content Filter, and it seems that the filter categories are not sorting my blog post even if I have added categories to different sections.

    Steps I have tried:
    1. Disabled all other plugins to see if there is a conflict
    4. Tried to add a new table of content
    5. Updated all my plugins to the latest version
    6. Purged cache
    7. Tried on different browsers.

    The problem persists.

    It has worked before, but now the categories and filter are not working.

    Unfortunately, I can’t upload screenshots and don’t want to link to something and break the forum rules, but please look at the link I provided in the “Link to the page you need help with.”

    Thank you.
    Regards

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Alexis Pandaan

    (@alexius08)

    Hi @dinye! We’re currently unable to recreate your issue with the Table of Contents. If you know which version was used when it last worked on your end, we may be able to figure out what causes this issue.

    However, we’ve traced the cause of the content filter issue to a change we recently did to the way the content filter script handles tags across multiple categories. Previously, we set the default matching behavior to “Match all filters”, where panels that would be displayed should have all the currently-selected tags. Around a week ago, we released a new version that set the default linking behavior to “Match any filter”, where panels that would be displayed should have at least one of the currently-selected tags.

    If you want to restore the previous behavior, you can set matching behavior to “Match all filters” under Panel Visibility > Filter options.

    Please let us know how it goes.`

    Plugin Contributor Alexis Pandaan

    (@alexius08)

    Also, when you receive the error message with the table of contents block, have you checked the error message that appears in the developer console? If, like in this screenshot, the source of the error message comes from our blocks.build.js file, you can click on the link, then click on either the “Pretty print” button just above the displayed code, or on the pair of braces that appears at the lower left corner. Both of them should turn the displayed code into something a bit more readable.

    The error message should now reference a specific line within the compiled plugin code. Providing a screenshot would be fine, but clicking on the links should highlight the specific line where the error occurs, and a screenshot of it would be much better.

    Thread Starter dinye

    (@dinye)

    Hello,
    Sorry about me not replying to you.
    The problem went away, but now it seems to be back again and I’m not sure why.

    I’m sorry, but I cannot find the Panel Visibility > Filter Options. Can you be more specific about where I can find that setting?

    Also, Unfortunately I cannot find the same kind of error message you are referring to in your screen-shot in my debugger. I can only find the front.build.js file and it doesn’t seem to have an error.

    Additionally to the error message I get in the live blog post, I also get this in the Gutenberg Editor:

    Warning: array_filter() expects parameter 1 to be array, null given in /home/qwinstah/public_html/wp-content/plugins/ultimate-blocks/src/blocks/table-of-contents/block.php on line 10

    Warning: array_values() expects parameter 1 to be array, null given in /home/qwinstah/public_html/wp-content/plugins/ultimate-blocks/src/blocks/table-of-contents/block.php online 10

    Warning: Invalid argument supplied for foreach() in /home/qwinstah/public_html/wp-content/plugins/ultimate-blocks/src/blocks/table-of-contents/block.php on line 18

    Warning: array_filter() expects parameter 1 to be array, null given in /home/qwinstah/public_html/wp-content/plugins/ultimate-blocks/src/blocks/table-of-contents/block.php on line 10

    Warning: array_values() expects parameter 1 to be array, null given in /home/qwinstah/public_html/wp-content/plugins/ultimate-blocks/src/blocks/table-of-contents/block.php on line 10

    Warning: Invalid argument supplied for foreach() in /home/qwinstah/public_html/wp-content/plugins/ultimate-blocks/src/blocks/table-of-contents/block.php on line 18

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Content filter not working’ is closed to new replies.