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
Photo Upload Not Working After WordPress 4.5 Release
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 15, 2016 - 10:18 pm

dont know how to fix/workaround the WP theme yet....  so no ETA... working on the more critical issue with the cancel function call...

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 15, 2016 - 11:25 pm

okay, think I may have a way around this themes  and bootstrap breaking wp jquery ui...  but need help testing...

a handful of small changes...

in file simple-press/sp-startup/sp-load-forum.php, find this line

    add_action('wp_enqueue_scripts',   'sp_load_forum_scripts', 1);

and add this line right after it:

    add_action('wp_enqueue_scripts',   'sp_load_forum_footer_scripts', 9999);

then in file simple-press/sp-startup/forum/sp-forum-framework.php, find these lines and remove them:

    # load up forum front end javascript that must be in footer
    $footer_dep = array('jquery');
    if ($tooltips) $footer_dep = array_merge($footer_dep, array('jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-tooltip'));
    $script = (defined('SP_SCRIPTS_DEBUG') && SP_SCRIPTS_DEBUG) ? SFJSCRIPT.'sp-forum-footer-dev.js' : SFJSCRIPT.'sp-forum-footer.js';
    wp_enqueue_script('spforumfooter', $script, $footer_dep, false, true);

    # sp_platform_vars is not static so cannot be in combined js cache but can be localized
    $platform = array(
        'focus'             => 'forum',
        'mobile'            => $spMobile,
        'device'            => $spDevice,
        'tooltips'          => $tooltips,
        'mobiletheme'       => (current_theme_supports('sp-theme-responsive')) ? 1 : 0,
        'headpadding'       => ($spMobile) ? 0 : sp_get_option('spheaderspace'),
        'saveprocess'       => 0,
        'checkiframe'       => $iframe,
        'pageview'          => $spVars['pageview'],
        'editor'            => $spGlobals['editor'],
        'waitimage'         => sp_paint_file_icon(SPFIMAGES, 'sp_Wait.png'),
        'successimage'      => sp_paint_file_icon(SPFIMAGES, 'sp_Success.png'),
        'failimage'         => sp_paint_file_icon(SPFIMAGES, 'sp_Failure.png'),
        'customizertest'    => isset($_GET['sp-customizer-test']),
        'autoupdate'        => $sfauto['sfautoupdate'],
        'autoupdatelist'    => $arg,
        'autoupdatetime'    => $timer
    );
    $platform = apply_filters('sph_platform_vars', $platform);
    wp_localize_script('spforumfooter', 'sp_platform_vars', $platform);

now, in same file, scroll down a bit to the end of this routine and find this code:

    do_action('sph_scripts_end', $footer);
}

function sp_load_plugin_styles($ahahCall = false) {

and then change it to:

    do_action('sph_scripts_end', $footer, $tooltips);
}

function sp_load_forum_footer_scripts() {
    $tooltips = (defined('SP_TOOLTIPS') && SP_TOOLTIPS == false) ? 0 : 1;

    do_action('sph_scripts_footer_start', $tooltips);

    # load up forum front end javascript that must be in footer
    $footer_dep = array('jquery');
    if ($tooltips) $footer_dep = array_merge($footer_dep, array('jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-tooltip'));
    $script = (defined('SP_SCRIPTS_DEBUG') && SP_SCRIPTS_DEBUG) ? SFJSCRIPT.'sp-forum-footer-dev.js' : SFJSCRIPT.'sp-forum-footer.js';
    wp_enqueue_script('spforumfooter', $script, $footer_dep, false, true);

    # sp_platform_vars is not static so cannot be in combined js cache but can be localized
    $platform = array(
        'focus'             => 'forum',
        'mobile'            => $spMobile,
        'device'            => $spDevice,
        'tooltips'          => $tooltips,
        'mobiletheme'       => (current_theme_supports('sp-theme-responsive')) ? 1 : 0,
        'headpadding'       => ($spMobile) ? 0 : sp_get_option('spheaderspace'),
        'saveprocess'       => 0,
        'checkiframe'       => $iframe,
        'pageview'          => $spVars['pageview'],
        'editor'            => $spGlobals['editor'],
        'waitimage'         => sp_paint_file_icon(SPFIMAGES, 'sp_Wait.png'),
        'successimage'      => sp_paint_file_icon(SPFIMAGES, 'sp_Success.png'),
        'failimage'         => sp_paint_file_icon(SPFIMAGES, 'sp_Failure.png'),
        'customizertest'    => isset($_GET['sp-customizer-test']),
        'autoupdate'        => $sfauto['sfautoupdate'],
        'autoupdatelist'    => $arg,
        'autoupdatetime'    => $timer
    );
    $platform = apply_filters('sph_platform_vars', $platform);
    wp_localize_script('spforumfooter', 'sp_platform_vars', $platform);

    do_action('sph_scripts_footer_end', $tooltips);
}

