getgrav / grav-plugin-guestbook

Grav Guestbook Plugin
https://getgrav.org
4 stars 10 forks source link

Recaptcha is not showing #14

Closed mikahanninen closed 7 years ago

mikahanninen commented 7 years ago

My site: http://uwc11.beissi.net/guestbook

I have entered guestbook.md by copy pasting example content on the plugin page and just changed the keys. In addition to this I have added JS file told my Google Recaptcha site into base.html.twig.

Browser console shows error recaptcha__fi.js:292 Uncaught Error: Missing required parameters: sitekey

If I manually add <div class="g-recaptcha" data-sitekey="INSERT_KEY_HERE"></div> then the RECAPTCHA shows but ofc not in the place it should appear.

Guestbook plugin v0.5.0 Form plugin v2.3.1 Grav v1.2.2 Admin v1.3.3

mikahanninen commented 7 years ago

I have added screenshot below because I am disabling guestbook on my site for now..

guestbook___unofficial_world_cup
mikahanninen commented 7 years ago

couple things in the grav.log

`[2017-04-17 01:12:38] grav.CRITICAL: A template that extends another one cannot include contents outside Twig blocks. Did you forget to put the contents inside a {% block %} tag? - Trace: #0 /var/www/html/uwc11/vendor/twig/twig/lib/Twig/Parser.php(399): Twig_Parser->filterBodyNodes(Object(Twig_Node_Include)) #1 /var/www/html/uwc11/vendor/twig/twig/lib/Twig/Parser.php(105): Twig_Parser->filterBodyNodes(Object(Twig_Node)) #2 /var/www/html/uwc11/vendor/twig/twig/lib/Twig/Environment.php(692): Twig_Parser->parse(Object(Twig_TokenStream)) #3 /var/www/html/uwc11/vendor/twig/twig/lib/Twig/Environment.php(750): Twig_Environment->parse(Object(Twig_TokenStream)) #4 /var/www/html/uwc11/vendor/twig/twig/lib/Twig/Environment.php(447): Twig_Environment->compileSource(Object(Twig_Source)) #5 /var/www/html/uwc11/vendor/twig/twig/lib/Twig/Environment.php(362): Twig_Environment->loadTemplate('default.html.tw...') #6 /var/www/html/uwc11/system/src/Grav/Common/Twig/Twig.php(346): Twig_Environment->render('default.html.tw...', Array) #7 /var/www/html/uwc11/system/src/Grav/Common/Service/OutputServiceProvider.php(19): Grav\Common\Twig\Twig->processSite('html') #8 /var/www/html/uwc11/vendor/pimple/pimple/src/Pimple/Container.php(113): Grav\Common\Service\OutputServiceProvider->Grav\Common\Service{closure}(Object(Grav\Common\Grav)) #9 /var/www/html/uwc11/system/src/Grav/Common/Processors/RenderProcessor.php(18): Pimple\Container->offsetGet('output') #10 /var/www/html/uwc11/system/src/Grav/Common/Grav.php(126): Grav\Common\Processors\RenderProcessor->process() #11 /var/www/html/uwc11/system/src/Grav/Common/Grav.php(368): Grav\Common\Grav->Grav\Common{closure}() #12 [internal function]: Grav\Common\Grav::Grav\Common{closure}('render', 'Render', Object(Closure)) #13 /var/www/html/uwc11/system/src/Grav/Common/Grav.php(344): call_user_func_array(Object(Closure), Array) #14 /var/www/html/uwc11/system/src/Grav/Common/Grav.php(127): Grav\Common\Grav->__call('measureTime', Array) #15 /var/www/html/uwc11/system/src/Grav/Common/Grav.php(127): Grav\Common\Grav->measureTime('render', 'Render', Object(Closure)) #16 /var/www/html/uwc11/index.php(52): Grav\Common\Grav->process() #17 {main} [] []

[2017-04-17 12:54:30] grav.CRITICAL: Template "guestbook.html.twig" is not defined. - Trace: #0 /var/www/html/uwc11/system/src/Grav/Common/Service/OutputServiceProvider.php(19): Grav\Common\Twig\Twig->processSite('html') #1 /var/www/html/uwc11/vendor/pimple/pimple/src/Pimple/Container.php(113): Grav\Common\Service\OutputServiceProvider->Grav\Common\Service{closure}(Object(Grav\Common\Grav)) #2 /var/www/html/uwc11/system/src/Grav/Common/Processors/RenderProcessor.php(18): Pimple\Container->offsetGet('output') #3 /var/www/html/uwc11/system/src/Grav/Common/Grav.php(126): Grav\Common\Processors\RenderProcessor->process() #4 /var/www/html/uwc11/system/src/Grav/Common/Grav.php(368): Grav\Common\Grav->Grav\Common{closure}() #5 [internal function]: Grav\Common\Grav::Grav\Common{closure}('render', 'Render', Object(Closure)) #6 /var/www/html/uwc11/system/src/Grav/Common/Grav.php(344): call_user_func_array(Object(Closure), Array) #7 /var/www/html/uwc11/system/src/Grav/Common/Grav.php(127): Grav\Common\Grav->__call('measureTime', Array) #8 /var/www/html/uwc11/system/src/Grav/Common/Grav.php(127): Grav\Common\Grav->measureTime('render', 'Render', Object(Closure)) #9 /var/www/html/uwc11/index.php(52): Grav\Common\Grav->process() #10 {main} [] []`

flaviocopes commented 7 years ago

There was this typo in the README: https://github.com/getgrav/grav-plugin-guestbook/commit/18861bef320a34c52928dc5fac427ff81536938e

The captcha used to work even with the typo, but maybe something changed in the latest releases.

mikahanninen commented 7 years ago

I got this plugin working so this issue can be closed. I had to configure email stuff which was told in detail in the plugin page.