klaviyo / magento2-klaviyo

37 stars 51 forks source link

Klaviyo blocks checkout from working - error with method getKlSmsConsent() #191

Closed RoboSowo closed 1 year ago

RoboSowo commented 2 years ago

We are in the process of installing Klaviyo to our Magento2, but before even configuring the app, we can see that the app is preventing our checkout flow in functioning. We get following error message:

main.CRITICAL: Error: Call to undefined method Magento\Checkout\Api\Data\ShippingInformationExtension::getKlSmsConsent() in /home/web/OURSITE/releases/20220523065500/vendor/klaviyo/magento2-extension/model/Checkout/ShippingInformationManagement.php:29

Does anyone experience something similar and do you have a fix for it?

We previously installed Klaviyo to our test site, and that worked as expected. We have done exactly same steps so far.

Br Sophie

VivekShingala commented 1 year ago

Hi @RoboSowo

We are also experiencing the same issue. Our staging site is working fine, but it is breaking the production site checkout page with the error you have mentioned.

We have same Magento, PHP and Klaviyo versions for our staging and production environment. Could you please help me if you have already fixed this issue?

RoboSowo commented 1 year ago

No, we did not find a fix, so we had to install an older version of the application...

Do you plan to make a solution in this in the near future?

Br Sophie

On Tue, 4 Oct 2022, 23.58 Vivek Shingala, @.***> wrote:

Hi @RoboSowo https://github.com/RoboSowo

We are also experiencing the same issue. Our staging site is working fine, but it is breaking the production site checkout page with the error you have mentioned.

We have same Magento, PHP and Klaviyo versions for our staging and production environment. Could you please help me if you have already fixed this issue?

— Reply to this email directly, view it on GitHub https://github.com/klaviyo/magento2-klaviyo/issues/191#issuecomment-1267624495, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACAJDYQPV5GU72BLVCPLT53WBSSCFANCNFSM5WZHFNRA . You are receiving this because you were mentioned.Message ID: @.***>

VivekShingala commented 1 year ago

Oh, I see.

Yes, I am working on it to find and fix the issue. Will let you know here.

cykolln commented 1 year ago

Thank you for raising this - I've created an internal ticket to investigate this and will update this issue when it gets picked up.

cykolln commented 1 year ago

@RoboSowo @VivekShingala can you please share which version of Magento you're using and the extension version?

VivekShingala commented 1 year ago

Hi @cykolln

I'm using below versions for my website:

Magento: 2.4.3-p2 PHP: 7.4.12 Klaviyo: 4.0.5

Please note that we have the same configuration for our staging site as well and it's working correctly. The issue we are facing is on production server.

cykolln commented 1 year ago

Hi @VivekShingala - thanks for supplying your configuration for us. A lot of the time issues with extension attributes can be resolved by removing the /generated directory and recompiling:

rm -rf generated/*
php bin/magento setup:di:compile
VivekShingala commented 1 year ago

Hi @cykolln

We are using deployer so generated folder is newly created each time we deploy the code to the server. So, that can't be the issue.

cykolln commented 1 year ago

Fixed in #244 and is included in version 4.0.11

wmdkdkussin commented 11 months ago

FYI: We still experience the issue with KLAVIYO v4.0.11 and Magento v2.4.2-p2.

jtomka commented 10 months ago

Confirming the issue is present in Magento 2.4.5-p1 and Klaviyo_Reclaim 4.0.12.

However, the issue seems to be with Deployer and its Magento 2 recipe. I haven't had a chance to investigate in depth, but re-deploying resolves the issue. I suspect it's the order of steps in Deployer recipe that makes it require two consecutive deployments for the newly installed extension to work.

In short, redeploy and see if it helps.