Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba

"Gallery" of Videos, Showing same image for all thumbs.

Go to End

4 Posts   1013 Views


Community Member, 31 Posts

16 April 2011 at 7:45am

Hey there.

Not sure how or why this is happening, but for a gallery-style page of videos using the VideoPopup method (tested with others, $Player, etc), the thumbnails are the same. Viewing the source of output page shows that they reference the same .jpg for the thumb.

Here's what information I 'think' you need:

Running latest DataObjectManager (Build Date: 2011-04-01)


class VideoPage extends Page
        static $has_many = array (
                'Videos' => 'Video'

        public function getCMSFields()
                $fields = parent::getCMSFields();
                $fields->addFieldToTab("Root.Content.Videos", new FileDataObjectManager(
                        array('Title' => 'Title', 'Description' => 'Description'),
                        new FieldSet(
                                new TextField('Title'),
                                new TextareaField('Description')
                return $fields;

class VideoPage_Controller extends Page_Controller



class Video extends DataObject
        static $db = array (
                'Title' => 'Varchar(100)',
                'Description' => 'Text'

        static $has_one = array (
                // Make sure this comes first
                'VideoPage' => 'VideoPage',
                'Video' => 'FLV'



        <% control Videos %>

                        <div class="resource" style="padding: 0 6px 0 25px; width:200px;">
                        <% control Video %>
                      <% end_control %>
                                <div class="description">

        <% end_control %>

In this case the Titles are different, the Descriptions are different and once clicked, the video that plays is different (all good and expected) -- just the thumbnail is the same across the board.

The kicker: In assets/video_thumbnails/ all the files are created properly, however the images on the parsed page are pointing to the _resampled directory, and pulling the same-named file, in this case 'croppedimage260152-.jpg' ...

It appears that the re-sampling process is truncating the file-names to the same name, so the last video file I upload gets turned into the thumbnail that they all end up using.

Bug? File-naming issues?

Any thoughts on the matter would be great.



Community Member, 31 Posts

19 April 2011 at 5:17am

*bumperdoodle* :)


Community Member, 31 Posts

20 April 2011 at 2:16am




Community Member, 13 Posts

11 May 2011 at 12:04am

Gallery doesn't even work for me. Just causes an Error 500 on the server.