πŸ‡ΊπŸ‡ΈUnited States @ericchew

Account created on 15 October 2017, over 6 years ago
#

Merge Requests

Recent comments

πŸ‡ΊπŸ‡ΈUnited States ericchew

I started running into this issue on my site when testing going from php 8.0 to 8.1 to prepare for D10. The patch fixes the issue for me too.

πŸ‡ΊπŸ‡ΈUnited States ericchew

@VasyOK you only need to apply the patch file. The interdiff is uploaded to see what code has changed between the current patch and the previous patch because it makes it easier to review.

https://www.drupal.org/docs/develop/git/using-git-to-contribute-to-drupa... β†’

πŸ‡ΊπŸ‡ΈUnited States ericchew

Manually tested on Drupal 10 and the module works. There is a JS error thrown in the console per the Drupal 10 test failure, but I'm not sure there is a way to fix it here other than applying patch from issue in linked in #4.

Merging so that a D10 compatible release can be tagged.

πŸ‡ΊπŸ‡ΈUnited States ericchew

Tests are failing on d10 because of this issue in drupal core regarding AJAX inside of a modal.

https://www.drupal.org/project/drupal/issues/2922677 πŸ› Uncaught TypeError: Cannot read property 'replace' of undefined Postponed: needs info

πŸ‡ΊπŸ‡ΈUnited States ericchew

I do not see the phpcs violations that you mention when I run it locally, and your patch appears to be empty. Seems to me this account just scans drupal projects to get phpcs fixes?

πŸ‡ΊπŸ‡ΈUnited States ericchew

Here is a patch to fix it.

I'm not sure if there is a good way to fix the test so that it catches this issue. It is a Unit Test that mocks the SearchApiQuery object and the test is checking mock objects instead of getting the conditions from the actual query (where the conditions were not present).

https://git.drupalcode.org/project/search_api/-/blob/8.x-1.x/tests/src/U...

πŸ‡ΊπŸ‡ΈUnited States ericchew

It's an entity form so its being built by the form display widgets when it calls $form = parent::form($form, $form_state);. Your code in #4 would break it because you're overriding the entire form element array for the title field.

Try $form['title']['widget'][0]['value']['#default_value'] = ShipmentForm::generateShipmentTitle($order); instead which just overrides the default value key (just like you did in your form alter). This line would have to go AFTER the form is being built (see the link I put in #3 for where it is being built.

πŸ‡ΊπŸ‡ΈUnited States ericchew

What if you have multiple shipment types? Should probably use hook_BASE_FORM_ID_alter instead.

Production build 0.69.0 2024