2

I'm trying to debug why Drupal Commerce License Billing isn't working on existing install but works fine on fresh install.

The difference I can see between the two when adding a new billing type is after entity_get_info is ran (after saving a new type) the clean install has two array elements complete the existing install does not.

Those two elements are "base table field types" and "schema_fields_sql".

So for some reason those elements aren't set in the existing install.

Any ideas why those elements wouldn't be populated or where they are set so I can further debug?

Thanks

  • Could you elaborate on what arrays you are comparing? Did you mean the return value of entity_get_info()? – zwirbeltier Aug 3 '15 at 20:07
  • yes the return value of entity_get_info. one contains values for base table field types and schema_fields_sql, the other array has both of these values as NULL. So something isn't setup right on the existing install, but im not sure what makes those elements populated. – RJ Johns Aug 4 '15 at 20:00
0

My first guess would be that the cache is somehow corrupted. To fix that you'll need to clear the drupal caches

If that doesn't help you'll need some more in-depth debugging.

For further debugging you'll need some easy way to execute code in your drupal environment. I'd suggest to use drush ev or drush php-script for that. -- Here is some information on how to install drush if you don't have it installed already.

At this point I think there are only two causes left:

  1. entity_get_info() only populates schema_fields_sql if the base table key is present. So it might by that somehow the base table is not set. To check that take a look at the return value of module_invoke_all('entity_info'). For debugging you'll need to take a look at all modules in module_implements('entity_info').
  2. If the original data in module_invoke_all('entity_info') includes a base table the only other way to corrupt the information is some implementation of hook_entity_info_alter(). Use module_implements('entity_info_alter') to find all modules you need to check.

If you need further help please provide at least the dump of entity_get_info() and module_invoke_all('entity_info').

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.