Trying to debug media_gallery-HEAD (is that the latest? media_gallery-DRUPAL-7--1 does not work and the package name in the .info file uses lower case so it shows up in its own grouping).

Looking at the theme_media_gallery_teaser function in media_gallery.theme.inc on line 50, the object passed in is completely different than the function's code is expecting. This will cause the teaser to always show the empty_gallery.png.

There is the initial test for: isset($element['media_gallery_media'][0])
but the first media gallery item is at: $element['media_gallery_media']['#object']->media_gallery_media[LANGUAGE_NONE][0]

It would seem that the object is built up incorrectly?? rather than the teaser theme function??

Anybody (JacobSingh) working on this? I will go through the code, but there seems to be a fundamental break down happening at an architectural level. It would be very helpful to ask some directional questions to whoever is coding this?

CommentFileSizeAuthor
#2 galleries-overview.png41.47 KBRobKoberg
#2 gallery.png45.49 KBRobKoberg
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

effulgentsia’s picture

Version: 7.x-1.0-beta2 » 7.x-1.x-dev
Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

Correct that HEAD has the latest code. You can also use beta3. At this time, there are only one or two commits in HEAD that were made after beta3 was released.

On a fresh install of Drupal 7.0's standard profile, when I enable Media beta3 and Media Gallery beta3, then add a new gallery, and add a new media item (an image) to it, then on the "galleries" page, which shows a grid of gallery teasers, I see the image that I added, and not the empty gallery image. Also, if I edit the gallery, and select the publishing option "promoted to front page", and then go to the site's front page, I also see the gallery teaser using the added image.

One possible reason for $element['media_gallery_media'][0] not existing is if on admin/structure/types/manage/media-gallery/display/teaser, you have the "Gallery media" field set to hidden. By default, it should be using the "Collection thumbnail" format.

If you're still experiencing the empty graphic showing up for galleries that have media in them, can you provide more info on how to reproduce that condition? Thanks.

RobKoberg’s picture

FileSize
45.49 KB
41.47 KB

I am seeing the object as what is expected in the code with the versions you recommended earlier today (media & media_gallery dev3). I am still seeing the empty_gallery.png whether I use an existing asset or or use the basic upload dialog (plupload does not upload for me). How do you get your media on your site?

How is your file system setup? I.e. should the files upload directory destination matter? (I am developing on a mac, fwiw, but deploy to linux)

Are you able to install a fresh version of d7 standard profile with an empty db, a clean file system and only enable media and media_gallery and everything just works? Are there other modules you enable? Do you set the Configuration -> Media -> File System directories first?

Doing as you say in #1, I do not see a new gallery show on the front page as a recent item.

When I go to the main Galleries page, I see all the galleries with their details *except* the empty_gallery.png always shows for each gallery (attached screenshot: galleries-overview.png). When I click on the placeholder image (link (pathauto installed) http://mymachine/content/test-gallery-1), I am taken to the gallery where the (only) image shows as a placeholder. If I click on the blue link below the image (the file name in this case - http://mymachine/sites/default/files/exhibit/art/image/act_comics_0.gif), the image shows.

When I drill into a gallery, again the placeholder is displayed with all other information correct (screenshot: gallery.png). Clicking on the only (placeholder) image (http://mymachine/media-gallery/lightbox/63/61) in that gallery throws up the light(color)box with the placeholder image at its original (very small) size with the correct title and a download original image link that does download the original image. If I click on the blue image name link below the placeholder, I am taken directly to the image which displays the original. If I click on the title link (http://mymachine/media-gallery/lightbox/63/61) that shows on hover, I am presented the light(color)box.

RobKoberg’s picture

I meant beta3 where I said dev3 above...

cmack’s picture

hello

I have been working with D6x and decided to try a d7 install this weekend. I installed the Media Gallery and have experienced the same thing you describe here. However, your experience was two months ago. The odd thing is that when I upload a video (youtube) the teaser for the video appears within the individual gallery. But the place holder image for images appears both on the main gallery page gallery teaser and within the individual gallery itself.

Since you wrote your comment above, have you been able to resolve this issue? If so, how.

thanks for your assistance.

RobKoberg’s picture

It was a while ago, but I think this is solved by configuring Image file styles. I believe it is set to 'File' by default and it needs to be set to 'Image'. I think it is done here: admin/config/media/types/manage/image/display

I think there is more info for you here: http://drupal.org/node/1030942

lsolesen’s picture

Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

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