- πΊπ¦Ukraine dinazaur
During the editing of the shipping method got the error
TypeError: array_combine(): Argument #1 ($keys) must be of type array, null given in array_combine() (line 90 of modules/contrib/address/src/Element/Country.php).
Had no time to investigate it. Here is a quick fix for the error.
- Status changed to Needs work
over 1 year ago 7:04am 1 March 2023 - πΊπΈUnited States dww
Fabulous, thanks for moving this forward!
Unfortunately, I still can't commit this without tests (as tagged), which the latest patch does not contain.
Also, the summary has some remaining tasks
- πͺπΈSpain psf_ Huelva
With patch in #46, I use the field in a render array I get error:
Simple form code:
/** * {@inheritdoc} */ public function buildForm(array $form, FormStateInterface $form_state) { $form['address'] = [ '#type' => 'address', '#title' => $this->t('Address'), ]; $form['actions'] = [ '#type' => 'actions', ]; $form['actions']['submit'] = [ '#type' => 'submit', '#value' => $this->t('Send'), ]; return $form; }
The error:
Warning: Undefined array key "#preferred_countries" in Drupal\address\Element\Address::processAddress() (line 192 of modules/contrib/address/src/Element/Address.php). Drupal\address\Element\Address::processAddress(Array, Object, Array)
- Status changed to Needs review
about 1 year ago 10:51am 16 November 2023 - last update
about 1 year ago 34 pass - πΊπ¦Ukraine sickness29
Added 2 test cases for this: one for views exposed filter setting and the other for widget configuration and make sure selected countries are displayed as only options directly in select and not optgroup.
Also fixed code standards, added missing default values for Address and Country element info and fixed schema for views filter. - π·πΈSerbia bojanz
Thank you for the improvements, sickness29!
Since this is a major new feature and change in behavior, let's keep it limited to the 2.0.x branch. I'd like to keep the legacy 8.x-1.x branch as stress-free as possible.
- πΊπΈUnited States dww
Agreed, this can be 2.0.x material at this point, since it's a potentially more "disruptive" new feature.
That said, I'm really excited about this, and will try to make time to review + test soon. Probably within the first week or two of December...
Thanks!
-Derek - last update
about 1 year ago 35 pass - last update
11 months ago 10 pass, 22 fail - π¦π·Argentina tguerineau
Hi,
I've tested the
preferred_countries-2626982-52.patch
patch with the current 2.0.x branch and found that the patch doesn't apply due to code expected from the 8.x-1.x branch.After applying the rejected hunks manually and resolving duplications in
AddressDefaultWidget.php
(defaultSettings, settingsForm and settingsSummary methods), I've successfully tested the module with preferred countries field.The attached patch includes these modifications and works as expected. Please find my re-rolled patch attached for review.
Reworked #52 to apply to 2.0.x.
- Status changed to Needs work
11 months ago 9:06pm 3 January 2024 The last submitted patch, 53: preferred_countries-2626982-53.patch, failed testing. View results β
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.- Status changed to Needs review
11 months ago 4:01am 4 January 2024 - last update
11 months ago 45 pass - π¦π·Argentina tguerineau
Hello,
I am posting an updated version of the patch preferred_countries-2626982-53.patch β . This new patch addresses the issues encountered with the previous submission (
preferred_countries-2626982-52.patch
).Please find the attached re-rolled patch for review and testing. I welcome any feedback or further testing.
- Status changed to RTBC
10 months ago 2:54am 2 February 2024 - π³πΏNew Zealand dieuwe Auckland, NZ
Thanks, this applies and runs well against the latest dev. Would be nice to get this committed after all these years.
- Assigned to bojanz
- π·πΈSerbia bojanz
Our next release is 2.1.0, so let's change the version and start an MR.
- Merge request !51Issue #2626982: Allow to set a list of preferred countries β (Open) created by bojanz