• Resolved chrishinde

    (@chrishinde)


    I get a warning, then an fatal error on the page where I use the Table of Contacts Block.
    Both the plugin (1.4.1) and WP (6.5.2) should be the latest versions.
    This has worked fine before (can’t give a “last confirmed with version xxx”, because it have been updated a couple of times since I checked that page last).
    The page works fine if I disable the plugin.

    Warning: DOMXPath::query(): Invalid expression in /home/h[...].se/wp-content/plugins/table-of-contents-block/includes/helpers.php on line 225
    
    Fatal error: Uncaught TypeError: Argument 1 passed to iterator_to_array() must implement interface Traversable, bool given in /home/h[...].se/wp-content/plugins/table-of-contents-block/includes/helpers.php:225
    Stack trace: #0 /home/h[...].se/wp-content/plugins/table-of-contents-block/includes/helpers.php(225): iterator_to_array(false)
    #1 /home/h[...].se/wp-content/plugins/table-of-contents-block/table-of-contents-block.php(182): TOC_Helper::getHeadersFromContent(Array, '\n<div class="wp...')
    #2 /home/h[...].se/wp-includes/class-wp-block.php(463): {closure}(Array, '\n<div class="wp...', Object(WP_Block))
    #3 /home/h[...].se/wp-includes/blocks.php(1705): WP_Block->render()
    #4 /home/h[...].se/wp-includes/blocks.php(1743): render_block(Array)
    #5 /home/h[...].se/wp-includes/class-wp-hook.php(324): do_blocks('<!-- wp:table-o...')
    #6 /home/h[...].se/wp-includes/plugin.php(205): WP in /home/h[...].se/wp-content/plugins/table-of-contents-block/includes/helpers.php on line 225
    • This topic was modified 7 months, 2 weeks ago by chrishinde.
Viewing 12 replies - 1 through 12 (of 12 total)
  • Hi chrishinde,
    Hope you are doing well.

    I have checked on my end by using the latest version of the Table Of Contents Block but didn’t get any errors on my end. Will you please provide me the URL of the page where you are getting the error so that I can check and assist you?

    Also, please provide us with your Site Health Information so that we can check and assist you? You can get the Site Health Information from WP Admin Dashboard > Tools > Site Health > Info > Copy site info to clipboard: https://d.pr/i/KDbAny and simply just paste it here. Also, you can share the site’s health information by using Pastebin. This will help us to reproduce this issue on our end.

    Hope to hear from you.
    Thank you.

    Thread Starter chrishinde

    (@chrishinde)

    Hi?chrishinde,

    Thank you so much for sharing the details with us. We are looking into this issue deeply based on the info you shared. I will let you know the update after checking it, no worries.

    Thank you for your patience.

    Amit Barai Alit

    (@amitbarai013)

    Hi?chrishinde,
    I hope you are doing well.

    I’m pleased to share the good news that the issue regarding the Table of Contents block has been successfully addressed in the Dev version of the Table of Contents plugin. To ensure you benefit from this fix, kindly download the plugin from here: https://d.pr/f/42hiK7 and install it on your website.

    Let us know how it goes.
    Thank you for your cooperation.

    Hello chrishinde,
    Greetings.

    We haven’t heard from you since then. Can you please inform me whether the issue mentioned above is already fixed or not by using the plugin that I shared already in the previous response?

    Let us know the update.

    Thank you.
    Have a good day!

    Thread Starter chrishinde

    (@chrishinde)

    Hi @amitbarai013

    Sorry, I’ve been caught up in other stuff.

    I download the .zip and replaced the “old” plugin on the site (I also then removed it and reuploaded the new version), but I still get the same error!

    Thanks!

    Hello?chrishinde,

    It seems that the “table-of-contents-block” folder that was created by previously installed Table of Contents Block plugin still exists on your website that is why the new plugin is not getting installed and you are getting an error. In order to resolve this issue, please go to the cPanel and navigate to the File Manager > public_html > wp-content > Plugins > from here, delete the “table-of-contents-block” folder. Then try to install the Table of Contents Block plugin that I shared with you. Also, you can unzip the Table of Contents Block zip file and insert it to the File Manager > public_html > wp-content > Plugins folder.

    Hope this will resolve your issue. Let me know how it goes.
    Thank you.

    Thread Starter chrishinde

    (@chrishinde)

    Hi!

    I assume you mean “table-of-contents-block” and not “betterdocs“? (I don’t have a betterdocs folder, and never have had that installed! Should I?)

    I went in through SSH/SFTP (because I try to avoid cPanel as far ass possible ;D) and removed the old table-of-contents-block folder (under wp-content/plugins), checked that it was gone in the WP UI, and uploaded the dir from the .zip, and activated the plugin. But I still have the same issue!

    Regards, Chris

    Hi chrishinde,

    We are really sorry to hear that. Actually, it is “table-of-contents-block” folder that you need to delete. However, as it is not working on your end, so we need to investigate this issue deeply. We will get to the bottom of this and resolve it as soon as possible. So, can you please contact us here, so that we can investigate this deeply and assist you to resolve this?

    Hope to hear from you.

    Thank you.

    Hi?chrishinde,
    Hope you are doing well.

    I haven’t heard from you since then. I have checked the ticket also on our end also but didn’t get any response on our end. So, I was wondering if your issue has been resolved or not.

    Please let us know. I wish you a good day.
    Thank you.

    Amit Barai Alit

    (@amitbarai013)

    Hello chrishinde,

    Hope you’re doing well.

    As we’re not getting any response from you, we are assuming your issue has been solved. And so, we’re going to mark this topic as resolved now. Please let us know if you face any issues further.

    Thank you!

    Thread Starter chrishinde

    (@chrishinde)

    Hi

    Sorry, due to life issues, and being caught up in other things, this has fallen to the side.

    It’s still not working, but I don’t have the time, or energy, to fault seek this atm. And since this (plugin) isn’t really “mission critical”, I’ll probably just disable it, and maybe find another solution in the future.

    Thanks for your help this far!

    /Chris

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Fatal error: Uncaught TypeError’ is closed to new replies.