[SOLVED] JS error in detail pages

lousyfool

Well-Known Member
Staff member
Sorry, I have one more...

On detail pages, with any template including the out-of-the-box Bootstrap template, I'm getting an JS error.
Please note, it doesn't appear with "simple" lists, but definitely when repeat groups are involved.
Also, it doesn't stop the page from rendering correctly or so, so I'm not suffering too badly... but eventually it'll prevent me from combining/minifying all scripts in the <head> section.

With JS debug on, the error reads in short form:
Code:
Uncaught TypeError: Cannot read property 'value' of null
    at Object.<anonymous> (form.js:1864)
    at Function.<anonymous> (mootools-core.js?2291a9c3158078bcd46ff6ceb07b5686:9)
    at Object.duplicateGroupsToMin (form.js:1853)
    at Object.e.extend.$owner (mootools-core.js?2291a9c3158078bcd46ff6ceb07b5686:38)
    at Object.<anonymous> (form.js:72)
    at mootools-core.js?2291a9c3158078bcd46ff6ceb07b5686:21
I/m attaching the long version here as txt file.

Line 1864 in form.js is obviously:
Code:
repeat_added = this.form.getElement('#fabrik_repeat_group_' + groupId + '_added').value,
One more hint on trouble with repeat groups?

I'm sure not JS man enough to be dealing with this any further, so a hint or even a fix from you would be greatly appreciated! Let me know if you need any further information on config, setup, whatever. Thanks!
 

Attachments

  • detail_page_js_error.txt
    6.3 KB · Views: 342
There is a slim to zero chance I'll remember to do that. Best to just keep an eye on the git commit messages, either over >>> there, or on our github page, and watch for a message about fixing duplicateGroupsToMin in details view.

-- hugh
 
Sure, will do.
On the side (pun intended), unfortunately the commit box over >>> here is blank most of the time these days, though... :(

TIA for the future fix, anyway!
 
That's weird. Somebody else mentioned that, but it always works for me, I've never seen it blank. But hey, that's why github exists, so you can monitor these things yourself.

And if you go check github now, you might find something.



Sent from my Pixel 2 XL using Tapatalk
 
That's weird. Somebody else mentioned that, but it always works for me, I've never seen it blank.
Since a while it's blank almost all the time. Anything in there is the rare exception.

Cool, will check Github later. Thanks again!
 

Attachments

  • blank_github_box.png
    blank_github_box.png
    363.8 KB · Views: 426
I am getting the same error. I just updated from GitHub and I can definitely see the change from your commit. I started debugging the JavaScript and I think it's calling a wrong "getElement" function. Instead of calling the one defined in /components/com_fabrik/models/form.php (which I assume is the right one) it's calling one from Mootools. I am attaching a screenshot. What's the right way to deal with something like this?
 

Attachments

  • mootools_conflict.png
    mootools_conflict.png
    11.9 KB · Views: 115
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top