Modals

SyntaxError: Unexpected token ':'. Parse error.

1 year 9 months ago #74337

ron eli's Avatar ron eli

Hi , i am getting a js error whenever i click on the link with the modals window, it says :
SyntaxError: Unexpected token ':'. Parse error.

Uncaught SyntaxError: Unexpected token :
at Object.f.exec (mootools-core.js?4c1c8dcba644d0fbaf41405d891cd392:28)
at Object.success (mootools-core.js?4c1c8dcba644d0fbaf41405d891cd392:168)
at Object.e.extend.$owner [as success] (mootools-core.js?4c1c8dcba644d0fbaf41405d891cd392:38)
at Object.onStateChange (mootools-core.js?4c1c8dcba644d0fbaf41405d891cd392:159)
at Object.e.extend.$owner [as onStateChange] (mootools-core.js?4c1c8dcba644d0fbaf41405d891cd392:38)
script.min.js?v=9.5.4.p:31 Uncaught TypeError: Cannot read property 'getBoundingClientRect' of undefined
at Object.getWidth (script.min.js?v=9.5.4.p:31)
at Object.resizeContent (script.min.js?v=9.5.4.p:24)
at Object.resize (script.min.js?v=9.5.4.p:22)
at script.min.js?v=9.5.4.p:22

i have tried to enable loading css/js and also "Load jQuery Script", nothing helps...tried different colorbox ect...
Please help!

Confidential information:
(hidden)

1 year 9 months ago #74338

Peter van Westen's Avatar Peter van Westen Admin

The issue is with the mootools scripts getting loaded on your site.
Not sure what you have running that requires mootools, but try to remove that.

1 year 9 months ago #74370

ron eli's Avatar ron eli

ok, so i detected where it comes from and disabled the mootools, but the issue is still there, you click once on the link the pop-up window shows but when you close it...you can't click again...it's disabled and not clickable...not sure what is causing it... i don't see any special error now.
please help

1 year 9 months ago #74375

Peter van Westen's Avatar Peter van Westen Admin

Looks like some conflicting JavaScript.
Can you check if the issue is still there when using the core Joomla template protostar?

1 year 9 months ago #74377

ron eli's Avatar ron eli

Well it doesn't happen on this page with Modals: www.forhair.com/thank-you/
so I doubt it is the template issue....something about the homepage is causing it...maybe becuase there are 3 modals pop-up on the fronpage conflicting?

1 year 9 months ago #74378

Peter van Westen's Avatar Peter van Westen Admin

Something is adding a class "hidden" to the modal window on pageload.
Not sure what is causing that and hard to track down with so many different scripts being loaded on your website.

1 year 9 months ago #74379

ron eli's Avatar ron eli

one of your supporters (maybe you) instruct me to put this code because the pop-up was not showing:

div#colorbox.hidden {
    display: block !important;
}

but even when I remove it the issue is still there...

1 year 9 months ago #74380

Peter van Westen's Avatar Peter van Westen Admin

Well, that css is to 'patch' the issue, so you shouldn't remove it.
If you make that load on the frontend, it should show correctly. Or better:

div#colorbox.hidden.complete {
    display: block !important;
}

Again, the issue it self is caused by some script. Seeing the complexity of your website (shear amount of javascripts getting loaded), this is beyond my support to figure out for you what is causing it.

1 year 9 months ago #74384

ron eli's Avatar ron eli

excellent thank you, the addition of .complete fixed it
what was the cause?

1 year 9 months ago #74385

Peter van Westen's Avatar Peter van Westen Admin

Great that it solves the issue.
What caused the issue in the first place? Some script conflict, I guess.