21302 Posts in 5736 Topics by 2603 members
| Go to End | Next > | |
| Author | Topic: | 2910 Views |
-
Undefined index: Folder_UnusedAssetsField

23 June 2009 at 2:45am
Hey everybody!
I have a problem. I installed the latest version (2.3.2), but i have a problem. When i try to get into Files and images in admin section, i get this error:
Undefined index: Folder_UnusedAssetsField
IN POST /admin/assets/getitem?ID=1&ajax=1
Line 157 in /var/www/vhosts/mysite.com/httpdocs/sapphire/core/ClassInfo.phpAnyone can help me? Thanks!
-
Re: Undefined index: Folder_UnusedAssetsField

23 June 2009 at 3:31am
Have you tried to rebuild the database? On each upgrade you may have new fields in the database objects so calling http://www.mysite.com/db/build?flush=1 is very important or you may mess up something!
-
Re: Undefined index: Folder_UnusedAssetsField

23 June 2009 at 3:36am
Quick note: Version 2.2.X was /db/build/ - Version 2.3.X is /dev/build/
-
Re: Undefined index: Folder_UnusedAssetsField

23 June 2009 at 3:42am
Ahhhh, i knew it! I got trained like 2 weeks ago and the guy kept telling me to use /db/build and i said to him it was /dev/build. I guess both works but the new standard is /dev/build now!
Thanks
-
Re: Undefined index: Folder_UnusedAssetsField

23 June 2009 at 3:55am
Hey guys! Thanks for your respond!!
I tried with /dev/build but i got the same error. I dont know what else to do, do you have some ideas ?
Thanks!
-
Re: Undefined index: Folder_UnusedAssetsField

23 June 2009 at 7:55pm
Try visiting the files & images section as admin/assets?flush=1
-
Re: Undefined index: Folder_UnusedAssetsField

24 June 2009 at 12:19am
Hey Sam!
Well, i tried that but nothing, i got the same error.
I changed the files "AssetAdmin.php" and "AssetTableField.php" for a past version of silver files, and now i can get into files and images now, but when i made clic in Assets, i got an alert like this:
ERROR [Notice]: Undefined index: Folder_UnusedAssetsField
IN POST /admin/assets/getitem?ID=1&ajax=1
Line 157 in /var/www/vhosts/mysite.com/httpdocs/sapphire/core/ClassInfo.phpSource
======
148: /**
149: * @todo Improve documentation
150: */
151: static function ancestry($class, $onlyWithTables = false) {
152: global $_ALL_CLASSES;
153:
154: if(is_object($class)) $class = $class->class;
155: else if(!is_string($class)) user_error("Bad class value " . var_export($class, true) . " passed to
ClassInfo::ancestry()", E_USER_WARNING);
156:
* 157: $items = $_ALL_CLASSES['parents'][$class];
158: $items[$class] = $class;
159: if($onlyWithTables) foreach($items as $item) {
160: if(!DataObject::has_own_table($item)) unset($items[$item]);
161: }
162: return $items;
163: }<ul>ClassInfo::ancestry(Folder_UnusedAssetsField)
line 451 of Object.phpObject->__construct()
line 42 of CompositeField.phpCompositeField->__construct(FieldSet)
line 429 of Folder.phpFolder_UnusedAssetsField->__construct(Folder)
line 356 of Folder.phpFolder->getCMSFields()
line 268 of AssetAdmin.phpAssetAdmin->getEditForm(1)
line 925 of LeftAndMain.phpLeftAndMain->EditForm()
line 380 of LeftAndMain.phpLeftAndMain->getitem(HTTPRequest)
line 162 of Controller.phpController->handleAction(HTTPRequest)
line 129 of RequestHandler.phpRequestHandler->handleRequest(HTTPRequest)
line 122 of Controller.phpController->handleRequest(HTTPRequest)
line 277 of Director.phpDirector::handleRequest(HTTPRequest,Session)
line 121 of Director.phpDirector::direct(/admin/assets/getitem)
line 118 of main.php</ul>
Thanks for your help, and sorry my english isn't good ;)
-
Re: Undefined index: Folder_UnusedAssetsField

24 June 2009 at 12:57pm
Hi Juan,
Replacing the files with older versions of the files isn't going to be a good idea.
However, try putting the proper files back there and making a trivial edit to the file (eg, add an extra line of whitespace) and saving them, and see if that works.
I think we've got a bug in a piece of code that detects whether code files are changed. I've posted it here: http://open.silverstripe.com/ticket/4288
| 2910 Views | ||
| Go to Top | Next > |



