Support Forum

Editing posts and Editor TinyMCE Rich Text

24 Answers

New Answer

TS T M Shaw
T M Shaw
Member

Hi Fellas, so after having made repeated request for th info you requested from the theme developers and not receiving any response, are you able to advise how I find where the file is loaded in the theme ?

cheers

Mark

YS Yellow Swordfish
Yellow Swordfish
Member

It really depends on how it is loaded. If it is done properly (from the wrong location but loaded properly) then the first place to look would be your theme’s functions.php file. Look for a line of code that starts with wp_enqueue_script and if you find it copy and paste a small handful of lines either side.

Other than that you will need to see if that apepars anywhere else. often there are some php files in a theme outside of the main templates folder so eorth looking.

The last place it should be is as a direct ‘script’ statement on the theme’s header.php file and that would be the last p;lace to look. usually a small amount of detective work will find it easily enough…

TS T M Shaw
T M Shaw
Member

Ok found this …

}
if (window.attachEvent) window.attachEvent(“onload”, sfHover);
//–><!]]></script>

<?php wp_get_archives(‘type=monthly&format=link’); ?>
<?php //comments_popup_script(); // off by default ?>
<?php
if ( is_singular() ) wp_enqueue_script( ‘comment-reply’ );
wp_head(); ?>

in header.php, wasn’t in the functions.php and could not findsee it anywhere else ? … Does this help ? 

MP Mr Papa
Mr Papa
Member

No, thats not it…  look for wp_deregister_script and/or wp_register_script…

typically its in header.php or functions.php…  but could be in just about any file…  you should be able to search from the windows or mac directory in all the files…

TS T M Shaw
T M Shaw
Member

Thanks Mr Papa ..

/**
* Remove a registered script.
*
* @since r16
* @see WP_Scripts::remove() For parameter information.
*/
function wp_deregister_script( $handle ) {
global $wp_scripts;
if ( ! is_a( $wp_scripts, ‘WP_Scripts’ ) ) {
if ( ! did_action( ‘init’ ) )
_doing_it_wrong( __FUNCTION__, sprintf( __( ‘Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.’ ),
‘

wp_enqueue_scripts

‘, ‘

admin_enqueue_scripts

‘, ‘

init

‘ ), ‘3.3’ );
$wp_scripts = new WP_Scripts();
}

$wp_scripts->remove( $handle );

In my wp-includes dir, functions.wp-scrips.php

Thanks Mark

YS Yellow Swordfish
Yellow Swordfish
Member

Whoa no… That is WP core code. You should be looking just in your WP theme files.

TS T M Shaw
T M Shaw
Member

Good grief ! …

Ok I have seven instances of wp_enqueue_scipt in my Themes Header.php..

00013: wp_enqueue_script(‘jquery’);
00014: wp_enqueue_script(‘cufon’, get_stylesheet_directory_uri() . ‘/js/cufon.js’);
00015: wp_enqueue_script(‘Rockwell’, get_stylesheet_directory_uri() . ‘/js/steelfish_400.font.js’);
00016: wp_enqueue_script(‘Effects’, get_stylesheet_directory_uri() .’/js/effects.js’);
00017: wp_enqueue_script(‘sprinkle’, get_stylesheet_directory_uri() .’/js/sprinkle.js’);
00018: wp_enqueue_script(‘jquery-ui-personalized-1.5.2.packed’, get_stylesheet_directory_uri() .’/js/jquery-ui-personalized-1.5.2.packed.js’);
00049: if ( is_singular() ) wp_enqueue_script( ‘comment-reply’ );

But nothing for register of derigister in my theme files ?

Is there somewhere i can send you a copy of the Header.php 

 

 

YS Yellow Swordfish
Yellow Swordfish
Member

This one is probably the problem one:

00018: wp_enqueue_script('jquery-ui-personalized-1.5.2.packed', get_stylesheet_directory_uri() .'/js/jquery-ui-personalized-1.5.2.packed.js');

But it makes me nervous when a theme author renames a standard library something like ‘personalised’ as you have no idea what crap they may have added to it. And that is a concern.

Anyway – you can only try. Comment it out (in case we need it again!) and replace it with:

wp_enqueue_script('jquery-ui-core');

and we will see what happens!

 

TS T M Shaw
T M Shaw
Member
query.jpg

Hiello chaps,  no joy I am afraid with the above .. thought you had it there ! ..

So reactivated Tiny plugin and as I am replying to you here, edit box has the options at the top, save the change, green tick and saved post, but no change to original.

Also the post ticker on the home page ceased to scroll and had ghosted text after the change was applied.

Ho Hum. 

MP Mr Papa
Mr Papa
Member

thats why wp devs strongly, strongly urge theme and plugin authors to not replace wp shipped libraries with their own…  just causes problems…

you may need to enqueue more than just ui core…  maybe widget and others… what was in the custom jquery ui file?

also, to get around the theme screw up, you will need to change how that occurs…  something like:

if (sp_is_forumpage()) {
    # load wp jquery ui stuff
} else {
    # load the theme crap version
}

that will get you front page back working…