7913 Posts in 1355 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » LeftAndMain: The UncleCheese Blog
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
| Go to End | ||
| Author | Topic: | 1899 Views |
-
Re: LeftAndMain: The UncleCheese Blog

26 November 2010 at 5:26am
UC,
I have a new challenge...
After upgrading to SS 2.4.3 everything seemed okay, i did nt have the HTTP Error anymore, but ...
I also have some ImageUploadFields, the strange thing is that they are working if i use ModelAdmin, but if i manage my objects in the Page i only get a textfield showing the Image ID. No Uploadify what so ever. I had to change the parameters in my ImageUploadField from
<CODE> new ImageUploadField('Photo', 'Foto',Null,Null,Null,'SomeImagePage/Images') </CODE>
To
<CODE> new ImageUploadField('Photo', 'Foto') </CODE>
Because i got an error concerning Uploadify when i tried to open my (Object)page for editing.
-
Re: LeftAndMain: The UncleCheese Blog

26 November 2010 at 5:50am
This looks like too many parameters for an UploadifyField:
new ImageUploadField('Photo', 'Foto',Null,Null,Null,'SomeImagePage/Images')
To set the upload folder, just use $your_uploadify_field->setUploadFolder('SomeImagePage/Images');
---------------
Silverstripe tips, tutorials, screencasts, and more. http://www.leftandmain.com -
Re: LeftAndMain: The UncleCheese Blog

26 November 2010 at 6:04am Last edited: 26 November 2010 8:20am
Okay UncleCheese,
Got that.
But what about the thing that i can not use the uploadify field in my page but can use it in ModelAdmin?
[EDIT]
In fact the Uploadify field is working when i ad a new Object ( A Serie in my case), but it doesn t show when i want to edit an existing Serie. Then it only shows an textfield with the Series ID.
[/EDIT]
[EDIT 2]
This might help...If i edit an Object, the popup opens and the imagefield shows only the image ID. When i click on {Next} the Uploadify box shows, then when i click {Previous} the box shows where it first only showed a textfield. So it seems that it is some kind of refresh...but then again ... What do i know LOL
ps. The same *.php files works in SS 2.4.2 but then i have HTTP errors in FileUploadFields ( posted that somewhere else)
[/EDIT 2]
<CODE>
public function getCMSFields()
{
$fields = parent::getCMSFields();
return new FieldSet
(
new TextField('SerieName'),
new TextField('Genre'),
new TextareaField('Beschrijving'),
new TextField('Server'),
new TextField('Folder'),
new ImageUploadField('Cover'),
new DataObjectManager
(
$this,
'SerieSeasons',
'SerieSeason',
array('SeasonNmbr' => 'Seizoen')));}
</CODE>Tx again
| 1899 Views | ||
| Go to Top |

