Hi,

I am getting the error:

Fatal error: Class 'UcOrderProductMetadataController' not found in .../sites/all/modules/entity/entity.info.inc on line 23

- I have tried a registry rebuild (as suggested here: http://drupal.org/node/1570038) doing drush rr

Comments

longwave’s picture

Status: Active » Postponed (maintainer needs more info)

UcOrderProductMetadataController is in the uc_order/uc_order.info.inc file. Are you sure this file is uploaded correctly? Try reuploading Ubercart. Also, make sure that you do not have two copies of Ubercart in your modules folder by mistake.

radiocontrolled’s picture

Hi longwave,

I re-uploaded the latest version of ubercart. there is one copy in my modules folder.
I enabled cart, order, product, store
I then ran update.php & cron
I did : drush rr

When I went to:
https://mysite.org/admin/structure/salesforce/mappings/manage/name-of-my...

I got the same error
Fatal error: Class 'UcOrderProductMetadataController' not found in .../sites/all/modules/entity/entity.info.inc on line 23

the uc_order/uc_order.info.inc is in ubercart.

the error is coming when I go to manage a salesforce module I have setup.

I want to use ubercart so that I can sell recurring subscriptions to user roles. e.g. customer signs up for drupal site, and upon purchasing a product, their role is upgraded. Ideally I can use ubercart and salesforce. Any help on this is appreciated. Thanks

your help is appreciated. thanks,

DanZ’s picture

This error is happening in relation to a SaleForce module.

A recent version of Ubercart changed the handling of the order product entity. Maybe the SalesForce code cannot handle the change.

Try getting a full backtrace of the error using the Devel module. That will help you pin down the problem.

Also, it is possible that this issue should be moved to http://drupal.org/project/issues/salesforce.

Something is trying to use that controller, but failing to include the required file. That might be Ubercart or might be the SalesForce stuff. A backtrace will help pin down the problem.

longwave’s picture

Title: Fatal error: Class 'UcOrderProductMetadataController' » Fatal error: Class 'UcOrderProductMetadataController' not found in .../sites/all/modules/entity/entity.info.inc
Project: Ubercart » Salesforce Suite
Version: 7.x-3.4 » 7.x-3.x-dev
Component: Other » salesforce_mapping.module
Category: support » bug
Status: Postponed (maintainer needs more info) » Active

This looks like a bug in the Salesforce module. It calls entity_entity_property_info() directly, instead of using it as a hook as intended. If it was invoked as a hook, uc_order.info.inc would be loaded automatically and the class would be found.

Moving to the Salesforce queue.

hitesh-jain’s picture

Status: Active » Fixed

Hi,

This error is happening in relation to a SaleForce module and ubercart module.

I was getting the same error....but when i included below code into sites/all/modules/contributed/entity/ entity.info.inc file in function entity_entity_property_info() it worked for me .Now m salesforce is working properly.

global $base_url;
include_once "$base_url/sites/all/modules/ubercart/uc_order/uc_order.info.inc";
DanZ’s picture

Status: Fixed » Active

Hacking the Entity module to fix a bug in the Salesforce Suite module doesn't count as a fix.

The fix suggested in #4 should be implemented, posted here as a patch, tested, and committed to the Salesforce Suite development Version. Once all that is done, it can be marked as "fixed". That's the official Drupal.org procedure.

theladebug’s picture

This is actually an ubercart problem, the uc_orders.info is missing the line for the info.inc file which contains the entity metadata info.

Simply add the following line to uc_orders.info:

files[] = uc_order.info.inc

Then, clear caches and you'll be good. I will head over and check out the most recent version of ubercart to be sure it's fixed there.

theladebug’s picture

Status: Active » Closed (works as designed)

Here's a link to the patch I submitted for the ubercart module just in case anyone is still running across this issue.

https://drupal.org/node/1570038#comment-7554225

longwave’s picture

Status: Closed (works as designed) » Active

This isn't an Ubercart issue. As I described in #4, the Salesforce module is calling entity_entity_property_info() when this function should be called as a hook, which would automatically include the right file. This same issue would affect other modules that implement hook_entity_property_info() and put them in a .info.inc file.

tauno’s picture

Issue summary: View changes
Status: Active » Fixed

Fixed in commit 43e0b47

Status: Fixed » Closed (fixed)

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