Login Broken Issue Fixed
-
While using this plugin, I tried to login to my site and got this error (I even tried not even using the plugin login and just using
admin.php):To fix this, I added this code in
/var/www/html/wp-content/pugins/user-registration/includes/functions-ur-core.php(I’m using the Dockerized version) in line (8051):function ur_find_my_account_in_custom_template($value, $page_id) {
if ($value) {
return $value;
}
$template_path = get_page_template();
if (empty($template_path)) {
error_log("DEBUG: Template path is empty.");
return $value;
}
$content = ur_file_get_contents($template_path);
//========================================================
// THIS SECTION IS THE ADDED CODE
//========================================================
// if ($content === null) {
// error_log("DEBUG: ur_file_get_contents() returned NULL for path: " . $template_path);
// return $value;
// }
// if (!is_string($content)) {
// error_log("DEBUG: ur_file_get_contents() returned non-string data.");
// return $value;
// }
//========================================================
if (strpos($content, '[user_registration_my_account]') !== false) {
return true;
}
if (strpos($content, '[user_registration_login]') !== false) {
return true;
}
if (strpos($content, '[woocommerce_my_account]') !== false) {
return true;
}
if (strpos($content, '<!-- wp:user-registration/myaccount') !== false) {
return true;
}
if (strpos($content, '<!-- wp:user-registration/login') !== false) {
return true;
}
return $value;
}
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Login Broken Issue Fixed’ is closed to new replies.