Support » Plugin: SimpleTOC - Table of Contents Block » Class problem in the block

  • Resolved Douglas Ferraz

    (@douglasferraz89)


    @marcdk happy new year, good 2021.

    In version 2.9 the page returns the following error:

    Warning: Undefined array key “className” in \wp-content\plugins\simpletoc\plugin.php on line 88

    So, because of that , I will need to add a class on the block in order to do the plugin to work.

    Another problem : if I use the simpletoc block on the page and a customized class in another block, what happens is that the class is not been included on the page.

    Maybe it’s because of that:

    https://wordpress.org/support/topic/cant-add-class-for-the-block/

    Note: I am using PHP 8.0

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Marc Tönsing

    (@marcdk)

    This warning will be fixed in the next version. Thank you for bringing this to my attention.

    Plugin Author Marc Tönsing

    (@marcdk)

    Fixed in 3.0. Sorry for the inconvenience.

    Thread Starter Douglas Ferraz

    (@douglasferraz89)

    Hi, @marcdk , thanks

    Now if I add a class to the simple toc block the error happens:

    Warning: Undefined variable $classNameAttribute in \wp-content\plugins\simpletoc\plugin.php on line 89

    And that problem persists: if I use the simpletoc block on the page and a customized class in another block, what happens is that the class is not been included on the page.

    Create a title or paragraph and add a class. You will see that it does not appear on the page if you use the simpletoc block.

    Plugin Author Marc Tönsing

    (@marcdk)

    Ok, thank you again. I should have tested the other case with a class set. It is now fixed in 3.1 This only happened on production systems with display_errors on. Nevertheless, this should not happen and is the cause of me not keeping it simple. 😉

    Thread Starter Douglas Ferraz

    (@douglasferraz89)

    @marcdk I’m testing in a development environment.

    No more problems with the classes in the simpletoc block.

    However, if I add a class in a paragraph, in a title, for example. This class does not appear in the paragraph or in the title if I use the simpletoc block on the page.

    Please, then do a test for you to check this.

    Thanks

    Plugin Author Marc Tönsing

    (@marcdk)

    Ok, I think you will find all bugs that 2020 kept hidden. This is more complicated. But can you please check again: only titles have missing custom classes. Paragraphs should work and have their respective custom class. Is that correct?

    Thread Starter Douglas Ferraz

    (@douglasferraz89)

    The paragraphs are working correctly, my fault, I’m sorry.

    But, in other titles, classes are absent.

    I tested on new elements and everything is working. The problem only happens when you manipulate the titles.

    Plugin Author Marc Tönsing

    (@marcdk)

    Yeah, I got it. Please try 3.2. =)

    Thread Starter Douglas Ferraz

    (@douglasferraz89)

    Everything is working very well.

    I just tested here.

    Thanks.

    Plugin Author Marc Tönsing

    (@marcdk)

    I don’t know why the changelog is not being displayed. It seems a problem with ll plugins. But I mentioned you there. Thank you for your help.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Class problem in the block’ is closed to new replies.