Hello,

I get this error:
Fatal error: Class 'EntityReference_SelectionHandler_Generic' not found in C:\wamp\www\drupal\sites\all\modules\contrib\og\plugins\entityreference\selection\OgSelectionHandler.class.php on line 7

The context is:
OG 7.x-2.7
Entity Reference branch 7.x-1.x

I have a "mongo_node" entity that has a group reference field and the error is on the entity form.
(Mongo node module https://drupal.org/sandbox/vladady/2008900)

Other custom entities created via ECK do not have this problem.

This was fixed by adding this to og\plugins\entityreference\selection\OgSelectionHandler.class.php
module_load_include('php', 'entityreference', 'plugins/selection/EntityReference_SelectionHandler_Generic.class');

Same error found here:
https://drupal.org/node/1423778#comment-7818685

Maybe this can be fixed by including the extending class until the problem is fixed in entity reference module?

Thanks,
Mihai

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

reszli’s picture

here's a patch that does the above, and works for me

jelaniaitch’s picture

I am getting this error as well, and the patch is not working for me.

After the patch was applied, I still get "Fatal error: Class 'EntityReference_SelectionHandler_Generic' not found in /sites/all/modules/og/plugins/entityreference/selection/OgSelectionHandler.class.php on line 8" when I click the Register button on my site, or when I attempt to add a new user from the admin panel.

www.legalally.com/user/register

I am using:
OG 7.x-2.7
Entity Reference branch 7.x-1.x

Any suggestions??

mihai_brb’s picture

Was the cache cleared after patch apply?

jelaniaitch’s picture

Yes the cache was cleared.

mmt8’s picture

I have the same error but couldn't apply the patch. In other words, how can I apply that patch?