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.

Customising the CMS /

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

GridField Error in Security/Members SS 3.0.2


Go to End


1002 Views

Avatar
VisualOverdose

Community Member, 2 Posts

23 November 2012 at 11:54am

Hey guys,

First time posting, but I'll try to be as clear as possible.

I've added some new fields to the "Members" section of my install, and come across a problem when trying to view/edit the members in the CMS through the GridField.

[User Error] Uncaught LogicException: GridField doesn't have a modelClassName, so it doesn't know the columns of this grid.

I've seen this error posted in the forums, but for different reasons, so I'm not sure if they apply to this.

The code I'm using:

<?php
class UserDecorator extends DataExtension {
	
	// Add extra database fields
	public static $db = array(
		'Username' => 'Varchar(255)',
		'UserLocation' => 'Text',
		'UserDOB' => 'Date',
		'UserHardwareCase' => 'Varchar(255)',
		'UserHardwareRAM' => 'Varchar(255)',
		'UserHardwareCPU' => 'Varchar(255)',
		'UserHardwareGFX' => 'Varchar(255)',
		'UserHardwareStorage' => 'Varchar(255)',
		'UserHardwareMonitor' => 'Varchar(255)',
		'UserHardwareMotherboard' => 'Varchar(255)',
		'UserHardwareKeyboard' => 'Varchar(255)',
		'UserHardwareMouse' => 'Varchar(255)',
		'UserHardwareMousepad' => 'Varchar(255)'
	);
	
	public static $has_one = array(
		
		'UserAvatar' => 'Image'
								   
	);	
}

Any insight would be greatly appreciated. Thanks.