When I use the captcha module with this theme some description information ("This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.") is missing from the displayed captcha.
The "smart description" feature in this module applies special processing to any element #description.
The captcha module uses a field #description for a different purpose - it's just a normal element as far as captcha is concerned and it should not be processed.
If you can provide a link to some documentation that specifies that #description should only be used for a particular purpose, then I can alter this bug to the captcha module.
Otherwise, there seems to be a bug with this module. It is assuming every instance of #description will have a particular meaning, but modules might not follow that convention.
Thanks!
Comment | File | Size | Author |
---|---|---|---|
#7 | interdiff-2887284-7.txt | 506 bytes | markhalliwell |
#7 | forcibly_disable_smart-2887284-7.patch | 2.12 KB | markhalliwell |
Comments
Comment #2
markhalliwellThere is nothing wrong with either project.
This is a theme setting that can easily be disabled.
Either globally, in the theme settings, or by setting
'#smart_descriptions' => FALSE
on the element in question in your sub-theme (see Element::smartDescription()).Comment #3
AdamPS CreditAttribution: AdamPS at AlbanyWeb commentedThanks for a quick response. Yes, I realise that I can disable the theme setting entirely. No problem I can do that.
My point is that at the moment, when used with the captcha module, the "smart description" setting is buggy - it causes a whole section of the UI to vanish without offering a smart replacement. I have now uploaded attachments correct versus smart - sorry should have done that in the first place.
Seeing as you had put time and effort into "smart descriptions" it could be useful in general. It's a shame if everyone who uses CAPTCHA (currently reported as 275,859 sites) has to spend a while debugging the same problem then eventually disable "smart descriptions" for the whole site.
Comment #4
markhalliwellFor the record, this is not "breaking" anything. It doesn't remove the description, it just moves it into a tooltip to help clean up the UI.
Honestly though, this doesn't seem to be very "vital" information in the first place.
That being said, this isn't the first time that someone has misunderstood the intentions behind what a captcha is and I suspect it's probably because they provide their instructions inside a description property (not an appropriate place IMO, should be separate/dedicated text).
Thus, I'm changing this issue to a feature request and I'll post a patch shortly that should remedy this minor annoyance.
Comment #5
markhalliwellOk, see if this "fixes" it for you. Just make sure you re-enable smart descriptions and then test before/after the patch.
Comment #6
AdamPS CreditAttribution: AdamPS at AlbanyWeb commentedThanks, but not working.
My first thought was to reverse the two lines of code in Captcha::preRenderElement.
However even then it's not working. PluginManager::preRender gets called before PrerenderBase::preRenderElement.
Sorry I'm now getting out of my depth to figure out how to fix it. I can apply another patch if you can figure it out.
Comment #7
markhalliwellTry this.
Comment #8
AdamPS CreditAttribution: AdamPS at AlbanyWeb commentedGreat, many thanks!
I agree with you re instructions versus description. In case it helps any others who find this issue, here is a clarification of the "symptoms".
Is it breaking anything?
UI text was lost.
Is it vital?
well I guess that is up to each site to decide, but we have found it useful and you do see something similar on some major sites.
Comment #10
markhalliwell