Project

General

Profile

Actions

Bug #62713

closed

EXT:form - accept-charset in form not working

Added by Julian Stock over 9 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Form Framework
Start date:
2014-11-05
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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);

Actions #1

Updated by Björn Jacob over 8 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
}

Actions #2

Updated by Julian Stock over 8 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)

Actions #3

Updated by Wouter Wolters over 8 years ago

Works perfectly fine for me in current master.

Actions #4

Updated by Julian Stock over 8 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/

Actions #5

Updated by Björn Jacob over 8 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.

Actions #6

Updated by Gerrit Code Review over 8 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

Actions #7

Updated by Björn Jacob over 8 years ago

  • Subject changed from accept-charset in form not working to EXT:form - accept-charset in form not working
Actions #8

Updated by Gerrit Code Review over 8 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

Actions #9

Updated by Morton Jonuschat over 8 years ago

  • Target version set to Candidate for patchlevel
Actions #10

Updated by Gerrit Code Review over 8 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

Actions #11

Updated by Ralf Zimmermann over 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #12

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF