Bug #62713
closedEXT:form - accept-charset in form not working
Added by Julian Stock about 10 years ago. Updated about 6 years ago.
100%
Description
Is there a bug in the form extension? "accept-charset" causes PHP Fatal error: Class 'TYPO3\\CMS\\Form\\Domain\\Model\\Attribute\\Accept-charsetAttribute' not found in /var/www/htdocs/typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 4370
Quick fix in GeneralUtility.php on line 4325:
$className = str_replace("Accept-charsetAttribute", "AcceptCharsetAttribute", $className);
Updated by Björn Jacob about 9 years ago
- Category set to Form Framework
- Status changed from New to Needs Feedback
- Assignee set to Julian Stock
I've tested this issue with the following example form. I've created it with the help of the form wizard.
- TYPO3 v6.2: All elements and attributes are rendered as expected.
- TYPO3 v7: Same as above.
IMHO there is no problem with this attribute.
@Julian: Can you test the issue again and tell me your results?
accept = ISO-8859-1 action = action class = class dir = rtl enctype = multipart/form-data id = id lang = de_DE method = post style = border:1px solid red; title = title prefix = tx_form confirmation = 1 postProcessor { 1 = mail 1 { recipientEmail = your@mail.com senderEmail = your@mail.com subject = Test } } 10 = TEXTLINE 10 { name = name label { value = Name } } 20 = SUBMIT 20 { name = 3 value = Formular absenden }
Updated by Julian Stock about 9 years ago
The attribute is called "accept-charset" (http://www.w3schools.com/tags/att_form_accept_charset.asp). Try it and you'll get an empty page, just tested it 2 minutes ago with a TYPO3 6.2.9.
("accept" is used for mimetypes, see http://www.w3schools.com/tags/att_form_accept.asp)
Updated by Wouter Wolters about 9 years ago
Works perfectly fine for me in current master.
Updated by Julian Stock about 9 years ago
Tested just a second ago on TYPO3 6.2.15:
prefix = tx_form confirmation = 0 accept-charset=UTF-8 postProcessor { 1 = mail 1 { recipientEmail = host@domain.tld senderEmail = host@domain.tld } } 10 = SELECT 10 { name = standort label { value = Standort } 10 = OPTION 10 { data = Bitte wählen value = Keine Auswahl } 20 = OPTION 20 { data = Ort1 value = Ort1 } 30 = OPTION 30 { data = Ort2 value = Ort2 } 40 = OPTION 40 { data = Ort3 value = Ort3 } } 20 = SELECT 20 { name = anrede label { value = Anrede } 10 = OPTION 10 { data = Herr } 20 = OPTION 20 { data = Frau } } 30 = TEXTLINE 30 { name = nachname label { value = Nachname* } } 40 = TEXTLINE 40 { name = vorname label { value = Vorname* } } 90 = TEXTAREA 90 { cols = 40 rows = 5 name = nachricht label { value = Ihre Nachricht* } } 110 = SUBMIT 110 { name = 5 value = Abschicken } rules { 1 = required 1 { breakOnError = 0 showMessage = 1 message = Benötigt error = Dies ist ein Pflichtfeld element = nachname } 2 = required 2 { breakOnError = 0 showMessage = 1 message = Benötigt error = Dies ist ein Pflichtfeld element = vorname } 4 = required 4 { breakOnError = 0 showMessage = 1 message = Benötigt error = Dies ist ein Pflichtfeld element = nachricht } }
Result:
[Mon Nov 02 08:52:39 2015] [error] [client xxx.xxx.xxx.xxx] PHP Fatal error: Class 'TYPO3\\CMS\\Form\\Domain\\Model\\Attribute\\Accept-charsetAttribute' not found in /var/www/xxx/html/typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 4440, referer: http://www.domain.tld/
Updated by Björn Jacob about 9 years ago
- Status changed from Needs Feedback to New
- Assignee deleted (
Julian Stock)
Can confirm this on 6.2. On 7 master it works like a charm. So we should tackle this issue for 6.2.
Updated by Gerrit Code Review almost 9 years ago
- Status changed from New to Under Review
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/44955
Updated by Björn Jacob almost 9 years ago
- Subject changed from accept-charset in form not working to EXT:form - accept-charset in form not working
Updated by Gerrit Code Review almost 9 years ago
Patch set 2 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/44955
Updated by Morton Jonuschat almost 9 years ago
- Target version set to Candidate for patchlevel
Updated by Gerrit Code Review almost 9 years ago
Patch set 3 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/44955
Updated by Ralf Zimmermann almost 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 02e124bc8fd79833fd4d58752a048e6806dce795.