(why the issue was filed, steps to reproduce the problem, etc.)
Because media_gallery can now support media 2.x but this is a patch buried in a long comment chain in issue "Make media_gallery work with media-7.x-2.x branch":
I have provided step-by-step instructions on how to tie together the great efforts of those who made this happen, here, i.e. on how to get media gallery working with media 2.x, using the supplied patch in the same issue comments, here: )

@bangpound suggested a new branch before I did, in comment 104 of the issue: :-

I don't see how the same branch of this module can work with media 1.x and 2.x without making a mess of conditions and overrides. I think the code should be branched.

They also said:

I've updated the patch to use file_entity_access() instead of media_access() which is deprecated and also completely unsuitable for our purposes... one shouldn't need administrator access to view a media gallery's images.

From that I presume we're at a point where the media_gallery code would have to support both 1.x and 2.x media module APIs which would result in messy code difficult to maintain and add features to.

So, having a separate media_gallery 2.x branch for media 2.x *only* - then means that we can support only media 2.x without the legacy of 1.x. Keeps things separate, cleaner, easier to maintain and progress with.

Proposed resolution

(description of the proposed solution, the rationale behind it, and workarounds for people who cannot use the patch)
Make the media_gallery 2.x branch, so that at the Downloads section near the end/bottom of the page, we see something like:

  • 7.x-2.0-alpha1 (and later alpha2, alpha3, beta1 etc.)
  • 7.x-2.x-dev

Remaining tasks

(reviews needed, tests to be written or run, documentation to be written, etc.)
This would be: to actually create the branch.

User interface changes

(new or changed features/functionality in the user interface, modules added or removed, changes to URL paths, changes to user interface text)
As per code in media_gallery 2.x whatever changes need to be made to support media 2.x

API changes

(API changes/additions that would affect module, install profile, and theme developers, including examples of before/after code if appropriate)
As per above, previous section.

Original report by [username]

// Text of original report here.
(for legacy issues whose initial post was not the issue summary)

Discussed previously in these places:


therobyouknow’s picture

Issue summary: View changes

Just cosmetic changes really: used quote tag for 2nd quote from @bangpound drupal user reworked slightly my response to that that came after.

therobyouknow’s picture
- Posted by lsolesen on November 19, 2012 at 2:09pm

@therobyouknow I agree with @nedjo that the 1.x-branch should be cleaned out before branching. It shouldn't take too long though.

therobyouknow’s picture

When we create the branch and progress work supporting media 2.x we should ensure we don't break support for dependent modules / plug-in modules to media 2.x and other modules that augment media/media gallery functionality - for example Media Gallery Picker - - this awesome project enables galleries to be included in WYSIWYG content like articles. How about that for a great publishing feature! We must continue to support this.

sw3b’s picture

Do you have a ETA for the alpha version of media_gallery for media 2 ??
Thanks and keep up the good work.

therobyouknow’s picture

No ETA from me sw3b at the moment but @lsolesen and @nedjo might know better. I don't have admin access to media nor media_gallery so could not set this up myself. However, I can help with cleaning up the media_gallery dev by providing a patch which I would endeavour to do...

sw3b’s picture

ok thanks...

Moloc’s picture

Status: Active » Fixed

When we create the branch and progress work supporting media 2.x we should ensure we don't break support for dependent modules

I had a look at the source code of mg_picker and it seems, that there is no special code, which would not work with media_gallery 7.x-2.x

- Cleand up media gallery 7.x-1.x: #1848908: Revert file field support from 1.x
- media_gallery 7.x-2.x branch created.

therobyouknow’s picture

Thank you @moloc !
Can't yet see media_gallery 7.x-2.x on its project page:
I guess it takes time to propagate?

Moloc’s picture

I think so too. It is neither available in the Release Information (for maintainers) and in the version field in the issue queue. Lets see tomorrow.

therobyouknow’s picture seem to be taking too long to update the page to show your newly created 2.x branch @Moloc. 2 days ago and still no 2.x branch! I assume you've probably verified what you need to do for the submission.

Any thoughts welcome...

