Welcome, Guest
Username: Password: Remember me

TOPIC: [FIXED] MODAL buttons not working / JQuery

MODAL buttons not working / JQuery 16 Sep 2015 20:15 #13465

  • MorganL
  • MorganL's Avatar
  • Offline
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
  • Karma: 15
I built a component yesterday and downloaded. On my J3.4 install the modal buttons (save, even cancel) do not work

I was using on the edge beta and in my console I was seeing

Uncaught ReferenceError: jQuery is not defined
toolbar.js:1 Uncaught ReferenceError: jQuery is not defined
index.php?view=region&layout=region&cid[]=1&tmpl=component&option=com_mycomponent:68 Uncaught TypeError: Joomla.submitformAjax is not a function

I am also seeing lots of errors generally on the front part of a site with a component.. again.

It looks like JCook components are trying to load jquery code(toolbar.js) before jquery is loaded
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla
The administrator has disabled public write access.

MODAL buttons not working / JQuery 16 Sep 2015 20:38 #13466

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
I see.

You can check again now for jQuery.

But for the ajax toolbar in the modal, I can't find the problem.
I am now publishing N:M, and then very soon I will review all the generated code.
Clean and consistent. Simplier because now 2.5 is dead, it will be much lighter and reviewed.

For your modal problem, I think it is because I changed in headerDeclaration() from helper.
Try your old version if you can find something.

I try to sort it out as soon as possible.
Coding is now a piece of cake
The administrator has disabled public write access.

MODAL buttons not working / JQuery 16 Sep 2015 20:49 #13467

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
I see.

It is because of a change in jQuery.
JDom is causing the problem. I will fix that and step a version.

FIX:
In JDom tree
replace
$.fn.jdomAjax

by
$.jdomAjax

You will have to chenge in few files...
Coding is now a piece of cake
Last Edit: 16 Sep 2015 20:50 by admin.
The administrator has disabled public write access.

MODAL buttons not working / JQuery 16 Sep 2015 20:56 #13468

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Wait...
Not only that.

This code is since it tries a different JS Ajax code (hook) for file upload.
Let me some time, I will rewrite this part.
This part is very specific and not Joomla :
Modal + Toolbar + Ajax + Ajax File Uploader

There is a fallback, but a little issue I have to fix. in toolbar.js.

In the meantime, if you find something, good to know.
Coding is now a piece of cake
The administrator has disabled public write access.

MODAL buttons not working / JQuery 16 Sep 2015 21:40 #13469

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Try it now.

I think it should be working better.
But still I think I will review all the code soon.

All JS will be placed in component, and simplificated in its way to load.
Now Joomla = jQuery + Bootstrap... Finaly.., with no b/c needed anymore.

JDom will soon be even not necessary maybe.
What do you think of that ?
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.074 seconds

Get Started