function sp_load_plugin_styles($ahahCall = false) {

we are inserting a new routine here after the first one....  save both files, clear your combined js caches and your browser caches, and give it a whirl...

would appreciate some feedback, please....

Avatar
patrick182
Space
Member
sp_UserOfflineSmall Offline
Apr 16, 2016 - 7:58 pm

I made these changes, cleared combined forum css and js cache, then cleared browser cache and still, the same problem occurs. The "Start Upload" option does nothing.

Should I leave these php changes?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 16, 2016 - 8:26 pm

I have verified it corrects the problem... I would ask if the changes were made properly...  did you copy the raw code popup and not from the post?  otherwise, you may have gotten invalid characters...

all caches cleared as requested?

is your site viewable?

Avatar
patrick182
Space
Member
sp_UserOfflineSmall Offline
Apr 16, 2016 - 8:36 pm

I stripped code of meta data via a plain text file before adding it to the PHP docs. It would be my understanding that I did everything exactly right. I sent you and the other two forum admins a PM.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 17, 2016 - 12:05 am

meta data????  not sure there would be any in there...

I am unsure how this discussion got around to bootstrap... I dont believe it has anything to do with bootstrap...  think its simply that you have jquery errors on your site...  you alluded to them in post 9... but dont think they have anything to do with bootstrap...  in fact, the code change you made would have resolved that... but those jquery errors are stopping things from working...

namely:  Error: cannot call methods on button prior to initialization; attempted to call method 'enable'

but believe this is going to be related to the wp 4.5 change and not simple press...  wp jumped the jquery version multiple versions in this release...  did you update your wp theme and other wp plugins?  its possible one is still out of date or needs an update to be compatible with wp 4.5...

do you still have this problem if you temp switch to the default wp theme?  if so, what about with all other wp plugins disabled?

Avatar
patrick182
Space
Member
sp_UserOfflineSmall Offline
Apr 18, 2016 - 3:13 pm

I changed WP theme and that fixed this issue.

It turns out, many of the themes from those theme developers have this issue; I tried several from that company and all had the same issue.

Still having problems with the post Edit button, which we'll continue to work out on the related support forum.

Avatar
patrick182
Space
Member
sp_UserOfflineSmall Offline
Apr 18, 2016 - 3:48 pm

Question though - how can I delete images in my profile image upload directory after they've been uploaded?

This isn't terribly important but we used to be able to do this on previous versions of SP.

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Apr 18, 2016 - 4:20 pm

When viewing your profile > attachments, you should be able to expand the tree (starting with date), select an image and use the 'Remove Selected Image Attachment' button.

Seeing as I was logged in to your site from the previous thread I double checked and it all seems to be working - Not that I've deleted anything!

Avatar
patrick182
Space
Member
sp_UserOfflineSmall Offline
Apr 18, 2016 - 8:45 pm

I see that now. Thank you.

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: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625