Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
FieldtypeComments: default action URL incorrect if template trailing slash setting is "No" #866
Short description of the issue
The default action URL defined in CommentForm.php is './', but if the template setting "Should page URLs end with a slash?" is "No" then the comment form submits to the parent page.
Although a custom action can be supplied to
Related forum topic: https://processwire.com/talk/topic/21427-comments-not-saving/
Suggestion for a possible fix
Set the action to the current page URL in the CommentForm constructor.
At line 80:
'action' => '',
At line 164:
// default action $this->options['attrs']['action'] = $this->wire('page')->url;