Datepicker not working - stack overflow at line 1797

Status
Not open for further replies.

angiras

Member
I'm trying to set up a form using the Datepicker ... In Firefox the datepicker comes up when you click on the ... button but when you click on a date nothing happens. In IE it comes up when you click on the ... button but when you click on a date it pops up an alert "Stack overflow at line: 1797"....

I am using the latest SVN for fabrik 1.0.x and Joomla 1.0.15... just updated to the SVN about 20 minutes ago and checked the datepicker again to make sure it wasn't fixed. Same problem.

Any ideas?

Thanks in advance.
 
I can't really send you to the page. Its in the joomla backend and my client is particular about people getting in there. The template is the standard Joomla 1.0.15 admin template with the default form template for fabrik forms using the fabrik backend interface to add/edit records in the DB. There aren't any modifications to the template or backend modules active beyond what comes standard with joomla. I agree that it sounds like mootools (or other javascript) conflict ... but since its a basic !J setup I'm surprised there are those kinds of conflicts?
 
without looking at the page, we really can't help too much :(
Can't you provide a temp login which you can delete after a couple of days?
Or can you replicate the issue on another less delicate site?

Rob
 
Well it works fine from the frontend. Its just a problem in the Joomla backend. I don't know why there would be a conflict with the unmodified joomla admin template ... or at least, I assume it would be something you'd have discovered and fixed. ;) I don't have any other J1.0.15 sites to tinker with ... and we can't let people into this one. So I guess I'll have to solve it on my own. I'll assume its some kind of issue with the template or maybe a mambot and see what I can do. I had hoped you'd say something like 'Oh, yeah the Joomla Admin bug ... we've seen that happen sometimes in the backend before. Here is how you fix it. ' ... but no such luck.

Thanks anyway.
 
Just wanted to make an update. I did solve this ... sort of...

It was not a conflict with the template ... it was a problem in Fabrik itself. In the admin backend and ONLY the backend ... Fabrik was putting these lines in the header twice ...

<link rel="stylesheet" type="text/css" media="all" href="http://www.kidsrunningamerica.org/components/com_fabrik/libs/jscalendar/calendar-system.css" title="green" />
<script type="text/javascript" src="http://www.kidsrunningamerica.org/components/com_fabrik/libs/jscalendar/calendar.js"></script>
<script type="text/javascript" src="http://www.kidsrunningamerica.org/components/com_fabrik/libs/jscalendar/lang/calendar-en.js"></script>
<script type="text/javascript" src="http://www.kidsrunningamerica.org/components/com_fabrik/libs/mootools111.js"></script>
<script type="text/javascript" src="http://www.kidsrunningamerica.org/components/com_fabrik/libs/mootools-ext.js"></script>

This was causing the system to have a stack overflow (i.e. running out of memory) when using the calendar widget.

How I fixed it ... I modified the writeFabrikHead() function in the admin.fabrik.html.php file so it would not write those headers twice. (specifically I commented out lines 27 - 31) ... Now it works. I solved this through trial and error rather than superior understanding of the program ... so I don't really know what the problem is. I'm going to guess that there is an if statement somewhere that is broken ... but I don't have time right now to hunt down the actual problem as long as this band aid continues to work.

Note that through trial and error I determined that the script that can't be called twice is the calendar.js file ... the others being called twice doesn't seem to have an effect on the the performance of the software - but still the header should not be calling those scripts twice even if they don't cause an error.
 
I've made some changes in SVN I think should fix it.

Those files were being included in both writeFabrikHead() on the backend, and writeFrontendFabrikHead(), which gets called from the form render().

-- hugh
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top