Support Forum

Editor issues

39 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

Well, of course if they turn up something we are not aware of then we would welcome that knowledge.
Do you know what plugin is putting the ‘tabs’ code in place and is it possible to deactivate that to see if it is the problem?

MP Mr Papa
Mr Papa
Member

Please make sure they are enqueueing with dependencies too. Last example you posted did not make it dependent on jQuery or jQuery ui. Otherwise it might get loaded before needed components are loaded.

AM Andrew Mintram
Andrew Mintram
Member

Further reply from theme author:

I’ve done a test with the standard Theme TwentyEleven, it works fine with the quote function as standard. However if you enqueue some default jQuery Scripts using WordPress scripts / methods, it stops working. I’ve added this to the functions.php file and if you activate Twenty Eleven, you’ll see it no longer works.

function custom_scripts()
{
if ( !is_admin() )
{
wp_enqueue_script(’jquery-ui-core’,false,array(’jquery’));
wp_enqueue_script(’jquery-effects-core’,false,array(’jquery’));
}
}

add_action(’wp_enqueue_scripts’, ’custom_scripts’);

I hope this can be fixed!

Thanks,

Andy

YS Yellow Swordfish
Yellow Swordfish
Member

Can you PM me some credentials I can use so I can reply to topics on your forum?

Sorry if you have sent them to me once already but I always delete them after a few days as a matter of policy.

AM Andrew Mintram
Andrew Mintram
Member

Same credentials as in last PM should still be working, but I will resend just in case you no longer have them.

Thanks in advance. :)

YS Yellow Swordfish
Yellow Swordfish
Member

OK – so we are seeing no reportable conflicts or errors but clearly there is some sort conflict of code going on somewhere.

Would you be able to run a couple of quick experiments for me? What would be useful for starters is if we can hone in on the js library that is causing the problem. So – if you can locate the place in the WP theme code where these js libraries are enqueued you could comment out their loading and then run the forum page to see if the quote comes back to life. Of course, either way, go back and then uncomment the code again so this does not effect the loading of the rest of your site.

If this is possible then the two js files to stop loading are firstly ‘jquery.effects.core.min.js‘ and then ‘nv-script-pack.js‘. I would suggest doing these one at a time and separately.

The aim here is simply to discover where the problem lies. If we can locate that then we can start to think of ways to work around it.

One caveat though. It is possible that stopping one of these scripts from loading may then cause an error if there are any in-line calls to use them. This could then stop other features of the form from working so keeping an eye on the error console would be helpful. I would also refresh your browser cache between each quick test.

Is this all possible? It should only take a minute or so to achieve.

AM Andrew Mintram
Andrew Mintram
Member

No problem, will try and do myself later when i get home from work, and if any problems I’ll ask the theme authors help to locate the relevant lines where the js libraries are enqueued.

YS Yellow Swordfish
Yellow Swordfish
Member

I would suggest looking in the theme’s functions.php file as the probable place.

AM Andrew Mintram
Andrew Mintram
Member

OK, found the lines in the tempates.php file, and commented them out one at a time, separately.

Commenting out jquery-effects-core (note, slightly different name to that used above, but assume it is the intended file) appears to have worked. The quote function now works and a quick test of other forum functions appears to show no further problems with the site/forum.

Commenting out nv-script.pack.js (as above, note slight different name) appeared to make no difference at all.

Hopefully this will be helpful! :)

I have left the jquery-effect-core file commented out if you wish to go in and look at the site in this state. The error console only brought up the following:

PPB_Graphics2D.PaintImageData: Rectangle is outside bounds.

YS Yellow Swordfish
Yellow Swordfish
Member

You best uncomment it so that the rest of your site is not effected negatively by whatever it is used for.

So we basically have two options as I see it. We can try and skip the loading of that script library on forum pages as I don’t see anywhere it is used. Or – I can download that library to try and see if I can find out what the issue is which will take much longer of course…

AM Andrew Mintram
Andrew Mintram
Member

OK, uncommented for now.

Personally I’d be quite happy with the former as it would get the job done, but clearly the latter is of more use to you in the long run, just in case it happens with other themes?

YS Yellow Swordfish
Yellow Swordfish
Member

Let’s try it anyway. See if this works please. Wrap that enqueue statement like this:

if ( sp_is_forumpage() == false ) {
    wp_enqueue_script(....);
}

i will keep my fingers crossed!

AM Andrew Mintram
Andrew Mintram
Member

Well, it seems to work… the quote function has returned and I can’t see any side effects at present. I’ll also ask the Theme author if he thinks it will affect anything else, but it looks good so far!

MP Mr Papa
Mr Papa
Member

well, we will run some tests and see if we can duplicate the error…