Support Forum

Some other issues on my forums

41 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

I have no idea what ‘very tough TF standards’ means either. But it has no relevance here.

Bootstrap is a javascript UI component library created by the Twitter development team and made available for public use. It is actually a very good and useful library and shows a lot of promise for the future.

However – as I have said before and will repeat again – it is NOT natively supported by WordPress. The jQuery UI library – which is an alternative to Bootstrap – IS the WordPress supported script UI library and no amount of meeting tough (unknown to me) standards is going to change that. The simple fact – again as already stated – is that Bootstrap components override jQuery UI components and render them inoperable. This can be overcome by loading the Bootstrap library first but even that is not really ideal.

Theme authors who insist on utilising Bootstrap are ignoring the WordPress standards and API. They and their users should really be lobbying the WordPress development team to support Bootstrap properly.

I believe on your site – if I recall correctly – the theme authors were also loading jQuery incorrectly (or perhaps it was another plugin). This action is also contrary to WP API and standards. It drives us wild that these people are also making money out of this flagrant disregard for their users.

I am afraid I don’t really know what you mean by ‘take the way over the WP-Media Upload’. Not really sure what an ‘MMO Guild Page’ is either come to that but that is probably just because I am an old fart.

XD xDave
xDave
Member

LOL^^

Okay in WP you can upload Media (images) for your Blogposts via the backend. This is what I meant.

MMO Guild Page …erm..a page for a Community of players of an massively multiplayer online game. But nvm :)

I see that you both have the point “bootstap is not supportet by WP by default” but on the other side it is very popular for themes and I found no page which says that bootstrap is not recommended for use. On the other hand you find thousands of themes for WP generated with that framework.

When I look here at the support forum, I see that the uploader problem is one of the most common. So the long term question could be if you will, independently from what your preferations are, adapt the conditions and perhaps look over the upload plugin regarding to that bootstap thing…

YS Yellow Swordfish
Yellow Swordfish
Member

The file uploader uses as it’s core the plUpload library from Moxie. This is the exact same core that WordPress uses on the media uploader in the WP admin. Like WordPress itself, plUpload also makes use of jQuery and the jQuery UI.

While it is true that you will find quite a few threads regarding the uploader and Bootstrap it most also be noted that this represents an almost insignificant fraction of those who have downloaded and use the uploader.

If you are suggesting that plUpload utilises Bootstrap then I suggest you lobby Moxie.

MP Mr Papa
Mr Papa
Member

not to be argumentative, but perhaps more insight… ;)

chicken and egg problem really…  wp includes jQuery UI with core…  by default, WP only uses it in the admin, but the API fully supports using it on the front end too – just like we do…  themes have largely gotten away with using bootstrap because they only load it on the front end…  and when bootstrap and jquery ui are both loaded, bootstrap will stomp on the wp api included jquery ui…  but any theme that loads bootstrap will have problems with any plugin in use that adds jquery ui to the front end…  and there numerous of those with similar reports…

so what is one to do??  hopefully, if bootstrap popularity grows, it will become fully supported by wp and proper loading order with jquery ui ensured..

which support forum were you looking at?  we have handful (or two at most) of conflicts with themes that load bootstrap…  a pretty low number really…  and as Andy said, its a 3rd party library so any such change to it would have to occur upstream…

If I were writing a theme that used bootstrap and was aware that it conflicted with the wp jquery ui, I would ensure that bootstrap was loaded after jquery ui since I was loading some js outside the wp provide libraries (yes, the api supports loading any js from outside wp)…  the above mentioned support topics have explained how to do that in the theme…

That said, thinking out loud, I wonder if we could also deregister jquery ui and then reregister it as dependency on bootstrap?  a bit hacky though since 99.9% of our installs wouldnt have such a dependency…  the problem with this implementation is that we would have to guess the handle for the theme loaded bootstrap… the theme can call it whatever they want… from the theme perspective, jquery ui is guaranteed to remain the same for any install since its part of wp core…

XD xDave
xDave
Member

