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: https://secondhand.aedgroup.com/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

 

You must be logged in to post in the forum