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
patrick182
Space
Member
sp_UserOfflineSmall Offline
Apr 18, 2016 - 8:46 pm

Mr Papa said
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

<br />

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

<br />

and add this line right after it:

<br />

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

<br />

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

<br />

    # 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);

<br />

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

<br />

    do_action('sph_scripts_end', $footer);
}

function sp_load_plugin_styles($ahahCall = false) {

<br />

and then change it to:

<br />

    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) {

<br />

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....

Since I added this but then changed themes because this code had exactly no effect on the problem, should I just leave this code intact or should I reinstate the original code?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 18, 2016 - 9:44 pm

so did you do what  I asked?  and tried default wp theme? and then if that did nothing, disable other plugins...

as mentioned, Andy is on vacation and I am on a business trip, so limited time this week for debugging...  if the above is done with no difference, we will have to go back to the drawing board on this seemingly unique case and try to track down your jquery error...  maybe it comes back to reboot trashing wp jquery ui, but the loading order is back the way it was in previous release...

Avatar
patrick182
Space
Member
sp_UserOfflineSmall Offline
Apr 19, 2016 - 12:34 am

Mr Papa said
so did you do what  I asked?  and tried default wp theme? and then if that did nothing, disable other plugins...

as mentioned, Andy is on vacation and I am on a business trip, so limited time this week for debugging...  if the above is done with no difference, we will have to go back to the drawing board on this seemingly unique case and try to track down your jquery error...  maybe it comes back to reboot trashing wp jquery ui, but the loading order is back the way it was in previous release...

On post #27 of this thread, I mentioned that I changed the theme. I did this after I tried the de-activate all plugins strategy, which didn't help. Only after I used a theme from a different dev. company did it fix the issue, which is kinda too bad because I liked the theme I was using. I tried several other themes from that same company and all had the same file upload issue.

Is there any way to fix that so that SP works on one of those themes?

As mentioned, the theme I'm using now doesn't have that issue, which is why I inquired about whether or not to keep the php edits intact or not. Or does it even matter?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 19, 2016 - 1:14 am

On the matter of whether we can finally hack SP to work with the unsupported and ill-used `bootstrap is still, I believe, under investigation and will be easier to look into when both Mr Papa and I return. Clearly Mr Papa believes has has a working solution.
As to changes you made - if they are working at the moment then why would you change them back...

andy-signature.png
YELLOW
SWORDFISH
Avatar
patrick182
Space
Member
sp_UserOfflineSmall Offline
Apr 19, 2016 - 1:44 am

Yellow Swordfish said
On the matter of whether we can finally hack SP to work with the unsupported and ill-used `bootstrap is still, I believe, under investigation and will be easier to look into when both Mr Papa and I return. Clearly Mr Papa believes has has a working solution.
As to changes you made - if they are working at the moment then why would you change them back...

That's a good point. Just thought I'd ask since they didn't seem to have any effect on fixing the issue with the bootstrap theme I was using.

If changes are made to SP in an attempt fix a problem that existed on another theme, my question is, would this have any negative implications to the theme I'm now using?

There's still an open thread about my pesky Edit button issue on a private thread I have on my forum - to be discussed further on the related support thread. So I was just wondering if the code edits had any effect on that problem since it exists on the theme I'm now using that replaced the bootstrap one.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 19, 2016 - 1:47 am

you forum seems fine to me. I have just posted on the edit post issue.

andy-signature.png
YELLOW
SWORDFISH
Avatar
patrick182
Space
Member
sp_UserOfflineSmall Offline
Apr 21, 2016 - 11:42 pm

Fyi - in an effort to fix the Edit button issue, I've removed these code edits and put the two files back to stock. It didn't fix the Edit button issue but at least now I know it wasn't this code that was causing the problem. Just trying to isolate the issue.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 22, 2016 - 9:58 am

understand...  we do need to keep the two separate... I will be in the swing later today...

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