Support » Plugin: User Registration Aide » Verifying email isn’t working

  • I had configured it to require approval, and also require email verification. I get an email for approval, and I can approve them. They get an email asking to verify the email, and click the link, it opens the email confirmation page, which is blank with just a title, but they are still pending needing verification, the link and page load doesn’t verify their email.

    Also (minor issue) it’s trying to load a “parent_style” even though I am not using a child theme, and it causes both mixed content SSL errors (the theme URL in the theme style.css is not https), I edit the link to be https, and it causes a 404 error in the console, that parent style CSS file doesn’t exist. I think it needs some if then logic added:

    if ( is_child_theme() ) {
            wp_enqueue_style( 'parent-style', trailingslashit( get_template_directory_uri() ) . 'style.css' );
        }
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author bnovotny

    (@bnovotny)

    What theme are you running? My guess is that is where the problem lies. I use template parts for the email confirmation page and it is not getting called apparently. There is a folder in the theme templates and a file ura-template-loader.php in it that controls the template part loading and the template-controller.php also controls the template loading. I cannot test on all themes, especially custom ones so duplicating your issue is not an option. It seems you know your way around code so maybe you can help. That is also where the ‘parent_style’ comes from. My guess is the template loader is either not getting called or the template part is not being found, but without actually being able to work on it I cannot tell you much more than that right now. All I do know is that it is working on all my test sites and live sites.

    I’m running Sahifa, a fairly popular magazine theme.

    I’ve turned the email verification off for now. Perhaps I could try deleting those pages, changing themes to a basic theme like Twenty Sixteen, have it create the pages using that theme, and see if they are created any differently – right now they are simply empty pages, no page template.

    I could also send you the theme file if you wanted to just take a look and poke around with what could be causing an issue.

    Thanks,
    Rob

    Plugin Author bnovotny

    (@bnovotny)

    Yes, I used the twenty-fifteen theme as a reference for my templates theme and for continuity called the site theme css, which is where the parent_style came in. MOst of the template actions come in the /templates/ura-template-loader.php file. I switched the style enqueue to this:

    wp_register_style( 'parent-style', $style );
    	wp_enqueue_style( 'parent-style' );

    instead of this
    wp_enqueue_style( 'parent_style', $style );
    that should fix that error. However if that is being called then you can go to the /templates/ura-email-confirm.php file which is the logic for the email confirmation page and put in a wp_die( ‘WORKING’ ) somewhere to see if it is getting called at all. Or another file to test with is the /themes/page.php which is the theme template for the page.

    Also look in your pages and see if the email confirm page has been created, which it is supposed to do on install/activate, however there have been a few times where that has been an issue. If you want to you can send the theme file to b.novotny2@gmail.com too, I can try to work with it but am sort of busy right now so I can’t tell you exactly when I will be able to look at it. Also will it need a key?

    However you want to proceed, let me know. I use the wp_die quite a bit in troubleshooting to find out exactly where the code is breaking so I can trace the problem down more directly and quickly. That way you can track what is going on. All the functions for loading the templates are in the template loader file. It starts in the page.php file then calls the template loader if it is one of my pages, then get template part then winds up on the email-confirm page ultimately.

    Plugin Author bnovotny

    (@bnovotny)

    Also while I am thinking of it, for the parent-style enqueue, it calls for the site themes style.css or stylesheet.css file, I should have made an exception and an alternative should that be empty, I assumed that all theme coders knew to do that, however if the sites theme primary css file goes by another name that could also be firing those errors. Those styles are used in the ura_template_loader function starting on line 14 and ura_get_template_part starting on line 59 of the /templates/ura-template-loader.php file. You can add

    if( empty( $style ) ){
         $style = $theme->get( 'ThemeURI' ).'my-theme-style.css file name';
    }

    Add that after the first if empty style statement and before the wp_register_style. I will also include all of that in the next update. Thanks mate

    • This reply was modified 3 years, 9 months ago by bnovotny.

    Awesome, thank you. I’ll dig into this more later this week, and try sending over the theme file for testing, it doesn’t require a key, but may help because it’s a popular framework-based theme and so could pinpoint framework related issues maybe.

    Plugin Author bnovotny

    (@bnovotny)

    Okay, sounds good. It may be quite possible that because it is throwing those errors in the css style section that the template is not getting called after I think about it. That could be the problem right there for all we know so I would try and fix that first and then see if it works.

    • This reply was modified 3 years, 9 months ago by bnovotny.
    Plugin Author bnovotny

    (@bnovotny)

    Instead of this starting on line 16 or /templates/ura-template-loader.php:

    
    $theme = wp_get_theme();
    $style = $theme->get( 'ThemeURI' ).'stylesheet.css';
    if( empty( $style ) ){
    	$style = $theme->get( 'ThemeURI' ).'style.css';
    }
    wp_enqueue_style( 'parent_style', $style );

    use this:

    
    $theme = wp_get_theme();
    $style = $theme->get( 'ThemeURI' ).'stylesheet.css';
    if( empty( $style ) ){
    	$style = $theme->get( 'ThemeURI' ).'style.css';
    }
    if( empty( $style ) ){
    	$style = $theme->get( 'ThemeURI' ).'your theme stylesheet name here.css';
    }
    $css = URA_CSS_PATH.'templates-style.css';
    wp_register_style( 'templates_style', $css, false );
    wp_enqueue_style( 'templates_style' );
    wp_register_style( 'parent-style', $style );
    wp_enqueue_style( 'parent-style' );
    

    and starting on line 63 of the same file instead of this:

    
    $theme = wp_get_theme();
    $style = $theme->get( 'ThemeURI' ).'stylesheet.css';
    if( empty( $style ) ){
    	$style = $theme->get( 'ThemeURI' ).'style.css';
    }
    wp_enqueue_style( 'parent_style', $style );
    

    use this:

    
    $theme = wp_get_theme();
    $style = $theme->get( 'ThemeURI' ).'stylesheet.css';
    if( empty( $style ) ){
    	$style = $theme->get( 'ThemeURI' ).'style.css';
    }
    if( empty( $style ) ){
    	$style = $theme->get( 'ThemeURI' ).'your theme stylesheet name here';
    }
    wp_register_style( 'parent-style', $style );
    wp_enqueue_style( 'parent-style' );
    

    If that is throwing the error it will not get to the load template function or get template part so that could be what is causing the issues right there.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Verifying email isn’t working’ is closed to new replies.