haassie / rh_recaptcha

TYPO3 extension implementing Google reCAPTCHA
1 stars 9 forks source link

v1.1.1: Can't include template #16

Closed Scunkaneli closed 6 years ago

Scunkaneli commented 7 years ago

Using newest update of rh_recaptcha, I can't include the root template, which leads to this error:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: The Fluid template files "/typo3conf/ext/powermail/Resources/Private/Partials/Form/Field/Recaptcha.html", "/typo3conf/ext/powermail/Resources/Private/Partials/Form/Field/Recaptcha" could not be loaded. | TYPO3Fluid\Fluid\View\Exception\InvalidTemplateResourceException thrown in file /typo3_src-8.7.1/vendor/typo3fluid/fluid/src/View/TemplatePaths.php in line 719

I can include the root template (and use rh_recaptcha) by going back to version 1.0.0 (together with #13).

System: CMS 8.7.1, PHP 7.1.4

Sonezi commented 7 years ago

I have a same issue. after update cant load recaptha template and on my form generate error (Oops an error occurred).. cant complete input on form. I am using recaptcha as another component of form from powermail extension as replacement for powermail captcha... :D

System: CMS 7.6.18, PHP 5.6.26 and Powermail 3.18.2

partial error log

Sun, 14 May 2017 23:18:51 +0200 [ALERT] request="f824e3b945909" component="TYPO3.CMS.Frontend.ContentObject.Exception.ProductionExceptionHandler": Oops, an error occurred! Code: 20170514231850474b2381 - {"exception":"exception 'TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException' with message 'The partial files \"\/var\/www\/vhosts\/test.ch\/httpdocs\/typo3conf\/ext\/powermail\/Resources\/Private\/Partials\/Form\/Field\/Recaptcha.html\", \"\/var\/www\/vhosts\/test.ch\/httpdocs\/typo3conf\/ext\/powermail\/Resources\/Private\/Partials\/Form\/Field\/Recaptcha\" could not be loaded.'

haassie commented 7 years ago

What exactly do you try? Do you only include the static template of the rh_recaptcha plugin? Or do you have some additional typoscript?

Scunkaneli commented 7 years ago

Normally, to use the extension, I first have to include the rh_recaptcha Template into my webpages template. I basically mean this section: "include static template (from extensions)"

With the newest version of rh_recaptcha, there is no template displayed to be included. As I can't include its template, the formular with Recaptcha fails to load, as it is not able to find the rh_recaptcha template.

When I revert back to v1.0.0, the template is again displayed in this "include static template view", I can include it and the forms load correctly.

I hope I was able to discribe it a little better for you! To answer your question: No, I was not trying to include the template via typoscript - I'm just talking about including it via Backend.

haassie commented 7 years ago

I will have a look on it tomorrow morning.

Op ma 15 mei 2017 om 22:58 schreef Scunkaneli notifications@github.com

Normally, to use the extension, I first have to include the rh_recaptcha Template into my webpages template. I basically mean this section: "include static template (from extensions)"

With the newest version of rh_recaptcha, there is no template displayed to be included. As I can't include its template, the formular with Recaptcha fails to load, as it is not able to find the rh_recaptcha template.

When I revert back to v1.0.0, the template is again displayed in this "include static template view", I can include it and the forms load correctly.

I hope I was able to discribe it a little better for you! To answer your question: No, I was not trying to include the template via typoscript - I'm just talking about including it via Backend.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/haassie/rh_recaptcha/issues/16#issuecomment-301602755, or mute the thread https://github.com/notifications/unsubscribe-auth/AKkAlVWPPZXJNxF_85L7593T1rURHRGpks5r6LxagaJpZM4NaGlT .

Sonezi commented 7 years ago

as for me, same as @Scunkaneli ... Same setup same problem... :)

Scunkaneli commented 7 years ago

I just created a fix. @Sonezi, can you confirm it works for you too?

Sonezi commented 7 years ago

@Scunkaneli sorry for delay answer. I can confirm now to have been enable to include recaptcha in static template, but now i have error that appeared to be closed issue...

Exception while property mapping at property path "": It is not allowed to map property "answers". You need to use $propertyMappingConfiguration->allowProperties('answers') to enable mapping of this property.

baden32 commented 7 years ago

I tried to install rh_recaptcha 1.1.1 on Typo3 7.6.18 and I'm also unable to add reCaptcha template (reCaptcha is not listed). The above posts mentionned a fix. Is a fix already available on TER? Regards, Joel

Scunkaneli commented 7 years ago

Hey, the fix above is just a pull request from me which resolved the issue for me. Sadly, @Sonezi was not able to get the extension to work correctly (Seems to be a different issue). So no, the fix is not on TER, as @haassie has not reviewed my changes at the moment.

But you can just download this file, named sys_template.php, and copy it to the following path: /rh_recaptcha/Configuration/TCA/sys_template.php (Most likely, you have to create the TCA folder yourself) That's literally the fix I proposed here on github. Could you please tell us if it worked for you?

@Sonezi: I've already tried to reproduce your issue, but sadly I was not able to do that - everything works fine here. Did you change something else on the plugin (eg. Template, special typoscript or tca,...)? Also, does your system log mention a specific location where this error is dropped (at which file (+line))?

haassie commented 7 years ago

I will check Tuesday.

We have it working correctly on a CMS 8.7.1 installation.

Op vr 19 mei 2017 om 21:09 schreef Scunkaneli notifications@github.com

Hey, the fix above is just a pull request from me which resolved the issue for me. Sadly, @Sonezi https://github.com/sonezi was not able to get the extension to work correctly (Seems to be a different issue). So no, the fix is not on TER, as @haassie https://github.com/haassie has not reviewed my changes at the moment.

But you can just place this file https://github.com/Scunkaneli/rh_recaptcha/raw/52ee036deccc8ea83eeb236a42032e59bfce73b6/Configuration/TCA/sys_template.php (named sys_template.php) on your extension-folder at path rh_recaptcha/Configuration/TCA/sys_template.php and tell me if it worked.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/haassie/rh_recaptcha/issues/16#issuecomment-302786878, or mute the thread https://github.com/notifications/unsubscribe-auth/AKkAlbugPpWZH4sTWV1jc_97nIT8noAuks5r7ejNgaJpZM4NaGlT .

Scunkaneli commented 7 years ago

Okay, thanks! Is it working on CMS 8.7.1 for you with the change I proposed or with another one / without any change on the code?

haassie commented 7 years ago

It works with the code of master.

Op vr 19 mei 2017 om 21:22 schreef Scunkaneli notifications@github.com

Okay, thanks! Is it working on CMS 8.7.1 for you with the change I proposed or with another one / without any change on the code?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/haassie/rh_recaptcha/issues/16#issuecomment-302789491, or mute the thread https://github.com/notifications/unsubscribe-auth/AKkAlfnIS0Oo7gnTxMRpDa6ggrer9UPWks5r7euSgaJpZM4NaGlT .

Scunkaneli commented 7 years ago

Hm that's weird. My cms seems to ignore the addStaticFile-code inside ext_localconf.php What I changed was basically using addStaticFile inside sys_template TCA like described in API documentation instead of using it inside localconf.

Sonezi commented 7 years ago

any new updates for this problem?

Scunkaneli commented 7 years ago

If you are talking about being not able to include the template, then my fix is working fine for me. haassie already said he will have a look on it Tuesday. If you are talking about your problem with mapping the property 'answers', then there is nothing I do know about it. If it will not be fixed by haassie Tuesday, then you could also open an exra issue for it, if you want.

In the meantime, you can of course use version 1.0.0, as this version does not include the problems

Sonezi commented 7 years ago

oke.. no problemo i don't have problems with enabling recaptcha an importing theme to static template, fix have worked this around well.. i try to bypass the given error with version 1.0.0... tnx meanwhile i hope you will find the fix for everything... :)

Sonezi commented 7 years ago

@Scunkaneli Hello I turn off option on powermail (Do you want confimation page) and captcha works, i mean it successfully finish form and complete redirect on home page.. i think that powermail in post request somehow loose information on captha even if it say its valid, but when sending futher it send empty property, maybe thats the error.. can you look into what can it be?

Moongazer commented 7 years ago

For me the current TER version 1.1.1 and also the current master-branch checkout doesn't work. In both versions I can*t select the template in the "include static template (from extensions)" list (it doens't show up there).

