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).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

wil3m’s picture

same issue on my website

federico.giunchi’s picture

subscribe

TripX’s picture

same here.

TripX’s picture

Assigned: zibby72 » Unassigned
Status: Active » Closed (works as designed)

Resolved 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

damien_vancouver’s picture

Category: support » bug
Priority: Normal » Minor
Status: Closed (works as designed) » Needs work

For 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:

 [error]  PHP Fatal error:  Call to undefined function styles_style_flush() in /home/webdev/public_html/sites/all/modules/media_gallery/media_gallery.install on line 65, referer: http://webdev/admin/modules

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.

innowhat’s picture

I 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.

desiman’s picture

This 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.

innowhat’s picture

Geezz... Thanks alot mate!!, your simple step/explanation worked, Hope it work for others.

lsolesen’s picture

Priority: Minor » Normal
Status: Needs work » Postponed (maintainer needs more info)

As there is not patch, this cannot not be "needs work". Is this still valid for beta7, or can we close the issue?

damien_vancouver’s picture

the issue from #5 is still there, but it's a separate error so I'll open a new issue and attach a patch there.

lsolesen’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

@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.

hor8tio’s picture

I also have this problem. None of the fixes above have done anything to help. No ideas?

sahaj’s picture

Same 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.

crawley’s picture

The 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.

jcdub’s picture

Thanks 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...

humansky’s picture

#7 worked for me...thank you!!

randell’s picture

Just 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.

erwangel’s picture

Issue summary: View changes

Still 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.

JonasSavs’s picture

Hi 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