Unable to upload 404
I folowed the instruction, and when i try to upload, I get: The requested URL /websitetest/en/site/coco/action/upload/data/a:6:{s:17:"allowedExtensions";a:4:{i:0;s:4:"jpeg";i:1;s:3:"jpg";i:2;s:3:"gif";i:3;s:3:"png";}s:9:"sizeLimit";i:2000000;s:9:"uploadDir";s:17:"uploads/products/";s:17:"receptorClassName";s:27:"application.models.Products";s:10:"methodName";s:14:"onFileUploaded";s:8:"userdata";s:2:"33";} was not found on this server.
Any ideas why?
Comments (3)
-
repo owner -
Thank you for the fast reply! This is my settings in main.php for URLs:
#! 'urlManager'=>array( 'class' => 'ext.localeurls.LocaleUrlManager', 'urlFormat'=>'path', 'showScriptName'=>false, 'rules'=>array( '<language:(fr|en)>/<controller:\w+>/<id:\d+>'=>'<controller>/view', '<language:(fr|en)>/<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>', '<language:(fr|en)>/<controller:\w+>/<action:\w+>'=>'<controller>/<action>', ), ),
And SiteController.php:
{ /** * Declares class-based actions. */ public function actions() { return array( // captcha action renders the CAPTCHA image displayed on the contact page 'captcha'=>array( 'class'=>'CCaptchaAction', 'backColor'=>0xFFFFFF, ), // page action renders "static" pages stored under 'protected/views/site/pages' // They can be accessed via: index.php?r=site/page&view=FileName 'page'=>array( 'class'=>'CViewAction', ), 'coco'=>array( 'class'=>'CocoAction', ), ); } ....
I just downloaded you script today. Also tried without urlmanager, but no luck.
When I test that url I get PHP Notice: unserialize() [<a href='function.unserialize'>function.unserialize</a>]: Error at offset 0 of 4 bytes
/Applications/MAMP/htdocs/websitetest/protected/extensions/coco/CocoWidget.php(176)
Can you please help me? Have I missed something? Should I declare your coco action in SiteController, like public function actionCoco()?
Thanks
-
Account Deleted Hello. I have the same problem (404) with new version:
I think widget can't find a controller action. Can you help me to resolve it? Thanks.
- Log in to comment
/websitetest/en/site/coco/action/upload/data/
1) maybe due to: bad urlmanager settings or rbac permissions. please refresh your coco version to the lastest one and try again with/without urlmanager enabled
2) maybe due to: not publishing the "coco" action in the actions() array in the refered controller name: "site" (because your setting is: /websitetest/en/site/...)
try first testing if the action itself really works without errors trying: /websitetest/en/site/coco/action/upload/data/test