Jump to content

Extending Modules (Issue after 2.8 upgrade)


renobird
 Share

Recommended Posts

I recently upgraded a site from 2.5.x to 2.8.62, and I'm having some issues with extending modules now.
The example below has been working without issue for several years, so I assume something in the core has changed?


Here's how the the primary module is setup

class ShibbolethLogin extends WireData implements module {

	public static function getModuleInfo() {
		return array(
			'title' => 'ShibbolethLogin',
			'version' => 100,
			'summary' => 'Externalizes PW Authentication to Shibboleth. Allows guest access to any user with a UFID.',
		);
	}

 

Here's how the dependent module is setup

class ShibbolethLoginDeptA extends ShibbolethLogin implements module {
	
	public static function getModuleInfo() {
		return array(
			'title' => 'ShibbolethLoginDeptA',
			'version' => 100,
			'summary' => '',
			'href' => '',
			'autoload' => true,
			'requires' => "ShibbolethLogin",
		);
	}

The issue arrises intermittently when I refresh the modules cache (either to install new modules, or for major updates).

Sometimes everything will be fine, and then other times it's like the load order of the modules gets messed up and the dependent modules are loaded before the parent and I get an error like this:

Error: 
Class 'ShibbolethLogin' not found (line 11 of /xxxxxx/site/modules/ShibbolethLogin/ShibbolethLoginDeptA.module)

The only way to clear it is to edit the DB and delete those modules from the modules table.
I can then reinstall, and everything works again.

Any ideas? Things to check? Different ways to set this up?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...