Jump to:

5539 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Image attach from the file store Error. ss2.4.5

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

Page: 1
Go to End
Author Topic: 977 Views
  • Ben_W
    Avatar
    Community Member
    80 Posts

    Image attach from the file store Error. ss2.4.5 Link to this post

    I was trying to attach a image from the files that has been already uploaded previously, and the iframe just won't load, got the following error:

    ERROR [User Error]: Bad RecordClassName '' and $baseClass not set
    IN GET /admin/EditForm/field/Thumbnail/EditFileForm/field/ExistingFile/tree?forceValue=&SecurityID=a3b5fd2f55e54f97db5b000b2949f2a883f3292f

    Just wondering if this is a bug from ss2.4.5

    Just did a test on ss2.4.1, attach image this way is fine.

    I have attached a screen shot of the error message.

    Attached Files
  • Ben_W
    Avatar
    Community Member
    80 Posts

    Re: Image attach from the file store Error. ss2.4.5 Link to this post

    I had a more close look. I used to have following custom image class:
    'RegionPageThumbnail_CustomImage', 'InfrastructurePageThumbnail_CustomImage', 'AboutUsPageThumbnail_CustomImage'

    Since they all share the same characteristics, I created a 'DefaultThumbnail_CustomImage,' and change the code to reference this default image class instead of individual separate class, and REMOVED these three image class. Now after dev/rebuild, I had a look at the 'File' table in the database, those images created previously, while they were referencing old image class has a empty ClassName, which makes sense because these image class no longer exist. Would this be the cause of 'BadRecordClassName'?

    The ClassName in File table is a enum field, which means they must use the value included in this enum(), how could it be empty???

    Does this mean, if you had a image class before and had upload some image using this class, you can not remove this class, because these images will be left without an associated image class?

  • Ben_W
    Avatar
    Community Member
    80 Posts

    Re: Image attach from the file store Error. ss2.4.5 Link to this post

    I just removed those images in the File table that is without an associated image class. The the ajax iframe works.

    This just confirm there is bug.

    977 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.