Quote from: dubbs at Mar 05, 2018, 05:10 AMSo.. for those looking to get quipReply to work with recaptchaV2 do this...
First install latest version of recaptchaV2 from here - https://modx.com/extras/package/recaptchav2
Make the changes as described in this comment - https://forums.modx.com/thread/103038/quip-with-recaptcha-v2?page=5#dis-post-557140
Then adapt your quipReply to read: [[!QuipReply? &thread=`article-ARTICLESRESOURCEIDHERE-[[*id]]` &preHooks=`recaptchav2` &closeAfter=`0` &moderate=`1` &requireAuth=`0` &recaptcha=`0` ]]
Changing the ARTICLESRESOURCEIDHERE to be the resource ID of your resources blog in your site tree.
Note - you need to make sure you add the: [[!recaptchav2_render]]
<span class="quip-error"> [[!+error.recaptchav2_error]]</span>
to your Reply Form Chunk.
Note - this overrides the suggestion in the comment at https://forums.modx.com/thread/103038/quip-with-recaptcha-v2?page=5#dis-post-557140
Should all work nicely now!
dubbs.
Hi Dubbs
I still can't seem to get this to work with our MODX installation. The steps I have carried out so far are as follows:
1. Installed RecaptchaV2 2.3.0-rc1
2. In core/components/quip/processors/web/comment/create.php found:
$quip->preHooks->loadMultiple($this->getProperty('preHooks',''),$this->getProperties(),array(
and replaced it with this:
$quip->preHooks->loadMultiple($this->getProperty('preHooks',''),$fields,array(
3. Changed the quipReply in resolveQuipComment from:
[[!QuipReply? &thread=`[[+thread]]` &recaptcha=`1` &tplAddComment=`resolveQuipAddComment` &parent=`[[+id]]` ]]
to:
[[!QuipReply? &thread=`article-3-[[*id]]` &preHooks=`recaptchav2` &closeAfter=`0` &moderate=`1` &requireAuth=`0` &recaptcha=`0` ]]
("3" being the relevant Resource ID)
4. In resolveQuipAddComment, changed:
[[+quip.recaptcha_html]]
<span class="quip-error">[[+error.recaptcha]]</span>
to:
[[!recaptchav2_render]]
<span class="quip-error"> [[!+error.recaptchav2_error]]</span>
(NB. as you have most likely noticed, our Quip Chunks have custom names - e.g. resolveQuipAddComment). The v2 form now appears within blog posts, but the page simply refreshes when the form is submitted. If I do not tick the recaptcha box, the form submits / refreshes without error. All comments are moderated, but the comment does not appear in Unapproved Comments in the back-end. I'm not quite sure where I'm going wrong. Any help would be much appreciated.