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.

Customising the CMS /

GridField Error in Security/Members SS 3.0.2


Reply


375 Views

Avatar
VisualOverdose

Community Member, 1 Post

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.