-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
bugSomething isn't workingSomething isn't working
Description
After following the installation instructions with suggested defaults on a local project, a TypeError is thrown when trying to submit a comment from the front end.
Environment
Plugin version: 3.7.7
Kirby version: 5.1.4
PHP: 8.2.0
Steps to Reproduce
- Follow instructions from the official docs, using recommended approach (composer, sqlite).
- Log into Panel and see Komments view as expected.
- Add comment form using default snippets to page.
- Submit a new comment on the front end.
Expected Behaviour
Success message on front end. New unpublished comment in the Komments view in the Panel.
Actual Behaviour
Notice "An error occurred" on front-end. TypeError thrown.
Request:
{"comment":"hey","email":"redacted@redacted.org","author":"Mr Comments","author_url":"","url":"","replyTo":"","replyHandle":"","language":"en","pageUuid":"page://3njrkycblqgouuq8"}
Response:
{"status":"error","exception":"TypeError","code":0,"message":"mauricerenck\\Komments\\KommentReceiver::sendVerificationMail(): Argument #1 ($email) must be of type string, null given, called in REDACTED\/site\/plugins\/komments\/plugin\/routes.php on line 81","details":null,"file":"\/site\/plugins\/komments\/lib\/KommentReceiver.php","line":206}
Workaround
- Comment out line 81 of
komments/plugin/routes.php. - Add
'mauricerenck.komments.spam.verification.filterUnverfied' => falsetoconfig.php(or comments are not displayed in Komments panel view).
Additional Context
- Docs suggest that spam/e-mail verification defaults to
false. - If verification is explicitly disabled (
'mauricerenck.komments.spam.verification.enabled' => false) the issue persists. - Enabling and configuring e-mail verification does not fix the issue as described.
- Note spelling error in
filterUnverfiedconfig setting.
Thanks!
Thank you for your work on this plugin, Maurice! Happy to test a fix or provide more details if needed.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working