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.

Customising the CMS /

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

Image attach from the file store Error. ss2.4.5


Go to End


3 Posts   1624 Views

Avatar
Ben_W

Community Member, 80 Posts

24 February 2011 at 8:39pm

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
Avatar
Ben_W

Community Member, 80 Posts

25 February 2011 at 12:15pm

Edited: 25/02/2011 12:26pm

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?

Avatar
Ben_W

Community Member, 80 Posts

25 February 2011 at 12:30pm

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.