Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Upgrading SilverStripe /

Ask questions about upgrading SilverStripe to the latest version.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

error in line 819 of injector.php caused by wrong classname??


Go to End


2 Posts   2318 Views

Avatar
yurigoul

Community Member, 203 Posts

21 September 2012 at 9:43am

Edited: 21/09/2012 10:04am

static $allowed_children = array('Newspage'); // if newspage is not a class -that is a php file in mysite- you get an error in the cms backend, nowhere else.

I'm not sure if people can reproduce it since it did not show up immediately, but removing all the php files (besides page.php) in mysite/code and putting them back in one by one + dev/build brought back the error and the error was gone after I corrected the classname.

Maybe someone else with this error can use it as a pointer...

Working with MAMP on osx 10.6 with Silverstripe 3.01 and 3.02

Avatar
claireh

Community Member, 2 Posts

2 November 2012 at 7:27am

Thanks for posting this, I was tearing my hair out over this one :) Just for anyone else's reference, the error I was getting was:

ERROR [User Error]: Uncaught ReflectionException: Class none does not exist
IN GET /admin/pages/treeview
Line 819 in .../framework/control/injector/Injector.php

I had several

	static $allowed_children = array (
		'none' => 'none'
	);

in my pages that were causing the error!