• Resolved Chris

    (@renaissancedesign)


    Steps to reproduce: on a WordPress install running a non-block theme (eg Twenty Twenty-One), install and activate the plugin.

    Expected outcome: markup of non-webmention comments is unchanged.

    Actual outcome: native comments lose the <footer class="comment-meta"> wrapper around the author card and comment metadata and the <div class="comment-content"> wrapper around the comment body, mangling the layout if any CSS has been written to target those elements.

    • This topic was modified 8 months, 2 weeks ago by Chris.
    • This topic was modified 8 months, 2 weeks ago by Chris.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Matthias Pfefferle

    (@pfefferle)

    @dshanske this is because of the comment walker I think. Any suggestions how to work around that issue?

    Plugin Contributor David Shanske

    (@dshanske)

    They aren’t Microformats so we should be able to restore them.

    Plugin Author Matthias Pfefferle

    (@pfefferle)

    @dshanske restore? the issue is that the plugin changes the HTML for all comments (including classic comments) on the template level.

    Plugin Contributor David Shanske

    (@dshanske)

    Can try a PR?

    Plugin Contributor David Shanske

    (@dshanske)

    Looking at the code. If it isn’t a webmention, it is calling comment instead of html5_comment. Simple mistake. The code was designed very specifically to not do what it was doing…@pfefferle, you are thinking of the old Semantic Linkbacks version, this version was designed to fallback if webmention was not the protocol. And add some enhancements for customization being called by a themer.

    Thread Starter Chris

    (@renaissancedesign)

    Can confirm that changing Comment_Walker->html5_comment() to call parent::html5_comment() instead of parent::comment() fixes it.

    Can also confirm I feel a bit stupid for not spotting it.

    • This reply was modified 8 months, 2 weeks ago by Chris. Reason: formatting
    Plugin Contributor David Shanske

    (@dshanske)

    Chris, me too…if you look at the code, you can see what I was trying to do. Only take over functionality when warranted, make it easy to customize…

    Thread Starter Chris

    (@renaissancedesign)

    I’ve bodged in the one line fix to my site for the moment, can chuck it in a PR if you like?

    Does this mean the plugin should also extend Walker_Comment->comment() to catch themes that don’t declare html5 support?

    • This reply was modified 8 months, 2 weeks ago by Chris.
    Plugin Contributor David Shanske

    (@dshanske)

    Yes, but figured that it would just show the default comment render on older themes

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Plugin strips markup from non-webmention comments’ is closed to new replies.