Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
Uploader 'Start Upload' Botton does nothing
Avatar
Rick R
Philadelphia, PA
Member
sp_UserOfflineSmall Offline
Jan 29, 2017 - 11:36 am

Hi all - 

Thank you for making such a great Forum product. Purchased the 'Gold' membership and we are enjoying the plugins! 

Like a few others, we are having trouble with the upload button. Read through a few other topics and verified some of the items your team has asked others to check. After reading same, I am sure it is related to Bootstrap in the very popular, Kleo theme.

Referencing this post - https://simple-press.com/suppo.....2/#p163786

Trying to figure out a similar code tweak that you had that user implement in their theme's functions.php - my functions.php is below - hoping you can lend a code tweak for me to put in the Kleo child theme's function.php

a few relevant sections from mine...    Thanks much for your help!   -Rick

 

/* Register the styles */

/* register only when Theme options - combine option is OFF */
if ( sq_option( 'perf_combine_css', 0 ) == 0 ) {
wp_register_style( 'bootstrap', get_template_directory_uri() . '/assets/css/bootstrap' . $min . '.css', array(), $version, 'all' );
wp_register_style( 'kleo-app', get_template_directory_uri() . '/assets/css/app' . $min . '.css', array(), $version, 'all' );
wp_register_style( 'magnific-popup', get_template_directory_uri() . '/assets/js/plugins/magnific-popup/magnific.css', array(), $version, 'all' );

wp_enqueue_style( 'bootstrap' );
wp_enqueue_style( 'kleo-app' );
wp_enqueue_style( 'magnific-popup' );
}

 

//head scripts
wp_register_script( 'kleo-init', get_template_directory_uri() . '/assets/js/init.js', array(), $version, false );
wp_register_script( 'modernizr', get_template_directory_uri() . '/assets/js/modernizr.custom.46504.js', array(), $version, false );

