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.

All other Modules /

Discuss all other Modules here.

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

SS 2.4 and DOM and Uploadify and SlideshowPro - can't load swf


Go to End


5 Posts   1643 Views

Avatar
Valorinbattle

Community Member, 95 Posts

27 September 2010 at 4:00pm

I'm running SS 2.4 and have downloaded and installed the latest builds of DOM, ImageGallery, Uploadify, and SlideshowPro. ImageGallery pages work great, but in SlideshowPro pages, it takes 4 or 5 attempts to upload photos (which is okay, if I just keep trying, eventually it completes the uploads). But the big problem is that it won't upload my .swf file. Once I click "Attach File" (From Your Computer or From File Store) that part of the the admin screen below "Upload a SlideshowPro SWF file" shows a generic error message: Website Error. There has been an error.

Any thoughts? Anybody experiencing this? Thanks for the help!

~ James

Avatar
Valorinbattle

Community Member, 95 Posts

27 September 2010 at 4:08pm

Also, a sidenote. This works properly locally, just not live. The only difference is locally I'm running Silverstripe 2.4.1 and Live version is Silverstripe 2.4.2

All the modules are the same locally and Live.

Avatar
Valorinbattle

Community Member, 95 Posts

27 September 2010 at 4:11pm

I turned on debugging and here is the actual error:

[User Error] Bad RecordClassName '' and $baseClass not set
POST /admin/EditForm/field/SWFFile/EditFileForm

Line 2762 in /home/artman16/public_html/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)) {
2764 user_error("Bad RecordClassName '{$record['RecordClassName']}' and bad "
2765 . "\$baseClass '$baseClass not set", E_USER_ERROR);
2766 }
2767 $results[] = new $baseClass($record);
2768 }

Trace

* Bad RecordClassName '' and $baseClass not set
Line 2762 of DataObject.php
* DataObject->buildDataObjectSet(MySQLQuery,DataObjectSet)
Line 745 of File.php
* File->instance_get(,,,,DataObjectSet)
Line 2714 of DataObject.php
* DataObject::get(File)
Line 118 of SortableDataObject.php
* SortableDataObject->onBeforeWrite(,,,,,,)
Line 963 of Object.php
* Object->extend(onBeforeWrite,)
Line 829 of DataObject.php
* DataObject->onBeforeWrite()
Line 348 of File.php
* File->onBeforeWrite()
Line 936 of DataObject.php
* DataObject->write()
Line 153 of Upload.php
* Upload->load(Array,Uploads)
Line 170 of Upload.php
* Upload->loadIntoFile(Array,File,Uploads)
Line 178 of FileIFrameField.php
* FileIFrameField->save(Array,Form,SS_HTTPRequest)
Line 300 of Form.php
* Form->httpSubmission(SS_HTTPRequest)
Line 137 of RequestHandler.php
* RequestHandler->handleRequest(SS_HTTPRequest)
Line 155 of RequestHandler.php
* RequestHandler->handleRequest(SS_HTTPRequest)
Line 155 of RequestHandler.php
* RequestHandler->handleRequest(SS_HTTPRequest)
Line 155 of RequestHandler.php
* RequestHandler->handleRequest(SS_HTTPRequest)
Line 147 of Controller.php
* Controller->handleRequest(SS_HTTPRequest)
Line 281 of Director.php
* Director::handleRequest(SS_HTTPRequest,Session)
Line 124 of Director.php
* Director::direct(/admin/EditForm/field/SWFFile/EditFileForm)
Line 127 of main.php

Avatar
UncleCheese

Forum Moderator, 4102 Posts

27 September 2010 at 4:53pm

Check your File table in the database and make sure none of the ClassName fields are null.

---------------
Silverstripe tips, tutorials, screencasts, and more. http://www.leftandmain.com

Avatar
Valorinbattle

Community Member, 95 Posts

27 September 2010 at 5:01pm

Wow, okay. That was easy. Thanks Uncle Cheese. I had seen that solution before, but didn't pay attention to the table name "File". I was looking in other tables. All fixed now. You're awesome.