TYPO3 7.6.18 PHP 7.0 Windows 8.1

baden32 commented 7 years ago

Did you try the "hack" posted by Scunkaneli (see above) link to replace /rh_recaptcha/Configuration/TCA/sys_template.php Hope this helps

Scunkaneli commented 7 years ago

For now nobody reported my pull request not fixing their issue in over a month. I think it should be safe to include - It has been almost a month since @haassie said he'll look into it. Sadly I can't answer you when it will be fixed in master/on TER. As @baden32 propsed, you should really try #17 and see if it will work for you.

@Sonezi For me both options, either with or without confirmation page, are working - Sadly I can't reproduce your issue.

stroebjo commented 6 years ago

I stumbled over this issue. The fix in #17 words for me! Thanks @Scunkaneli!

Typo3 7.6.18 PHP 7.0

outdoorsman commented 6 years ago

It looks like you've already closed this issue, but I'm experiencing this issue still with rh_recaptcha 1.1.1 in TYPO3 7.6.20. Not sure what else you need from me for more diagnotics. I'm just not able to include the info for rh_recaptcha in my TS template.

Scunkaneli commented 6 years ago

I have an idea why it isn't working:

Do you use the rh_recaptcha 1.1.1 from TER? Because this one was not updated since May 13, so it does not contain the fix. If this is your problem here, you should use the master and it will work. The github version (also labeled v1.1.1) containing the fix has not been uploaded to the TER yet.

outdoorsman commented 6 years ago

Hello @Scunkaneli, great thoughts. I am using composer and it's pointed to typo3-ter/rh-recaptcha. So would that mean that I'm using an up to date version or not... I was having a hard time understanding exactly what was where??

Scunkaneli commented 6 years ago

Hi @Outdoorsman, sorry for the very late reply. If you still weren't able to figure it out or switched to another solution, here's the thing you have to do: Download current master from here (newest version of the ext, newer than on TER). Then you have to upload it to your Typo3 CMS (either via FTP or in the Backend). Then the extension should work.

The fix still was not pushed to the TER so the version on the TER is outdated and does not contain the fix