7956 Posts in 1396 Topics by 945 members
|Go to End||Next >|
22 February 2009 at 3:34pm
Interesting. What kind of files are you uploading? I can add GIFs to the allowed file types.
Do you use SSP Director? That's one of the best apps I've ever seen. Nothing SS offers will compete with that.
22 February 2009 at 3:43pm
The best thing, imho, would be to just allow the normal setAllowedFileTypes() to override what files can be uploaded, so I could set eg. ('jpg', 'png', 'flv'). The image preview for those videos would then, of course, be broken, but maybe one can fix that by some mime-type inspection.
SSP Director is really impressive, however, my galleries are mostly showcasing a bunch of images for products, in the traditional "slideshow" way, and I manage those products from SS. Maybe at some point I will upload my SlideShowPage module as a simple alternative to the existing SSP gallery, depending on how much I like it once it's finished.
22 February 2009 at 4:25pm
Yeah, the ImageDataObjectManager expects file types that qualify for image resampling (JPG and GIF). A FileDataObjectManager is more tolerant, and knows to skip all of that stuff if the file isn't an image. If the ImageDataObjectManager could take normal files (i.e. FLV), imagine imagine all the distorted Flash icons that would appear when one dragged the slider to its max.
23 February 2009 at 7:09am Last edited: 23 February 2009 7:10am
Sorry for bothering you again, but it seems like I'm too stupid to get this to work correctly:
When I have two pages using the manager, they both always display all existing managed items, no matter to which of the two an item actually belongs.
If I add a filter clause to select only the items already belonging to the current page, I am no longer able to add new items.
23 February 2009 at 7:19am
Hmm... Would you mind posting your code?
23 February 2009 at 7:32am Last edited: 23 February 2009 7:35am
Here it is. I just noticed this is happening not with those page types themselves, but with subclasses of them! Ie. in the example posted, every CatalogItem page sees all the SlideShowFile objects.
This is the page:
class SlideShowPage extends Page
static $has_many = array(
'Files' => 'SlideShowFile',
$filesField = new FileDataObjectManager(
'Title' => 'Title',
'Link' => 'Link',
'Target' => 'Target',
'Pause' => 'Pause'
This is the object:
class SlideShowFile extends DataObject
static $has_one = array(
'File' => 'Image',
The error occurs in subclassed pages:
class CatalogItem extends SlideShowPage
23 February 2009 at 12:19pm
If I had to guess, I'd say this happens on ComplexTableFields, too. I didn't modify the method that retrieves the records for the table -- only those that change the parameters for that method (sort, page size, filter, etc).
It's an unusual scenario, but nonetheless one that needs to be addressed. I'll try to duplicate what you have and see what I can come up with. I'm sure it has something to do with the joining of parent class to child class -- using an incorrect or ambiguous ID field or something.
24 February 2009 at 11:22pm
I've teste your new files and if both managers are in list-view it works without a problem. I you use two FileDataObjectManager and the first is in grid-view, the second manager still can't be sorted.
There's an HTML error (the Comment should be '<!-- LIST VIEW -->', not '<! -- LIST VIEW -->'), but that's not the cause for it.
It's realy strange, when you switch the view of the first manager with sorting enabled of the second manager, sorting works without turning it off and on again...
|Go to Top||Next >|