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.

Content Editor Discussions /

Forum for content editors and CMS users.

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

ss 2.4 and upload problem.


Go to End
Reply


10 Posts   3037 Views

Avatar
HanSolo

Community Member, 83 Posts

16 June 2010 at 7:42am

Edited: 16/06/2010 8:01am

I recently upgraded to 2.4. And now I cant upload images or files anymore.
When i click on the upload button i get " file is not a valid upload!"

I did search teh forum, and I found that more people than I had the same problem, but noone had found an answer for the problem.

So I hope someone can point me in the right direction. I do have some more sites I would like to upgrade to SS 2.4 but if there is no solution for the upload problem then SS 2.4 cant be a stable release in my opinion. Should I wait for SS 2.4.1?

Joakim

Avatar
qlex

Community Member, 68 Posts

18 September 2010 at 2:41am

HanSolo, did u eventually solve your problem ?
I now upgraded my client to 2.4.1 and have an upload problem - admin can upload, user can't upload.
do you have swfupload installed ?

qlex

Avatar
Tonyair

Community Member, 81 Posts

21 September 2010 at 7:02am

Had the same problem on one hosting.

Everything works fine on my computer and another hostings just one had such problem.
"Files and Images" works fine, but when i was clicking "add image" in TinyMCE and Upload then, i got that error.

It was fixed after I modified sapphire/filesystem/Upload.php function validate()

I just moved
$pathInfo = pathinfo($this->tmpFile['name']);
before
if(isset($this->tmpFile['tmp_name']) && !is_uploaded_file($this->tmpFile['tmp_name']) && !SapphireTest::is_running_test())

I tried to remove conditions to parse params, but got nothing ... it's very strange, but now it's working.

Avatar
qlex

Community Member, 68 Posts

21 September 2010 at 10:13pm

Tonyair:
tried to follow your suggestion. No change :(
When i click "add files to "Uploads" button, the lightbox comes up with the following error:

[User Error] Bad RecordClassName '' and $baseClass not set
GET /[sitename]/admin/assets/EditForm/field/Files/upload

Line 2761 in [sitedir]/sapphire/core/model/DataObject.php

Source

2752 		foreach($records as $record) {
2753 			if(empty($record['RecordClassName'])) {
2754 				$record['RecordClassName'] = $record['ClassName'];
2755 			}
2756 			if(class_exists($record['RecordClassName'])) {
2757 				$results[] = new $record['RecordClassName']($record);
2758 			} else {
2759 				if(!$baseClass) {
2760 					user_error("Bad RecordClassName '{$record['RecordClassName']}' and "
2761 						. "\$baseClass not set", E_USER_ERROR);
2762 				} else if(!is_string($baseClass) || !class_exists($baseClass)) {
2763 					user_error("Bad RecordClassName '{$record['RecordClassName']}' and bad "
2764 						. "\$baseClass '$baseClass not set", E_USER_ERROR);
2765 				}
2766 				$results[] = new $baseClass($record);
2767 			}

Trace

    * Bad RecordClassName '' and $baseClass not set
      Line 2761 of DataObject.php
    * DataObject->buildDataObjectSet(MySQLQuery,DataObjectSet)
      Line 739 of File.php
    * File->instance_get(ClassName != 'Folder' AND ParentID = 80,,,,DataObjectSet)
      Line 2713 of DataObject.php
    * DataObject::get(File,ClassName != 'Folder' AND ParentID = 80)
      Line 145 of FileDataObjectManager.php
    * FileDataObjectManager->getImportFolderHierarchy(79,2)
      Line 148 of FileDataObjectManager.php
    * FileDataObjectManager->getImportFolderHierarchy(78,1)
      Line 148 of FileDataObjectManager.php
    * FileDataObjectManager->getImportFolderHierarchy(0)
      Line 130 of FileDataObjectManager.php
    * FileDataObjectManager->ImportDropdown()
      Line 321 of FileDataObjectManager.php
    * FileDataObjectManager->UploadForm()
      Line 227 of FileDataObjectManager.php
    * FileDataObjectManager->upload(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 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/assets/EditForm/field/Files/upload)
      Line 127 of main.php

Avatar
Tonyair

Community Member, 81 Posts

22 September 2010 at 12:53am

is this swfupload?

Avatar
qlex

Community Member, 68 Posts

22 September 2010 at 1:19am

Tonyair: yes it is.
When adding uploadify, there's no change. If i remove swfupload and leave dom and uploadify only, i get an DOM error insisting on installing swfupload. This might change when UncleCheese brings uploadify support for dom ?

Avatar
Tonyair

Community Member, 81 Posts

22 September 2010 at 2:55am

Edited: 22/09/2010 2:55am

Maybe, but actually I use only DOM and swfupload, i can attach my swfupload version with the latest swfupload version and user side image resizing if u need

Avatar
qlex

Community Member, 68 Posts

22 September 2010 at 3:33am

Please do, i will see if that helps.

Go to Top