Oh. Its very hard for me to follow some of the complicated sentence of the last reply. To be honest I don´t really have a clue what you are talking about , sorry :(

I´m only a guy making a community page for about 50 ppl. I spent my own money in the membership here, in the theme, in the webserver. I can handle some php snippets, CSS and the Administration. But I am not earning anything with that. I´m doing it just for “fun”. Finding and fixing errors is only the necessary evil for me.

When I don´t know a thing about something I go and buy the service for me in trust, that these professionals know their business. And after having spent about 100€ for this project (which is by far the most expensive page I ever did) I only want it to work as intended. Okay 95% of the functions work as intended, but this particular thing NOT working is gnawing…

MP Mr Papa
Mr Papa
Member

no worries xDave… understand…  and we can help you sort the ordering in your theme if you like…  but I dont see a link to your site in this topic??  I know Andy has been helping you with other stuff so he may know it, but can you share a link?  or better yet, find the location in the theme where bootstrap is loaded and we can give you code to change to see if it clears it up…

XD xDave
xDave
Member

Yeah, Andy already took a look. Its teso.trollpit.de. 

MP Mr Papa
Mr Papa
Member

so yeah, lots of bootstrap…

<script type=’text/javascript’ src=’http://teso.trollpit.de/wp-content/themes/oblivion/js/bootstrap-transition.js?ver=3.8.1′></script>
<script type=’text/javascript’ src=’http://teso.trollpit.de/wp-content/themes/oblivion/js/bootstrap-tooltip.js?ver=3.8.1′></script>
<script type=’text/javascript’ src=’http://teso.trollpit.de/wp-content/themes/oblivion/js/bootstrap-button.js?ver=3.8.1′></script>
<script type=’text/javascript’ src=’http://teso.trollpit.de/wp-content/themes/oblivion/js/bootstrap-carousel.js?ver=3.8.1′></script>
<script type=’text/javascript’ src=’http://teso.trollpit.de/wp-content/themes/oblivion/js/bootstrap-collapse.js?ver=3.8.1′></script>
<script type=’text/javascript’ src=’http://teso.trollpit.de/wp-content/themes/oblivion/js/bootstrap-modal.js?ver=3.8.1′></script>

now what is interesting here is that the theme is also loading its own version of jquery ui (think Andy mentioned that before too)…  and its loading it after bootstrap stuff so that is good…

the actual problem may be the loading of its own version of jquery ui instead of using the jquery ui that comes with wp…  obviously, plugins can only test and expect the wp version, not some custom one…

I would try a quick test of where its loading its own jquery ui and switch it over to the wp version and see if it works or any ill side effects on the theme… can you find that loading in the theme?

XD xDave
xDave
Member

Could be this. Should I try what happens when I comment the bootstrap6 stuff out?

wp_register_script( ‘bootstrap1′, get_template_directory_uri().’/js/bootstrap-transition.js’,”,”,true);
wp_enqueue_script(‘bootstrap1’);
wp_register_script( ‘bootstrap2′, get_template_directory_uri().’/js/bootstrap-tooltip.js’,”,”,true);
wp_enqueue_script(‘bootstrap2’);
wp_register_script( ‘bootstrap3′, get_template_directory_uri().’/js/bootstrap-button.js’,”,”,true);
wp_enqueue_script(‘bootstrap3’);
wp_register_script( ‘bootstrap4′, get_template_directory_uri().’/js/bootstrap-carousel.js’,”,”,true);
wp_enqueue_script(‘bootstrap4’);
wp_register_script( ‘bootstrap5′, get_template_directory_uri().’/js/bootstrap-collapse.js’,”,”,true);
wp_enqueue_script(‘bootstrap5’);
wp_register_script( ‘bootstrap6′, get_template_directory_uri().’/js/bootstrap-modal.js’,”,”,true);
wp_enqueue_script(‘bootstrap6’);

YS Yellow Swordfish
Yellow Swordfish
Member

You seem to be looking at the right code so in the right area. I wouldn’t comment it out though – that would almost certainly upset other stuff.

What else is around this code? What about jQuery and the jQuery UI scripts? Are they being loaded near there as well and if so could you paste the whole lot? Using the Syntax Highlighter button would be best. Paste the code. Select it carefully and then click on the button on the toolbar and specify php.

MP Mr Papa
Mr Papa
Member

first thing I would try is change:

wp_register_script( ‘custom_js2′,  get_template_directory_uri().’/js/jquery-ui-1.10.3.custom.min.js’,”,”,true);

to

wp_enqueue_script(‘jquery-ui’, false, array(‘bootstrap6’, ”, true)

XD xDave
xDave
Member

This only gives me a “white page”after the change. 

 

wp_register_script(‘jquery-ui’, false, array(‘bootstrap6’, ”, true);
wp_enqueue_script(‘jquery-ui’);
YS Yellow Swordfish
Yellow Swordfish
Member

Well to start with that is not the code that Steve suggested you use….

XD xDave
xDave
Member

You are right Andy. I exchanged it now but the effect is pretty much the same. The only thing i changed now ist a Semikolon, I added at the end.