therobyouknow’s picture

Status: Fixed » Active

Re-opened this issue because after THREE DAYS have NOT refreshed the changes that @Moloc made to create a media_gallery 2.x download link! I would have thought that being a dynamic community, our tools were more responsive. Thanks Moloc for doing the change, hope refresh soon. Hurry up! What's the hold up?!

Moloc’s picture

With the help @IRC i was able to create a 2.x dev release (it seems, this buttons are hidden from me, because i don't see any button to create new releases, as described in ). It is now available to select in the issue queue.

Lets see, whether the 7.x-2.x branch is available tomorrow. ;)

brayo4’s picture

Status: Fixed » Active

Hello i cannot install using latest dev of media and file entity. i get the following error when i try to enable media gallery.

"EntityFieldQueryException: Unknown field: media_gallery_expose_block in EntityFieldQuery->addFieldCondition() (line 770 of /home/xxxxx/public_html/drupal/includes/"


I had a broken multiforms module required for media.. uninstalled those modules and reinstalled and all is well. thx for the help.

therobyouknow’s picture

Thanks @Moloc - about the 2.x branch: thanks for your latest attempt to create it, but can't see it yet on:

I checked at 0939 GMT from the UK

I will check later, may be it has to propagate across the world and perhaps this takes time...

When you say @IRC do you mean Drupal's Internet Relay Chat discussions - people help you on there?


About your error message, can you do the following to help us help you:

  • Please search for your error to see if someone else has already raised the issue - and to see if there is a patch offered that you can download to fix your problem (interim measure until official release of the fix)
  • Can you try out your installation - sometimes errors occur but the code does still work - in these cases you can hide the error for the time being until a fix comes. To hide error messages see instructions on this page: (you should still be able to see all error messages in the report section of your admin)
  • If the issue has not already been raised, can you create a new issue in the appropriate Drupal project page (module) and in it describe your problem more:
    • What you started with before the install
    • What version of media, media_gallery and other related modules you are using and details of any patches
    • The exact steps you took - a good example to the level of detail might be somethink like this: Also, use the issue summary template:
    • Screenshots of your problem
therobyouknow’s picture

@Moloc I have create the issue that the branch does not appear here:

I was hoping that this highlights the issue to themselves and/or perhaps triggers the automatic machinery behind to create it.

Moloc’s picture

Status: Active » Fixed

As the branch is already created, i set this back to fixed.

brayo4: There are some issues in this queue about your problem. We were never able to reproduce it and therefore we cannot fix it. I guess, that there was going something wrong during installation of media_gallery, but thats just a guess. (please fill a new issue, if you can provide more information)

therobyouknow: Yes, i was asking at #drupal-contribute. davereid explained me to create a developement release and timpucket gave me a link, where i just had to fill in some information and hit next/finish. (The downloadable dev link is by default not visible. It needs to be activated by a maintainer. Today it was visible to me and therefore i made it available.)

kalman.hosszu’s picture


I'm the maintainer of Media Gallery Picker module so if you need help I can dedicate time for development in the new branch.


therobyouknow’s picture

Status: Active » Fixed

@Moloc - thank you!!! @bangpound has released a new patch in the "make media gallery work with media 2.x" issue, I will try it out with this new media gallery 2.x branch.

See @bangpound's comment in that issue here:
the patch:

See my comment response to this, with my intent for testing:

therobyouknow’s picture

@kalman.hosszu - great to have another contributor. I am looking forward to trying out your module with media 2.x, media_gallery 2.x and Panopoly rc3 wysiwyg. I will let you know my findings.

therobyouknow’s picture

@bangpound has provided a patch for media_gallery 2.x - Let's try this out. I will report back my findings later. Thanks to @bangpound.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

therobyouknow’s picture

Confirming that this works with media-2.x on Panopoly distro RC3. However, there appears an issue whereby the media is not visible to unauthenticated users - will raise a seperate ticket.

therobyouknow’s picture

Issue summary: View changes

grammatical semantics about media_gallery 2.x only being for media 2.x -- i.e. what we want