Welcome, Guest
Username: Password: Remember me

TOPIC: [FIXED] Cancel button does nothing in table form editor

Cancel button does nothing in table form editor 16 Mar 2013 07:10 #6946

  • agaudreau
  • agaudreau's Avatar
  • Offline
  • New Member
  • Posts: 7
  • Karma: 1
The cancel button in table form editors does not return you to the table item list as is expected when you try to edit one of the items.

Problem reproduced in a virgin sandbox run with V2.0 beta format selected.
The administrator has disabled public write access.

Re: Cancel button does nothing in table form editor 16 Mar 2013 09:45 #6950

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
Do you have any JS issues in your console?

Please let us know all of your config options from the builder too.

Thanks,

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.

Re: Cancel button does nothing in table form editor 17 Mar 2013 04:37 #6964

  • agaudreau
  • agaudreau's Avatar
  • Offline
  • New Member
  • Posts: 7
  • Karma: 1
The problem only appears if I have embed framework off which means it must be a jquery incompatibility between version 1.8.2 which is embedded and the current jquery at code.jquery.com/jquery.min.js which you use when not embedded.

I am testing with the sandbox as well as on my own servers.

With embed off, it's giving the .live and .die is not a function.

If we fix these by replacing them with .on() and .off() as per the jquery upgrade guide, we get to validationEngine is not a function.

all are within js/jquery.validationEngine.js and called from administrator/components/com_X/views/X/tmpl/X.php as:

jQuery("#adminForm").validationEngine();
jQuery("#adminForm").validationEngine('detach');

X being the name of the component.

If we comment out those calls, the cancel button works properly with Embed Off.


Cook Config:

Framework JQuery
Embed (Off gives errors) (On works)
Form style condensed
Features recudes
TODO no

V2 settings:
DB Auto: Model
Timeout: 20secs
The administrator has disabled public write access.

Re: Cancel button does nothing in table form editor 17 Mar 2013 06:15 #6965

  • agaudreau
  • agaudreau's Avatar
  • Offline
  • New Member
  • Posts: 7
  • Karma: 1
To get the cancel button to work, you have to either do the .live and .die replacement manually in the jquery.validationEngine.js or upgrade jquery.validationEngine.js to version 2.6.2.

If you are on Joomla 3.0:

Joomla jdoc:include "head" which is called after the component had added it's script thus causing conflicts.

I haven't pin pointed if it causes jquery to reset the scope by overriding the JQuery tag and making any prior definition of functions and so on invisible to the scope or if it's another problem.

Will check it tomorrow but for now, renaming /media/jui/js fixes the cancel button but breaks the rest of the admin default template (isis).

That part is more of a porting issue or joomla admin template issue.

I'll post findings in case there are other who encounter this issue.
The administrator has disabled public write access.

Re: Cancel button does nothing in table form editor 17 Mar 2013 09:03 #6966

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.

Re: Cancel button does nothing in table form editor 17 Mar 2013 23:41 #6969

  • agaudreau
  • agaudreau's Avatar
  • Offline
  • New Member
  • Posts: 7
  • Karma: 1
Hi @audibleid

I have seen it and the second link comes down to what I was saying about the upgrade to jquery.validationEngine.js version 2.6 or manually changing the .link() and .die() calls in the file.

The problem really is with isis Joomla 3.0 Admin template. Here are the headers:

Hathor template:
  <script src="/media/system/js/mootools-core.js" type="text/javascript"></script>
  <script src="/media/system/js/core.js" type="text/javascript"></script>
  <script src="http://code.jquery.com/jquery.min.js" type="text/javascript"></script>
  <script src="http://code.jquery.com/ui/1.9.1/jquery-ui.min.js" type="text/javascript"></script>
  <script src="/administrator/components/com_bfprods/js/jquery.validationEngine2.6.js" type="text/javascript"></script>
  <script src="templates/hathor/js/template.js" type="text/javascript"></script>

Isis template:
<script src="/media/system/js/mootools-core.js" type="text/javascript"></script>
  <script src="/media/system/js/core.js" type="text/javascript"></script>
  <script src="http://code.jquery.com/jquery.min.js" type="text/javascript"></script>
  <script src="http://code.jquery.com/ui/1.9.1/jquery-ui.min.js" type="text/javascript"></script>
  <script src="/administrator/components/com_bfprods/js/jquery.validationEngine2.6.js" type="text/javascript"></script>
  <script src="/media/jui/js/jquery.min.js" type="text/javascript"></script>
  <script src="/media/jui/js/jquery-noconflict.js" type="text/javascript"></script>
  <script src="/media/jui/js/bootstrap.min.js" type="text/javascript"></script>
  <script src="templates/isis/js/template.js" type="text/javascript"></script>

As you can see, the problem is with the reloading of jquery with jui/js from google.

Since isis is the default admin theme in Joomla 3.0, I'll take a bit of time and see if I can get it to work with the j-cook component without hacking the joomla core themes.


For anyone having this issue in Joomla 3.0 , an easy work around on top of the upgrade or edit of jquery.validationEngine.js is to switch to the Hathor admin template.
The administrator has disabled public write access.

Re: Cancel button does nothing in table form editor 18 Mar 2013 01:41 #6970

  • agaudreau
  • agaudreau's Avatar
  • Offline
  • New Member
  • Posts: 7
  • Karma: 1
The fix I ended up using for Joomla 3.0 with the Isis (Default) admin theme is this due to a lack of time to find a better solution:

Add:
$doc->addScriptDeclaration('var jCook = $.noConflict(true);');

to /administrator/components/com_mycom/helpers/helper.php right after:
$doc->addScript($componentUrlAdmin . '/js/jquery.validationEngine.js');

And then change jQuery( everywhere in /administrator/components/com_mycom/ to jCook(
which you can easily do with a little "search and replace all" with your favorite IDE, shell script etc...

Works like a charm with the downside of requiring the visitor loads two jquery scripts and maintains them both in memory while it interprets and renders the page.
The administrator has disabled public write access.

Re: Cancel button does nothing in table form editor 07 Aug 2013 18:03 #10714

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Fixed now.
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.070 seconds

Get Started