Closed (fixed)
Project:
Address
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
7 May 2026 at 16:04 UTC
Updated:
11 Nov 2026 at 02:45 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
hctomComment #3
hctomJust fixing typos and formatting in issue body ;)
Comment #5
gurkawal commentedI replicated this issue on Drupal 11 with Address 2.x and Diff 2.x.
The issue occurs because Diff 2.x updated a method to require an array return type, while the Address module was still using the older method definition. This causes a fatal error on the content revision diff page.
The fix is to add the missing : array return type to AddressFieldBuilder::build() so the method signatures match correctly.
After reviewing the issue and codebase, I found that this fix is already present in the current 2.0.x-dev branch, so there are no additional changes left for a new MR.
However, the latest stable release (2.0.4) does not yet include this fix, so a new stable release from the updated 2.0.x branch is needed.
Comment #7
bala_28 commentedAdding patch for 2.0.4 version
Comment #8
joachim commentedPatch looks good but someone needs to make an MR from it.
Comment #11
idebr commentedThis was already fixed in #3460590: AddressFieldBuilder::build is not compatible with diff 2.0.x's CoreFieldBuilder::build
Comment #12
joegl commentedComment #13
joegl commentedIt was fixed a few years ago but no release has been made with the fix.
Comment #14
brandonlira commentedConfirmed. The change from the patch is already present in 2.0.x-dev via #3460590, but it is not included in the latest stable release, 2.0.4.
I think this can be handled by publishing a new 2.0.x release rather than creating another MR.
Comment #15
ifrikI have the same problem with Address 2.0.4 and Diff 2.0.1 as well as with Diff 2.1.1
After applying the patch #7, I get this error
InvalidArgumentException: Invalid $mode 3 specified in Drupal\Component\Diff\DiffOpOutputBuilder->hunkOp() (line 127 of core/lib/Drupal/Component/Diff/DiffOpOutputBuilder.php).Comment #16
a8w4This error also blocks the fields config page of the Diff module:
Fatal error: Declaration of Drupal\address\Plugin\diff\Field\AddressFieldBuilder::build(Drupal\Core\Field\FieldItemListInterface $field_items) must be compatible with Drupal\diff\Plugin\diff\Field\CoreFieldBuilder::build(Drupal\Core\Field\FieldItemListInterface $field_items): array in /var/www/html/drupal/web/modules/contrib/address/src/Plugin/diff/Field/AddressFieldBuilder.php on line 24Steps to reproduce
This is a major showstopper for the diff module - please fix soon!
Comment #17
tvalimaa commentedI get this on Drupal 11.4 / PHP 8.4 with address 2.0.4 and diff 2.1.1. The revision comparison page on nodes with address fields was returning a 500 error. Applied the patch from comment #7 and it resolved the issue immediately.
Address: 2.0.4
Diff: 2.1.1
Drupal: 11.4
PHP: 8.4
Comment #20
benstallings commentedComment #23
dwwThanks for the test. Our GitLab CI test-only job didn't make it easy to verify, but I confirmed locally that the test fails with address 2.0.4 and diff 2.*. Committed and pushed to 2.1.x and 2.0.x. The 2.x branch is sort of abandoned at this point. 😬
I only mentioned benstallings and myself in the commit message, since what I committed had nothing to do with the earlier (mostly duplicate) effort in this issue. However, I saved credit for other folks on the contribution credit, since you did try to help in other ways.
Thanks again,
-Derek
Comment #25
dww