Jump to content
adrian

Comments approval bug?

Recommended Posts

Hi,

Has anyone else come across an issue with the approval link in the comment emails?

The message is: "Invalid comment code or code has already been used" but the problem is that no code or subcode was ever created in the DB table.

I am seeing this on all comments on a new site I am finishing up, but looking back at another site using the comment system I see that sometimes no code was entered there either.

I thought it might be related to logged in users, but even guest users don't get the code and same goes for users without already approved comments.

Anyone also seeing something like this?

 

Share this post


Link to post
Share on other sites
1 hour ago, adrian said:

Has anyone else come across an issue with the approval link in the comment emails?

Not on a site, but I have noticed something similar (If I recall correctly), when approving comments sent to me by ProcessWire for approval with respect to comments left on my modules' pages in the modules directory (hope this makes sense...Friday, tired and all that 😄).

  • Like 1

Share this post


Link to post
Share on other sites

Thanks @kongondo - sounds like I'll have to investigate a bit further to see if I can narrow it down and possible file a bug report.

Share this post


Link to post
Share on other sites

Ok, I went a wandering into the comments fieldtype code and discovered it was because the schemaVersion setting for the field was set to "1" whereas it should be "6". I've made that change and it seems to be working fine now. As to why it was set to 1 and not 6, I have no idea - maybe someone else will come across this and it will help them to solve it as well.

  • Like 3

Share this post


Link to post
Share on other sites
On 3/15/2021 at 6:26 PM, adrian said:

Ok, I went a wandering into the comments fieldtype code and discovered it was because the schemaVersion setting for the field was set to "1" whereas it should be "6". I've made that change and it seems to be working fine now. As to why it was set to 1 and not 6, I have no idea - maybe someone else will come across this and it will help them to solve it as well.

Can you narrow things down for me adrian? I'm having the same problem but there's a lot of code to go through and I don't know where to look.

Please.

Share this post


Link to post
Share on other sites
27 minutes ago, digitex said:

Can you narrow things down for me adrian? I'm having the same problem but there's a lot of code to go through and I don't know where to look.

Please.

Just a matter of changing the value in the field's settings JSON.

image.png.392085ae083a6a56267cd0f1fb8569c1.png

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for the hint @adrian. The interface looks very different on my end but I found the settings. Seems my problem is different in more than one way: the schemaVersion is already set to 6.

I don't see a message like you described, the approval email simply does nothing when clicking the approve link i.e. pending comments remain pending. I had hoped your issue and mine may have had a similar solution.

Share this post


Link to post
Share on other sites

@digitex - that interface is simply "Adminer" which I include as part of Tracy. Of course you can view this via PHPMyAdmin or a desktop client like SequelAce.

But it sounds like it's no use to you anyway. Hope you can dig in further and figure out what the problem might be.

Share this post


Link to post
Share on other sites
5 hours ago, adrian said:

@digitex - that interface is simply "Adminer" which I include as part of Tracy. Of course you can view this via PHPMyAdmin or a desktop client like SequelAce.

But it sounds like it's no use to you anyway. Hope you can dig in further and figure out what the problem might be.

I figured it was tracy, I was just marvelling at how much easier it is to read than phpMyAdmin.

I found a solution here:

This works. It's an odd behaviour for the Approve Now button in the notification email to only work when comments are rendered through the render function. I can work with it though 😂

Thanks for your help.

  • Like 1

Share this post


Link to post
Share on other sites

Glad you got it sorted - if it's not already, I think this should be posted as an issue on Github. We desperately need to start culling these weird inconsistencies that waste hours of time and make you go grey 🙂

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...