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 uploading an image and pressing the Submit-Button I get this:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'usr_web339_2.cache_entity_asset' doesn't exist: DELETE FROM {cache_entity_asset} WHERE (cid IN (:db_condition_placeholder_0)) ; Array ( [:db_condition_placeholder_0] => 1 ) in cache_clear_all()
Comment | File | Size | Author |
---|---|---|---|
#6 | 2129587-fix-cache-table-fatal-error-6.patch | 3.63 KB | kiseleva.t |
#4 | 2129587-fix-cache-table-fatal-error-4.patch | 994 bytes | kiseleva.t |
Comments
Comment #1
romansta CreditAttribution: romansta commentedComment #2
corentin.crouvisier CreditAttribution: corentin.crouvisier commentedSame issue with the version 7.x-1.0-beta4
Comment #3
corentin.crouvisier CreditAttribution: corentin.crouvisier commentedHi, same problem for me with 7.x-1.0-beta4 when I edit a media and that I save/delete it after (from /admin/content/assets).
Line 116 changing $return['asset']['entity cache'] = TRUE; to $return['asset']['entity cache'] = FALSE; from asset.module in function asset_entity_info() and after clear cache solve the problem.
Comment #4
kiseleva.t CreditAttribution: kiseleva.t at DrupalJedi commentedHi,
As described here: https://www.drupal.org/node/1387268#comment-6983504, each module should create this table it manually.
This patch should fix this problem, it's created necessary table.
Comment #5
IRuslan CreditAttribution: IRuslan as a volunteer and at DrupalJedi commentedTatiana, thanks for patch. It's actually works.
But the single problem that even for users without entity cache enabled additional table will be created.
What I propose is to get inspiration from the approach in bean module.
We should create sub-module like bean_entitycache. And move table creation into .install file of the submodule.
Additionally, it will allow us to move this snippet
into entity_info_alter of the submodule.
To be sure if previous versions not affected, we need to add enabling of submodule in hook_update if entitycache enabled.
As improvement we also should add same condition into hook_install — and make submodule enabled for fresh installs if entitycache enabled.
Comment #6
kiseleva.t CreditAttribution: kiseleva.t at DrupalJedi commentedRuslan, thank you for your answer.
Please check new patch attached.
Comment #7
IRuslan CreditAttribution: IRuslan as a volunteer and at DrupalJedi commentedGreat work! Pushed to dev.