cancel
Showing results for 
Search instead for 
Did you mean: 

Magento2 Wrong base url on ajax call

Magento2 Wrong base url on ajax call

Hi,

 

I have upgraded the Magento version to 2.3.4. After that, I had a strange issue on the checkout that when we trying to call ajax function the URL is been wrongly generated. Previously it was like

 

<website>/rest/default/V1/guest-carts/AC72N37Vmo3uGMIXEVQfIDt1ubuZLJws/estimate-shipping-methods

 

but  after upgrading Magento version now it's 

 

<website>/checkout/undefinedrest/default/V1/guest-carts/AC72N37Vmo3uGMIXEVQfIDt1ubuZLJws/estimate-shipping-methods

 

it comes with the current URL which throughs I error while proceeding further.

 

Can anyone help me out from this?

 

Thanks in Advance.

3 REPLIES 3

Re: Magento2 Wrong base url on ajax call

Hello @mandar_parbate1 

 

Can you please check base url secure and non secure url ?

 

if it is empty then enter your base site URL


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: Magento2 Wrong base url on ajax call

Hi @Sunil Patel ,

 

I checked the secure & unsecured URL's. Both are fine.

 

Re: Magento2 Wrong base url on ajax call

In my controller I want to receive the data that I sent with this post request and make a CSV file outta it. But it seems that my controller Sarkari Result  Pnr Status  192.168.1.1  doesn't get the post request ?