Jump to:

1155 Posts in 2568 Topics by 408 members

Upgrading SilverStripe

SilverStripe Forums » Upgrading SilverStripe » Error when accessing "Files & Images"

Ask questions about upgrading SilverStripe to the latest version.

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

Page: 1
Go to End
Author Topic: 831 Views
  • BruceyBonus
    Avatar
    Community Member
    7 Posts

    Error when accessing "Files & Images" Link to this post

    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
  • MateuszU
    Avatar
    Community Member
    89 Posts

    Re: Error when accessing "Files & Images" Link to this post

    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

    831 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.