7607 Posts in 1236 Topics by 846 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » SWFUpload: auto logout and processing stuck
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba
|
Page:
1
|
Go to End | |
| Author | Topic: | 833 Views |
-
SWFUpload: auto logout and processing stuck

18 August 2010 at 10:05pm Last edited: 18 August 2010 10:11pm
Hi,
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.
Cheers!
Anatol -
Re: SWFUpload: auto logout and processing stuck

18 August 2010 at 11:26pm Last edited: 18 August 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:
/swfupload/code/SWFUploadField.php
/dataobject_manager/_config.php
/dataobject_manager/code/DataObjectManager.phpAdded code in green:
<?php
if (!preg_match("/^\/admin\/assets\//",$_SERVER["REQUEST_URI"])) {class SWFUploadField extends FileField
{
...etc...
}}
?>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!
Cheers!
Anatol -
Re: SWFUpload: auto logout and processing stuck

19 August 2010 at 1:37am
DataObjectManager::allow_assets_override(false);
-
Re: SWFUpload: auto logout and processing stuck

7 September 2010 at 1:48am
UncleCheese, can you document that in http://doc.silverstripe.org/modules:swfuploadfield? Thanks!
| 833 Views | ||
|
Page:
1
|
Go to Top |

