- Issue created by @linhnm
- 🇺🇸United States spfaffly
Probably not the best solution but commenting out the offending code for now at least gives us a path forward to an installable state.
Patch file attached.
- Assigned to samit.310@gmail.com
- Status changed to Needs work
over 1 year ago 7:00am 8 August 2023 - Issue was unassigned.
- Status changed to Needs review
over 1 year ago 7:03am 8 August 2023 - last update
over 1 year ago 3 pass - 🇮🇳India samit.310@gmail.com
interdiff with #2 🐛 Incompatibility with Address module version 2.x RTBC
- 🇺🇸United States tea.time
These patches are both skipping subscribing to the
AddressEvents::INITIAL_VALUES
event if it isn't defined by the Address module... but without running that event handler that would be attached, isn't that going to break some functionality of Quick Node Clone? It appears to be setting initial values in an address field from the current node. So if the Address module has removed the event, I'd think Quick Node Clone needs to implement that same functionality another way. - Status changed to Needs work
about 1 year ago 2:16am 9 October 2023 - 🇩🇪Germany Anybody Porta Westfalica
Address 2.0 is now stable, so this issue becomes even more critical.
- Status changed to RTBC
12 months ago 10:06pm 27 December 2023 - last update
12 months ago 3 pass - 🇺🇸United States jacobbell84
I believe the approach for patch #6 is correct here. Looking through the patch in #2838457: Re-enable the default value functionality for Address fields → , it was more than deprecating this functionality. They actually removed all the code that fired the event, so it hasn't been doing anything since version 1.5 of Address.
The original verbiage change to the function header comment made that more clear, before it was updated to the more generic deprecation description in a later issue.
diff --git a/src/Event/InitialValuesEvent.php b/src/Event/InitialValuesEvent.php index a40c322..842cb6e 100644 --- a/src/Event/InitialValuesEvent.php +++ b/src/Event/InitialValuesEvent.php @@ -8,8 +8,8 @@ use Symfony\Component\EventDispatcher\Event; /** * Defines the initial values event. * - * @see \Drupal\address\Event\AddressEvents - * @see \Drupal\address\Plugin\Field\FieldWidget\AddressDefaultWidget::getInitialValues() + * @deprecated No longer fired since 1.5. Use hook_field_widget_form_alter() + * to change the address #default_value instead. */ class InitialValuesEvent extends Event {
Given that, I think doing a simple check of the event constant's existence is a reasonable fix, as it allows us to support the older versions of the Address module without breaking when version 2 is used. I tested patch 6 on one of my sites that use the Address module, and the address content still cloned without issue, so marking this as RTBC
- 🇩🇪Germany mkalkbrenner 🇩🇪
Yes, this one is critical. A composer update now lets a site run into fatal errors.
- 🇫🇷France kumkum29
Patch #6 works fine.
Do you think to include this fix in the dev or next release ?Thanks.
- 🇩🇪Germany Anybody Porta Westfalica
I pinged the both maintainers, hope they hear us. Indeed critical!
- First commit to issue fork.
- Merge request !19Check for presence of AddressEvents::INITIAL_VALUES before using. → (Merged) created by markdorison
-
markdorison →
committed cfe1d249 on 8.x-1.x
Issue #3376504 by markdorison, samit.310@gmail.com, spfaffly, linhnm,...
-
markdorison →
committed cfe1d249 on 8.x-1.x
- Status changed to Fixed
11 months ago 3:04pm 12 January 2024 - 🇺🇸United States markdorison
I created an MR from the patch so tests could run. Resolved a small PHPCS issue. Committing this now. Thanks for the ping!
- 🇩🇪Germany Anybody Porta Westfalica
Thank you very very much @markdorison!! :)
Automatically closed - issue fixed for 2 weeks with no activity.