- Issue created by @jonathan1055
- last update
11 months ago 43 pass - last update
11 months ago 7 pass, 13 fail - 🇬🇧United Kingdom jonathan1055
You can see on https://www.drupal.org/pift-ci-job/2837276 → that the daily tests passed at 10.1 up to Jan 5th. Then when the core testing branch switched to 10.2 on Jan 6th we immediately got the deprecation messages and red test failures.
- 🇬🇧United Kingdom jonathan1055
Looking at the CR I think the module might also need a
address.field_type_categories.yml
file. I don't know if the lack of this file was the cause of the tests still complaining ofUsing a translatable string as a category for field type is deprecated in drupal:10.2.0
even when the category is now updated to justcategory = "address",
- 🇷🇸Serbia bojanz
Yes:
Where number is the category ID defined in core.field_type_categories.yml:
So setting "address" results in a broken reference if the same type is not defined in the yaml file.
Thanks for working on this!
- last update
11 months ago 43 pass - 🇬🇧United Kingdom jonathan1055
Is there any reason why the gitlab pipeline is not triggered when I commit to the branch? I can see there are pipeline runs on this project.
- last update
11 months ago 35 pass, 2 fail - 🇬🇧United Kingdom jonathan1055
Oh yes, sorry, I can see that it is very new work, the pipelines only started running yesterday.
Replying to #5 it seems that the new file
address.field_type_categories.yml
is not strictly needed. The latest test at 10.2 no longer has the deprecation messages now that I found the two other places where the translation was being done. There are now only 2 tests that fail, due to Ajax problems, and those are also in the main branch test at 10.2.
But it probably is worth creating a categories.yml, as I guess this is where the translation is done, for better UI.
- Status changed to Needs work
11 months ago 7:26pm 8 January 2024 - last update
10 months ago 43 pass - last update
10 months ago 43 pass - last update
10 months ago 43 pass - Status changed to Needs review
10 months ago 5:59pm 13 January 2024 - 🇬🇧United Kingdom jonathan1055
Added new address.field_type_categories.yml
Ready for review. - last update
10 months ago 43 pass - 🇺🇸United States dww
So does this mean that a contrib which supports 10.2 and up without deprecations must have untranslatable categories for 10.1 and lower? That's fairly annoying. It's hard when core makes changes where there's no way to maintain wide compatibility.
- Status changed to Needs work
10 months ago 8:09pm 16 January 2024 - 🇺🇸United States dww
Ahh, reading the CR there's a "BC layer" section → that explains how to do it. IMHO, we should. NW for adding
HOOK_field_info_alter()
for this.Also, moving to a task. There's no bug, just a new deprecation to handle.
- 🇬🇧United Kingdom jonathan1055
Ha ha, that BC layer was not there when I opened the issue, it was added on 9 Jan https://www.drupal.org/node/3375748/revisions/view/13354071/13370886 → So it looks like this will take a bit longer to fix?
I suspect that this deprecation has taken many contrib maintainers by surprise (me included) as I did not have up-coming deprecations being flagged on either the drupalCI nor Gitlab-CI tests when 10.1 was the default branch to test against.
The problem is that one of the modules I maintain has integration with Commerce, which requires the Address module. Both of these have this deprecation for translatable category, so the DrupalCI tests are now failing at 10.2.
- last update
10 months ago 43 pass - last update
10 months ago 43 pass - Status changed to Needs review
10 months ago 9:21pm 17 January 2024 - 🇺🇸United States dww
It really wasn't that bad. 😉 Tested manually on 10.1.x-dev.
- 🇺🇸United States dww
Hah, but local testing uncovered a bug in 10.2.x with all this new UI: 🐛 Field type plugin description is assumed to be an array Fixed
- 🇺🇸United States dww
Yay, 🐛 Field type plugin description is assumed to be an array Fixed is now fixed. Not that it needed to block this, but it's nice that it's done. This is clearly working, and the fact that the D10 tests are failing in DrupalCI is annoying and misleading. Committed to 2.x and cherry picked to 2.0.x and 8.x-1.x.
Thanks!
-Derek - Status changed to Fixed
10 months ago 12:40am 6 February 2024 - 🇬🇧United Kingdom jonathan1055
Thanks. At least the D10.2 test failures on drupalCI have reduced from 13 down to 1
Scheduler has a 'next minor' gitlab pipeline with deprecations being shown not suppressed, so I will check when you next make a release, that the warning is gone. But I know it will be :-)
Commerce has the same problem, but it's not fixed yet
📌 Using a translatable string as a category for field type is deprecated in drupal:10.2 (Commerce) Active - 🇺🇸United States dww
Yup, I had already opened a tab for an issue about that remaining deprecation. Fixed at 📌 JSWebAssert::assertExpectedAjaxRequest() called unnecessarily in ZoneTerritoryElementTest::testZoneTerritory Fixed
Automatically closed - issue fixed for 2 weeks with no activity.