mauricerenck / komments

A Kirby comment plugin
MIT License
44 stars 8 forks source link

formFeedback not working #42

Closed nordowl closed 2 years ago

nordowl commented 2 years ago

Using version 1.5.1 of this plugin together with Kirby 3.6.1 gives a JSON.parse error upon submitting a comment. The comment gets submitted and I'm able to review it in the dashboard, but the form feedback element div.form-feedback doesn't work as no text appears and the class .moderation-note doesn't get added.

I could fix this problem.

In komments/utils/receiveKomment.php, line 165, I changed the following:

Before (not working) public function sendReponseToClient(string $headlineTranslationString, string $messageTranslationString, number $httpCode, boolean $shouldReturnJson)

After (working) public function sendReponseToClient(string $headlineTranslationString, string $messageTranslationString, number $httpCode, bool $shouldReturnJson)

mauricerenck commented 2 years ago

Can you please tell me, which PHP version you are using?

nordowl commented 2 years ago

I'm using PHP 8.0.2 and XAMPP for local development.

mauricerenck commented 2 years ago

A fix for this is included in https://github.com/mauricerenck/komments/releases/tag/v1.5.2 Can you please confirm?

nordowl commented 2 years ago

Works perfectly!

mauricerenck commented 2 years ago

Great :) thank you for letting me know!