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.
enabling MG module gives me this error:
EntityFieldQueryException: Unknown field: media_gallery_expose_block in EntityFieldQuery->fieldCondition() (line 656 of /home/content/65/7930665/html/includes/entity.inc).
Comment | File | Size | Author |
---|---|---|---|
#19 | media_gallery_error_installing_due_to_existing_field_tables.patch | 1.35 KB | JonasSavs |
Comments
Comment #1
wil3m CreditAttribution: wil3m commentedsame issue on my website
Comment #2
federico.giunchi CreditAttribution: federico.giunchi commentedsubscribe
Comment #3
TripX CreditAttribution: TripX commentedsame here.
Comment #4
TripX CreditAttribution: TripX commentedResolved the problem. The reason was that I installed media + media gallery earlier.
I made following steps:
- Run update.php
- Deinstalled Media Gallery
- Re-uploaded and re-installed MG module
Comment #5
damien_vancouver CreditAttribution: damien_vancouver commentedFor me, this error was being caused by a problem enabling the Media Gallery module. I got a white screen of death immediately after enabling it int he modules list, and my apache error log contained the following error:
Checking my styles module (which was not showing need of a security update), I discovered that there's a new 7.x-2.x branch out. I was running 7.x-1.0-alpha4, which is not compatible with Media Gallery and does not support file objects.
Thus, if you upgrade your styles module to the latest (7.x-2.x-alpha8 as I write this), then you can properly enable media gallery.
styles 7.x-2.x+ should be added as a media gallery dependency since installing with the old version causes WSOD and requires disabling the module via drush or a SQL query for the system table - not very friendly for less advanced users!
I'm setting this issue to be a bug, minor priority, needs work. The resolution of this bug would be to add the proper dependency to the module's info file so one cannot install it without a compatible styles module.
Comment #6
innowhat CreditAttribution: innowhat commentedI have tried everything that was suggested here but still get this error:
Error message
EntityFieldQueryException: Unknown field: media_gallery_expose_block in EntityFieldQuery->fieldCondition() (line 656 of /home/www/webhero/innowhat.com/www/includes/entity.inc).
I cant even run cron or flush cache.
Comment #7
desiman CreditAttribution: desiman commentedThis is what I did to remove that error. Added one more step from TripX list
- In Modules page unchecked Media Gallery and Multiple Forms modules
- In Uninstall tab, removed Media Gallery and Multiple Forms
- Downloaded MG and MF (non-unstable version)
- re-installed MG and MF modules
The error message was gone.
Comment #8
innowhat CreditAttribution: innowhat commentedGeezz... Thanks alot mate!!, your simple step/explanation worked, Hope it work for others.
Comment #9
lsolesen CreditAttribution: lsolesen commentedAs there is not patch, this cannot not be "needs work". Is this still valid for beta7, or can we close the issue?
Comment #10
damien_vancouver CreditAttribution: damien_vancouver commentedthe issue from #5 is still there, but it's a separate error so I'll open a new issue and attach a patch there.
Comment #11
lsolesen CreditAttribution: lsolesen commented@damien_vancouver The guys behind media does not recommend using styles anymore. This is probably not related to media_gallery, but to styles? We will close this issue. Open a new one, if appropriate.
Comment #12
hor8tio CreditAttribution: hor8tio commentedI also have this problem. None of the fixes above have done anything to help. No ideas?
Comment #13
sahaj CreditAttribution: sahaj commentedSame here. This is my message as soon as I try to enable Media Gallery:
EntityFieldQueryException: Unknown field: media_gallery_expose_block in EntityFieldQuery->addFieldCondition() (line 767 of xxx/includes/entity.inc).
I have Media Gallery 7.x-1.0-beta7 and Multiform 7.x-1.0.
UPDATE: Actually, I could install Media Gallery after deleting a taxonomy vocabulary called 'Gallery collections'. Only don't know if there is a link between it and the issue.
Comment #14
crawley CreditAttribution: crawley commentedThe most scary moment....stupid me was working on on a live site.....I just deleted the folder from my list of modules. This media gallery is cursed I tells you.
Comment #15
jcdub CreditAttribution: jcdub commentedThanks desiman... I'd been running into this issue trying to install via the admin interface (with latest stable modules + core 7.15) but no luck. Kept getting errors and white screens.
The trick for me was to follow your instructions using Drush. Running updatedb along the way...
Comment #16
humansky CreditAttribution: humansky commented#7 worked for me...thank you!!
Comment #17
randell CreditAttribution: randell commentedJust want to emphasize the second item in #7 that says "In Uninstall tab, removed Media Gallery and Multiple Forms". This is what I missed since I only usually disable modules as compared to uninstalling them.
Comment #18
erwangel CreditAttribution: erwangel commentedStill there in 7.x-2.x-dev (along with media module 7.x-2.x-dev). Plus unable to uninstall
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table [error]
'field_data_media_gallery_file' doesn't exist: UPDATE
{field_data_media_gallery_file} SET deleted=:db_update_placeholder_0; Array
(
[:db_update_placeholder_0] => 1
)
in field_sql_storage_field_storage_delete_field() (line 312 of
/home/.../modules/field/modules/field_sql_storage/field_sql_storage.module).
Cannot modify header information - headers already sent by (output started at
Older versions are only compatibles with media 1.x, so no other gallery version available for media module 7.x-2.x-dev which uses File entity instead of the media_field and comes with sub module media_wysiwyg . That means that iff you want these features of media module, you have to say goodbye to media gallery which hasn't been updated since February.
Comment #19
JonasSavs CreditAttribution: JonasSavs as a volunteer and commentedHi Everyone,
I did add this error also, due to an existing table of the field field_tags added by several modules which made the installation fail and give this error.
I fix that with this patch renaming the non used table and allowing the field to be created properly.
Hopes this helps anyone.
Regards