Developer forum

Forum » Feature requests » Improving "Ensure unique paths for each area"

Improving "Ensure unique paths for each area"

Keld Gøtterup
Reply

The checkbox "Ensure unique paths for each area" is described as only being functional if you have unique domains on your sites.

This is problematic when we usually don't have domains on every single site or language layer. We are however interrested in having similar structures on the different sites.

A typical path could be /DK/ProductPage/Groupname/ProductName
It would appear this way if you only have one site or if there are unique domains on the site and the checkbox is checked.

If you do not have unique domains it will set -1 after a page/group/product if that also occurs on another site.
The path would then be /UK/ProductPage-1/Groupname-1/ProductName-1
and we would rather have /UK/ProductPage/Groupname/ProductName

This will result in problems when trying to link to the same product on different language layer or with getting proper naming conventions that would benefit SEO

It would be nice to have the possibility to be able to use the "Ensure unique paths for each area" without having unique domains. It should be possible to make a unique path with "Include language layer" or "Use ISO code from regional settings (i.e. en-GB)" and it can be set but it doesn't work, as warning states.

unique_path.png

Replies

 
Nicolai Pedersen
Reply

Hi Keld

You can select this at all times. We just cannot guarentee that it works for all URLs without a unique domain.

Consider these websites

  • Master (DA)
    • English (EN)
    • German (DE)
  • Other website (DA)

And all websites share domain and all have a page called Home.

It would generate 2 URLs called /da/home because 2 website shares regional info.

If you changed the "Other website" to (SE), the checkbox does not have an affect on the URLs - they would all be unique dispite the setting...

Hope this cklarifies.

BR Nicolai

 
Keld Gøtterup
Reply

We currently have an example where i can't get this working.
 

http://dwtest.ditnyewebsite.dk/standard
http://dwtest.ditnyewebsite.dk/DomainSite

These use the "Include language layer" 
When activating "Ensure unique paths for each area" the last site just gives a 404 no matter how i try to access it.
 

 
Nicolai Pedersen
Reply

Hi Keld

Both URLs work for me...

BR Nicolai

 
Keld Gøtterup
Reply

"Ensure unique paths for each area"  was not activated before.
it is activated now, and you should be getting the 404

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Keld

Looked more into this.

When you set the checkbox "Ensure unique paths for each area", Dynamicweb creates an index for each website in the solution.

Now, when a URL hits the system, it needs to find out which index to use. So it resolves the hostname "dwtest.ditnyewebsite.dk" to the first area/website in the systems where the URL match. In this configuration, both matches, so it returns the first one.

Based on that lookup, an index is returned and that is used for looking up the page to display based on the value in path (/standard). But since /DomainSite is in second area whos index is not the one found, you get a 404.

You would probably advocate, that if we do not find anything in first index, look in the second index and so forth. But that would be the same as not setting the checkbox.

  • But why do you need this setting set when you have included language name in the URL?
  • If you do not include language name, then you have 2 pages called /produktside in 2 different url indexes, making it impossible to ever lookup page number 2

So, if you do not set the "Ensure unique paths for each area" and have only one domain and you include the site name, you would get these 2 urls:

  • http://dwtest.ditnyewebsite.dk/da/produktside
  • http://dwtest.ditnyewebsite.dk/en/produktside

And that is what you want, right?

URLs have to be unique to be resolved....

The rest of the URL, which is the ecommerce information, http://dwtest.ditnyewebsite.dk/en/produktside/group/product are not affected by that checkbox anyways - so if you have 2 groups called the same name in the same level, no matter which checkboxes you set, Dynamicweb with the current implementation, would add -1 to one of them.

All of Ecommerce currently runs on 1 index per language.

This is what you request on the same domain:

  • /DK/ProductPage/Groupname/ProductName
  • /UK/ProductPage/Groupname/ProductName

That is only possible if you do not set "Ensure unique for each area", includes the regional information, and have the GroupName onoly once in each language and the Productname only once in each language.

But if you create this structure in you catalog:

  • shop1
    • Groupname
      • Productname (SKU: X1)
    • Groupname
      • Productname (SKU: X2)
    • OtherGroupname
      • Productname (SKU: X3)

Dynamicweb cannot handle this without making products unique on the name. And that is because it is many to many relations. The product with SKU X3 could also be added to one of the other groups, and to support that, it is needed to give products with the same name 2 different names in the URLs.

Dynamicweb 9 has a new URL system underneath that is ready to solve some of this (having 2 different products with the same name in 2 different categories).

BR Nicolai

Votes for this answer: 1