🇬🇧United Kingdom @mirhamzah

Account created on 7 August 2010, over 14 years ago
#

Recent comments

🇬🇧United Kingdom mirhamzah

Had a look couple of weeks ago. Problem was in the commerceguys/address module, which is being used by this module.

Here is a quick fix:

  1. Copy event subscriber from modules/contrib/address/tests/modules/address_test/src/EventSubscriber/GreatBritainEventSubscriber.php in your custom module.
  2. Change namespace accordingly.
  3. Add service to .services.yml
  4. Add the line
    $definition['locality_type'] = 'city';

    in the if country = GB condition

🇬🇧United Kingdom mirhamzah

That is all good, but turning on search_api_solr_devel helped me debug in right direction.

The fields sort_X3b_en_FIELD_NAME and sort_X3b_und_FIELD_NAME had default data, not the overridden data.
Not sure if it is meant to be like that or there is a setting to override data for sorting.

I had just this line before:

$document->setField('sm_FIELD_NAME', $value);

Added couple more lines for sorting and now it looks like this:

$document->setField('sm_FIELD_NAME', $value);

$document->setField('sort_X3b_en_FIELD_NAME', $value);
$document->setField('sort_X3b_und_FIELD_NAME', $value);

And it seems to be working fine.

Thanks :)

Production build 0.71.5 2024