• Resolved verkkovaraani

    (@verkkovaraani)


    Hi,

    I have added the Joli Table of Contents on a page as a Gutenberg Block. Everything else works, but if I try to hide a second level (H3) heading by clicking the eye, I get this error in front end:

    Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in?/plugins/joli-table-of-contents/core/Controllers/ShortcodesController.php?on line?218

    And the table of contents does not show. This happens with PHP8.2 and I would assume with 8.3 (that has more errors with other plugins so cannot use that)

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author WPJoli

    (@wpjoli)

    Hi, thank you for reporting this.

    This will be investigated and patched asap. However “deprecated” notices usually don’t cause the plugin to malfunction as they are different from “fatal errors” so I will need to have this tested extensively and try to reproduce this behavior.

    I will let you know!

    Plugin Author WPJoli

    (@wpjoli)

    Hey, I could not exactly reproduce this issue. However, from v.2.1.2 on, this particular warning should not show up again as null values aren’t allowed anymore.

    Please let me know if there’s any improvement,.

    Thread Starter verkkovaraani

    (@verkkovaraani)

    The deprecation warning went away, but now the table of contents does not show if I try to hide any of the headings by clicking the eye. Cant see any error messages either. And I now tried to disable all other plugins so I dont think its a conflict issue either

    Plugin Author WPJoli

    (@wpjoli)

    Hi,

    Thanks for getting back to me.

    Let me try to help you on this. Would you mind sharing your URL with me, export your settings and send those to [email protected] ?

    Thank you

    Thread Starter verkkovaraani

    (@verkkovaraani)

    Hi

    I sent you details. It is the Gutenberg block I am using. It does not work with a fresh installation so I would say it is a bug

    Plugin Author WPJoli

    (@wpjoli)

    Hi, thank you for the details.

    After reading your email, the table of contents did not show up because the option “Minimal headings count” was set to 3 by default, and your TOC only had 2 headings after hiding the items.

    The solution is to set GENERAL > TABLE OF CONTENTS > Minimal headings count option to 0 to have the TOC generated regardless of the headings count.

    Thread Starter verkkovaraani

    (@verkkovaraani)

    Hi

    Thanks, it seems that is the case. Ironically it seems I was always testing it with 3 headings so it seemed like it was the hiding that was the issue. Did not realize there was a setting for that.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Error in PHP8.2’ is closed to new replies.