Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
WP 3.3 & SP 5.0 Upgrade and serious javascript functions (topic, post, links) not working
Avatar
PCDF
Rookie
Free Members
sp_UserOfflineSmall Offline
Dec 13, 2011 - 9:16 am

I've browsed and searched this forum and tried a couple of things but the main issue still isn't resolved and I'm about to shoot my laptop. To prevent a reasonably attractive woman from pulling out her hair, PLEASE HELP ASAP on this.

So, I've recently redone a website for a client and added an SP forum, originally 4.5 or whichever it was for the latest WP version. Today, we get the WP 3.3 upgrade notice and I did that without issues. Then I get the SP upgrade noticed and decided to go with 5.0. It loaded fine, installed fine, everything went well...

And then on the page itself where the forum is, everything looks fine until you try to click anything and nothing actually works. The New Topic doesn't do anything but reload the page. The menus pop up and stay up, but don't go to the forum listed. The edit function didn't work but I managed to fix that somehow and don't ask what I did because I don't have a clue. The little profile icons don't do anything, clicking on member name links down bottom doesn't work, and while the profile button up top works, once in, there's no getting out...the drop down menu doesn't work at all, clicking on the forum links don't work, and the only way out is either to delete the profile part of the url path back to the main page, or click the button to show recent user posts. 

I have the required footer/problem-with-post-edit-buttoneader code, but haven't found the _content code in either the page or index, but it's all loaded fine. The option to force js in the footer was on, I turned it off and the forum menu drops down and works. 

I really need to get this fixed asap so they can have full site functionality but the javascript:void tool tip pops up when trying to click on member names, nothing happens. Still can't post or make new topics. I did install and activate all the plugins offered on the download page to check them out but deactivated them and the problem persists. The plugins for WP are staying, so removing them is not an option. Removing the SP forum will be the solution if it comes to having to choose...but a nice forum integrated with the theme is preferred so I'd like to find a real solution in a hurry if you can help. If there is no solution for 5.0, is there a way to downgrade back to a previous version since it did at least work? Well, except for some warped thing where all the apostrophes became quotes.

For the record, I did check out a few polls and plugins that seemed to use a flash/javascript sort of function and it doesn't work on those either so I had to get rid of them.

Here's the link to the forum page http://freepaulcortez.org/?page_id=1227 need a real solution else this makes me look bad since I assured them I could get the job done. I just have no idea why this isn't working so I don't know where to even look for a solution...so here I am. 

This is so exasperating. Why can't stuff just work right the first time anymore ;-p Grrr.

 

On a separate note, when I registered to post this, I see that really fab little captcha with dragging the thing in the circle, and the sign on options - what are those and where could I find them? Also, the theme used for this forum is nice, which one is that and is it available with 5.0?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 13, 2011 - 9:59 am

Well let's take it one step at a time.

Using the Firebug console virtually every time I click on anything (i.e., the stuff that doesn't work!) I see an error reported using the jQuery 'easing' library. This is supplied by the theme. So this would be the first problem to sort out.

I don't know how much you now about jQuery but if something breaks it it does have a habit of closing down so that all subsequent calls also fail. This sometimes means that the actual problem is not necessarily in the library reported in the console but it is the only place to start.

So what is the 'easing' library doing and used for? The interesting thing is that the error pops u as soon as I hover the mouse cursor over a link or button. I don't have to click - just hover. That suggests it is doing something to links that isn't working. Only you would know hat that is.

If this worked before then it might be that the easing library is no more compatible with the new version of jQuery and the jQuery UI libraries that are supplied and used by both WordPress 3.3 and SP 5. So it would be worth checking if the Wp theme you are using also has an upgrade available.

Or - are you able to turn off this odd easing/link behaviour so we can see what is what?

andy-signature.png
YELLOW
SWORDFISH
Avatar
PCDF
Rookie
Free Members
sp_UserOfflineSmall Offline
Dec 13, 2011 - 10:21 am

First, thanks so much for getting back to me really soon, it's appreciated.

Second, I don't have a clue what any of that means you wrote 😉 I get the concept but specifically what it is, where it is, how to fix it, no idea. Is there a layman's version? 

The old version worked before except for one minute it's fine and the next reload, the apostrophes turned to quotes. I checked the source when I finally got the edit button to work and show the post editor (in 5.0) and all the ' and " were the ascii code instead...which is going to be a pain trying to right all those...

So what is the 'easing' library doing and used for? The interesting thing is that the error pops u as soon as I hover the mouse cursor over a link or button. I don't have to click – just hover. That suggests it is doing something to links that isn't working. Only you would know hat that is.

Then I'm probably about to be in a mess because nope, I don't have any idea what that is. Nothing hovers up on me so I'm a bit lost on this part. What is an easing library?

 

The theme has no upgrade, it was a nice freebie one and built probably a year ago. I had to do some tweaking to it regardless and get rid of that obnoxious base64 code and that's been the main problem - it tends to freeze the footer and bottom segment. I've messed with it for days and the only solution that doesn't destroy the whole theme is to get rid of the nasty code using comments over and below the get footer tag, copy all that and replace the ugly stuff...but it keeps showing the current scripts. In order to get it functional, I had to disable all plugins that show code in the footer, so it's only bare footer code...then add in only the relevant plugins, copy that back into the footer.php so it shows up but I can't change anything. 

But from the code itself, everything was where it should be except the footer tag, which I added in. There was this code in the header that I removed and replaced with the one below, which is, I think, what at least made the edit button work and the editor show up at all but I'm not positive.

Original - 

?php
if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); wp_head(); ?

 

