• I use the plugin “user registration aide” (http://wordpress.org/plugins/user-registration-aide/ ) to facilitate display and management of additional user fields.
    URA provides also the functionality that a user can type his own password on the registration page, which utilizes also the WP default password strength meter to help choosing a good password.
    However the password strength meter functionality is broken on my site. I first debugged URA, until I started searching for possible plugin incompatibility.
    Today I found that when I disable NGG, then the password strength field on the registration page works. with NGG enabled, it does not show properly.

    Really easy to reproduce in a few minutes. Installing a empty WP 3.9.1. downloading the two plugins, enable URA only, enable the password field to show on the registration page. Check it out, it works. Enable NGG (no config, just simply enable it) -> strength meter does not work anymore.

    When I look at the produced HTML code, I can also see that the necessary JS loading for the strength meter is missing, and NGG seems also to “re-order” the loading of JS. One of the URA scripts is loading in the body with NGG disabled, and with NGG enabled, it is moved to the header section. However the password-strength JS are NO LONGER loaded, i.e. NGG somehow break loading those scripts.

    It becomes clearer to me now, that NGG somehow changes how “wp_enqueue_scripts” is loading the JS and that seems to break the password strength meter on the registration page.

    Any help here?

    Thanks, Herbert

    https://wordpress.org/plugins/nextgen-gallery/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Herbert

    (@hneugebauer)

    Hello,

    OK, I used master-G to search for NGG issues and javascripts and plugin conflicts… and I encountered a function called the “Photocrati Resource Manager”.

    I really didn’t check what this thing actually does, but it changes how WordPress loads scripts. This seems to be clear. I personally think this is a great way of introducing plugin conflicts, I don’t like that.

    Anyway…
    It breaks the password strength meter on the registration page, and I want this functionality back.

    So I looked and found the function validate_request() on line 43 of class.photocrati_resource_manager.php .
    There is a else-if chain which check whether the resources manager should do what it does… or not.
    So I added the following line to the end of the else-if chain:
    else if (strpos($_SERVER[‘REQUEST_URI’], ‘?action=register’) !== FALSE) $retval = FALSE;

    safe it, reload login page -> strength meter works.

    Here the more complete code-block:

    function validate_request()
    	{
    		$retval = TRUE;
    
    		if (is_admin()) {
    			if (isset($_REQUEST['page']) && !preg_match("#^(ngg|nextgen)#", $_REQUEST['page'])) $retval = FALSE;
    		}
    
    		if (strpos($_SERVER['REQUEST_URI'], 'wp-admin/update') !== FALSE) $retval = FALSE;
    		else if (isset($_GET['display_gallery_iframe'])) 				  $retval = FALSE;
            else if (defined('WP_ADMIN') && WP_ADMIN && defined('DOING_AJAX') && DOING_AJAX) $retval = FALSE;
    		else if (preg_match("/(js|css|xsl|xml|kml)$/", $_SERVER['REQUEST_URI'])) $retval = FALSE;
            else if (preg_match("#/feed(/?)$#i", $_SERVER['REQUEST_URI']) || !empty($_GET['feed'])) $retval = FALSE;
    		elseif (preg_match("/\\.(\\w{3,4})$/", $_SERVER['REQUEST_URI'], $match)) {
    			if (!in_array($match[1], array('htm', 'html', 'php'))) {
    				$retval = FALSE;
    			}
    		}
    		else if (strpos($_SERVER['REQUEST_URI'], '?action=register') !== FALSE) $retval = FALSE;
    
    		$this->valid_request = $retval;
    	}

    NGG will never ever do or show anything on the registration page. So disabling the resource manager there should be the right thing to do.

    Can you please incorporate this into your next version of the plugin? I’l like to avoid having to modify code on the next coming SW updates.

    Thanks, Herbert

    Plugin Contributor photocrati

    (@photocrati)

    @herbert – We’ll have to look into this further. We would also greatly appreciate if you were able to send this to us as a Bug Report (http://www.nextgen-gallery.com/report-bug/) as well.

    Thanks!

    – Cais.

    Thread Starter Herbert

    (@hneugebauer)

    OK, just submitted the Bug Report.

    Plugin Contributor photocrati

    (@photocrati)

    @herbert – Thank you very much!

    I’ve forwarded those details off to our developers so they can review you suggested modification.

    – Cais.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Plugin incompatibility, NGG break password strength meter on URA’ is closed to new replies.