• Resolved knowro

    (@knowro)


    I recently upgraded from version 6.3.12 to 6.4.9, and am getting bug reports from a small number of users who are receiving errors when registering. Before upgrading, we frequently received bug reports that a new user’s email address had already been registered. I suspect the new bug reports are caused by the same underlying issue, but the error message has now changed from that to something about contacting the webmaster.

    My best guess is that the underlying cause is concurrency issues related to the fact that my site still uses MyISAM tables. I know the tables lock often from long-running SELECT statements.

    My question is, does TML support MyISAM tables? If a table such as users or usermeta is locked when a new user registers, does the insert fail with no fallback? Not sure how WordPress Core handles this situation either.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jeff Farthing

    (@jfarthing84)

    TML does not deal with he database directly. It only uses WordPress core API. If WP supports MyISAM, TML does as well.

    Thread Starter knowro

    (@knowro)

    Found the root cause. I do believe it is a TML bug, so I am sharing here.

    When a user attempts to register with a username or email address that already exists, they receive an uninformative, generic error message, copied below.

    “ERROR: Couldn’t register you… please contact the webmaster !”

    The word “webmaster” is linked to the webmaster email, so users get confused and email the webmaster to complain about not being able to register.

    Not sure why the default registration errors are being overwritten, but to fix it I added the following function to my theme’s functions.php.

    function 9609499_registration_validation( $errors, $sanitized_user_login, $user_email ) {
    	if(isset($_POST['user_login'])) {
    
    		if (username_exists( $_POST['user_login'] )) {
    
    			$errors->add( 'username_exists', '<strong>ERROR</strong>: The username '.$sanitized_user_login.' is already taken.' );
    
    		}
    	}
    
    	if(isset($_POST['user_email'])) {
    
    		if (email_exists( $_POST['user_email'] )) {
    
    			$errors->add( 'email_exists', '<strong>ERROR</strong>: The email address '.$user_email.' is already registered.' );
    
    		}
    	}
    
    	return $errors;
    
    }
    
    add_filter( 'registration_errors', '9609499_registration_validation', 10, 3 );
    Plugin Author Jeff Farthing

    (@jfarthing84)

    Sorry, but that error is not from TML.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Does TML support MyISAM tables?’ is closed to new replies.