Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Javascript conflict breaking Wordpress admin
Avatar
Jan Bosman
Member
Free Members
sp_UserOfflineSmall Offline
Jul 30, 2013 - 5:04 pm

I'm having a pretty serious plugin/theme conflict going on. I've already tried to have the theme author suss out the problem, and they've not been able to sort it out on their end, so I'm pleading with you guys for help.

Here's the ticket I submitted to them:
http://www.kriesi.at/support/t.....osts-pages

Basically, on select parts of the Wordpress admin (specifically the Add/Edit Posts and Edit Media views), jquery fails to load. Which means it's impossible to add media to a post, change the date of a post, view screen options, add tags, etc. It's a pretty huge issue for our site, which schedules dozens of posts every month.

When Simple-Press is disabled, the conflict disappears and everything loads fine. There don't appear to be any front-end symptoms causing problems for users.

Would you take a look at the ticket linked above? I'm happy to email you admin credentials to our website as well so that you can take a first-hand look.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 30, 2013 - 5:38 pm

cant tell much from that thread... need to see it in action...

but first, go to forum - integration - page and permalink... are you loading the forum js in footer or header? try switching it... doubt it will matter but easy check...

also, no caching plugins, right? we have seen some evidence of some caching plugins incorrectly caching the wp admin...

as another quick test, lets try a temp switch to the default wp theme and see if it works then... I know you said if SP was disabled it worked, would like to verify the converse too...

and then, if you want us to look into, please send via pm a temp wp admin account with full sp admin capabilities to Yellow Swordfish and myself... please link to this topic so we know what it is about... and we can take a look..

Avatar
Jan Bosman
Member
Free Members
sp_UserOfflineSmall Offline
Jul 31, 2013 - 3:36 am

I had to wait until after prime time to shut down the site briefly and double-check things (disabling other plugins, resetting the theme, etc).

Here's how it stands:

  • If no other plugin is active save for SP, as well as the Enfold theme we are using, this bug is present in the admin. This is also the case if every other plugin we use on the site is active.
  • If SP is deactivated and the theme is Enfold, the bug is not present in the admin.
  • If SP is active and the theme is reset to twentytwelve, the bug is not present in the admin.

I did try your suggestion of toggling the header/footer JS setting, to no avail.

We don't use any caching plugins.

To me, seems pretty clearly to be a conflict between the Enfold theme and Simple-Press, and when those are both activated, jQuery fails to load.

I've created an admin account for you guys to take a look at the site (see your PMs). 

Thank you much for looking in to this!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 31, 2013 - 6:20 am

mmm... see nothing particularly wrong with the load order but there again I do not know which theme code is making the call to 'sortable'. I have to say that despite the claim that this was 'fixed' I got the distinct impression from the topic they linked to in your thread that nobody actually seemed to address what the cause might be.

I did try and look at the theme code but it seems like the usual 'theme editor' WP provides under the 'Appearance' menu has been removed. So about the only way I might be able to look is if you want to zip up and send me a copy of the theme so that I can actually install it and try it.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 31, 2013 - 11:49 am

one thing.. in your ticket with Kreisi, you mention that jquery fails to load...  actually jquery loads fine...  its the first js loaded except for some moonray thing which doesnt use it... so that is good...

its actually a call to jquery ui sortable that is causing errors...  and jquery ui sortable is loaded in the footer... the calls to it are occurring before its been loaded...

it appears that the theme is adding some sortable metaboxes...  how does it enqueue the sortable jquery ui js??  It appears as if its loading it in the footer...  simple press does not try to load it in the footer...

just a guess, but if jquery ui sortable were loaded in the header, it might fix this...  if the theme requires it to be loaded in the header, it needs to enqueue it such that it will enforce it...

can you research how the theme enqueues jquery ui sortable?

Avatar
Jan Bosman
Member
Free Members
sp_UserOfflineSmall Offline
Jul 31, 2013 - 2:31 pm

Thanks for the replies! 

I re-enabled the theme Editor in WP if you want to look at the theme files that way. I'll also PM you a copy of the theme files so that you can install it and try it yourself.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 31, 2013 - 3:05 pm

Went for the download.Much more versatile.

OK - the WP base theme does NOT load jQuery, the jQuery UI OR the sortable library so this is either turned on with a theme option or is being added by a third party component. Can you tell me which this is please? And how I can emulate that?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Jan Bosman
Member
Free Members
sp_UserOfflineSmall Offline
Jul 31, 2013 - 3:14 pm

There doesn't appear to be any UI-related theme options in Enfold, and none of the functions in my child-theme should affect jQuery at all. And from the testing I did, none of the other plugins seem to be causing the conflict.

I'm at a loss here.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 31, 2013 - 3:47 pm

I am not entirely sure what is going on here either... but things like pilot press, quiz answers are all adding sortable boxes...

and the theme is adding all sorts of avia sortable elements, css and shortcodes via script tags...

all that should be fine... but then it seems something is trying to organize or sort or move them around before the sortable is loaded...hence the error..

just not sure what...  and our stuff isnt even loaded on the wp add post screen...

I have also noticed something else quite strange on your site...  almost all wp admin ajax requests fail with a connection closed error...  and it seems like something is adding an additional query arg to them

action=blc_work

any idea what that is?  its not standard wp...

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 31, 2013 - 3:59 pm

I need to add to Steve's comments and my own earlier ones. The theme IS loading jQuery, the UI and the sortable library. It is using the 'print_scripts' technique which is not something you see that often so easy to miss.

However - Steve is not quite right in one point as SP CAN load some scripts (jquery among them) depending upon which SP plugins you may have active and if support is needed. But - when we do that, the theme quite correctly seems to not load what we have already loaded.

So I am still somewhat lost here!

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17366
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626