Forum Replies Created

Viewing 14 replies - 1 through 14 (of 14 total)
  • Will

    (@funkmasterbecks)

    Hi guys,

    I’m experiencing the same issue on a WP 4.9.4 local installation.

    …/admin.php?page=wp-user-avatar – generates “ERR_EMPTY_RESPONSE” in Chrome.
    …/admin.php?page=wp-user-avatar-library –?works.

    And it’s not due to a conflicting plugin from what I can tell.

    Cheers

    Thread Starter Will

    (@funkmasterbecks)

    //My initial answer just disappeared after editing it, so I’m going to post it again. If the original shows up again, feel free to delete this post.

    Looking at the code explained everything.

    @developers: it would be nice to add this functionality to the shortcode, even if it’s only for admins.

    The reason I couldn’t see the shortcode, is that it only renders if a user is logged out–and that includes admins. So as a logged in admin, you won’t see the output of the form. I understand that a logged in user should be redirected and not being displayed useless stuff, but when working on a website, I should be able to see the form at all times. It also should be mentioned in the documentation.

    To change the shortcode’s behavior, head over to the Groups plugins directory, and edit the file class-groups-shortcodes.php.

    Look for the following lines:

    /**
     * Renders the Groups login form.
     * 
     * The user is redirected to the current page after login by default.
     * The user can be redirected to a specific URL after login by
     * indicating the <code>redirect</code> attribute.
     *
     * @param array $atts
     * @param string $content
     * @return string the rendered form or empty
     */
    public static function groups_login( $atts, $content = null ) {
    	$current_url = ( is_ssl() ? 'https://' : 'https://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    	extract(
    		shortcode_atts(
    			array(
    				'redirect'        => $current_url,
    				'show_logout'     => 'no'
    			),
    			$atts
    		)
    	);
    	$redirect    = trim( $redirect );
    	$show_logout = trim( strtolower( $show_logout ) );
    	$output      = '';
    	if ( !is_user_logged_in() ) {
    		$output .= wp_login_form(
    			array(
    				'echo'     => false,
    				'redirect' => $redirect
    			)
    		);
    	} else {
    		if ( $show_logout == 'yes' ) {
    			$output .= self::groups_logout(
    				array(
    					'redirect' => $redirect
    				)
    			);
    		}
    	}
    	return $output;
    }

    Change it to:

    /**
     * Renders the Groups login form.
     * 
     * The user is redirected to the current page after login by default.
     * The user can be redirected to a specific URL after login by
     * indicating the <code>redirect</code> attribute.
     *
     * @param array $atts
     * @param string $content
     * @return string the rendered form or empty
     */
    public static function groups_login( $atts, $content = null ) {
    	$current_url = ( is_ssl() ? 'https://' : 'https://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    	extract(
    		shortcode_atts(
    			array(
    				'redirect'        => $current_url,
    				'show_logout'     => 'no'
    			),
    			$atts
    		)
    	);
    	$redirect    = trim( $redirect );
    	$show_logout = trim( strtolower( $show_logout ) );
    	$output      = '';
    	if ( !is_user_logged_in() || !is_admin() ) {
    		$output .= wp_login_form(
    			array(
    				'echo'     => false,
    				'redirect' => $redirect
    			)
    		);
    	} else {
    		//Facultative Code Start
    		global $current_user;
    		get_currentuserinfo();
    		echo '<span>You are currently logged in as: ' . $current_user->user_login . '</span><br>';
    		//Facultative Code End
    		if ( $show_logout == 'yes' ) {
    			$output .= self::groups_logout(
    				array(
    					'redirect' => $redirect
    				)
    			);
    		}
    	}
    	return $output;
    }

    Adding the condition if ( !is_user_logged_in() || !is_admin() ) {...}, is going to enable the rendering of the login form when logged in as an admin.

    Facultative Code
    Adding global $current_user; get_currentuserinfo(); echo '<span>You are currently logged in as: ' . $current_user->user_login . '</span>', is going to get the current user’s username, and render “You are currently logged in as: Username” in html. You can add some more attributes if you like (see WP Codex, or just leave it out and redirect the user automtically.

    Hope this helps.

    Thread Starter Will

    (@funkmasterbecks)

    Looking at the code explained everything.

    @developers: it would be nice to add this functionality to the shortcode, even if it’s only for admins.

    The reason I couldn’t see the shortcode, is that it only renders if a user is logged out–and that includes admins. So as a logged in admin, you won’t see the output of the form. I understand that a logged in user should be redirected and not being displayed useless stuff, but when working on a website, I should be able to see the form at all times. It also should be mentioned in the documentation.

    To change the shortcode’s behavior, head over to the Groups plugins directory, and edit the file class-groups-shortcodes.php.

    Look for the following lines:

    /**
     * Renders the Groups login form.
     * 
     * The user is redirected to the current page after login by default.
     * The user can be redirected to a specific URL after login by
     * indicating the <code>redirect</code> attribute.
     *
     * @param array $atts
     * @param string $content
     * @return string the rendered form or empty
     */
    public static function groups_login( $atts, $content = null ) {
    	$current_url = ( is_ssl() ? 'https://' : 'https://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    	extract(
    		shortcode_atts(
    			array(
    				'redirect'        => $current_url,
    				'show_logout'     => 'no'
    			),
    			$atts
    		)
    	);
    	$redirect    = trim( $redirect );
    	$show_logout = trim( strtolower( $show_logout ) );
    	$output      = '';
    	if ( !is_user_logged_in() ) {
    		$output .= wp_login_form(
    			array(
    				'echo'     => false,
    				'redirect' => $redirect
    			)
    		);
    	} else {
    		if ( $show_logout == 'yes' ) {
    			$output .= self::groups_logout(
    				array(
    					'redirect' => $redirect
    				)
    			);
    		}
    	}
    	return $output;
    }

    Change it to:

    /**
     * Renders the Groups login form.
     * 
     * The user is redirected to the current page after login by default.
     * The user can be redirected to a specific URL after login by
     * indicating the <code>redirect</code> attribute.
     *
     * @param array $atts
     * @param string $content
     * @return string the rendered form or empty
     */
    public static function groups_login( $atts, $content = null ) {
    	$current_url = ( is_ssl() ? 'https://' : 'https://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    	extract(
    		shortcode_atts(
    			array(
    				'redirect'        => $current_url,
    				'show_logout'     => 'no'
    			),
    			$atts
    		)
    	);
    	$redirect    = trim( $redirect );
    	$show_logout = trim( strtolower( $show_logout ) );
    	$output      = '';
    	if ( !is_user_logged_in() || !is_admin() ) {
    		$output .= wp_login_form(
    			array(
    				'echo'     => false,
    				'redirect' => $redirect
    			)
    		);
    	} else {
    		//Facultative Code Start
    		global $current_user;
    		get_currentuserinfo();
    		echo '<span>You are currently logged in as: ' . $current_user->user_login . '</span><br>';
    		//Facultative Code End
    		if ( $show_logout == 'yes' ) {
    			$output .= self::groups_logout(
    				array(
    					'redirect' => $redirect
    				)
    			);
    		}
    	}
    	return $output;
    }

    Adding the condition if ( !is_user_logged_in() || !is_admin() ) {...}, is going to enable the rendering of the login form when logged in as an admin.

    Facultative Code
    Adding global $current_user; get_currentuserinfo(); echo '<span>You are currently logged in as: ' . $current_user->user_login . '</span>', is going to get the current user’s username, and render “You are currently logged in as: Username” in html. You can add some more attributes if you like (see WP Codex, or just leave it out and redirect the user automtically.

    Hope this helps.

    • This reply was modified 7 years, 8 months ago by Will.
    Will

    (@funkmasterbecks)

    That’s weird. I just tested it locally, and there’s no error.

    Thank you anyway ??

    Will

    (@funkmasterbecks)

    Hi Giorgos,

    I’m facing the same issue. Would you mind sharing how to fix this ourselves?

    Thread Starter Will

    (@funkmasterbecks)

    Stupid as I am, I’ve been thinking that you plugin would add the template to the active child theme. Removed the file-away-iframe-template.php from the parent theme folder, and everything’s fine again.

    Thread Starter Will

    (@funkmasterbecks)

    All right, thanks.

    Thread Starter Will

    (@funkmasterbecks)

    Hi Dion,

    I’ve read that in rob_st_82‘s thread, but this is not the case. This thread is not solved as the issue remains.

    I have /wp-content/uploads/custom-folders/ containing files, and they all get copied into WP’s default folder upon import, so there definitely is a bug.

    Thread Starter Will

    (@funkmasterbecks)

    [empty post – can be deleted]

    Thread Starter Will

    (@funkmasterbecks)

    ti2m, is right, “line-height: 1;” was causing the issue. I removed it and everything is fine now.

    Thanks a lot for the great support!

    Thread Starter Will

    (@funkmasterbecks)

    Yes, I wouldn’t know how to implement different Edge Animations without your plugin yet. I already tried the iframe option and have it activated now, it doesn’t change anything to the issue.

    Thread Starter Will

    (@funkmasterbecks)

    You’re right, I didn’t think about checking the body parameters. It fixes the “huge” offset on this site, but now the offset is the same as on the other site.

    In detail:

    • “Warum eine Banane” – should be aligned with the bottom of the banana
    • “Jeder Liebt” – should be more centered
    • “Wir – Sie – Alle!” – should be centered, i.e. “ALLE!” should be completely readable when scaled to the max.
    • “Vielleicht nach unserer ersten Zusammenarbeit” – should be aligned

    Thank you for your support! ??

    Thread Starter Will

    (@funkmasterbecks)

    You can see the file here: https://tinyurl.com/qylnwls

    The animation is not made for this site, but I use the same plugins across both sites. The bug is stronger in this one though.

    Will

    (@funkmasterbecks)

    Guys, seriously, upgrading to 3.1 brings up exactly the same issue. What’s going on?
    This flaw has been preoccupying me for at least 3 hours now because updating from 3.0 to 3.1 messed up everything. I reinstalled everything, but I still don’t have the “Tools – Domain Mapping” menu showing up in 3.1. I hope this thread is going to help me fix that issue.

Viewing 14 replies - 1 through 14 (of 14 total)