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
Question on a new theme I'm testing
Avatar
kvr28
Member
Free Members
sp_UserOfflineSmall Offline
Nov 12, 2014 - 1:56 pm

Everything seems to work great on this new theme, the developer has been awesome helping out when I find an issue, but there is one thing that has me stumped as is keeping me from going live with it, the file uploader plugin

normal

Image Enlarger

what the theme is creating on the add files and upload buttons

Image Enlarger

I can click add file and choose one, but when I click upload, nothing happens, I'm not seeing any javascript errors or anything, any suggestions? Oh, and it's the same on pc and mobile, thank-you

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Nov 12, 2014 - 2:24 pm

Hey kvr,

I know you are saying that you can't see a conflict, but the only time I've seen this is when there has been, and I'll add - although you might already be aware being a regular user here, and pretty knowledgable - I think the most common conflict in this case is the bootstrap library.

Of course, you know your way around and are also working with a developer, and WP themes are not my strong point, but unless somebody has a better suggestion it might just be worth checking that if the bootstrap library is being used, it has to be loaded before the jquery-ui library.

Also - And again this is just an educated guess - but it might not show up as a conflict. Searching previous posts it's been suggested to search for bootstrap in the source code which would suggest to me that it might not be showing in the console.

Once again, I could be wrong, but if it's something to go on then it's definitely worth a check!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Nov 12, 2014 - 3:14 pm

Ike has hit the nail on the head. in fact Ui would almost be willing to take bets on Bootstrap being the issue.

The reason it doesn't actually cause a conflict is because it replaces what the jQuery Ui components do - basically it is changing the submit button but the submit button code is expecting a jQuery response.

Ike is also right in that the way to get around this is for it to be loaded BEFORE the jQuery UI core component.

I would add that the jQuery scripts and the jQuery UI scripts are 100% supported by WordPress as the de facto JavaScript UI libraries. Bootstrap is not supported. While I realise theme developers are attracted to it it can have unwanted and negative effects on any plugins and code written for the supported libraries.

andy-signature.png
YELLOW
SWORDFISH
Avatar
kvr28
Member
Free Members
sp_UserOfflineSmall Offline
Nov 12, 2014 - 3:27 pm

thank-you gents, is this something I can do myself? or should I forward it on to the theme developer?

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Nov 12, 2014 - 3:51 pm

I suppose it depends really, it might be easier to get the developer to make the change, or at least advise, as it is different for all themes.

If you wanted to do it yourself, although I could probably figure it out given a theme which has the problem to begin with - and a bit of time, we would probably need some advice from Steve or Andy!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Nov 12, 2014 - 4:41 pm

Well if it is all done properly then the scripts will be loaded with the wp_enqueue() function. So really they need to be found in the theme code base and then the bootstrap script needs to be done real nice and early so that when the forum page is run it loads first when you look at the generated html source.

By the way - do you have the SP scripts set to load in the footer? If not it might be worth a try as that has solved it for a couple of users...

andy-signature.png
YELLOW
SWORDFISH
Avatar
kvr28
Member
Free Members
sp_UserOfflineSmall Offline
Nov 12, 2014 - 5:09 pm

I do, I made a support ticket on the themes site and this was his response

there’s a conflict between jQueryUI and Twitter Bootstrap buttons because they both define $.fn.button(). Try adding this code to "Theme Options > Advanced Settings > Custom JS":

(function($) {
    var btn = $.fn.button.noConflict() // reverts $.fn.button to jqueryui btn
    $.fn.btn = btn // assigns bootstrap button functionality to $.fn.btn
})(jQuery);

and it fixed the problem, thank-you guys for your help
Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Nov 12, 2014 - 5:27 pm

Excellent, glad you got it resolved and quick turn around too.

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: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626