Forum Replies Created
-
Author
-
October 27, 2016 at 19:35 in reply to: js error introduced in recent theme version with gravity forms/gravity view plugins #141698davidryalParticipant
Hi Radu-
If you look at Step 3 above, the 3 js errors how up when you try to EDIT an entry as an admin, like so:https://www.opentest.co/share/94f597b09c6211e6b1777d3d580c8a9a
Once you’ve reproduced that, feel free to switch to a default theme on that site, to verify that all fields show for editing as they should when Kleo is not running.
…Also, additional clue: running Theme Check on Kleo comes up with the following:
COPY CODEWARNING: Found wp_deregister_script in kleo-framework/options/core/enqueue.php. Themes must not deregister core scripts. Line 215: wp_deregister_script( 'jquerySelect2' );
I’m not 100% sure that a jquery-dependency issue is to blame here, but it sure appears so, given the similarity to the StackOverflow issue I linked above..?
Thanks again!
October 26, 2016 at 18:50 in reply to: js error introduced in recent theme version with gravity forms/gravity view plugins #141486davidryalParticipantHi Radu-
I don’t know what the error you mention is (I’ve never seen it), but I’ve disabled the unrelated plugin that was triggering it; this doesn’t not fix the 3 errors I posted here about. The 3 errors that show up in the process I described in my last post are:
COPY CODEUncaught ReferenceError: gform is not defined http://cabec.staging.wpengine.com/admin/cea-lookup/entry/3518/?gvid=2892&page=gf_entries&view=entry&edit=8c0a35ecb0 line 788 Uncaught ReferenceError: gform is not defined http://cabec.staging.wpengine.com/wp-content/plugins/gravityforms/js/conditional_logic.min.js?ver=2.0.7 line 1 Uncaught ReferenceError: gformExtractFieldId is not defined http://cabec.staging.wpengine.com/wp-content/plugins/gravityforms/js/conditional_logic.min.js?ver=2.0.7 line 1
I am not using any caching plugins on staging (on production, the host, WP Engine, uses its own, but that is not an issue here — I am working on staging).
I have toggled and tested with every combination of Kleo speed/dev mode/etc. toggles. The problem is with the theme, because these errors go away when using a default (i.e. 2016) theme & no changes in plugin configuration (all plugins active).
I am not a developer, but to me this looks like a larger incompatibility with how Kleo loads jquery vs. how Gravity Forms does it. I think these links are more along the lines of the problem/solution:
http://stackoverflow.com/questions/23786388/js-error-on-gravity-forms — in it, an answer says this:
COPY CODE"I had exactly the same problem, and managed to track it down to some theme code. I was using the bones theme, which de-registers the default jQuery JS and adds its own using the Google CDN... As you can see, it deregister's the default jquery script, and then adds its own cdn-jquery script, which is fine, apart from the fact that the Gravity forms scripts have a dependency on jquery and not cdn-jquery! Because they can't see the default jquery script, they don't load, and it would seem that they fail silently, simply emitting this JavaScript error because said JavaScript is loaded without checking dependencies. In any case, I fixed it by re-naming the bones register script to jquery, might not be the best way to fix this, but it works."
…or maybe this?: http://micahjon.com/loading-jquery-in-the-footer-with-gravity-forms/
Hope this helps. Thanks for staying on top of it and helping me get it fixed.
Cheers,
David -
AuthorPosts