Problem/Motivation

If you use this formatter on a field rendered via Layout Builder, nothing changes. See related issue.

I'm on core version 9.3.3 but can't assign that. Perhaps this should be an issue for compatibility?

Steps to reproduce

Add an address field to a layout builder section on version 9.3.3. Configure any way you'd like. Nothing happens on the front-end.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

SiliconValet created an issue. See original summary.

chrissnyder’s picture

I think this is related to an issue in Drupal core #3015152: Support third-party settings for components within a section. Once that is resolved, this may work with layout builder.

chrissnyder’s picture

cwyattjibc’s picture

Is this bug the cause of the formatting change I've witnessed on my site? Address no longer has spaces "New WestminsterBCV3K 5T5
Canada". Specifically this span class <span class="administrative-area">BC</span>. Drupal 9.3.9

anybody’s picture

I can sadly confirm this issue. :( Added this one as child issue of #3015152: Support third-party settings for components within a section. This is annoying, I was so happy to find this helpful module. Not sure when this will be fixed in core, should we implement a workaround?

I also tried with the latest patch from the core issue, but it doesn't work.
$field_display variable in address_map_link_preprocess_field looks like this:

array:6 [▼
  "type" => "address_default"
  "label" => "inline"
  "settings" => []
  "third_party_settings" => []
  "weight" => 2
  "region" => "content"
]

I'm not sure yet if the core patch isn't perfect yet or if there's a mistake in the implementation of this module.

anybody’s picture

Title: Doesn't work if rendered via Layout Builder » 3262109-layout-builder-support
Status: Active » Needs work

Just compared this to https://www.drupal.org/project/fences/ which works in layout builder and added the differences and missing schema to the MR. Still WIP.

@ChrisSnyder side-topic: Perhaps enable automated testing for issues?

anybody’s picture

Title: 3262109-layout-builder-support » Doesn't work if rendered via Layout Builder
Status: Needs work » Needs review

Yay! It works, and I guess it might also work without the core patch. Please try with and without layout builder using the patch from MR1:
https://git.drupalcode.org/project/address_map_link/-/merge_requests/1.diff

And please check, if the core patch is required. I think it's not.

anybody’s picture

Version: 8.x-1.2 » 8.x-1.x-dev
anybody’s picture

chrissnyder’s picture

Automated testing has been updated for issues/commits (was configured for an old/unsupported version of PHP).

@Anybody, does it work without patching core?

anybody’s picture

@ChrisSnyder, we'll have to try it. I can't say as the core patch contained a DB update and I didn't roll that back...

anybody’s picture

@ChrisSnyder it works and fixes an implementation issue. Could you perhaps review and commit this? If you can't use Layout Builder, please at least check the functionality still works correctly without layout builder :)

chrissnyder’s picture

Thanks for your work on this. I tested it with both layout builder and when layout builder was not installed.

  • ChrisSnyder committed bbd49f2 on 8.x-1.x authored by Anybody
    Issue #3262109 by Anybody, ChrisSnyder: Doesn't work if rendered via...
anybody’s picture

Status: Needs review » Fixed

Coooooool, thanks!!! :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.