Skip Navigation

[Resolved] 404 on WooCommerse cart redirect

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 11 replies, has 2 voices.

Last updated by MrHinsh 1 year ago.

Assigned support staff: Jamal.

Author
Posts
#1773975

I am trying to: Add an item to the cart from page.

Link to a page where the issue can be seen: hidden link

I expected to see: Item added to the cart

Instead, I got: 404

When Toolset Types is enabled I get a 404 on the car page, only on post. (Refresh then loads the page).
When Toolset Types is disabled the cart-add works.

#1774057

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello and thank you for contacting the Toolset support.

Please activate PHP debugging, then switch to a default theme, and disable all plugins except WooCommerce and Toolset plugin. Then try to reproduce the issue. We may get some logs on the debug.log file that can help us find out the root cause.
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/#php-debugging

#1774173

Debug enabled: No additional errors.

Issue Reproducible with Default Theme + Event Tickets + Toolset.

Issue fixed if Toolset disabled, and returns when Toolset enabled.

#1774193

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Can we have access to the debug.log file?

Is it possible to share a Duplicator copy of your website and let me analyze this locally?

#1774675

🙂 The log is right where you asked me to put it: hidden link

It is possible to share an export but its 4.5GB in size...

#1777021

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

It won't be possible to upload it to our website, but you can use a sharing service such as DropBox or GDrive and share the download link in your next reply, which will be private.

#1777115

hidden link

#1778987

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

I worked on a copy of your website and I was not able to find out the cause of this issue. It only happens to event tickets. It does not happen with simple products. I suspect, an issue on how the event tickets are built.

I am escalating this to our 2nd tier, and we may need to try in a clean install. In that case, I'll need your help to:
- Upload the events tickets into our test site.
- Configure the event tickets plugin and share the procedure with us.
- Create a product and reproduce the issue.

I'll let you know as soon as I get a reply from the 2nd Tier.

#1781621

Im here

#1781755

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Our 2nd Tier has tried to reproduce the issue on a clean install to check if it is not a general compatibility bug, but the issue was not reproduced. It only happens on your website, so, we're still investigating why.
We'll get back to you as soon as we find something.

#1793859

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello and our apologies for the late reply. We finally find out the origin of this issue.

The site has defined a custom post type with slug "provider", and the plugin for events ticket management is adding a "provider" input to the form which is submitted when adding one ticket to the cart. As a result, submitting that form POSTs to the cart page but with a "provider" query argument, which then forces a WordPress query looking for a "provider" which does not exist, hence resulting in a 404 error.

We would suggest two possible solutions:
- Either rename your custom post type to something else than "provider".
- Or contact the plugin authors over https://wordpress.org/support/plugin/event-tickets/ and ask them to prefix that field to avoid clashes with custom post types named as "provider" (I would also request the same for attendee as this other key is also POSTed by the form).

There is nothing for us to do here as we can not guess what parameters will be POSTed by third party plugins and we will not forbid using random words as post type slugs.

I hope this helps. Let us know if you have any questions.

#1798467

My issue is resolved now. Thank you!