I installed OG User Roles without having first uninstalled OG Roles which resulted in this error:

Fatal error: Cannot redeclare _user_roles() (previously declared in E:\drupal\sites\all\modules\og_roles\og_roles.module:199) in E:\drupal\sites\all\modules\og_user_roles\og_user_roles.module on line 403

No, I did not first read the README.txt that warned of this error (shame on me).

However, the installation of a module should never render the site completely inaccessible - even if the behavior is clearly documented. Instead, I would think that relevant scripts should check for the existence of modules known to be incompatible and handle that situation gracefully.

At least for now, please provide a clear warning in the description field in og_user_roles.info until this issue can be handled better. It currently says "NOT same as OG Roles" which is hardly a warning.

Comments

somebodysysop’s picture

Assigned: Unassigned » somebodysysop
Status: Active » Reviewed & tested by the community
StatusFileSize
new1.99 KB

Try the attached patch which fixes a few things, including this.

Thanks for the note.

somebodysysop’s picture

somebodysysop’s picture

Status: Reviewed & tested by the community » Fixed

Unless there is some problem with the submitted patch, it resolves this particular error by renaming the function that's causing the problem.

I'll include it in the next revision.

CheckeredFlag’s picture

The og_user_roles.module.070606d patch does indeed fix this problem. Drupal will now happily allow this module to coexist with OG roles. I have no idea whether or not that is a bad idea though since my understanding is that OG user roles is intended to be used as a replacement of OG roles.

Anyway, thanks for the prompt fix!

Anonymous’s picture

Status: Fixed » Closed (fixed)