replaced with ?php wp_head(); ? only because I wasn't sure what of the above I could scrap...

 

I'm learning all this sort of thing but while I greatly appreciate your response, it's still a little too high over my knowledge base level 😉 Plan B?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 13, 2011 - 11:15 am

I don't really have a plan B I'm afraid!

So let's talk easing to see if any of this rings a bell because if you are not using it then you may as well disable it.

The jQuery 'easing' library adds fancy animation effects. If you google 'jquery easing' you can see the website with examples. Bounce effects to divs and text and stuff like that. This is, as I say, erroring every time i hover over a button. Looking at the source code being generated I can see that the theme does indeed add something to the 'hover' mechanism but I have no idea what it does.

So - does the theme not come with any options where these sort of things can be turned on and off? Because - as I said before - this might not even be the actual conflict but it needs to be got out of the way and corrected to see what we are left with.

Oh - there is also another snippet of inline javascript setting something to WordPress 3.2. I don't know what that is about either and it's probably harmless but I thought I should mention it.

andy-signature.png
YELLOW
SWORDFISH
Avatar
PCDF
Guest
Guests
Dec 13, 2011 - 1:33 pm

Where about in the theme or ? should I look?

And apologies for the delay in answering but this problem was superseded by yet another warped thing turning all my spaces, dashes and the occasional semi colons to question marks...wow, can't win for losing today.

I do know that the hover thing happens on the SP forum tables, which, if there's a way to turn that off that would be extra appreciated because it's annoying. I don't like flashing stuff, but particularly on this site, the flashy bits aren't appropriate. 

The theme - far as I know - has nothing that can be turned on/off specifically, unless you're talking about inside the code, but where would I look for it? There is a theme options element but it's mostly for the slider thing and ads. 

Inline snippet...where was that?

 

PS that drag captcha thing is really cool. I definitely want one 😉

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 13, 2011 - 2:43 pm

OK - I loaded your forum page. I opened up the view source and selected it all and copied it to an html file which I then loaded into my browser from my desktop. Had, of course, the same problems.

I then deleted the hover script and removed the loading of the easing library and loaded it up again and the forum components all start to work so this is the first big problem area.

I can't really see what that easing script is there for. It doesn't actually seem to be used as far as I can ascertain and I looked at most of the pages. if I were you I would remove the damn thing and see what happens.

Try looking in the theme functions.php file which is the most likely place ity is loaded - that or the header.php file of course. Look for the line that loads the jquery.easing.js script and a piece of inline script code that starts with