/* Footer scripts */
if ( sq_option( 'perf_combine_js', 0 ) == 1 ) {
wp_register_script( 'kleo-combined', get_template_directory_uri() . '/assets/js/combined' . $min . '.js', array( 'jquery' ), $version, true );
} else {
wp_register_script( 'bootstrap', get_template_directory_uri() . '/assets/js/bootstrap' . $min . '.js', array( 'jquery' ), $version, true );

 

/* Footer scripts */
if ( sq_option( 'perf_combine_js', 0 ) == 1 ) {
wp_register_script( 'kleo-combined', get_template_directory_uri() . '/assets/js/combined' . $min . '.js', array( 'jquery' ), $version, true );
} else {
wp_register_script( 'bootstrap', get_template_directory_uri() . '/assets/js/bootstrap' . $min . '.js', array( 'jquery' ), $version, true );

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 29, 2017 - 4:57 pm

It would be worth starting my moving the bootstrap script...

wp_register_script( ‘bootstrap’,... etc.,

out of the footer scripts and in to the head scripts section. See if that helps.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Rick R
Philadelphia, PA
Member
sp_UserOfflineSmall Offline
Jan 29, 2017 - 9:18 pm

Tried your suggestion - unfortunately, it did not help. 

 

Below, I've pasted the section of functions.php that has the bootstrap mentioned (you can see where I moved bootstrap into header)

Thanks

-Rick

 

/***************************************************
* :: Scripts/Styles load
***************************************************/

add_action( 'wp_enqueue_scripts', 'kleo_frontend_files' );
if ( ! function_exists( 'kleo_frontend_files' ) ) :
// Register some javascript files
function kleo_frontend_files() {
$min = sq_option( 'dev_mode', 0 ) == 1 ? '' : '.min';

/* If remove query option is ON */
if ( sq_option( 'perf_remove_query', 0 ) == 1 ) {
$version = null;
} else {
$version = KLEO_THEME_VERSION;
}

//head scripts
wp_register_script( 'bootstrap', get_template_directory_uri() . '/assets/js/bootstrap' . $min . '.js', array( 'jquery' ), $version, true );
wp_register_script( 'kleo-init', get_template_directory_uri() . '/assets/js/init.js', array(), $version, false );
wp_register_script( 'modernizr', get_template_directory_uri() . '/assets/js/modernizr.custom.46504.js', array(), $version, false );

/* Footer scripts */
if ( sq_option( 'perf_combine_js', 0 ) == 1 ) {
wp_register_script( 'kleo-combined', get_template_directory_uri() . '/assets/js/combined' . $min . '.js', array( 'jquery' ), $version, true );
} else {

wp_register_script( 'waypoints', get_template_directory_uri() . '/assets/js/plugins/waypoints.min.js', array( 'jquery' ), $version, true );
wp_register_script( 'magnific-popup', get_template_directory_uri() . '/assets/js/plugins/magnific-popup/magnific.min.js', array( 'jquery' ), $version, true );
wp_register_script( 'caroufredsel', get_template_directory_uri() . '/assets/js/plugins/carouFredSel/jquery.carouFredSel-6.2.0-packed.js', array( 'jquery' ), $version, true );
wp_register_script( 'jquery-mousewheel', get_template_directory_uri() . '/assets/js/plugins/carouFredSel/helper-plugins/jquery.mousewheel.min.js', array(
'jquery',
'caroufredsel',
), $version, true );
wp_register_script( 'jquery-touchswipe', get_template_directory_uri() . '/assets/js/plugins/carouFredSel/helper-plugins/jquery.touchSwipe.min.js', array(
'jquery',
'caroufredsel',
), $version, true );
wp_register_script( 'isotope', get_template_directory_uri() . '/assets/js/plugins/jquery.isotope.min.js', array( 'jquery' ), $version, true );

}
wp_register_script( 'app', get_template_directory_uri() . '/assets/js/app' . $min . '.js', array( 'jquery' ), $version, true );

//not loaded by default. Only when needed by shortcodes
wp_register_script( 'three-canvas', get_template_directory_uri() . '/assets/js/plugins/snow/ThreeCanvas.js', array( 'app' ), $version, true );
wp_register_script( 'snow', get_template_directory_uri() . '/assets/js/plugins/snow/Snow.js', array( 'three-canvas' ), $version, true );
wp_register_script( 'particles-js', get_template_directory_uri() . '/assets/js/plugins/particles.min.js', array( 'jquery' ), $version, true );
wp_register_script( 'bootstrap-multiselect', get_template_directory_uri() . '/assets/js/plugins/bootstrap-multiselect.js', array( 'jquery' ), $version, true );

//enqueue them
wp_enqueue_script( 'kleo-init' );
wp_enqueue_script( 'modernizr' );

if ( sq_option( 'perf_combine_js', 0 ) == 1 ) {
wp_enqueue_script( 'kleo-combined' );
} else {
wp_enqueue_script( 'bootstrap' );
wp_enqueue_script( 'waypoints' );
wp_enqueue_script( 'magnific-popup' );
wp_enqueue_script( 'caroufredsel' );
wp_enqueue_script( 'jquery-touchswipe' );
wp_enqueue_script( 'isotope' );
}
wp_enqueue_script( 'mediaelement' );
wp_enqueue_script( 'app' );

$regular_logo = sq_option_url( 'logo', '' );
if ( is_singular() && get_cfield( 'logo' ) ) {
$regular_logo = get_cfield( 'logo' );
}
$retina_logo = sq_option_url( 'logo_retina' ) != '' ? sq_option_url( 'logo_retina' ) : '';
if ( is_singular() && get_cfield( 'logo_retina' ) ) {
$retina_logo = get_cfield( 'logo_retina' );
}
$header_height = intval( sq_option( 'menu_height', 88 ) );
$header_height_scrolled = intval( sq_option( 'menu_height_scrolled', '' ) );
$header_two_height = intval( sq_option( 'menu_two_height', 88 ) );
$header_two_height_scrolled = intval( sq_option( 'menu_two_height_scrolled', '' ) );

$obj_array = array(
'ajaxurl' => admin_url( 'admin-ajax.php' ),
'themeUrl' => get_template_directory_uri(),
'loginUrl' => site_url( 'wp-login.php', 'login_post' ),
'goTop' => sq_option( 'go_top', 1 ),
'ajaxSearch' => sq_option( 'ajax_search', 1 ),
'alreadyLiked' => sq_option( 'likes_already', 'You already like this' ),
'logo' => $regular_logo,
'retinaLogo' => $retina_logo,
'headerHeight' => $header_height,
'headerHeightScrolled' => $header_height_scrolled,
'headerTwoRowHeight' => $header_two_height,
'headerTwoRowHeightScrolled' => $header_two_height_scrolled,
'loadingmessage' => '<i class="icon icon-spin5 animate-spin"></i> ' . __( 'Sending info, please wait...', 'kleo_framework' ),
'DisableMagnificGallery' => sq_option( 'magnific_disable_gallery', '0' ),
'flexMenuEnabled' => sq_option( 'header_flexmenu', 0 ),
);
$obj_array = apply_filters( 'kleo_localize_app', $obj_array );

wp_localize_script( 'app', 'kleoFramework', $obj_array );

if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}

/* Register the styles */

/* register only when Theme options - combine option is OFF */
if ( sq_option( 'perf_combine_css', 0 ) == 0 ) {
wp_register_style( 'bootstrap', get_template_directory_uri() . '/assets/css/bootstrap' . $min . '.css', array(), $version, 'all' );
wp_register_style( 'kleo-app', get_template_directory_uri() . '/assets/css/app' . $min . '.css', array(), $version, 'all' );
wp_register_style( 'magnific-popup', get_template_directory_uri() . '/assets/js/plugins/magnific-popup/magnific.css', array(), $version, 'all' );

wp_enqueue_style( 'bootstrap' );
wp_enqueue_style( 'kleo-app' );
wp_enqueue_style( 'magnific-popup' );
}

/* Load font icons */
$override_fonts = false;
if ( is_child_theme() && file_exists( get_stylesheet_directory() . '/assets/css/fontello.css' ) ) {
$fonts_path = get_stylesheet_directory_uri() . '/assets/css/fontello.css';
$override_fonts = true;
} else {
$fonts_path = get_template_directory_uri() . '/assets/css/fontello' . $min . '.css';
}

wp_register_style( 'kleo-fonts', $fonts_path, array(), $version, 'all' );
wp_register_style( 'kleo-style', CHILD_THEME_URI . '/style.css', array(), $version, 'all' );
wp_register_style( 'kleo-rtl', get_template_directory_uri() . '/rtl.css', array(), $version, 'all' );

//load fonts file if we not overriding font file in child theme
if ( 0 == sq_option( 'perf_combine_css', 0 ) || ( 1 == sq_option( 'perf_combine_css', 0 ) && true === $override_fonts ) ) {
wp_enqueue_style( 'kleo-fonts' );
}

//enqueue required styles
wp_enqueue_style( 'mediaelement' );

} // end kleo_frontend_files()
endif;

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jan 30, 2017 - 12:03 am

are you loading the forum scripts in the footer?  on forum - integration - page and permalink...

are you using the combined js cache for forum?  if so, try clearing it on forum - toolbox - housekeeping....

odd because we have an attempt at fixing bootstrap clash with jquery ui that WP uses... and its been working...

if moving the forum scripts doesnt help, next step would be to deregister the loading of jquery ui from wp... and re-register it yourself with a dependency on bootstrap... so jquery ui loads last...

Avatar
Rick R
Philadelphia, PA
Member
sp_UserOfflineSmall Offline
Jan 30, 2017 - 10:30 am

Yes, "Load javascript in footer" is checked. Also, cleared the combined js cache

Not clear on the process of  're-register it yourself with a dependency on bootstrap'  Could use a little help with that one - I tried google- however, I just don't know enough about coding to put it all together. Could use some help, if you don't mind. 

Really appreciate it!

-Rick

Avatar
Rick R
Philadelphia, PA
Member
sp_UserOfflineSmall Offline
Jan 30, 2017 - 11:13 am

also, for what its worth...

I did search the SeventhQueen (makers of Kleo theme) forum for issues with any plugin broken functionality and bootstrap. Some of the Author's replies to these folks that are having issues...

 

*************************
It seems that this issue is caused by WHMCSConnect because it load bootstrap.js over the kleo bootstrap.js
I suggest you to contact WHMCSConnect developers and ask them about a filter that stops this plugin to load bootstrap.min.js

*************************

The problem comes from this plugin : magee-shortcodes it loads again the bootstrap js and css library over the theme bootstrap library.. look in that plugin in settings panel for an option to disable loading the bootstrap framework.

*************************

The problem is because the plugin that you use “download manager” it using and loading the bootstrap js framework over our custom bootstrap js framework.

Please look into that plugin settings page for preventing bootstrap loading, if you have no similar option please open a ticket on their forum support.

************************

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jan 31, 2017 - 1:03 am

this why loading bootstrap in a theme or plugin is not the best of ideas since WP doesnt really support it now as it conflicts with the jQuery UI that comes with WP...

before we go down the deregister path, are you sure you had bootstrap loading in the head? and then our js in the footer? both at same time...would it be possible to see this live on your site?  and check the order of loading?  if the order is right, might be something else at play...

Avatar
Rick R
Philadelphia, PA
Member
sp_UserOfflineSmall Offline
Jan 31, 2017 - 10:14 am

PM sent

Thanks

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 31, 2017 - 12:13 pm

Would you like to send that to me as well?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 31, 2017 - 3:27 pm

You know - it does look like bootstrap is still loading in the footer and I think that might be my fault,

When I asked you to move it from the footer group to the header group, I should have also asked you to change the last parameter from true to false...!

Can you try changing that - hoping it should make all the difference...

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: 619
Members: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625