bootstrap-3-shortcodes icon indicating copy to clipboard operation
bootstrap-3-shortcodes copied to clipboard

Uncaught TypeErrors

Open SmashBrando opened this issue 12 years ago • 4 comments

When viewing the console I get the following errors.

Uncaught TypeError: Object [object Object] has no method 'tooltip

Uncaught TypeError: Object [object Object] has no method 'popover'

This causes errors to pop up in IE.

You can view the errors here (this is a clean build using the latest version of WP and this plugin. I have tested both 2012 and 2013 to make sure it was not a theme conflict).

http://playground.bldsvr.com/

p.s. php_markdown is not being included in the master download using the download zip feature of github. I'm not sure what the issue is there.

SmashBrando avatar Jan 15 '14 23:01 SmashBrando

The site you linked doesn't seem to include the Bootstrap javascript, which is required to use this plugin. Can you add that to your theme and see if the problem persists?

Regarding php_markdown, this is an issue with GitHub; php_markdown is a submodule, and the .zip download feature of GitHub doesn't include submodules. You can get a fully functional download of the plugin, with any and all submodules included, from http://filipstefansson.com/bootstrap-3-shortcodes/

MWDelaney avatar Jan 16 '14 01:01 MWDelaney

The site is running bootstraps js. It has been minified using grunt into scripts.min.js - http://playground.bldsvr.com/wp-content/themes/roots-master/assets/js/scripts.min.js?ver=01d073428e4e54f227f8a0a3bad4b804

Grunt is compiling the following -

            'assets/js/plugins/bootstrap/alert.js',
            'assets/js/plugins/bootstrap/button.js',
            'assets/js/plugins/bootstrap/carousel.js',
            'assets/js/plugins/bootstrap/collapse.js',
            'assets/js/plugins/bootstrap/dropdown.js',
            'assets/js/plugins/bootstrap/modal.js',
            'assets/js/plugins/bootstrap/tooltip.js',
            'assets/js/plugins/bootstrap/popover.js',
            'assets/js/plugins/bootstrap/scrollspy.js',
            'assets/js/plugins/bootstrap/tab.js',
            'assets/js/plugins/bootstrap/affix.js',

I installed a theme that uses bootstrap.min.js (TWBS3) and have the same result.

SmashBrando avatar Jan 16 '14 04:01 SmashBrando

Aha, but scripts.min.js is being called in the footer AFTER bootstrap-shortcodes-tooltip.js and bootstrap-shortcodes-popover.js.

abf5dadc0c4396de472c44b968312e8ac494cca3 lowers the priority of the tooltip and popover scripts, which should make them load after scripts.js in your theme (and any other themes which load the Bootstrap js in the footer). Can you try that and let me know?

MWDelaney avatar Jan 16 '14 10:01 MWDelaney

Theoretically that works, but was in conflict with the same priority of my scripts file. Since it doesn't need to run prior to anything, a priority of 9999 would be safer.

SmashBrando avatar Jan 17 '14 00:01 SmashBrando