744 Posts in 309 Topics by 287 members
|Go to End|
20 February 2013 at 6:44am
I'm trying to add an 'UploadField' to a widget in SilverStripe 3.0, but can't seem to get anywhere with it.
I get the error:
Fatal error: Call to a member function FormAction() on a non-object in /home/amberlei/public_html/framework/forms/FormField.php on line 139
I know there was a similar error prior to SilverStripe 3.0 for the 'ImageField', but I thought it would be fixed in the newer version. Does anyone know how to successfully add an 'UploadField' in SS 3.0?
It would be nice to have this just work rather use a work around, but if that's necessary then that's cool.
Thanks in advance, any help is appreciated.
20 February 2013 at 8:45am
I can only talk about the 2.4.x, but as I understand it widgets are a "port" from that code (i.e. not rediesigned since 2.4.x) and as such an uploadfield was unworkable in terms of the old system. So instead I created a LinkWidget (http://www.silverstripe.org/imagelinkwidget-widget/ - boy what a plug!) to link to uploads in the normal fashion.
Love to know this is fixed, but in case it isn't the above is the best workaround I know
20 February 2013 at 10:20pm Last edited: 20 February 2013 10:33pm
Thanks for such a quick reply. I tried installing the widget you linked to but when I try to add the widget to a page I get this error:
Error at line 568 of /home/amberlei/public_html/framework/model/MySQLDatabase.php
I also remember the widget as I used a modded version of it for a project I was working on last year. It works very well on SilverStripe 2.4.x but on SilverStripe 3.x I get the error mentioned above.
I don't suppose you have any ideas on what the problem could be?
EDIT: I have checked the site and it is in dev mode, so any ideas where could I find more information?
20 February 2013 at 10:25pm
I suspect it will be many things! I know this sort of thing...
...is depreciated in SS3. If that helps, but it doesn't look like that error... sorry can't help any more as I'm not on SS3 yet
|Go to Top|