Comment Shortcodes Not Working
-
Hi @lallarookh,
Thanks for your message.I’ve just tested this but can’t replicate the issue.
I’ve tested by:- Adding a ‘New Comment Awaiting Moderation’ notification and including all of the shortcodes available from this page: https://betternotificationsforwp.com/documentation/notifications/shortcodes/?notification=moderate-comment
- Ensuring all comments are held for moderation in WP Admin > Settings > Discussion.
- Logging in as another user with the Subscriber user role so that their comments are held for moderation.
- Left a comment on a post as that user and confirmed the ‘Your comment is awaiting moderation. This is a preview; your comment will be visible after it has been approved.’ message is shown.
- Checked the email log to see the notification had been sent to the correct users.
- Logged in as an administrator again and clicked the ‘Approve’ link in the email that was generated by the
[comment_moderation_approve]shortcode, which took me to the correct page.
Please let me know if you’d like me to test in a different way.
Hi, thanks so much for your timely reply.
- Yes, those were the shortcodes I was pulling from
- Yes, all comments are currently being held for moderation
- I was working within admin a/o editor level roles (and the site does not have subscribers, so only the public may comment (as mentioned in bullet 2, all comments are held for moderation).
- I do get the message that says, “Your comment is awaiting moderation” after a public comment is left on the post
- Notifications are being sent to the correct users (editor (and editor in this instance is also the post author), and the site admin is also set to and getting the notification)
- I am still not getting a live “approve” link via the applicable shortcode in the email notifications being sent (or for links for delete, moderate, and spam shortcodes)
I have also tried deactivating other plugins (no success). I have not tried reverting to a default wp theme to test this because my current theme is necessary, though it is regularly updated and I haven’t had any conflicts with it for any of the other plugins I’ve tried so far.
I understand that based on what you’ve tested for my issue, it sounds like the problem is on my end and likely the theme, so what I have done is just deactivate your plugin.
I love your turnaround time on assistance here in the forums, and your plugin was simple to set up as well as working as expected…except for those darn non-functional url based shortcodes mentioned above!
Hope to use your plugin in the future with a different project and thank you!
Hi @lallarookh,
Not a problem.I would recommend testing with a non-admin or non-high-end user, such as a Subscriber to see if it works better. It may well be sending out the notification but with no reason to moderate the comment. If so, this would be a bug I’d need to investigate.
Let me know how you get on?
Hi, there are no subscriber levels for the site – just one admin and one editor allowed access. Other than replies to comments from the site editor (who is also the blog’s author), comment notification triggering would only ever be from public viewers, not logged in and with no relationship to the site.
When testing your plugin, I did trigger all comment alerts while logged out of the system as a would-be “random blog reader” and inputting a commenter email (required on the site for comment submission) that the site does not have in its system. All comments submitted to the site are held for moderation and not posted until the admin or editor level user gets the notification and takes action with it.
So, I believe I was testing as a non-high end user. What do you think?
Hi @lallarookh,
Thanks for the extra info.I’ve just tested this by commenting as a non-logged in user and it triggered the notification and included the comment moderation links as expected again.
How are comments made on your site? Is it using the default form, a custom form, or a plugin, such as Disqus?
Hi, the site uses the default for wp, no plugin or customization for the comment system. Between the two of us, with the testing we’ve done so far, I am nearly sure it is something in the theme! I haven’t had a chance to set this up in a staging environment, but when I do, I’ll re-test to confirm it and let you know.
Hi @lallarookh,
No problem – let me know how you get on.
The topic ‘Comment Shortcodes Not Working’ is closed to new replies.
(@lallarookh)
2 years, 4 months ago
Hi, I am working on a new comment/moderate new comment email alert with your plugin. The following three shortcodes are not working and I am hoping you can help me resolve this:
Comment Moderation – Approve: [comment_moderation_approve]
Comment Moderation – SPAM: [comment_moderation_spam]
Comment Moderation – Delete: [comment_moderation_delete]
Within the email, the recipient sees this (no links or anything else – just plain text):
Comment Moderation – Approve: Approve
Comment Moderation – SPAM: SPAM
Comment Moderation – Delete: Delete
I have tried setting this alert up as both a “new comment” alert and a “moderate new comment” alert but the approve/spam and delete shortcode urls don’t work with either option. I have also tried adding these with a href/html as I’ve seen suggested elsewhere and there is no change (i.e. still no link even with the a href added). Example: <a href=”[comment_moderation_approve]”>Approve Comment</a>
All other shortcode links that I have added to the alert are working perfectly! Thanks much for your time and help.