Hi All,
I'm using 2.3.3 for one of my client's sites. Its been in place for several months with no difficulties. Today I tried to upload some photos through the CMS for them to use in blog entries, and I no longer have access to that section of the site. When that page loads SS displays an error message. All other pages, both external and admin, seem to work perfectly. The error message is below. Does anyone know how I can fix this?
[Notice] Trying to get property of non-object
GET /admin/assets/
Line 404 in /home/smadmin2/public_html/sapphire/filesystem/Folder.php
Source
395 if($object->$fieldName != NULL) $usedFiles[] = $object->$fieldName;
396 unset($object);
397 }
398 } elseif($joinClass == 'Folder') {
399 // @todo
400 }
401 }
402 }
403 foreach($usedFiles as $file) {
404 $where .= $file->ID . ',';
405 }
406 if($where == "") return "(ClassName = 'File' OR ClassName = 'Image')";
407 $where = substr($where,0,strlen($where)-1);
408 $where = "`File`.ID NOT IN (" . $where . ") AND (ClassName = 'File' OR ClassName = 'Image')";
409 return $where;
410 }
Trace
* Folder->getUsedFilesList()
Line 465 of Folder.php
* Folder_UnusedAssetsField->getAssetList()
Line 439 of Folder.php
* Folder_UnusedAssetsField->getChildren()
Line 452 of Folder.php
* Folder_UnusedAssetsField->FieldHolder()
* call_user_func_array(Array,Array)
Line 408 of ViewableData.php
* ViewableData->XML_val(FieldHolder,,1)
Line 74 of .cache.home.smadmin2.public_html.sapphire.templates.TabSetFieldHolder.ss
* include(/tmp/silverstripe-cache-home-smadmin2-public_html/.cache.home.smadmin2.public_html.sapphire.templates.TabSetFieldHolder.ss)
Line 354 of SSViewer.php
* SSViewer->process(Object id #489)
Line 773 of ViewableData.php
* ViewableData->renderWith(TabSetFieldHolder)
Line 62 of TabSet.php
* TabSet->FieldHolder()
* call_user_func_array(Array,Array)
Line 408 of ViewableData.php
* ViewableData->XML_val(FieldHolder,,1)
Line 70 of .cache.home.smadmin2.public_html.sapphire.templates.Includes.Form.ss
* include(/tmp/silverstripe-cache-home-smadmin2-public_html/.cache.home.smadmin2.public_html.sapphire.templates.Includes.Form.ss)
Line 354 of SSViewer.php
* SSViewer->process(Object id #510)
Line 773 of ViewableData.php
* ViewableData->renderWith(Array)
Line 982 of Form.php
* Form->forTemplate()
Line 424 of ViewableData.php
* ViewableData->XML_val(EditForm,,1)
Line 983 of ViewableData.php
* ViewableData_Customised->XML_val(EditForm,,1)
Line 34 of .cache.home.smadmin2.public_html.cms.templates.Includes.AssetAdmin_right.ss
* include(/tmp/silverstripe-cache-home-smadmin2-public_html/.cache.home.smadmin2.public_html.cms.templates.Includes.AssetAdmin_right.ss)
Line 354 of SSViewer.php
* SSViewer->process(Object id #26)
Line 773 of ViewableData.php
* ViewableData->renderWith(Array)
Line 484 of LeftAndMain.php
* LeftAndMain->Right()
* call_user_func_array(Array,Array)
Line 408 of ViewableData.php
* ViewableData->XML_val(Right,,1)
Line 983 of ViewableData.php
* ViewableData_Customised->XML_val(Right,,1)
Line 71 of .cache.home.smadmin2.public_html.cms.templates.LeftAndMain.ss
* include(/tmp/silverstripe-cache-home-smadmin2-public_html/.cache.home.smadmin2.public_html.cms.templates.LeftAndMain.ss)
Line 354 of SSViewer.php
* SSViewer->process(Object id #26)
Line 166 of Controller.php
* Controller->handleAction(Object id #7)
Line 129 of RequestHandler.php
* RequestHandler->handleRequest(Object id #7)
Line 122 of Controller.php
* Controller->handleRequest(Object id #7)
Line 277 of Director.php
* Director::handleRequest(Object id #7,Session)
Line 121 of Director.php
* Director::direct(/admin/assets/)
Line 118 of main.php