I tried to update Entity Registration 7.x-1.4 to 7.x-1.5 but couldn't proceed or navigate to any pages due to the following fatal error:

Fatal error: Class 'RegistrationTypeController' not found drupal...

When I switched back to 7.x-1.4 (was unable to update database) my site displayed again.

In the change log there is this:
Override RegistrationTypeController::export() to ensure our data fields get exported.

Do I need to do something prior to the update to go foward?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lsabug created an issue. See original summary.

gcb’s picture

That's strange. RegistrationTypeController is new, but it's in the lib directory there and you can see it getting included in registration.info. Can you confirm that when you upgrade you see this file:

lib/registration_type.controller.inc

And that the file is included in the .info?

If it is, you may need to rebuild your registry to get that file recognized. You can do that with drush: "drush rr".

Sorry about your trouble, and let us know what else you learn!

lias’s picture

Thanks very much for your reply.

I dug a little deeper and the error seems to have been caused by a Rule that fired an email message when a registration was submitted.

The message was using the token: [site:url]node/[registration:entity-id]
When I replaced it with: [site:url][registration:url]

I was able to update the module.

What gave me a clue was this issue https://www.drupal.org/node/2230359.
-----

lias’s picture

Status: Active » Closed (fixed)
PascalAnimateur’s picture

I experienced this problem when upgrading from 1.4 => 1.5, drush rr solved this for me.

heddn’s picture

Version: 7.x-1.5 » 7.x-1.x-dev
Priority: Normal » Critical
Status: Closed (fixed) » Needs review
FileSize
1.96 KB

Two things are needed.
1) A hook update to flush the registry.
2) A wrapper inside the hook_entity_info_alter to check if the RegistrationTypeController class exists.

Without the second, I cannot rebuild the registry because hook_entity_info_alter is called during a registry rebuild and the class doesn't exist in the drupal registry yet. The first is necessary because we need to rebuild the registry. One should not have to install rebuild_registry to update this module.

Putting a class_exists in there is safe because once all update hooks are run, cache is flushed. At that point in the cache rebuild process, the new files are in the registry and the entity info alter should function just fine. Bumping this to critical because the update path from <1.5 is broken at this point.

cweagans’s picture

Status: Needs review » Reviewed & tested by the community

LGTM. This completely WSOD'd a client's site on update. This should go in ASAP and a new release should be tagged.

  • Greg Boggs committed 09e04d3 on 7.x-1.x authored by heddn
    Issue #2546836 by heddn: Fatal error: Class 'RegistrationTypeController...
Greg Boggs’s picture

I am unable to replicate the upgrade path issue in a Drupal Standard install. But, I've confirmed that the patch doesn't cause any problems. So, I've committed the patch to 7.x-1.x

Greg Boggs’s picture

Status: Reviewed & tested by the community » Needs review
heddn’s picture

Status: Needs review » Fixed

Thanks for the quick commit. I wonder how much of this related to the use of panels and panelizer. I noticed those modules in the stack trace.

  • Greg Boggs committed 09e04d3 on 7.x-2.x authored by heddn
    Issue #2546836 by heddn: Fatal error: Class 'RegistrationTypeController...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

cartagena’s picture

Just want to say thanks to all for the module and the fix. Got rid of my WSOD, I'm grateful!

Sam Moore’s picture

Patch in #6 worked for me.
My registration module was in the Commons profile, but all other details apply.