sfHover = function() {

and I would just remove it and see what happens.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Seberius
Guest
Guests
Dec 13, 2011 - 9:59 pm

I have (had) the same problem with JQuery not working properly.  After reading Yellow Swordfish's excellent information, I went poking around with Firebug.  I first found a call to a "non-existent function" for audio player script I don't use, and the error occurred on every page.  Found it being called(?) in the header (using Notepad++ to search my entire WP backup directory), and took it out.  Now the error is gone.

 

Still broken though, so I looked a little more.  Now that first error is gone, JQuery is trying to run another broken script file with the same error.  I remove it from the header and the theme-functions.php file, and again that is fixed.  But no dice.  Now there is an error that only appears on the forum page.  Something is not a function in the theme's unhelpfully named "custom.js" file (I wonder what it does).  I removed that from theme-functions as well and...

 

Flawless Victory cool

 

I have spent more time than I will admit trying to fix this (months), with no previous success.  Now it works!  And I didn't realize how much it was breaking on the forums, they are even nicer than previously thought.

 

I nominate Yellow Swordfish for all around awesome guy.

 

Seb

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 13, 2011 - 10:05 pm

thanks! on behalf of Andy... wink

we like good success stories!

Avatar
PCDF
Guest
Guests
Dec 13, 2011 - 10:39 pm

Is it possible for you to pop me an email with the source and what page it was on? I can paste it in there and that would be much easier so I can see what you're referring to. 

 

I checked functions and that's not in there at all, just the basic components. I looked in header.php and found what appears to be what you're describing - I'll add the lines immediately above and below this snip of code and if you wouldn't mind showing which part to remove I will be eternally grateful...

-]]link rel="stylesheet" type="text/css" href="]]?php bloginfo('template_directory'); ?]]/glide.css" media="screen" />

]]?php

wp_enqueue_script('jquery');

wp_enqueue_script('cufon', get_stylesheet_directory_uri() . '/js/cufon.js');

wp_enqueue_script('easing', get_stylesheet_directory_uri() . '/js/jquery.easing.1.1.js');

wp_enqueue_script('carousal', get_stylesheet_directory_uri() . '/js/jcarousel.js');

wp_enqueue_script('Myriad', get_stylesheet_directory_uri() . '/js/Myriad_Pro_700.font.js');

wp_enqueue_script('Effects', get_stylesheet_directory_uri() .'/js/effects.js');

?]]

]]script type="text/javascript"]] ]]!--//--]] ]]![CDATA[//]] ]]!--

sfHover = function() {

if (!document.getElementsByTagName) return false;

var sfEls1 = document.getElementById("catmenu").getElementsByTagName("li");

for (var i=0; i<sfEls1.length; i++) {

sfEls1[i].onmouseover=function() {

this.className+=" sfhover1";

}

sfEls1[i].onmouseout=function() {

this.className=this.className.replace(new RegExp(" sfhover1\b"), "");

}

}

var sfEls1 = document.getElementById("menu").getElementsByTagName("li");

for (var i=0; i<sfEls1.length; i++) {

sfEls1[i].onmouseover=function() {

this.className+=" sfhover";

}

sfEls1[i].onmouseout=function() {

this.className=this.className.replace(new RegExp(" sfhover\b"), "");

}

}

}

if (window.attachEvent) window.attachEvent("onload", sfHover);

//--]] ]]!]]]]]]/script]]

]]?php wp_get_archives('type=monthly&format=link'); ?]]

]]?php //comments_popup_script(); // off by default ?]]

]]?php wp_head(); ?]]

]]/problem-with-post-edit-buttonead]]

Avatar
PCDF
Guest
Guests
Dec 13, 2011 - 11:55 pm

I would still greatly value your feedback to be sure I did this correctly - but since I'm not sure when you'll be back around, I decided to give it a shot as best as I understood your suggestion. In header.php I just deleted this snippet only:

 

?php
wp_enqueue_script('jquery');
wp_enqueue_script('cufon', get_stylesheet_directory_uri() . '/js/cufon.js');
wp_enqueue_script('easing', get_stylesheet_directory_uri() . '/js/jquery.easing.1.1.js'); (removed)
wp_enqueue_script('carousal', get_stylesheet_directory_uri() . '/js/jcarousel.js');
wp_enqueue_script('Myriad', get_stylesheet_directory_uri() . '/js/Myriad_Pro_700.font.js');
wp_enqueue_script('Effects', get_stylesheet_directory_uri() .'/js/effects.js');

?

 

And it's now appearing to work...everything works and reloads as it's supposed to with one slight snag...having removed the enqueue stuff, the forum works but the glider no longer works and is warped out and disjointed. I put the entire code back and only removed the easing1.1 line and it now displays properly but it no longer glides. The forum is still working, however, but now I need to make the glider glide again. Instead, it just jumps the page down a bit. the prev/next buttons don't do anything anymore.

 

As for the script element mentioned last post, I didn't mess with that - the sf hover - should I leave it alone or remove it or? 

 

At least it feels like I'm getting somewhat closer. What do you suggest from here?

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: 617
Members: 17359
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10125
Posts: 79620