Support Forum

Add Reply, New Topic and other buttons not working

HF H Finlay
H Finlay
Member

Hi, Most buttons on site are not working – I believe it is a clash with the WP theme I am using, but don’t know where the error lies. Any help here?

There are also the following errors in the Console:

Uncaught TypeError: a.widget is not a function
Uncaught TypeError: jspf(…).msDropDown is not a function

http://growgreatfruitprogram.com/forum/

Thx.

16 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

The first problem is indeed that your WordPress theme (and I am 99% sure it is the theme) IS loading a non-standard version of the jQuery Javascript library from the google CDN. Why they do this is beyond me when it can cause so many problems for well-behaved plugins that adhere to WordPress standards and the WP API.

To make it worse it is also loading a version that will disallow users of IE version 8 and below to make use of your site. Bear in mind that while these may not be great browsers there are still a large number of people using them!

There may – or may not – be another issue lurking underneath but this one is enough to cause the errors and should be fixed up first.

Personally, I would be asking the theme authors to correct this as they really should conform to standards,. If this is not possible then it is usually easy to fix but it does mean editing code and that code has to be found. 

Assuming, of course, that there is not an option within the Wp theme custom settings to NOT load the library from Google. Some have done that bless them!

 

 

HF H Finlay
H Finlay
Member

Thanks, I will pass this on to theme author to fix, and see if this the cause.

IK Ike
Ike
Member

Fingers crossed they can work something out, let us know how you get on!

HF H Finlay
H Finlay
Member

Hmm, looks like I’m on my own with this…

So, firstly what code should I be looking for, and how does it need to change.

TIA

YS Yellow Swordfish
Yellow Swordfish
Member

Oh this is really bad. Not only are they using a non-standard version of jQuery but they are not even calling in the right way. The WordPress team have been talking about trying to stamp this sort of thing out and just stopping execution when this sort of thing turns up but so far they have not actually done anything about it. I sure wish they would!

So – this is actually load with a script tag. That means you would not even get the latest version when it comes along.

File is ‘header.php’ in the templates folder. Line 47. Force loads jquery.min.js from the googlapis site. That needs to be removed. Don’t lose it though. If things go wrong you may need to put it back until we find out what the problem is.

Then in the file spFunctions.php in the templates folder try adding the following on the line after the opening php tag at the top:

add_action( 'wp_enqueue_scripts', 'load_up_jquery' );
function load_up_jquery() {
    wp_enqueue_script( 'jquery' );
}

The it is time to see what you have! And hope that the theme authurs have not left anything else nasty sitting around.

HF H Finlay
H Finlay
Member

Hi, thanks for your reply.

First instruction is Ok, but do not see the file “spFunctions.php in the templates folder “.

Cheers, Hugh >

YS Yellow Swordfish
Yellow Swordfish
Member

Whoops! Sorry. Wasn’t thinking, That’s just functions,php

WE Wendell
Wendell
Member

hi @yellow-swordfish! this is happening to me as well.

 

add reply, add topic, quote and delete buttons not working – but edit and thanks button are fine.

im using the KLEO theme and i just updated.

here is my site –> http://brgyginebra.ph

MP Mr Papa
Mr Papa
Member

better to start your own topic than add on to another…

more than likely because you are caching the forum page

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Object Caching 2936/2987 objects using disk

 Served from: brgyginebra.ph @ 2016-02-25 13:33:59 by W3 Total Cache -->

since the forum page is dynamic in nature, you cannot cache it..  you need to tell w3 total cache to ignore the wp page the forum is on for all caching types…

are you not getting a warning on the sp admin panels about w3 total cache??

WE Wendell
Wendell
Member

the forum page is not cached. even if i deactivate w3 total cache the buttons still don’t work.

HF H Finlay
H Finlay
Member

Yellow Swordfish said
Oh this is really bad. Not only are they using a non-standard version of jQuery but they are not even calling in the right way. The WordPress team have been talking about trying to stamp this sort of thing out and just stopping execution when this sort of thing turns up but so far they have not actually done anything about it. I sure wish they would!

So – this is actually load with a script tag. That means you would not even get the latest version when it comes along.

File is ‘header.php’ in the templates folder. Line 47. Force loads jquery.min.js from the googlapis site. That needs to be removed. Don’t lose it though. If things go wrong you may need to put it back until we find out what the problem is.

Then in the file spFunctions.php in the templates folder try adding the following on the line after the opening php tag at the top:

 

add_action( 'wp_enqueue_scripts', 'load_up_jquery' );
function load_up_jquery() {
    wp_enqueue_script( 'jquery' );
}

 

The it is time to see what you have! And hope that the theme authurs have not left anything else nasty sitting around.

 Hi, Author not proving very helpful, but I am nervous about breaking my site. Presumably I can ftp in amended functions.php and header.php and then replace with originals if something doesn’t work? I have backed up the site as a first step. 

IK Ike
Ike
Member

Absolutely. If you make a local copy of your functions.php and header.php and things go wrong, putting them back via ftp will restore things to how they were before.