Skip to content
Grav 2.0 is officially stable. Read the announcement →
Support

Comments breaks contact

Started by Ian 7 years ago · 1 replies · 811 views
7 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 Paul Hodges, 24 hours ago
2 46 21 hours ago
Support · by TomW, 5 days ago
4 103 22 hours ago
Support · by Anna, 5 days ago
4 116 2 days ago
Support · by Anna, 1 week ago
7 203 4 days ago
Support · by Anna, 1 week ago
9 164 4 days ago