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

$searchable_fields in SilverStripe 2.4.1


Go to End


5 Posts   1833 Views

Avatar
cuSSter

Community Member, 56 Posts

16 September 2010 at 2:27am

Hi,

Just upgraded from 2.3.6 to 2.4.1 and one of my $searchable_fields does not seem to work properly anymore. It's on a 2nd level relationship. Example:

$searchable_fields = array( '1stDegree.2ndDegree.ID' => array( 'title' => 'Name' ) );

What seems to be the problem with this?

Avatar
cuSSter

Community Member, 56 Posts

16 September 2010 at 2:29am

Is this a known issue in 2.4.1?

Avatar
Ingo

Forum Moderator, 801 Posts

20 September 2010 at 8:51am

Hmm, was that ever working? Its not covered by unit tests at least (see SearchContextTest->testRelationshipObjectsLinkedInSearch()). Do you have a full example (incl. model definitions) that you can get to work in 2.4.0?

Avatar
cuSSter

Community Member, 56 Posts

20 September 2010 at 8:28pm

I'm pretty positive that is was working before the upgrade.

Avatar
Ingo

Forum Moderator, 801 Posts

25 September 2010 at 12:20pm

Edited: 25/09/2010 12:21pm

Hm can you provide PHP files with a datamodel (and perhaps some sample data as a SQL dump) so we can verify this? I assume that both "1stDegree" and "2ndDegree" are connected to their respective "parent" as "has one" relations?

BTW, there's another unit test dealing specifically with relationships in search, but it doesn't have the case that you described either - SearchFilterApplyRelationTest