Bug #13261
new IRRE records not stored
| Status: | New | Start date: | 2011-02-22 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - | |||
| Votes: | 0 |
Description
If I use Advanced FE Editing with a record containing IRRE data I can edit existing IRRE records without any problem.
But if I try to add a new IRRE record (in my case: using an IRRE Selector) that new record appears and I can fill in my data. But if I save the (parent-) record the new IRRE record will not be stored.
Seems to be a bunch of problems, I have seen that /t3lib/jsfunc.inline.js "memorizeAddRecord" is not called with a correct formObject but there seem to be other problems as well.
History
Updated by Martin Neumann about 2 years ago
This applies to TYPO3 v4.4 as well as v4.5
The reason for this behavior is that the added IRRE data is stored in form fields called data[xyz] (as it is in BE). In FE Advanced Editing it should be stored in form fields like TSFE_EDIT[data][xyz]
For me this workaround worked (but should be solved earlier in the PHP Code):
/typo3/jsfunc/tbe_editor.js line 414 added
myelems=document[TBE_EDITOR.formname].elements;
for (i=0;i<myelems.length;i++) {
neu = myelems[i].name.replace(/data\[/g, "TSFE_EDIT[data][");
myelems[i].name=neu;
}
/t3lib/jsfunc.inline.js line 557 added:
neu = objectName.replace(/data\[/g, "TSFE_EDIT[data][");
objectName=neu;
Still not solved:
probably the same problems when deleting an IRRE record
the above workaround does not take BE editing into account
Updated by Björn Pedersen almost 2 years ago
I can confirm this behaviour for Typo3 4.6alpha3 /1.5.0 as well.
Updated by Martin Neumann almost 2 years ago
if somebody is interested in DELETING IRRE Records as well:
in /typo3/jsfunc/tbe_editor.js line 414 I now have a real AJAX call added:
myelems=document[TBE_EDITOR.formname].elements;
for (i=0;i<myelems.length;i++) {
neu = myelems[i].name.replace(/data\[/g, "TSFE_EDIT[data][");
aktion=neu.split("[");
if (aktion[0]=="cmd" && aktion[3]=="delete]" && myelems[i].value=="1" && !myelems[i].disabled) {
// ein Delete-Command!
tabelle=aktion[1].substr(0,aktion[1].length-1);
removeUid=aktion[2].substr(0,aktion[2].length-1);
remove=tabelle+':'+removeUid;
url='/index.php';
// ToDo: Man müsste noch bestimmen auf welcher PID die IRRE-Records liegen!
options = {
method: 'post',
parameters: '&pid=122&TSFE_EDIT[record]='+remove+'&TSFE_EDIT[pid]=122&TSFE_EDIT[cmd]=delete&eID=feeditadvanced'
};
new Ajax.Request(url, options);
}
myelems[i].name=neu;
Still to do: How to get the PID of the page where the inline record is stored?