wpmudev / membership-2

GNU General Public License v2.0
47 stars 58 forks source link

Fatal error at member login #14

Open jimgordon1978 opened 2 years ago

jimgordon1978 commented 2 years ago

Hello, I have been using Membership plugin for years without any issue. Recently, after the latest Wordpress core upgrade, members that attempt to access our site get a fatal error at login:

Fatal error: Uncaught TypeError: Argument 3 passed to locate_block_template() must be of the type array, string given, called in /web/htdocs/www.mywebsite.it/home/wp-includes/template.php on line 66 and defined in /web/htdocs/www.mywebsite.it/home/wp-includes/block-template.php:22 Stack trace: #0 /web/htdocs/www.mywebsite.it/home/wp-includes/template.php(66): locate_block_template('', 'm2', 'm2-account-7921...') #1 /web/htdocs/www.mywebsite.it/home/wp-content/plugins/membership/app/controller/class-ms-controller-plugin.php(875): get_query_template('m2', 'm2-account-7921...') #2 /web/htdocs/www.mywebsite.it/home/wp-includes/class-wp-hook.php(305): MS_Controller_Plugin->custom_page_template('') #3 /web/htdocs/www.mywebsite.it/home/wp-includes/plugin.php(189): WP_Hook->apply_filters('', Array) #4 /web/htdocs/www.mywebsite.it/home/wp-includes/template.php(103): apply_filters('page_template', '', 'page', Array) #5 /web/htdocs/www.mywebsite.it/home/wp-includes/template.php(495): get_query_template('page', Array) #6 /web/htdocs/ in /web/htdocs/www.mywebsite.it/home/wp-includes/block-template.php on line 22

(for privacy I replaced my website domain name with "mywebsite.it")

Anybody else has the same issue? Is there here someone able to help me fixing the error?

I am using PHP 7.3 (I can also switch to 7.4 or lover versions, in any case the error stays there).

Many thanks in advance for your attention. Regards

panoslyrakis commented 2 years ago

Hey! As you know this plugin is no longer supported so I would recommend to try find an alternative (you would probably need a developer to help migrating data though).

There's a similar issue reported and sainty0 provided a fix here https://github.com/wpmudev/membership-2/issues/12#issuecomment-890892901

I think it's worth trying that as it looks like the same issue.