-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some comments are not saved #103
Comments
@bastian42, I have run an automated acceptance test with the Comment plugin.
Would it be possible to create a small reproducible case I could test? |
@pamtbaau, Thank you for your help and testing. I made a screencast of the behavior and attached it to the comment. Unfortunately, I have not discovered a reproducible process that causes the error. test.comments.mp4You are also welcome to try it yourself. I have a test environment and the credentials are: I am grateful for every idea and every hint! |
Nothing was getting saved for me either after I copied over the comments.yaml configuration file. The "disable_on_routes" option seems to break things, but after commenting it out in the yaml it works OK. |
@af7567, I don't think |
@bastian42, Sorry, I've somehow missed your comment... I've just entered a comment on page https://test.2278426.de/blog/000039_regenbogen and it doesn't show up... Without knowing your setup, it's hard to say or test anything. |
@pamtbaau , Yes, I thought that if it was actually disabled on that path then it just wouldn't show any comments stuff at all. But I was getting the comment submission form showing, it just did nothing when clicking submit apart from reload the page. The In my case I only wanted it active for /blog/xxxx paths, so I copied the example yaml and had this at the top
I thought that should be fine since none of the disabled paths match any of my paths, but this way it would show a comment form at the bottom of each blog item but clicking submit doesn't save any comments. After changing to
(commented out the disable_on_routes stuff) I had a quick look through the code and couldn't see why it wold enable the comments form but not enable the edit: I just noticed the problem. The example comments.yaml file doesn't have quotes around the example disabled routes and that is messing up the comparisons somehow. Still strange that it shows the comments box but doesn't accept the form submission :) |
I do believe you experience some unexpected behaviour, however I cannot reproduce any issue wrt. quoted/unquoted strings in Unquoted routes used in comment.yaml show up perfectly in PHP according the debugger. Also, according To Quote or not to Quote?, quotes shouldn't be necessary considering the characters used in the routes. |
You are right, it looks like the route shouldn't need to be inside quotes. |
@pamtbaau: Many thanks for the help. Your comment has not been saved and I have not received an email either. What information do you need? Here are the
|
@bastian42, I've tried your config/template files, but get errors:
I give up. Because I cannot reproduce the issue on skeleton "Blog Site", instead of me trying to reproduce the issue you are experiencing, I would like to suggest you:
|
OK. many thanks for the tips. I will test them and then report. |
My comments stopped working again without any configuration changes. I just found that if I open |
@pamtbaau, I have done the following activities:
-> I have the same problem: some comments are lost! -> I will give up with GRAV and comments... :-( |
Hi,
I have a very mysterious bug with the “comment” plugin: some comments are not saved - about 1 of 10 comments are lost.
I use
on PHP 8.1.0 (I also tested PHP 7.4.25 - same problem)
In the template I have integrated the comments as follows:
{% if config.plugins.comments.enabled%}
{% include 'partials / comments.html.twig' with {'page': page}%}
{% endif%}
The comment fields are also displayed correctly and 9 out of 10 comments are correctly saved and the email is also sent. Only about 1 in 10 comments simply go away (not saved and no mail).
I’ve already checked logs from Grav and Apache, but there is simply nothing to be seen.
There were no unusual signs in my tests. They were structured as follows:
Test date // time // number
Test 30.12.21 // 19:52 // #1
…
Then some of them are missing.
Does anyone have similar experiences or a tip on how I can fix the problem.
Thank you for your support!
The text was updated successfully, but these errors were encountered: