- Issue created by @hawkeye.twolf
- @hawkeyetwolf opened merge request.
- Status changed to Needs review
almost 2 years ago 9:39pm 28 March 2023 - πΊπΈUnited States hawkeye.twolf αα©α―αα Unalatogiyasdi, Tsalaguwetiyi (Cherokee country)
- Assigned to sickness29
- Status changed to Needs work
about 1 year ago 10:47am 21 November 2023 - Issue was unassigned.
- Status changed to Needs review
about 1 year ago 1:19pm 21 November 2023 - last update
about 1 year ago 33 pass - πΊπ¦Ukraine sickness29
Reworked to apply to latest 8.x-1.x, fixed few coding standard issues.
Renamed CountryNameTokenTest to AddressTokenTest and extended it to contain test case for new token - last update
about 1 year ago Patch Failed to Apply - Status changed to Needs work
about 1 year ago 3:47pm 30 December 2023 - π·πΈSerbia bojanz
Needs a reroll for 2.0.x.
We also need to add address_line3 the same way we added address_line2.
- Status changed to Needs review
about 1 year ago 2:24am 10 January 2024 - last update
about 1 year ago 44 pass - π¦π·Argentina tguerineau
I have created a patch for the 2.0.x.
I have adapted this patch for the 2.0.x branch, which includes support for an additional third address line.
Changes Made:
1. Renamed the token from'address_lines_both'
to'address_lines_combined'
to better reflect its functionality, as it now combines up to three address lines.
2. Updated the logic inaddress.tokens.inc
to handle the third address line. The token now correctly concatenates the available address lines, separating them with commas as appropriate.
3. Manually tested the new token with the Meta Tag module. I used the[node:field_address:address_lines_combined]
token in the default meta description for content. The token correctly outputs:- Just the first line when only the first address line is present.
- The first and second lines, separated by a comma, when both are present.
- All three lines, each separated by a comma, when all are present.
- No additional text in the meta description when the address field is empty.
- π·πΈSerbia bojanz
Thanks!
This is now 2.1.0 material, so bumping the version.
- First commit to issue fork.
- Merge request !57Add token for "Street address lines 1/2/3 combined" β (Merged) created by ericgsmith
- π³πΏNew Zealand ericgsmith
ericgsmith β changed the visibility of the branch 3350959-add-token-for to hidden.
- π³πΏNew Zealand ericgsmith
Thanks all - we've been using this patch for a couple of months and it works perfectly for us.
Code changes look good and so does the test π
Moving patch from #9 to a MR against 2.1.x
Looks like tests and a few jobs are failing but they may not be related to this change as it looks like the pipelines aren't running on a schedule and I can't see the last run - I'd RTBC it but will investigate these failures first.
- π³πΏNew Zealand ericgsmith
Test passed locally:
docker compose exec php-cli phpunit -c /data/app/core/phpunit.xml /data/app/modules/contrib/address/tests/src/Kernel/AddressTokenTest.php PHPUnit 10.5.39 by Sebastian Bergmann and contributors. Runtime: PHP 8.3.14 Configuration: /data/app/core/phpunit.xml ... 3 / 3 (100%) Time: 00:16.928, Memory: 12.00 MB OK, but there were issues! Tests: 3, Assertions: 58, PHPUnit Deprecations: 1.
Needs π [Gitlab] PHPUnit tests fail after --verbose removed, and no scheduled pipelines exist Active to pass in CI as there is a bit of work to get the pipeline green - good enough for RTBC for me :)
-
bojanz β
committed 1fe933fd on 2.1.x authored by
ericgsmith β
Issue #3350959 by sickness29, tguerineau: Add token for "Street address...
-
bojanz β
committed 1fe933fd on 2.1.x authored by
ericgsmith β
- π·πΈSerbia bojanz
Merged, thanks.
Let's get the CI green in the other issue.
-
bojanz β
committed d541f205 on 2.x authored by
ericgsmith β
Issue #3350959 by sickness29, tguerineau: Add token for "Street address...
-
bojanz β
committed d541f205 on 2.x authored by
ericgsmith β
-
bojanz β
committed d5c0e8a6 on 2.x
Fix phpcs issues introduced by #3350959.
-
bojanz β
committed d5c0e8a6 on 2.x
-
bojanz β
committed 6077c38f on 2.1.x
Fix phpcs issues introduced by #3350959.
-
bojanz β
committed 6077c38f on 2.1.x
Automatically closed - issue fixed for 2 weeks with no activity.