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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Error using $many_many_extraFields Field in $searchable_fields


Go to End


2 Posts   1169 Views

Avatar
Scor1on

Community Member, 1 Post

11 February 2016 at 3:14am

Edited: 11/02/2016 3:16am

Hi All,

I have problem on $searchable_fields, when I am using field form many_many_extraFields.

private static $many_many = array( 
'Products' => 'Products',
);
private static $many_many_extraFields = array( 
'Products' => array( 
'CarteCadeauByMail' => 'Int', 
'CarteCadeauByPost' => 'Int', 
'CardCode' => 'Varchar' 
) 
);
private static $searchable_fields = array( 
'ManyMany[CardCode]' => array( 
'title' => 'CardCode', 
'field' => 'TextField', 
'filter' => 'PartialMatchFilter', 
), 
);

On ?flush=1 I am getting error:

Fatal error: Call to a member function stat() on a non-object in /home/tugadumcss/www/.../framework/model/DataObject.php on line 3568

What I am doing wrong? Please help.

Regards,
Artem

Avatar
helenclarko

Community Member, 166 Posts

11 February 2016 at 8:32am

Hi Scorion,

Do you have a GridField attached to any of these classes?
It could be how the gridfield is configured.

-helenclarko