Skip to content
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

Comment is not saved. onFormProcessed is not called. #35

Closed
tranduyhung opened this issue Sep 13, 2016 · 5 comments
Closed

Comment is not saved. onFormProcessed is not called. #35

tranduyhung opened this issue Sep 13, 2016 · 5 comments

Comments

@tranduyhung
Copy link

This is the first time I try Comments plugin. The form is shown but comment is not saved.
I have tried on both localhost and a live site (email is working) but the problem still exists.
I have uploaded the site at https://github.com/tranduyhung/grav-skeleton-blog-site, I really appreciate if you can take a look and let me know what I am doing wrong.

I have also tried to modify the form from

form:
    name: comments
    fields:

to

forms:
   comments:
      fields:

but still the same.

As I have debugged, onFormProcessed function is never called.

Thank you!

@flaviocopes
Copy link
Contributor

Which other plugins you have installed?

@tranduyhung
Copy link
Author

Currently I am testing with Blog skeleton, you can see the list of plugins here https://github.com/tranduyhung/grav-skeleton-blog-site/tree/master/user/plugins.
It is the default Blog skeleton + Comments plugin installed,

@flaviocopes
Copy link
Contributor

Mmm, looks like an issue in the latest Form release and Comments. @rhukster do you foresee any issue it might have with Comments adding a form to the page header dynamically? Maybe it's just events ordering?

@rhukster
Copy link
Member

Actually yes, the forms are now processed and cached prior to page content being available in onPageProcessed. This way the forms are all available no matter which page you are on. This is how including forms from other pages is possible. I didn't realize that comments plugin was adding a form dynamically.

This will require some additions in the form plugin to be able to support.. alternatively, comments might be able to be modified to modify/store the page in onPageProcessed like the forms plugin is doing.

@flaviocopes
Copy link
Contributor

Should be fixed by the upcoming Form + Comments plugin release. Update when Grav notifies you of the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants