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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

SWFUpload: auto logout and processing stuck

Go to End

5 Posts   1718 Views


126 Posts

18 August 2010 at 10:05pm

Edited: 18/08/2010 10:11pm


I use the latest (trunk) version of SWFUpload (rev 432), DataUploadManager (rev 432) and the Gallery and Silverstripe 4.1.

I have some problems that appeared in earlier forum posts (e.g. here and here) but none of the solutions helped.

I tried to

  • * update everything to the latest trunk version.

  • * set the assets folder permissions to recursive 777

  • * session.use_only_cookies is off

  • * SWFUploadField.php contains SWFUploadConfig::addPostParam('PHPSESSID',session_id());

  • * I tried some small patches to Sapphire that were mentioned in another related post (didn't help so I reverted the changes)

  • * and a number of other things that didn't seem to work

Here is the SWFUpload debug of the failed upload.

The upload fails in the CMS in the "Files & Images" tab.

However, the upload works perfectly well in the CMS "Pages" tab when I add images to a gallery. It shows "processing" and then "completed". No issues. Here is the "healthy" debug.

What I also notice is that every time I upload or try to upload images (both in the "Files & Images" and the "Pages" tab I get logged out. I'm just guessing but this might be connected to the problem.

I'm looking forward to the new module that will replace the SWFUploader but for the meanwhile I hope I'll find a way to fix the issue so that my client can use the site properly.

I need SWFUpload for the gallery, otherwise I get a fatal error. Or is there any way to disable SWFUpload except for the gallery module or Dataobject Manager? I know that the built-in "Files & Images" uploader works.

Any hint is appreciated. I really don't know what else I could try.



126 Posts

18 August 2010 at 11:26pm

Edited: 18/08/2010 11:32pm

Hi again,

OK, here is a (temporary) solution for my problem. Hopefully until I can replace it with the new replacement module for SWFUpload. Very very very very very ugly ... you have been warned. I'm off on holiday on Friday and I don't want to take a heavy suitcase of coding problems with me and leave an unhappy client behind.

I simply added the if condition below around all code of the following files:


Added code in green:

if (!preg_match("/^\/admin\/assets\//",$_SERVER["REQUEST_URI"])) {

class SWFUploadField extends FileField


So just ignore any of the code of all 3 files if we are in the Assets area, i.e. "Files & Images". So the Assets area uses the default file upload field.

I told you it was ugly - but it does the trick.

I still get logged out when I upload images to the gallery, but for now I can live with that. I'm very much looking forward to the new module though!

Oh, and if anyone does have a more elegant solution or can solve my problem as described above please please do post!



Forum Moderator, 4102 Posts

19 August 2010 at 1:37am



126 Posts

19 August 2010 at 11:27am

Perfect! Thank you!


Community Member, 25 Posts

7 September 2010 at 1:48am

UncleCheese, can you document that in Thanks!