Closed (fixed)
Project:
Address
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
7 Jan 2024 at 14:31 UTC
Updated:
21 Feb 2024 at 02:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
jonathan1055 commentedYou 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.
Comment #4
jonathan1055 commentedLooking at the CR I think the module might also need a
address.field_type_categories.ymlfile. 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.0even when the category is now updated to justcategory = "address",Comment #5
bojanz commentedYes:
So setting "address" results in a broken reference if the same type is not defined in the yaml file.
Thanks for working on this!
Comment #6
jonathan1055 commentedIs 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.
Comment #7
jsacksick commentedThe reason is that Gitlab CI file isn't yet committed to the branch. See #3401422: GitLab CI.
Comment #8
jonathan1055 commentedOh yes, sorry, I can see that it is very new work, the pipelines only started running yesterday https://git.drupalcode.org/project/address/-/pipelines
Replying to #5 it seems that the new file
address.field_type_categories.ymlis 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.
Comment #9
bojanz commentedShortening the title somewhat, and updating the status.
Comment #10
jonathan1055 commentedAdded new address.field_type_categories.yml
Ready for review.
Comment #11
dwwSo 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.
Comment #12
dwwAhh, 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.
Comment #13
jonathan1055 commentedHa 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. I will set them to be hidden, so that the branch test passes again.
Comment #14
dwwIt really wasn't that bad. 😉 Tested manually on 10.1.x-dev.
Comment #15
dwwHah, but local testing uncovered a bug in 10.2.x with all this new UI: #3415412: Field type plugin description is assumed to be an array
Comment #19
dwwYay, #3415412: Field type plugin description is assumed to be an array 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
Comment #21
dwwComment #22
jonathan1055 commentedThanks. 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
#3413020: Using a translatable string as a category for field type is deprecated in drupal:10.2 (Commerce)
Comment #23
dwwYup, I had already opened a tab for an issue about that remaining deprecation. Fixed at #3419633: JSWebAssert::assertExpectedAjaxRequest() called unnecessarily in ZoneTerritoryElementTest::testZoneTerritory