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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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   1508 Views

Avatar
BruceyBonus

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 http://silverstripe.org/upgrading-silverstripe/show/269536#post269536 & http://silverstripe.org/upgrading-silverstripe/show/255475#post255475 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.

Cheers

Attached Files
Avatar
MateuszU

Community Member, 89 Posts

5 February 2010 at 9:48am

Hi,
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 :)

cheers
mat