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

Account created on 15 October 2017, about 7 years ago
#

Merge Requests

Recent comments

πŸ‡ΊπŸ‡ΈUnited States ericchew

Hi @Anybody,

I'm glad the module is working well for you. I will try to schedule some time to create a release, my company just migrated to a new ERP so my time is limited right now.

My gut feeling is the Commerce maintainers would prefer this to remain a contributed module feature, but you are welcome to post an issue on the Commerce module to see if they would consider it.

πŸ‡ΊπŸ‡Έ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.71.5 2024