Support Forum
Hi to everyone.
I am experiencing some problems with SP on Dynamix Premium Theme. Looking around with Firebug on Console i have this error:
jspf(function(jspf){vtip();})
and i can't do anything because Add Topic, Add Reply doesn't call any js event and the Reply Textarea doesn't show.
PS: I forced the theme to load the wp-version of Jquery and added the include of jquery.cookie plugin that was missing. Someone can help me solving that?
Looking at your site it looks like you are still using a Google API js. ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js
http://codex.simple-press.com/.....-conflict/
for more info...
Visit Cruise Talk Central and Mr Papa's World
Ok. In the functions.php file of my template there were all the
wp_deregister_script('jquery-ui-core');
I have replaced all of them with:
wp_enqueue_script('jquery-ui-core');
wp_enqueue_script('jquery-ui-tabs');
[...]
but it seems that jquery-ui is not loaded.
Here's my functions.php js loading section (now. The old version below this):
<?php if (!is_admin()) if(!session_id()) session_start(); /***************************************************************/ /* Initialise DynamiX and JQUERY Scripts */ /***************************************************************/ function init_dynscripts() { if (!is_admin()) { if ( function_exists('bp_is_blog_page')) { if (!bp_is_blog_page()) { wp_enqueue_script( 'bp-js', BP_PLUGIN_URL . '/bp-themes/bp-default/_inc/global.js', array( 'jquery' ) ); } } wp_register_style('dynamix-style', get_bloginfo('stylesheet_url'),false,null); wp_enqueue_style('dynamix-style'); wp_dequeue_style('em-ui-css'); // stop Event Manager jQuery UI CSS interfering. wp_enqueue_script('jquery'); wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-ui-tabs'); wp_register_script('jquery-cookie', get_bloginfo('template_directory').'/js/jquery.cookie.js',false,null); wp_enqueue_script('jquery-cookie'); wp_deregister_script( 'dynamix' ); wp_register_script( 'dynamix', get_bloginfo('template_directory').'/js/dynamix.min.js',false,null); wp_enqueue_script( 'dynamix' ); if(get_option('jwplayer_js')) { // Check jw player javascript file is present $CWZ_jwplayer_js = get_option('jwplayer_js'); wp_deregister_script( 'jw-player' ); wp_register_script( 'jw-player', $CWZ_jwplayer_js ); wp_enqueue_script( 'jw-player' ); } } } add_action('init', 'init_dynscripts',100); /***************************************************************/ /* Initialise DynamiX and JQUERY Scripts *END* */ /***************************************************************/
Here's the originial with just the jquery loaded as WP-version:
<?php if (!is_admin()) if(!session_id()) session_start(); /***************************************************************/ /* Initialise DynamiX and JQUERY Scripts */ /***************************************************************/ function init_dynscripts() { if (!is_admin()) { if ( function_exists('bp_is_blog_page')) { if (!bp_is_blog_page()) { wp_enqueue_script( 'bp-js', BP_PLUGIN_URL . '/bp-themes/bp-default/_inc/global.js', array( 'jquery' ) ); } } wp_register_style('dynamix-style', get_bloginfo('stylesheet_url'),false,null); wp_enqueue_style('dynamix-style'); wp_dequeue_style('em-ui-css'); // stop Event Manager jQuery UI CSS interfering. wp_deregister_script('jquery-ui-core'); wp_deregister_script('jquery-ui-tabs'); wp_deregister_script('jquery-ui-sortable'); wp_deregister_script('jquery-ui-draggable'); wp_deregister_script('jquery-ui-droppable'); wp_deregister_script('jquery-ui-selectable'); wp_deregister_script('jquery-ui-resizable'); wp_deregister_script('jquery-ui-dialog'); wp_deregister_script('jquery-ui'); wp_deregister_script('jquery-ui-core'); wp_deregister_script('jquery-ui-datepicker'); wp_enqueue_script( 'jquery' ); wp_register_script('jquery-cookie', get_bloginfo('template_directory').'/js/jquery.cookie.js',false,null); wp_enqueue_script('jquery-cookie'); wp_register_script( 'jquery-ui-core', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js',false,null); wp_enqueue_script( 'jquery-ui-core' ); wp_deregister_script( 'dynamix' ); wp_register_script( 'dynamix', get_bloginfo('template_directory').'/js/dynamix.min.js',false,null); wp_enqueue_script( 'dynamix' ); if(get_option('jwplayer_js')) { // Check jw player javascript file is present $CWZ_jwplayer_js = get_option('jwplayer_js'); wp_deregister_script( 'jw-player' ); wp_register_script( 'jw-player', $CWZ_jwplayer_js ); wp_enqueue_script( 'jw-player' ); } } } add_action('init', 'init_dynscripts',100); /***************************************************************/ /* Initialise DynamiX and JQUERY Scripts *END* */ /***************************************************************/
I still see jquery ui loaded from google apis:
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js'></script>
what about the other jquery ui elements? not needed?
Visit Cruise Talk Central and Mr Papa's World
You're seeing that because i restored the default theme loading from googleapis. Now i enqueued all the Ui components but the sliding show effect of the dropdown menu tab named Chi Siamo (there's the subpage that should show with sliding effect but in Firebug when i am onmouseover i get:
f.easing[i.animatedProperties[this.prop]] is not a function
Here's my functions.php
<?php if (!is_admin()) if(!session_id()) session_start(); /***************************************************************/ /* Initialise DynamiX and JQUERY Scripts */ /***************************************************************/ function init_dynscripts() { if (!is_admin()) { if ( function_exists('bp_is_blog_page')) { if (!bp_is_blog_page()) { wp_enqueue_script( 'bp-js', BP_PLUGIN_URL . '/bp-themes/bp-default/_inc/global.js', array( 'jquery' ) ); } } wp_register_style('dynamix-style', get_bloginfo('stylesheet_url'),false,null); wp_enqueue_style('dynamix-style'); wp_dequeue_style('em-ui-css'); // stop Event Manager jQuery UI CSS interfering. wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-ui-tabs'); wp_enqueue_script('jquery-ui-sortable'); wp_enqueue_script('jquery-ui-draggable'); wp_enqueue_script('jquery-ui-droppable'); wp_enqueue_script('jquery-ui-selectable'); wp_enqueue_script('jquery-ui-resizable'); wp_enqueue_script('jquery-ui-dialog'); wp_enqueue_script('jquery-ui'); wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-ui-datepicker'); wp_enqueue_script( 'jquery' ); wp_register_script('jquery-cookie', get_bloginfo('template_directory').'/js/jquery.cookie.js',array('jquery'),null); wp_enqueue_script('jquery-cookie'); wp_register_script( 'jquery-ui-core', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js',false,null); wp_enqueue_script( 'jquery-ui-core' ); wp_deregister_script( 'dynamix' ); wp_register_script( 'dynamix', get_bloginfo('template_directory').'/js/dynamix.min.js',false,null); wp_enqueue_script( 'dynamix' ); if(get_option('jwplayer_js')) { // Check jw player javascript file is present $CWZ_jwplayer_js = get_option('jwplayer_js'); wp_deregister_script( 'jw-player' ); wp_register_script( 'jw-player', $CWZ_jwplayer_js ); wp_enqueue_script( 'jw-player' ); } } } add_action('init', 'init_dynscripts',100); /***************************************************************/ /* Initialise DynamiX and JQUERY Scripts *END* */ /***************************************************************/
Now it seems loading ui components but anyway i have the problem i explained up here on sliding dropdowns. 😀
Ok i solved. It was missing jquery.easing plugin, so here's the complete workaround:
- Download Jquery.cookie and Jquery.easing plugins
- Rename them in jquery.cookie.js and jquery.easing.js
- Put them in /wordpressfolder/wp-content/themes/Dynamix/js
- Edit functions.php of the theme from
***************************************************************/ /* Initialise DynamiX and JQUERY Scripts */ /***************************************************************/
to:
/***************************************************************/ /* Initialise DynamiX and JQUERY Scripts *END* */ /***************************************************************/
pasting this:
/***************************************************************/ /* Initialise DynamiX and JQUERY Scripts */ /***************************************************************/ function init_dynscripts() { if (!is_admin()) { if ( function_exists('bp_is_blog_page')) { if (!bp_is_blog_page()) { wp_enqueue_script( 'bp-js', BP_PLUGIN_URL . '/bp-themes/bp-default/_inc/global.js', array( 'jquery' ) ); } } wp_register_style('dynamix-style', get_bloginfo('stylesheet_url'),false,null); wp_enqueue_style('dynamix-style'); wp_dequeue_style('em-ui-css'); // stop Event Manager jQuery UI CSS interfering. wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-ui-tabs'); wp_enqueue_script('jquery-ui-sortable'); wp_enqueue_script('jquery-ui-draggable'); wp_enqueue_script('jquery-ui-droppable'); wp_enqueue_script('jquery-ui-selectable'); wp_enqueue_script('jquery-ui-resizable'); wp_enqueue_script('jquery-ui-dialog'); wp_enqueue_script('jquery-ui'); wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-ui-datepicker'); wp_enqueue_script( 'jquery' ); wp_register_script('jquery-cookie', get_bloginfo('template_directory').'/js/jquery.cookie.js',array('jquery'),null); wp_enqueue_script('jquery-cookie'); wp_register_script('jquery-easing', get_bloginfo('template_directory').'/js/jquery.easing.js',array('jquery'),null); wp_enqueue_script('jquery-easing'); wp_deregister_script( 'dynamix' ); wp_register_script( 'dynamix', get_bloginfo('template_directory').'/js/dynamix.min.js',false,null); wp_enqueue_script( 'dynamix' ); if(get_option('jwplayer_js')) { // Check jw player javascript file is present $CWZ_jwplayer_js = get_option('jwplayer_js'); wp_deregister_script( 'jw-player' ); wp_register_script( 'jw-player', $CWZ_jwplayer_js ); wp_enqueue_script( 'jw-player' ); } } } add_action('init', 'init_dynscripts',100); /***************************************************************/ /* Initialise DynamiX and JQUERY Scripts *END* */ /***************************************************************/
hope it will be useful to others. 😀 Thanks for your support!
A better solution could be to use a Child Theme and write the functions.php as this:
<?php /** * DynamiX Child Theme Functions * Load languages directory for translation */ // Removing original init_dynscripts replacing with personal one /********************************************* Replacing the action for embedding JS scripts with one more compatible with plugins **********************************************/ function my_init_dynscripts_new_action () { remove_action('init','init_dynscripts',100); add_action('init','my_init_dynscripts',100); } function my_init_dynscripts() { if (!is_admin()) { if ( function_exists('bp_is_blog_page')) { if (!bp_is_blog_page()) { wp_enqueue_script( 'bp-js', BP_PLUGIN_URL . '/bp-themes/bp-default/_inc/global.js', array( 'jquery' ) ); } } wp_register_style('dynamix-style', get_bloginfo('stylesheet_url'),false,null); wp_enqueue_style('dynamix-style'); wp_dequeue_style('em-ui-css'); // stop Event Manager jQuery UI CSS interfering. wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-ui-tabs'); wp_enqueue_script('jquery-ui-sortable'); wp_enqueue_script('jquery-ui-draggable'); wp_enqueue_script('jquery-ui-droppable'); wp_enqueue_script('jquery-ui-selectable'); wp_enqueue_script('jquery-ui-resizable'); wp_enqueue_script('jquery-ui-dialog'); wp_enqueue_script('jquery-ui'); wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-ui-datepicker'); wp_enqueue_script( 'jquery' ); wp_register_script('jquery-cookie', get_bloginfo('template_directory').'/js/jquery.cookie.js',array('jquery'),null); wp_enqueue_script('jquery-cookie'); wp_register_script('jquery-easing', get_bloginfo('template_directory').'/js/jquery.easing.js',array('jquery'),null); wp_enqueue_script('jquery-easing'); wp_deregister_script( 'dynamix' ); wp_register_script( 'dynamix', get_bloginfo('template_directory').'/js/dynamix.min.js',false,null); wp_enqueue_script( 'dynamix' ); if(get_option('jwplayer_js')) { // Check jw player javascript file is present $CWZ_jwplayer_js = get_option('jwplayer_js'); wp_deregister_script( 'jw-player' ); wp_register_script( 'jw-player', $CWZ_jwplayer_js ); wp_enqueue_script( 'jw-player' ); } } } add_action('after_setup_theme', 'my_init_dynscripts_new_action'); ?>
In this way we're replacing the action of the parent theme with the one edited without hard coding anything. This will be useful for futhrt upgrades of the theme.
1 Guest(s)