Closed BassGPS closed 3 years ago
SAME for me. Failed on WP 5.8
Same thing here. I tried adding the disable block widgets plugin and/or disabled Gutenberg with no luck. I believe it's something with the wp-includes/template.php file.
public function custom_page_template( $default_template ) {
$template = '';
// Checks for invoice single template.
if ( $type = MS_Model_Pages::is_membership_page() ) {
$membership_id = apply_filters(
'ms_detect_membership_id',
0,
true,
true
);
if ( $membership_id ) {
$template = get_query_template(
'm2',
array('m2-' . $type . '-' . $membership_id . '.php')
);
}
if ( ! $template ) {
$template = get_query_template(
'm2',
array('m2-' . $type . '.php')
);
}
}
if ( ! $template ) {
$template = $default_template;
}
return $template;
}
Edit this function around line 964 of the class-ms-controller-plugin.php. This can be found in wordpress > htdocs > wp-content >plugins > membership2-2-master > app > controller > class-ms-controller-plugin.php. The issue was that get_query_template requires an array for the second param in 5.8.
I would send a merge request but I am unsure if this project is still maintained or not.
@sainty0 You are the Man! This solved the issue for me. I just didn't have the time available right now to devote to this investigation. I hate to say that I might still be looking for an alternative as we get farther and farther away from the last commit on this project but this will buy me some time. Thanks again and best wishes! Marking this as successfully resolved.
Are you going to commit this change? Thanks.
send a merge request
Please send a merge request
Hey jdagan I've submitted a pull request. You can either use that or just follow the steps on my comment above. It a pretty easy fix. Good luck.
This was the fix I needed. Thanks so much!
Don't have a solution yet but the protected content page delivers a critical error. WP 5.7.2 working correctly.