Forum
Comments does not work
Testing it, doesn't appear to be working, no "Thank you. Your comment has been submitted and will appear on the site once approved." when I fill it in and submit, no output just act on refresh, check contol panel, nothing there as well?
<?php
perch_comments('product123');
perch_comments_form('product123', 'Elasticated garden yoga pants');
?>
Have you added the Comments app to your
config/apps.php
file?Yes I did
Can you add debug to your page and let me know what it outputs?
https://docs.grabaperch.com/docs/installing-perch/configuration/debug/
Thank you. Output:
Is that from your page with the comment form?
If not, add it to the page and submit a comment. The output will likely reveal what's wrong.
Sorry about that:
I can't see any evidence there of the comment form being submitted.
Does the form even display?
Yes it is showing. That is the output after submitted. Does it help to say that I got event listing on the same page as well?
Do you have any URL rewriting in place?
Only thing I did was to hide .php extension in .htaccess
Can you disable that to check that it's not redirecting the posted form and losing the data?
Brilliant, it is working now with that disabled thank you. Look like I will have to do without hiding php
Not necessarily. Which version of Perch are you on?
When you view source on the page, what value is set for the
action
attribute on theform
tag?Version 2.6.3.
Top of the comment script
Bottom
You could add the following condition to your rewrite rule - it will stop it redirecting if it's a POST request: