- Issue created by @aleix
- Merge request !33Add tests to cover multilanguage, default and fallback url issues β (Open) created by aleix
- πͺπΈSpain aleix
Adding tests and defining urls of endpoints with language not applicable option.
Need to say that I was wrong when I was stating :
... by default, the url prefix will add the langcode for every language...
By default, and is also recommended in language detect and select settings, that fallback language being set with empty prefix. This solves some things, but not totally, like when someone accesses the activity pub actor endpoint with language prefix, then all endpoints will use the language prefix. Also the fallback empty prefix is not forced, and if language fallback is changed must be set manually, so also could be harder to catch, so again better define url language as not applicable, as this MR does.
- πͺπΈSpain aleix
Tests are not passing because of fetched aliases urls from webfinger module in event subscriber are localized, and comes with prefix. It's already reported and waiting for MR in https://www.drupal.org/project/webfinger/issues/3516129 β¨ Make endpoints unlocalized Active , as soon as this is merged tests will pass (at least in local it does). So waiting @swentel (and/or rtbc) to review it !
- πΊπΈUnited States mradcliffe USA
I applied the patch manually to my non-activitypub module, non-multilingual site that uses webfinger, and I did not find any regressions. +1.
- π§πͺBelgium swentel
Merged β¨ Make endpoints unlocalized Active - would the tests pass (in case you use dev require of webfinger?)
- πͺπΈSpain aleix
Yes, they do locally:
vendor/bin/phpunit --debug web/modules/contrib/activitypub/tests/src/Functional/WebfingerMultilanguageSiteTest.php PHPUnit 9.6.22 by Sebastian Bergmann and contributors. Testing Drupal\Tests\activitypub\Functional\WebfingerMultilanguageSiteTest Test 'Drupal\Tests\activitypub\Functional\WebfingerMultilanguageSiteTest::testWebfingerResponse with data set #0 (array('en', '', 'es'), 'eo')' started Test 'Drupal\Tests\activitypub\Functional\WebfingerMultilanguageSiteTest::testWebfingerResponse with data set #0 (array('en', '', 'es'), 'eo')' ended Time: 01:20.327, Memory: 18.45 MB OK (1 test, 22 assertions)
So it should pass when there is a new webfinger version release.
- π§πͺBelgium swentel
Alright, new release out, triggered ci for the tests.
- π§πͺBelgium swentel
Hmm, tests are failing with 2.0.3 webfinger too, but maybe it's a bot thing?
Will run then locally to double check.