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

CommentFileSizeAuthor
#5 3364372-5.patch2.45 KBtonytheferg

Comments

tarasiadis created an issue. See original summary.

tarasiadis’s picture

Is there any other user that update to commerce 2.35.0 and see the same error?

tarasiadis’s picture

I 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.

tarasiadis’s picture

I’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.

tonytheferg’s picture

StatusFileSize
new2.45 KB

The 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.

tonytheferg’s picture

Version: 1.0.0-beta4 » 1.0.x-dev
Status: Active » Needs review
tarasiadis’s picture

Hi tonytheferg,
I have check the patch and seems that works ok with commerce 2.36

andyd328’s picture

Patch is working here. Thanks!

  • tonytheferg committed 440e3770 on 1.0.x
    Issue #3364372 by tonytheferg: Ajax error after update commerce cart
    
tonytheferg’s picture

Status: Needs review » Fixed

Committed with an updated Commerce Core requirement of "drupal/commerce": "^2.36"

Pushed a new release as well. Thanks for reporting!

tarasiadis’s picture

After 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)!

tarasiadis’s picture

Now 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

tarasiadis’s picture

It seems that patch conflict with new version?

tarasiadis’s picture

I have delete the whole folder and I upload the new version and is ok now.

tonytheferg’s picture

You don't need the patch in the new version, it's already included. Remove the patch if you are using rc1.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.