backdrop-contrib / group

Allows you to group users and content
GNU General Public License v2.0
1 stars 0 forks source link

When I enable the group module the site breaks and shows Fatal error: Uncaught Error: Class 'GroupViewsController' not found #7

Open paucku opened 4 weeks ago

paucku commented 4 weeks ago

I've just installed and enabled the module


Fatal error: Uncaught Error: Class 'GroupViewsController' not found in /path-to-backdrop-installation/modules/entity_plus/views/entity_plus.views.inc:30 Stack trace: #0 /path-to-backdrop-installation/core/includes/module.inc(975): entity_plus_views_data() #1 /path-to-backdrop-installation/core/modules/views/includes/cache.inc(89): module_invoke_all('views_data') #2 /path-to-backdrop-installation/core/modules/views/includes/cache.inc(74): _views_fetch_data_build() #3 /path-to-backdrop-installation/core/modules/views/views.module(1180): _views_fetch_data(NULL, true, false) #4 /path-to-backdrop-installation/modules/entity_plus/views/entity_plus.views.inc(320): views_fetch_data() #5 /path-to-backdrop-installation/core/modules/views/includes/utility.inc(459): entity_plus_views_plugins() #6 /path-to-backdrop-installation/core/modules/views/includes/cache.inc(147): views_discover_plugins() #7 /path-to-backdrop-installation/core/modules/views/views.module(1191): _views_fetch_plugin_data(NULL, NULL, false) #8 /path-to-backdrop-installation/core/modules/views/views.module(115): vi in /path-to-backdrop-installation/modules/entity_plus/views/entity_plus.views.inc on line 30

This is all that I see – it is an unformatted page and no access to my Backdrop site.

argiepiano commented 4 weeks ago

Hmm.. There is no release of this module, and no activity in 6 years, which leads me to believe the dev version may actually not work.

This is an interesting error. I see that GroupViewsController does exist and it's also correctly included in hook_autoload_info(). There are problems with the declaration of this class, since it extends EntityDefaultViewsController which doesn't exist in Entity Plus or Backdrop. However, the fatal error this should have caused is different from what you report. Judging from your error, it sounds like the hook_views_data() is being called before the autoload hook, which shouldn't be happening. This may be an issues with cached data, and tricky to debug.

As a temporary solution you can add a include_once statement to load the file with GroupViewsController in the first line of group.module. This may prevent that fatal error and allow you to clear caches - which may or may not solve this. Then remove the line after clearing them.

argiepiano commented 4 weeks ago

And also fix the declaration to

class GroupViewsController extends EntityPlusDefaultViewsController {

Otherwise you'll get a different fatal error.

paucku commented 4 weeks ago

First I will say how I repaired my site and brought it back to life. Next I will try @argiepiano suggestions about the group module.

The whole site was down. I had not access to anything and particularly couldn't clear the cache.

  1. First I deleted the Group module
  2. The site became usable
  3. Copied again the Group module
  4. Now I go to Functionality > Uninstall modules
  5. Uninstall the two modules