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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Upgrading SilverStripe /

Ask questions about upgrading SilverStripe to the latest version.

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

Error when accessing "Files & Images"

Go to End

2 Posts   1135 Views


Community Member, 7 Posts

4 February 2010 at 10:19pm

I get an error every time I try to access ("Files & Images") the assets folder. I have a fresh installation of 2.3.5, and I have not seen this before in on other sites using 2.3.4. I installed 2.5.5 again on a new sub domain to check it and it work at first but then produced the same error when I changed some of the files in the assets using my FTP client. I trued to change the files back but that did not work.

I have seen these posts & but these solution involve making changes to a sapphire file which I am not keen to do unless I have to.

I have attached the error and any help would be great.


Attached Files

Community Member, 89 Posts

5 February 2010 at 9:48am

I've just checked and this does not seem to happen on clean 2.3.5 install. That's probably something in your classes. Look through your code for name clashes between the has_one relation to Image/File and regular fields or function names on the same class or on decorators applied to that class.

You can also try adding:

        foreach($usedFiles as $file) {
            if ( !isset($file->ID) ) var_dump($file);
            $where .= $file->ID . ',';     

temporarily to the Folder to sort out what kind of offending object makes it into the $usedFiles. If you know what's the object, you can try to track it down. It's quite hard to help you without knowing what custom classes you have implemented and what sits in the database :)