Developer forum

Forum » Ecommerce - Standard features » 404 - File or directory not found for a product page when added to a group (ecom category)

404 - File or directory not found for a product page when added to a group (ecom category)

Davy Capiau
Reply

Hi,

DW9

Issue:

When products are added to a specific category, they show in the product list view. When you click on the products and go to their product page the error: "404 - File or directory not found." returns.

Info:

When you move the product to another category, there is no issue. The product page functions as expected. The issue is category page related

It seems that when a product url is generated, the path to the product doesn't exist.

Product list page (works): [domain]/shop/special-effects/smoke-haze/stage-fan

Product detail page (doesn't work): [domain]/shop/product-detail-page/special-effects/smoke-haze/stage-fan/dmx-controllable-fan-jem-af-2-60-cm/


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Could be one of your groups /special-effects/smoke-haze/stage-fan/ that is not translated to the language you are in.

In settings for customized URLs you have some options related to - show 404 for products not in "Shop", Language and similar. Try to disable them one by one, and see if one of those settings are the reason - then you will also better understand what is wrong.

Also if you look at the respsonse headers of your 404 request in browser dev tools, there can be a header x-dw-404 or something like that - sometimes it will contain a reason.

 
Davy Capiau
Reply

Hi Nicolai,

 

- Tried disabling the customized url settings => no effect

- Group is only available in 1 language

- Headers don't give a clue: 

 

Might it be related with the url provider?

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

I think we need a URL to see if we can find the cause

 

 
Davy Capiau
Reply

Hi Nicolai,

 

Here you go:  (...)/shop/product-detail-page/special-effects/smoke-haze/stage-fan/mk-ii-remote-control-for-af1-and-af2/a-1

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Davy

What a setup! Below is my guess based on what I could find.

You have assortments - specifically a second hand assortment - with 30000 users? (Those users should be in one group and the group should be used for assortment)

Then you have a lot of single products in the assortment - but not the 2 in special-effects/smoke-haze/stage-fan/ group.

Your query does not check for assortments - so the products show up on the list.

When you go to product detail for the product, it will give you a 404 because the product is not in assortment.

 
Davy Capiau
Reply

Ni Nicolai,

It's a complex setup indeed, we took it recenlty over.

1) When you move the product to another category, there is no issue. So it all points to the group. When looking into the assortments, I can see it's based on products, not on groups. There is no group selection in the assortment used and these products are already selected

2) The query didn't use the assortment context. Adding it to the used query, didn't result in the products without 404. (Also reindexed just to be sure)

 

Ps:Thanks for the user tip, wasn't aware!

 
Davy Capiau
Reply

Hi Nicolai,

Any other ideas I might pursuit?

Kr

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Davy

This has taken us hours to look at.... I have found out that if I rename the group from "Stage fan" to anything else - it works.

First i created a new group called "Stage fan 2" - that did not work. I renamed it to "St@ge fan" and that made it work.

Then I tried "St@age fan" and "Sta@ge fan" which do not work - which led to to conclude that it was a URL issue. So if you have "stage-fan" in the URL it is a problem. So I have renamed the URL to /stagefan - with no dash, and now it works.

So question is - why is that? Maybe some kind of custom thing somewhere?

 

Votes for this answer: 1
 
Davy Capiau
Reply

Hi Nicolai,

Many thanks! I can confirm there's a lot of custom work implemented but there is no overview document. If I find the cause, I'll update this thread!

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

We talked about this - it can also be that you have 2 routes - that would be group paths - that goes to the same group - it is the group path that is the problem - the last node "Stage fan" - so there might be a ghost record in the database or a product in parent group named "Stage fan". So might not be custom code, but a data issue.

 

You must be logged in to post in the forum