When a page with a content view restriction is opened, rather than redirecting to the URL set on the page, I get a 404 error. It seems that the function get_page_path_from_url is failing because it is using a full path and relative path.
The location of the file is /var/www/html/wp-content/plugins/user-role-editor-pro/pro/includes/classes/content-view-restrictions.php line 924.
I was able to make the functionality work with the changes below and seek your opinion on whether the changes will have any undesired outcomes?
private static function get_page_path_from_url() {
$url = substr(untrailingslashit( parse_url( $_SERVER[‘REQUEST_URI’], PHP_URL_PATH) ), 1 );
$home_url = basename( untrailingslashit( parse_url( home_url(), PHP_URL_PATH) ) );
$path = substr($url, strlen($home_url));
return $path;
}