Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After updating 7.x-2.1 up to 7.x-2.1+25-dev I'm started to get following error:
Fatal error: Call to undefined function countries_field_info_property_callback() in /sites/all/modules/contrib/entity/modules/field.info.inc on line 30
How to reproduce:
$field_type = field_info_field_types('country');
var_dump($field_type['property_callbacks']); // countries_field_info_property_callback doesn't exist.
If truncate all cache* tables manually - it will solve the problem. However normal flushing cache (or drush cc all) gives fatal error.
I think on hook_update_N you should somehow flush cache.
Comment | File | Size | Author |
---|---|---|---|
#6 | countries-2293209-6.patch | 1.36 KB | mrded |
Comments
Comment #1
mrded CreditAttribution: mrded commentedComment #2
mrded CreditAttribution: mrded commentedComment #3
mrded CreditAttribution: mrded commenteddrupal_flush_all_caches() solves the problem. Please take a look my patch
Comment #4
mrded CreditAttribution: mrded commentedComment #5
mrded CreditAttribution: mrded commented#3 patch doesn't solve the problem.
Why do we need to flush cache during updating? After updating Drupal will flush everything automatically!
Comment #6
mrded CreditAttribution: mrded commentedI've added old countries_field_info_property_callback() function back which calls new countries_entity_metadata_field_property_callback() to keep compatibility with 7.x-2.1 version.
I've also deleted flushing cache during update, because update.php flushes it anyway.
Comment #7
Alan D. CreditAttribution: Alan D. commentedMaybe related?
#1312374: Fatal error: Call to undefined function link_field_property_info_callback() in field.info.inc on line 30
#1447946: Recent entity API dev version requires a recent i18n dev version
#2069035: Can't run site update
What version of the Entity API are you using?
Workaround could be on the cards still though.
Comment #8
mrded CreditAttribution: mrded commentedWe use Entity 7.x-1.5.
i18n module doesn't related with issue at all. We don't use i18n module, and still have the problem.
As you can see by patch, problem is because 'property_callbacks' has been renamed.
Comment #9
kenorb CreditAttribution: kenorb commentedComment #10
roball CreditAttribution: roball commentedAlso encountered the same problem while updating the Countries module from 7.x-2.1 to 7.x-2.2.
The site then became completely inaccessible.
TRUNCATE TABLE `cache_field`
solved the problem.Comment #11
Alan D. CreditAttribution: Alan D. commentedRe-added the function and re-rolled a new release.
https://www.drupal.org/node/2330401
Let me know if this helps! (5 min to publish on drupal.org from now)
"The caching should flush itself"... does not always seem too, so I have left this in.
Comment #12
roball CreditAttribution: roball commentedUpdating from 7.x-2.2 to 7.x-2.3 worked fine for me of course, since I have already managed to solve the problem during the update to 7.x-2.2 manually. So, the new release should fix update issues when updating from 7.x-2.1 to 7.x-2.3.
Thanks for the quick release!
Comment #13
kenorb CreditAttribution: kenorb commentedComment #14
Alan D. CreditAttribution: Alan D. commentedworkaround to fix the Entity API bug should have solved this with countries 7.x-2.3
https://cgit.drupalcode.org/countries/commit/?id=fff90b6