400 Bad Request Error Link Issue

400 Bad Request Error Link Issue

mfjhyo
Shopify Partner
3 0 0

mfjhyo_0-1727353335740.png

I'm seeing a "400 Bad Request" error even though I can add products to my cart without issues. This dead link is concerning, and I’m unsure why it’s appearing. I even tried redirecting this link from /cart/add to /cart, but it still doesn't redirect; it still shows:

Something went wrong.

What happened?
Parameter Missing or Invalid: Required parameter missing or invalid: items

I have redirected this broken link to /cart anyway,

mfjhyo_1-1727353657990.png

jovikids.ae

so any guidance on how to resolve this would be greatly appreciated! Thanks!

Replies 4 (4)

juanidi
Tourist
11 1 1

Hi @mfjhyo 

 

Quick questions, are you using <form> for '/cart/add' action?

 

mfjhyo
Shopify Partner
3 0 0

No, I don't use a form to add to the cart. I haven't even touched the cart page yet or changed any settings. As a matter of fact, I don't even know what caused the error because when I try to add any products to the cart, it's working perfectly fine. I'm creating a new store called jovikids.ae and have removed the password so anyone can access it and see for themselves to figure out what's the problem.

PageFly-Richard
Shopify Partner
4668 1069 1726

Hi,

This is Richard at PageFly - Shopify Advanced Page Builder app.

 

 

The error message "Parameter Missing or Invalid: Required parameter missing or invalid: items" indicates that your Shopify store is expecting a specific parameter named "items" to be present in the URL when a product is added to the cart. However, the link you're trying to redirect is missing this parameter.

Here are a few possible reasons why you're seeing this error:

  1. Incorrect Redirection: Ensure that the redirection from /cart/add to /cart is set up correctly in your Shopify theme. Check the theme's code or consult your theme's documentation to verify the redirection logic.
  2. Custom Code: If you have custom code in your theme or app that handles product additions to the cart, it might be interfering with the default behavior. Double-check your custom code to ensure it's not causing the issue.
  3. Shopify Platform Issue: In rare cases, there might be a temporary issue with Shopify's platform that is causing the error. You can check Shopify's status page ([invalid URL removed]) to see if there are any known issues.

If you've already verified the redirection and custom code, and there are no known Shopify platform issues, you might need to consult with Shopify support for further assistance. They can help you troubleshoot the specific issue and provide guidance on how to resolve it.

Hoping my solution helps you solve your problem.

Best regards,

Richard | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 


All features are available from Free plan. Live Chat Support is available 24/7.

mfjhyo
Shopify Partner
3 0 0

Thank you so much for your detailed response. Just to let you know, in my code, I have main-cart.liquid and cart-drawer.liquid, and the error is 'parameter missing or invalid: items.' I tried hard to figure it out, but clearly, I'm not good at coding. I request you to please look into the code and help me solve the issue.
Code