I have done the below update today.
After this I get the below error.
{
"message": "\nΠαρουσιάστηκε AJAX HTTP σφάλμα.\nΚωδικός αποτελέσματος HTTP: 200\nΑκολουθούν πληροφορίες αποσφαλμάτωσης.\nΔιαδρομή: /el/product/koypa-gyalini-me-diplo-toihoma-75ml-66x95cm-fy75b?v=18841&ajax_form=1\nΚείμενο Κατάστασης: parsererror\nΚείμενο Απόκρισης: ArgumentCountError: Too few arguments to function Drupal\\commerce_cart\\EventSubscriber\\CartEventSubscriber::__construct(), 2 passed in /home/easytech/viosarp.gr/web/modules/contrib/commerce_ajax_atc/src/EventSubscriber/AjaxCartEventSubscriber.php on line 34 and exactly 3 expected in Drupal\\commerce_cart\\EventSubscriber\\CartEventSubscriber->__construct() (line 42 of /home/easytech/viosarp.gr/web/modules/contrib/commerce/modules/cart/src/EventSubscriber/CartEventSubscriber.php).",
"name": "AjaxError"
}
It seems that the constructor of AjaxCartEventSubscriber at line 34. Maybe that there is issue compatibility with new commerce upate.
Any help please.
Upgrading symfony/finder (v6.2.7 => v6.3.0): Extracting archive
- Upgrading doctrine/deprecations (v1.0.0 => v1.1.0): Extracting archive
- Upgrading symfony/var-dumper (v5.4.23 => v5.4.24): Extracting archive
- Upgrading egulias/email-validator (3.2.5 => 3.2.6): Extracting archive
- Upgrading twbs/bootstrap (v5.2.3 => v5.3.0): Extracting archive
- Upgrading drupal/commerce (2.35.0 => 2.36.0): Extracting archive
- Upgrading drupal/commerce_price (2.35.0 => 2.36.0)
- Upgrading drupal/commerce_store (2.35.0 => 2.36.0)
- Upgrading drupal/commerce_number_pattern (2.35.0 => 2.36.0)
- Upgrading drupal/commerce_order (2.35.0 => 2.36.0)
- Upgrading drupal/commerce_product (2.35.0 => 2.36.0)
- Upgrading drupal/commerce_cart (2.35.0 => 2.36.0)
- Upgrading drupal/commerce_checkout (2.35.0 => 2.36.0)
- Upgrading drupal/feeds (3.0.0-beta3 => 3.0.0-beta4): Extracting archive
- Upgrading drupal/commerce_product_limits (1.0.0 => 1.0.1): Extracting archive
- Upgrading drupal/field_validation (1.0.0-beta4 => 1.0.0-beta5): Extracting archive
- Upgrading drupal/metatag (1.23.0 => 1.25.0): Extracting archive
- Upgrading drupal/views_bulk_operations (4.2.3 => 4.2.4): Extracting archive
- Upgrading symfony/css-selector (v6.2.7 => v6.3.0): Extracting archive
- Upgrading symfony/string (v6.2.8 => v6.3.0): Extracting archive
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3364372-5.patch | 2.45 KB | tonytheferg |
Comments
Comment #2
tarasiadis commentedIs there any other user that update to commerce 2.35.0 and see the same error?
Comment #3
tarasiadis commentedI have downgrade to "drupal/commerce": "2.35" and works ok. But with new "drupal/commerce": "2.36", I get the error that I have sent.
Comment #4
tarasiadis commentedI’m sure that is compatibility issue with new commerce 2.36.
Here is the new feature that maybe is conflict with Ajax add to cart class extension.
https://www.drupal.org/node/3317738
If somebody could help to make it compatible with new version of commerce.
Comment #5
tonytheferg commentedThe tests will probably need to be fixed, and we will probably have to set a new minimum version requirement to commerce core.
Apply the patch and clear the caches.
Let me know.
Comment #6
tonytheferg commentedComment #7
tarasiadis commentedHi tonytheferg,
I have check the patch and seems that works ok with commerce 2.36
Comment #8
andyd328Patch is working here. Thanks!
Comment #10
tonytheferg commentedCommitted with an updated Commerce Core requirement of
"drupal/commerce": "^2.36"Pushed a new release as well. Thanks for reporting!
Comment #11
tarasiadis commentedAfter update to 1.0.0-rc1 I cannot apply the patch.
And my site crach with error 500.
Please help me.
- Installing drupal/commerce_ajax_atc (1.0.0-rc1): Extracting archive
- Applying patches for drupal/commerce_ajax_atc
https://www.drupal.org/files/issues/2023-06-02/3364372-5.patch (Add to cart fix with commerce 2.36 update)
Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2023-06-02/3364372-5.patch
In Patches.php line 331:
Cannot apply patch Add to cart fix with commerce 2.36 update (https://www.drupal.org/files/issues/2023-06-02/3364372-5.patch)!
Comment #12
tarasiadis commentedNow I get an error as below
PHP Fatal error: Cannot use Drupal\Core\Entity\EntityTypeManagerInterface as EntityTypeManagerInterface because the name is already in use in /......../web/modules/contrib/commerce_ajax_atc/src/EventSubscriber/AjaxCartEventSubscriber.php on line 11
Comment #13
tarasiadis commentedIt seems that patch conflict with new version?
Comment #14
tarasiadis commentedI have delete the whole folder and I upload the new version and is ok now.
Comment #15
tonytheferg commentedYou don't need the patch in the new version, it's already included. Remove the patch if you are using rc1.