Marketpress Login At Checkout Error

Good morning support team. I hope you all are doing well. I'm having an issue with Marketpress.

During checkout, if not logged in, on step 1 when trying to log in, clicking the login button brings up the loading gif icon next to the button and then the icon goes away, but step 2, "billing/shipping address" never opens up. I don't have any errors in wp_debug. However in the chrome developer console, I have:

Uncaught TypeError: Cannot read property 'message' of undefined
    at Object.<anonymous> (mp-checkout.js?ver=3.2.3:303)
    at i (jquery.js?ver=1.12.4:2)
    at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)
    at y (jquery.js?ver=1.12.4:4)
    at XMLHttpRequest.c (jquery.js?ver=1.12.4:4)

This is referring to this part of the function:

// Destroy any tooltips
if ( $( '#mp-login-tooltip' ).length > 0 ) {
                                $( '#mp-login-tooltip' ).remove();
                            }

                            var data = {
                                action: "mp_ajax_login",
                                email: $email.val(),
                                pass: $pass.val(),
                                mp_login_nonce: $form.find( '[name="mp_login_nonce"]' ).val()
                            };

                            $.post( mp_i18n.ajaxurl, data ).done( function( resp ) {
                                if ( resp.success ) {
                                    window.location.href = window.location.href;
                                } else {
                                    $btn.ajaxLoading( 'hide' );
                                    $email.before( '<a id="mp-login-tooltip"></a>' );
                                    $( '#mp-login-tooltip' ).mptooltip( {
                                        items: '#mp-login-tooltip',
                                        content: resp.data.message, //This line <------------------------
                                        tooltipClass: "error",
                                        open: function( event, ui ) {
                                            setTimeout( function() {
                                                $( '#mp-login-tooltip' ).mptooltip( 'destroy' );
                                            }, 4000 );
                                        },

This error only prevents checking out when trying to log in through the check out form. If already logged in, a user has no problem checking out.

  • Nahid Ferdous Mohit

    Hey Justin !
    Hope you are having a great day!

    I'm sorry about the matter that you're facing this issue. Unfortunately, I couldn't replicate the error on my fresh WordPress and MarketPress installation with the default Twenty Seventeen theme and no other plugins installed. I couldn't replicate it on your site too as I don't have the login credentials. As the error couldn't be replicated on a fresh installation, I believe this is a plugin/theme conflict issue. Can you try initiating a plugin/theme conflict test following this flowchart?

    Let me know what the results are. Thanks!

    Best,
    Nahid.

  • Justin

    I deactivated, then reactivated marketpress. I deactivated every plugin (including sunrise.php), switched to the default 2017 theme, upgraded to the latest wp version and I'm still having the issue. Also, I discovered a new issue where if I continue as guest and try to register as customer, no matter what name I enter in the username field, I get a "An account with this username already exists" error.

    Here are the changes I've made to wp-config.php:

    define('WP_DEBUG', false);
    define( 'WP_DEBUG_LOG', false );
    
    define('FORCE_SSL_ADMIN', true);
    
    /* Multisite */
    define( 'WP_ALLOW_MULTISITE', true );
    
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', true);
    define('DOMAIN_CURRENT_SITE', 'storifieds.com');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    
    define('SUNRISE', 'on');
    
    /*
    *suggested at https://tommcfarlin.com/resolving-the-wordpress-multisite-redirect-loop/
    *to help fix infinite loop on subdomains seemingly caused by domain mapping.
    *
    *//*
    define('ADMIN_COOKIE_PATH', '/');*/
    /*define('COOKIE_DOMAIN', ''); debug shows that this is already defined by domain mapping plugin *//*
    define('COOKIEPATH', '');
    define('SITECOOKIEPATH', '');
    */

    Here are the contents of my htacess file:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    #RewriteCond %{SERVER_PORT} !^443$
    #RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    
    </IfModule>
    
    # END WordPress