Bug #17495
closedIRRE Ajax does't work if date2cal extension is installed
0%
Description
if your child record uses date fields and you have date2cal extension installed to help filling in date fields, you are not able to add new child records to the parent record
(issue imported from #M6072)
Updated by Oliver Hader over 17 years ago
Which browser are you using and do you get any JavaScript errors?
Updated by Stefan Galinski over 17 years ago
I can reproduce the problem! Just disabled the natural language parsing feature of date2cal. Should have somebody a better solutuion than to disabled that feature dont hesitate to inform me.
Here some debug output from firebug:
this.element has no properties
[Break on this error] if (this.adjacency && this.element.insertAdjacentHTML) {
prototype.js (line 1626)
initialize("data[tx_aggiasartists_artistData][NEW46b5b30f33be6][header]_hrContainer", "<div id="data[tx_aggiasartists_artistData][NEW46b5b30f33be6][header]_hr_msg"> </div>")prototype.js (line 1626)
create()prototype.js (line 23)
_createHtml()datetime_toolbock... (line 191)
initialize(Object format=typo3)datetime_toolbock... (line 142)
create()prototype.js (line 23)
evalScripts("\n new DatetimeToolbocks({ \n format: 'typo3',\n elementId: 'data[tx_aggiasartists_artistDat...")prototype.js (line 212)
collect("\n new DatetimeToolbocks({ \n format: 'typo3',\n elementId: 'data[tx_aggiasartists_artistDat...", 0)prototype.js (line 367)
(no name)("\n new DatetimeToolbocks({ \n format: 'typo3',\n elementId: 'data[tx_aggiasartists_artistDat...")prototype.js (line 328)
_each(function())prototype.js (line 541)
each(function())prototype.js (line 326)
collect(function())prototype.js (line 366)
evalScripts()prototype.js (line 212)
(no name)()prototype.js (line 1643)
[Break on this error]
Updated by Oliver Hader over 17 years ago
There are three things I found:
1) In tx_date2cal_wizard the variable $this->jsObj is set to &$GLOBALS['SOBE']->doc if the TYPO3 version is higher or equal to 4.0.0. alt_doc_ajax.php which is used for IRRE hasn't a template part in the class variable doc - $GLOBALS['SOBE']->doc doesn't exist in this case.
It's better to use t3lib_TCEforms::$additionalCode_pre in this case.
2) On creating a new child record there will be JavaScript code/sources that have to be executed/loaded. There is no direct way to do this with DOM append actions. If <SCRIPT> tags are put to t3lib_TCEforms::$additionalCode_pre during the creation of a new child record using IRRE, these parts will be treated in a special way. A solution for this is available at bug #17484 because the situation for RTEhtmlarea is similar.
3) Don't load prototype.js if it's already loaded (for TCEforms in 4.1 this is the case).
Updated by Thomas Mammitzsch over 17 years ago
so should we assign that bug to the date2cal extension author?
Updated by Oliver Hader about 17 years ago
Updated by Ralf Hettinger about 17 years ago
Updated by Steffen Kamper over 16 years ago
date2cal has some other bad things: it disables the javascript where you can add offsets, like +5d
Updated by Stefan Galinski over 16 years ago
I will completly rewrite the current natural language parser and hope to fix all this issues in the next few weeks. I would be really glad if someone can help me with the rewrite, because I'am not very experienced with prototype.
Updated by Oliver Hader over 16 years ago
FYI: Before you start a complete rewriting of date2cal maybe it's worthy to look to other JavaScript frameworks. The planned new list module could use "extJS" to simplify a lot of grid and search things.
Additionally extJS comes up with a date selector which you could try out here:
http://www.extjs.com/deploy/dev/examples/form/adv-vtypes.html
Updated by Benni Mack over 15 years ago
OK. so nothing new here? Either there would be a small fix in date2cal or IRRE to get this thing done, instead of rewriting everything....
Updated by Alexander Opitz over 11 years ago
- Status changed from Accepted to Needs Feedback
- Target version deleted (
0)
The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?
Updated by Chris topher over 11 years ago
- Status changed from Needs Feedback to Closed
- Assignee deleted (
Oliver Hader)
date2cal is no longer supported; the newest version is marked as obsolete with the comment "PLEASE DONT USE THIS EXTENSION ANYMORE!". Also the Core comes with its own calender feature since quite some time now.