Project

General

Profile

Actions

Bug #18427

closed

Required fields within flexform section elements cause Javascript errors

Added by Jeff Segars about 16 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2008-03-11
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If a flexform uses section elements with required fields, a Javascript error is generated as soon as the form is loaded and that flexform cannot be saved.

I believe this is related to changeset 2628, which made significant enhancements to section handling. To see the error in action, check out the Scoring Tab within the pb_survey plugin.

The error message is "document[TBE_EDITOR.formname][elementName] has no properties". Once the required eval is removed, the Javascript errors go away because the code causing the error is no longer executed.

(issue imported from #M7829)


Files

7829_required_check.diff (1.28 KB) 7829_required_check.diff Administrator Admin, 2008-03-11 23:36
0007829.patch (1.55 KB) 0007829.patch Administrator Admin, 2008-03-17 17:58

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #18429: required fields in Flexform are not correct marked with Exclamation SignClosed2008-03-12

Actions
Is duplicate of TYPO3 Core - Bug #18751: JavaScript error in TBE_EDITOR causes login expired dialogClosedOliver Hader2008-05-06

Actions
Actions #1

Updated by Steffen Kamper about 16 years ago

i fixed the JS Error with the patch.

This is only one half. With IRRE the naming of the field differs from record to record so JS has to search in childs for matching field.

For first i returned true in this case and marked it with TODO

Actions #2

Updated by Oliver Hader about 16 years ago

Hm, how can I test/reproduce this?
I fetched pbsurvey v. 1.2.0 from TER but could not find the string "inline" in the whole extension. Thus, I don't understand, where the IRRE factor comes into this game... Please enlighten me! :)

Actions #3

Updated by Steffen Kamper about 16 years ago

Hi Olly,

fine that you stumble also :-)
This technique is new for me, in flexform the element (eg result) is declared as array with section=1, i think this is the part doing the magic.

To reproduce it following steps:
1) got to a page and create a CE with pbsurvey
2) go to scoring tab, add a element and enter a value for scoring
3) save it

Actions #4

Updated by Oliver Hader about 16 years ago

Thanks Steffen. I can reproduce this behaviour resulting in my back-end session getting cleared.
This new technique for flexforms feels like IRRE, but isn't. That's why I stumbled and was astonished how this could be related to IRRE if it isn't defined anywhere in the pbsurvey extension.

Actions #5

Updated by Steffen Kamper about 16 years ago

I would propose to use the patch as first step so it will work (only required will not be checked in this special case)

Secondly the required check in eval script should be enhanced, i have no quick solution herefore, i also miss any documentation about this feature.

Actions #6

Updated by Oliver Hader about 16 years ago

I've attached a new patch which is very similar to Steffen's.
Currently there's no other solution to fix it since it goes much deeper to handle the flexform thingy which ignores nearly any other TYPO3 parts...

Thus, the bugfix is to avoid the JavaScript errors - a real bugfix would be to rewrite Kasper's dynamic flexform fields...

Actions #7

Updated by Oliver Hader almost 16 years ago

Duplicate... ;-)

Actions #8

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF