Closed danijelpetkovic closed 1 month ago
I tried to use Shopware 6 default theme, and this error still shows.
I already wrote an email to adyen reporting that problem, but never got an answer. Problem is that the dist.js in shopware/vendor/adyen/adyen-shopware6/src/Resources/app/storefront/dist/storefront/js
get also loaded when installing the plugin.
A really dirty workaround:
Copy shopware/vendor/adyen/adyen-shopware6/src/AdyenPaymentShopware6.php somewhere and change the following method so it looks like this:
public function installJsAssets($shopwareVersion)
{
$storefrontAssetPath = __DIR__ . '/Resources/app/storefront/dist/storefront/js/adyen-payment-shopware6.js';
$adminAssetPath = __DIR__ . '/Resources/public/administration/js/adyen-payment-shopware6.js';
if (\version_compare($shopwareVersion, '6.5.0.0', '<')) {
$resultAdmin = copy(
__DIR__ . '/Resources/public/administration/js/adyen-payment-shopware64.js.dist',
$adminAssetPath
);
} else {
$resultStorefront = copy(
__DIR__ . '/Resources/app/storefront/dist/storefront/js/adyen-payment-shopware65.js.dist',
$storefrontAssetPath
);
$resultAdmin = copy(
__DIR__ . '/Resources/public/administration/js/adyen-payment-shopware64.js.dist',
$adminAssetPath
);
}
}
In the composer.json and the post-install and post-update cmd add these lines:
"cp **<pathtomodified>**/AdyenPaymentShopware6.php vendor/adyen/adyen-shopware6/src/AdyenPaymentShopware6.php",
"cp vendor/adyen/adyen-shopware6/src/Resources/app/storefront/dist/storefront/js/adyen-payment-shopware64.js.dist vendor/adyen/adyen-shopware6/src/Resources/app/storefront/dist/storefront/js/adyen-payment-shopware6.js || true",
"rm vendor/adyen/adyen-shopware6/src/Resources/app/storefront/dist/storefront/js/*.js.dist || true ",
Hi @danijelpetkovic @PeterMarteau, thanks for opening the issue and giving more context, we have included the issue in our internal backlog and we will keep you posted of the updates
Hi, its actually fixed in 4.1.3 :) I tested it in our shop and it works. Just do the update and the workaround is not needed anymore.
Edit: Our support case at adyen for which we got the message that it is fixed for reference: 03125743 with subject [Test Env] JavaScript Error causing other JS to not be executed
@hossam-adyen @PeterMarteau Hey guys. What do you mean it is resolved in 4.1.3? That version is not existing. The latest adyen version is 3.14.3. I have that version installed and the error still occurs.
Hi @danijelpetkovic thanks for your comment, I will reopen this and included in our backlog to investigate this further
@danijelpetkovic I'm sorry, i of course meant 3.14.3 as the latest version, not 4.1.3. For us it fixed it. I cant test it any further for shopware version 6.4.20.2 because in the meantime we updated to shopware v6.5. But I'm pretty sure it worked with 6.4.20.2 as well. You sure you did run bin/build-storefront.sh after updating? Also i think the problematic stuff happens in the install routine of the plugin. I dont know if Adyen also included some fix in the update routine. So maybe try bin/console plugin:uninstall and then install it again.
And if it still doesnt work then just use the dirty workaround i posted earlier. This definitely worked.
@PeterMarteau Thanks for the suggestions. I tried deinstalling and installing the plugin again, but the error still persists and the shop is still broken. I guess I will have to wait for Adyen fix.
@hossam-adyen Hello. Is there maybe any news on the issue? Thanks
Hello @danijelpetkovic,
Thank you sincerely for your patience and collaboration throughout the process. We truly appreciate your dedication to resolving this issue.
I would like to inform you that we have opened an issue in our internal backlog to further investigate and address the reported problem. We are actively working on this, and you can expect to hear from us soon regarding a proposed solution.
Your continued cooperation and valuable insights are crucial to our efforts, and we are committed to ensuring a swift and effective resolution.
If you have any additional thoughts, questions, or updates in the meantime, please don't hesitate to share them with us.
Once again, thank you for your understanding and support.
Regards! Khushboo
Describe the bug Once you add the plugin to the shop, it keeps giving console error that CartPlugin is already registered.
Versions Shopware version: 6.4.20.2 Plugin version: 3.14.2
To Reproduce Steps to reproduce the behavior: