- Issue created by @loze
Hi, can you please try the fix in this issue, clear the cache, and report back?
📌 AjaxCartEventSubscriber::$entityTypeManager declaration is redundant / problematic Active
- 🇺🇸United States loze Los Angeles
Clearing caches didn't do anything.
I was able to get it working by removing this one line from CommerceAjaxAtcServiceProvider.php
$definition->setClass(AjaxCartEventSubscriber::class) ->addArgument(new Reference('request_stack'));
removing the addArgument from this line
$definition->setClass(AjaxCartEventSubscriber::class);
Got it working.
I'm not sure if thats the correct thing to do, but if it is, I can make a patch/MR
Probably need to add the reference to the messenger before the request stack
Please let me know what version of this module you are on, and what if any patches are applied. I also need to know what your ajax settings are as well. Clear steps to reproduce please.
Thanks!
- 🇺🇸United States loze Los Angeles
I am using the latest 1.0.x dev version. That fix in the issue is already merged, no? So its in the dev version (at least thats what it looks like)
I cleared my caches multiple times.
Removing that one line has it working for now.
Yes, that change is merged into the latest dev. OK, I will have a look. Thank you.
Maybe revert the changes here and see what happens:
https://git.drupalcode.org/project/commerce_ajax_atc/-/merge_requests/7/...- First commit to issue fork.
- Merge request !9Issue #3510771 by jsacksick: Fix errors occurring on add to cart due to... → (Open) created by jsacksick
- 🇮🇱Israel jsacksick
Ok I now understand why the initial approach from 📌 AjaxCartEventSubscriber::$entityTypeManager declaration is redundant / problematic Active didn't work... We were both defining the service from the service.yml and overridding it, causing issues...
The attached MR should do the trick and should work with both Commerce 2 and 3.
This applied to both Commerce 2 and 3, and there were no errors in the log when using the cart message.
+1 for RTBC
@loze, please apply the MR to 1.0.x-dev, and let me know how it goes.- 🇺🇸United States loze Los Angeles
Confirmed, MR9 applied to 1.0.x-dev, and is working with commerce 3.0.x dev
Thank you!