Jump to:

23481 Posts in 18951 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » ModelAdmin & HTML editor image manager bug?

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 607 Views
  • SheaDawson
    Avatar
    Community Member
    45 Posts

    ModelAdmin & HTML editor image manager bug? Link to this post

    Hey,

    I have come across this problem a couple of times now, but this time I really need to solve it. In ModelAdmin, if I add an HTMLEditorField to the dataobject I am managing, everything appears to work at first glance... but, if I try to add an image through the image icon in the editors toolbar, and click on the folder dropdown that appears on the right hand side, I get an error and none of the folders load up in the dropdown.

    Here's the error retrieved from the firebug console.

    500//ERROR [User Error]: Bad RecordClassName '' and $baseClass not set IN GET /admin/artists/EditorToolbar/ImageForm/field/FolderID/tree?forceValue=&SecurityID=3d269b74c72b07df798ecfa8946a7be6e22328f9 Line 2762 in /Applications/MAMP/htdocs/silverstripe/delicious/sapphire/core/model/DataObject.php Source ====== 2753: foreach($records as $record) { 2754: if(empty($record['RecordClassName'])) { 2755: $record['RecordClassName'] = $record['ClassName']; 2756: } 2757: if(class_exists($record['RecordClassName'])) { 2758: $results[] = new $record['RecordClassName']($record); 2759: } else { 2760: if(!$baseClass) { 2761: user_error("Bad RecordClassName '{$record['RecordClassName']}' and " * 2762: . "\$baseClass not set", E_USER_ERROR); 2763: } else if(!is_string($baseClass) || !class_exists($baseClass)) {....

    Has anyone else come across this before or have any suggestions?

    Many thanks

  • SheaDawson
    Avatar
    Community Member
    45 Posts

    Re: ModelAdmin & HTML editor image manager bug? Link to this post

    Typical. One moment after I finally resorting to posting this problem in the forum, I solve it. If anyone else gets stuck on this, make sure the records in your file table all have a ClassName value ;)

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