Bug #31653
Using captcha in 1.0.15 on Typo3 4.4.11 breaks saving the tt_news entry
| Status: | Closed | Start date: | 2011-11-07 | |
|---|---|---|---|---|
| Priority: | Must have | Due date: | 2011-11-08 | |
| Assignee: | André Steiling | % Done: | 100% |
|
| Category: | Backend Module | |||
| Target version: | - | Estimated time: | 0.50 hour | |
| TYPO3 Version: | 4.4 | Has patch: | Yes | |
| PHP Version: | ||||
| Votes: | 0 |
Description
If the plugin is set to use the captcha library, the $arrNews array contains an entry 'captcha_response' which prevents storing the news entry.
elemente_fenews 1.0.15
Typo3 4.4.11
Two fixes worked for me:
a) disable captcha
b) unset the value in the array
The array looks like this:
a:19:{s:3:"pid";s:3:"525";s:6:"tstamp";i:1320685339;s:6:"crdate";i:1320685339;s:6:"hidden";i:1;s:8:"datetime";i:1320685339;s:8:"category";s:1:"1";s:16:"sys_language_uid";i:0;s:5:"title";s:6:"test14";s:6:"author";s:0:"";s:12:"author_email";s:0:"";s:24:"tx_elementefenews_author";s:1:"0";s:5:"short";s:0:"";s:8:"bodytext";s:6:"test14";s:8:"keywords";s:0:"";s:12:"imagecaption";s:0:"";s:12:"imagealttext";s:0:"";s:14:"imagetitletext";s:0:"";s:5:"links";s:0:"";s:16:"captcha_response";s:5:"HDxbE";}
But it should look like this:
a:18:{s:3:"pid";s:3:"525";s:6:"tstamp";i:1320685457;s:6:"crdate";i:1320685457;s:6:"hidden";i:1;s:8:"datetime";i:1320685457;s:8:"category";s:1:"1";s:16:"sys_language_uid";i:0;s:5:"title";s:6:"test15";s:6:"author";s:0:"";s:12:"author_email";s:0:"";s:24:"tx_elementefenews_author";s:1:"0";s:5:"short";s:0:"";s:8:"bodytext";s:6:"test15";s:8:"keywords";s:0:"";s:12:"imagecaption";s:0:"";s:12:"imagealttext";s:0:"";s:14:"imagetitletext";s:0:"";s:5:"links";s:0:"";}
I've attached a patch and the patched class which fix the issue.
Simply unsetting the value when it is set fixes the issue.
...
// New record
if ($newsUID == 0) {
if (isset($arrNews['captcha_response'])) {
unset($arrNews['captcha_response']);
}
...
History
Updated by André Steiling over 1 year ago
- Due date set to 2011-11-08
- Status changed from New to Closed
- Assignee set to André Steiling
- % Done changed from 0 to 100
Hi Christoph,
your're right. I fixed this small bug and unset the field generally (not only in case of a new record). New version 1.0.16 will be in TER soon.
Thanks!