Plain Text Formatter does not set Locality properly

Created on 3 January 2025, 6 days ago

Problem/Motivation

When there is an administrative area and a locality, the AddressPlainFormatter only adds the code and name to the administrative area and not the locality such that when in ./templates/address-plain.html.twig you cannot access {{ locality.code }} but instead would have to use {{ locality }}.

Steps to reproduce

1. Create a new content type.
2. Add an address field to the new content type, hiding all fields except for the administrative area and locality. Change the display to use the Plain text formatter.
3. Add a node of this new content type, filling in all fields.
4. Note that the locality is not displayed in the output.

Proposed resolution

Remove check at the bottom of the

      if (!$subdivision->hasChildren()) {
        // The current subdivision has no children, stop.
        break;
      }

Remaining tasks

Create MR.

User interface changes

Fixes UI bug.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States douggreen Winchester, VA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024