• Resolved Hans Schuijff

    (@hanswitteprins)


    I don’t use comments on the single event pages and noticed that a comment validation scripts was loaded when the show comments option in the TEC settings was off. In examining this I discovered that the showcomments option in the setting only blocks comments from being inserted in the page, but the support for comments is still declared and the default value then opens comments on an event page even though TEC wont show them because of it’s own settings.

    This means that in the editor the discussion meta is still displayed when TEC is set to not show comments in events.

    In the code I see that when the showcomment option is set to yes, that the support for comments is added. The problem is that it adds support that is always already there, so this only makes sense when the initial support doesn’t include comments. This is also illustrated by the fact that the support isn’t removed when the setting is not yes.

    It seems to me that this is a bug and the support should not initially be declared via de register_post_type, so it can be added depending on the setting.

    Please change the Tribe__Events__Main->post_type_args declaration/assignment in Main.php.

    Regards,
    Hans

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Deblyn Prado

    (@deblynprado)

    Hi there @hanswitteprins!

    Thank you so much for your feedback and detailed explanation.

    I’ve shared all this info with our Development team.
    I’ll let you know once we have any news about it.

    Thanks again for heads up ??

    Thread Starter Hans Schuijff

    (@hanswitteprins)

    Hi @deblynprado ,

    It’s been a while now, and this bug is still present in the current version. By now, I’ve added some code in my core functionality plugin to compensate for this bug and make sure my comment validation script doesn’t load on event pages, but it seems to me that removing one line of code shouldn’t have to take this long.

    Please remove “comments” from Tribe__Events__Main::post_type_args["supports"] so the setting works correctly again.

    Hope this reminder helps.

    Regards,

    Hans

    Plugin Support Jaime

    (@jaimemarchwinski)

    Hi @hanswitteprins

    Thanks for reaching out again! I’m sorry that we haven’t yet resolved this issue within our plugin, we’ll let you know when we do.

    I’m glad to hear that you have found a workaround for now. Thank you for your patience!

    Cheers,
    Jaime

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove comment support from register_post_type args so the setting works.’ is closed to new replies.