We should have pt-pt (for Porutguese, Portugal) and pt-br (for Portuguese, Brazil) instead of just 'pt'.
LanguageManagerD8

Comments

OanaIlea created an issue. See original summary.

OanaIlea’s picture

StatusFileSize
new23.41 KB
OanaIlea’s picture

Status: Active » Needs review
mkalkbrenner’s picture

Status: Needs review » Needs work
  1. +++ b/search_api_solr.install
    @@ -1662,3 +1662,129 @@ function search_api_solr_update_8326() {
    +        $field_type_config['field_type_language_code'] = 'pt-pt';
    

    The pt config should be removed entirely.
    After that an installation of new configs should be triggered.

mkalkbrenner’s picture

Category: Task » Bug report
OanaIlea’s picture

Status: Needs work » Needs review
StatusFileSize
new24.35 KB
new23.41 KB
mkalkbrenner’s picture

Status: Needs review » Needs work
  1. +++ b/config/optional/search_api_solr.solr_field_type.text_pt-br_7_0_0.yml
    diff --git a/config/optional/search_api_solr.solr_field_type.text_pt-pt_7_0_0.yml b/config/optional/search_api_solr.solr_field_type.text_pt-pt_7_0_0.yml
    new file mode 100644
    

    pt-pt should not be a new file.
    pt should be renamed to pt-pt.

  2. +++ b/search_api_solr.install
    @@ -1662,3 +1662,19 @@ function search_api_solr_update_8326() {
    +      search_api_solr_update_helper_install_configs();
    

    This call must not happen inside the foreach.

OanaIlea’s picture

Status: Needs work » Needs review
StatusFileSize
new17.5 KB
new18.57 KB
mkalkbrenner’s picture

Status: Needs review » Needs work

travis.yml needs to be adjusted

jcnventura’s picture

Thanks for the work @OanaIlea.

I still get a 'Schema incomplete' in admin/reports/status.

OanaIlea’s picture

Status: Needs work » Needs review
StatusFileSize
new464 bytes
new19.06 KB

I forgot about travis.yml again, sorry

cspitzlay’s picture

@jcnventura: How did you apply the patch? I tried the latest one and with the patch utility I got and error when it tried to rename an existing config file:

$ patch < ../../../portuguese_configs.patch 
patching file .travis.yml
patching file search_api_solr.solr_field_type.text_pt-br_7_0_0.yml
Cannot rename file without two valid file names
17 out of 17 hunks ignored
patching file search_api_solr.install

I'm renaming it manually now and test it.

cspitzlay’s picture

Ok, that did not work as intended as some of the changes were still missing.
What seems to work is having composer apply the patch during module install (via the cweagans/composer-patches plugin).

cspitzlay’s picture

cspitzlay’s picture

Title: Update the Portuguese config » Update the Portuguese config to use the langcodes used by Drupal
cspitzlay’s picture

@jcnventura and I checked his project code and the patch had been applied correctly and the field type was visible in the GUI. It looks like there is a second part to this issue that is not fixed yet.

  • OanaIlea authored 0b30098 on 8.x-3.x
    Issue #3087744 by OanaIlea, mkalkbrenner, cspitzlay, jcnventura: Update...
  • 10102df committed on 8.x-3.x
    Issue #3087744 by cspitzlay: Add file changes missing from previous...
cspitzlay’s picture

cspitzlay’s picture

The issue that remained (#3091574) should be fixed now.
@jcnventura: Please feel free to reopen if it still does not work.

jcnventura’s picture

Status: Needs review » Reviewed & tested by the community

Yes. This, in conjunction with the other patch seems to work just fine!

Thanks!

mkalkbrenner’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.