I just upgraded a fully functional Craft website to Craft 2.6. The site is hosted on Heroku with assets uploading to S3. So all of that has been working really well for about 10 months. Now I can't upload any more assets. When I choose a file from my computer, the upload hangs.
I get a console error:
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
https://www.example.com/index.php?p=admin/actions/assets/uploadFile Failed to load resource: the server responded with a status of 500 (Internal Server Error)
Here is the response body of the 500 error:
<h1>PHP Error [500]</h1>
<p>Trying to get property of non-object (/app/craft/app/services/AssetsService.php:707)</p>
<pre>#0 /app/craft/app/etc/errors/ErrorHandler.php(184): Craft\ErrorHandler->handleError()
#1 /app/craft/app/framework/base/CErrorHandler.php(133): Craft\ErrorHandler->handleError()
#2 /app/craft/app/framework/base/CApplication.php(834): Craft\ErrorHandler->handle()
#3 /app/craft/app/etc/web/WebApp.php(688): Craft\WebApp->handleError()
#4 /app/craft/app/services/AssetsService.php(707): Craft\WebApp->handleError()
#5 /app/craft/app/controllers/AssetsController.php(52): Craft\AssetsService->uploadFile()
#6 /app/craft/app/framework/web/actions/CInlineAction.php(49): Craft\AssetsController->actionUploadFile()
#7 /app/craft/app/framework/web/CController.php(308): CInlineAction->runWithParams()
#8 /app/craft/app/framework/web/CController.php(286): Craft\AssetsController->runAction()
#9 /app/craft/app/framework/web/CController.php(265): Craft\AssetsController->runActionWithFilters()
#10 /app/craft/app/framework/web/CWebApplication.php(282): Craft\AssetsController->run()
#11 /app/craft/app/etc/web/WebApp.php(818): Craft\WebApp->runController()
#12 /app/craft/app/etc/web/WebApp.php(288): Craft\WebApp->_processActionRequest()
#13 /app/craft/app/framework/base/CApplication.php(185): Craft\WebApp->processRequest()
#14 /app/craft/app/index.php(62): Craft\WebApp->run()
#15 /app/public/index.php(19): require_once()
</pre>
Any ideas? This happens when I try to upload an asset directly in the Assets section of Craft as well as uploading a new image to an Entry.
Thanks.
craft/config/general.phpcan influence those if you're using environment variables (https://craftcms.com/docs/multi-environment-configs#environment-specific-variables). – Brad Bell Oct 04 '16 at 21:12return array( 'cpTrigger' => 'admin', 'omitScriptNameInUrls' => true, 'useCompressedJs' => false, 'userSessionDuration' => 'P2W', 'useSecureCookies' => false, 'devMode' => true, 'maxUploadFileSize' => 16777216, );
– chrisyour Oct 04 '16 at 21:26My user.ini settings:
post_max_size = 64MB upload_max_filesize = 100MB max_input_vars = 2000 session.save_handler=memcached memcached.sess_binary=1 session.save_path="PERSISTENT=myapp_session ${MEMCACHIER_SERVERS}" memcached.sess_sasl_username=${MEMCACHIER_USERNAME} memcached.sess_sasl_password=${MEMCACHIER_PASSWORD}
– chrisyour Oct 05 '16 at 21:31