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
Upgrade 4.5.1 --> 5.1.4, uploading forum images/files not working?
Avatar
chessert
Member
Free Members
sp_UserOfflineSmall Offline
Nov 12, 2012 - 7:10 pm

My forum members post/share a lot of photos, so the image/media/file upload and reuse functionality are very important.  I successfully installed the plugins for file upload and uploads viewer.

I am using the WP-Clear theme from Solostream, version 3.1.3:  http://www.ogaugehobbyist.com/wp/forum/.

In WP-Clear a good chunk of button functionality like uploading files and the forum toolset aren't working.  When I switch over to the default "Twenty Eleven" theme everything works fine.

Here's the errors from Firebug:

TypeError: document.addpost is undefined
http://www.ogaugehobbyist.com/.....eval/seq/5
Line 1

TypeError: a.ui.dialog is undefined
http://www.ogaugehobbyist.com/.....ver=1.8.20
Line 5

What do I need to update to remedy this?  I'm guessing the theme or something else is using an older version of jQuery/jQuery-ui?  WP and all plugins are up to date.

Thanks!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Nov 12, 2012 - 7:24 pm

see: http://codex.simple-press.com/.....-conflict/

If I had to guess, I would say its this:

<script type='text/javascript' src='http://www.ogaugehobbyist.com/wp/wp-content/themes/wp-clear313/admin/jquery-ui-personalized-1.5.2.packed.js?ver=3.4.2'></script>

loading an old version of jquery ui...  so see if you can find where in the theme it loads that...  and we can see if we can work around it...

Avatar
chessert
Member
Free Members
sp_UserOfflineSmall Offline
Nov 12, 2012 - 8:02 pm

It's called in a file called "theme-js.php":

if ( is_active_widget( false, false, 'sidetabs-widget' ) || is_pagetemplate_active("page-tabbed-archive.php") || is_pagetemplate_active("page-tabbed-cat.php") ) {
    wp_enqueue_script('jquery');
    wp_enqueue_script('jquery-ui-per', get_bloginfo('template_directory').'/admin/jquery-ui-personalized-1.5.2.packed.js', array('jquery'));
    wp_enqueue_script( 'sprinkle-tabs', get_bloginfo('template_directory').'/admin/sprinkle-tabs.js', array('jquery') );
}
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Nov 12, 2012 - 8:38 pm

first step, lets try changing this line

wp_enqueue_script('jquery-ui-per', get_bloginfo('template_directory').'/admin/jquery-ui-personalized-1.5.2.packed.js', array('jquery'));

to

wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-ui-widget');

then check the forum page and your other wp pages... even if it makes the forum work, it may break other stuff in his theme...

are you even using the sidetabs widget? if so, which I think you must for it to get loaded, are they in use on the forum page?

Avatar
chessert
Member
Free Members
sp_UserOfflineSmall Offline
Nov 14, 2012 - 3:13 pm

I have it working now by loading the Simple::Press scripts in the footer, but I'd still like to avoid the jquery-ui lib conflict.

Not sure about the sidetabs widget - I'll check further.

I tried your first fix, but that stopped all hover functionality - the buttons became unclickable.  Still pursuing this with the theme creators too.

I want to let you and the Simple::Press team know that 5.1.4 is awesome, and I'm very glad we made the upgrade from 4.5.1!  Getting excellent feedback from our members.  Thank you all!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Nov 15, 2012 - 5:21 am

Thanks for the supportive comments!

I am a little surprised actually that just running the scripts in the footer solves the issue. But hey - it's a good thing.

The real and proper fix really needs to come from the theme authors. The WordPress team have been trying to discourage authors from bundling these scripts for a while now - (they recently announced they will reject any plugins in their repository that do so) and hopefully will do the same for themes. It would make all of our lives easier!

Bundling old versions - and non-compatible versions - of the main libraries is bad enough but it get's a lot worse when they add custom code into the same file which looks like the case with your theme.

We might be able to try testing if the page being loaded is a forum page. If it is load the kosher WP scripts and of not then use the theme scripts. But that would still stop any other functionality the theme scripts perform from working on the forum page - if there are any.

andy-signature.png
YELLOW
SWORDFISH
Avatar
chessert
Member
Free Members
sp_UserOfflineSmall Offline
Nov 15, 2012 - 11:34 am

The only theme content on the forum page is the header/menu, breadcrumbs and footer:  http://www.ogaugehobbyist.com/wp/forum.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Nov 15, 2012 - 2:24 pm

Ok - so if not in the header then probably OK. Good stuff.

andy-signature.png
YELLOW
SWORDFISH
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: 619
Members: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625