• Resolved Emil

    (@qu1em)


    Hi,

    When using the Upload widget you are redirected to the homepage. In table VI “Uploader Landing” is actually set to the correct page but all the options are disabled.

    I tried removing disabled=”disabled” in the select options which seemed to save just fine but I’m still being redirected to the homepage.

    On another note; would it be possible to move the script that alerts you after submitting the Upload widget form to the very bottom of wp_footer – it is blocking page load?

    https://wordpress.org/plugins/wp-photo-album-plus/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Jacob N. Breetvelt

    (@opajaap)

    The Upload widget links to the page where it was originally displayed upon, usually the home page if any page changes have been made by ajax calls.

    The Uploader widget gives you the opportunity to display the photos uploaded by a certain user=owner=uploader. This widget needs the landing page to display the photos on.

    If you want to display the album where the photo has been uploaded to, use the upload links on the album cover or on the thumbnails display area in stead of the widget.

    would it be possible to move the script that alerts you after submitting the Upload widget form to the very bottom of wp_footer – it is blocking page load

    Will be considered. Thanx

    Thread Starter Emil

    (@qu1em)

    Thanks for the quick reply!

    Okay I see; the Upload widget and the setting are unrelated. It is with the Upload widget I’m having the issue of being redirected to the homepage instead of the page with the widget. How does WPPA determine the URL?

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    In a widget it is indeed home_url();
    Maybe it should be get_permalink();

    You may change in wppa-links.php line 24:

    switch ($key) {
    	case '0':
    	case '':	// normal permalink
    		if ($wppa['in_widget']) {
    			$pl = home_url();

    into:

    switch ($key) {
    	case '0':
    	case '':	// normal permalink
    		if ($wppa['in_widget']) {
    			$pl = get_permalink();

    Pls tell me if this gives you the desired result. If so, i will consider to change this in the release code.

    Thread Starter Emil

    (@qu1em)

    Thanks Jacob, that works perfectly! Maybe it should rather be defined by the requested URL e.g. so that putting the widget on the blog page wouldn’t mess it up (get_permalink() returns the latest post URL in this case)?
    esc_url( ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    I will test this. Thanx.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    would it be possible to move the script that alerts you after submitting the Upload widget form to the very bottom of wp_footer – it is blocking page load

    From the changelog 5.3.8:

    The alert boxes ( e.g. “Photo successfully uploaded” ) will be displayed when the page is almost loaded, if Table IV-A8 ( Defer javascript ) is ticked.

    Thread Starter Emil

    (@qu1em)

    Great! Thanks a lot!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Upload widget redirects to home’ is closed to new replies.