Jump to:

1156 Posts in 2568 Topics by 408 members

Upgrading SilverStripe

SilverStripe Forums » Upgrading SilverStripe » $searchable_fields in SilverStripe 2.4.1

Ask questions about upgrading SilverStripe to the latest version.

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

Page: 1
Go to End
Author Topic: 974 Views
  • cuSSter
    Avatar
    Community Member
    56 Posts

    $searchable_fields in SilverStripe 2.4.1 Link to this post

    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?

  • cuSSter
    Avatar
    Community Member
    56 Posts

    Re: $searchable_fields in SilverStripe 2.4.1 Link to this post

    Is this a known issue in 2.4.1?

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: $searchable_fields in SilverStripe 2.4.1 Link to this post

    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?

  • cuSSter
    Avatar
    Community Member
    56 Posts

    Re: $searchable_fields in SilverStripe 2.4.1 Link to this post

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

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: $searchable_fields in SilverStripe 2.4.1 Link to this post

    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

    974 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.