GiovanniSalmeri/yellow-comment

Unpublished comments show up in search results

Closed this issue · 3 comments

pftnhr commented

Hi Giovanni,

I just did some searching on my site and found an unpublished comment:

Bildschirmfoto 2023-08-28 um 16 55 06

Now I don't know if it's your extension or Yellow's search function.

Thank you very much for the report! Perhaps the first version of YellowComment (which I took over years ago) was written when YellowSearch did'nt exist yet and I have never realised that they interact badly. The simplest solution is to exclude wholly the comments from search results. I think that this can be achieved simply by changing line comment.php:256 like this:

        $content = "---\nTitle: Comment\nStatus: unlisted\n---\n";

But in already created comment pages you should fix by hand the first lines:

---
Title: Comment
Status: unlisted
---

For the published comments to show up properly in search results, the solution is not so easy. Perhaps the whole code of YellowComment should be refactored, I will think about it!

pftnhr commented

For me, comments in the search results would be a nice-to-have but not a must. I'm fine like this, especially since no one ever comes to my site anyway. 😅

I put this in my Todo list 😊