Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Comments breaks contact

Started by Ian 8 years ago · 1 replies · 938 views
8 years ago

I'm having a problem with the comments plugin. It works as expected but once a comment has been added to a given post, the contact page stops working with the following error:
"Unable to add function "recent_comments" as extensions have already been initialized."

Note that the contact page does not call the comments twig, which is only called in the blog item twig while the comments page uses the default twig.

7 years ago

For posterity...

When I posted I was imagining the problem to be with the comments plugin as I've had it cause the same error in other situations.

However it turns out to be the reCAPTCHA Contact plugin that's buggy in this case.

Solution: In comments.yaml, disable the route associated with the contact page (i.e. /contact).

last edited 04/16/19 by Ian

Suggested topics

Topic Participants Replies Views Activity
Support · by webmasterodp, 7 days ago
4 145 6 days ago
Support · by nwhitfield, 1 week ago
2 126 1 week ago
Support · by stell, 3 weeks ago
5 364 2 weeks ago
Support · by gravinator, 1 month ago
5 556 2 weeks ago
Support · by Gravver, 3 weeks ago
6 344 3 weeks ago