Developer forum

Forum » CMS - Standard features » Fix Duplicate URL Problem in Dynamic Web 10

Fix Duplicate URL Problem in Dynamic Web 10

Alex Guo
Reply

Hey everyone,

I'm encountering an issue with our Dynamic Web 10 site related to URL conflicts. Here’s what’s happening:

Problem Description:

  • I have a page named "textielen" that functions as a button in our navigation and includes a megamenu on hover.

  • Additionally, there is a Channel with a category also named "textielen".

  • When clicking the "textielen" button, the site navigates to "textielen-1" instead of "textielen".

  • This seems to be because the category is using the alias "textielen", and therefore DW10 automatically appends “-1” to avoid a URL conflict.

Additional Details:

  • The SEO URL field is greyed out in the interface, so I can't directly change it.

  • The redirect settings in the administration haven’t resolved the issue.

  • I’ve tried various configuration options for both the category and the page without success.

What I Need:

Does anyone have a solution or workaround to force the navigation button to use /textielen so that it loads the correct page with products? Any tips on resolving this conflict preferably without modifying templates would be greatly appreciated.

Thanks in advance!


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Alex

When you publish teh channel to the "Textielen" page, the root groups in that channel will become sub pages also in the URL structure.

And as you have figured out, URLs have to be unique, so no 2 navigational items can have the same URL. 

On the textielen page, SEO tab, you can change one of 2 things. Either change the name being used in the URL in the field "Use in URL" and add e.g. "textielen page" and then it would work.

Alternatively remove the "Do not use in sub page urls" checkbox - then you would have "/textielen" for the page and "/textielen/textielen" for the group under that page.

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I was just thinking about this scenario. Maybe one approach would be to use the Shortcut instead.
Create a page with the same name, add some fake value in the "use in url" on the page (just to avoid the creation of a duplicate url) and set the shortcut to point to the product category page.

Which made me realise that it would be helpful if the Shortcut of the page had a similar behavior to the new "Link" field type that you can find on the Items. Being able to select various link types without having to copy/paste the URL could be very useful. Not critical, but useful.

Thank you,

Adrian

 
Alex Guo
Reply

I've tried this approach but it didnt work.
The products and categories only display when the URL is "textielen/(category)/...".
When disabling "Do not include URL in subpage URLs" this happens:
The subpages url will be "textielen/textielen/(subcategory)/...

The button itself always goes to "textielen-1" because of the dubbel url. Changing Use in URL to "textielen" doesnt work, any other value does. same for exact URL for this page doesnt work.
Here I clicked on the textielen button when both set to textielen:

When enabling "Do not include URL in subpage URLs",
The categories do go to textielen but then the category itself gets a -1 behind it like here.

Using a shortcut will always set the button to go to the shortcut i set, but so do the subpages/categories.

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi

The -1 will only come if you have the same page twice.

Do you have 2 websites with the same structure? In that case they share hostname unless you use domain and primary domain options on website settings.

 
Alex Guo
Reply


No we only have one
Could it be that the -1 gets added at the end of the url, even behind the categories, because textielen is a double URL?
There should not be double category pages. Those names are only used in the Channel as group names.
The button goes to textielen-1.

-----------------------------------------------------------------------------------------------------------------------------------------------------

edit:

I'll explain our setup and show you whats happening using the profielen category as an example.

We have a Product Channel with 3 main categories, The same category names are used as buttons in our nav menu. This results in duplicate URLs.

 

To fix that, we set the Exact URL for the Profielen page to "/profielen-test" instead of the default "/profielen-1".

In the SEO tab, we then set the URL to "/profielen". This works correctlyclicking the Profielen button leads to the right page.

 

However, the issue now is that all subcategories in the mega menu are also redirecting to "/profielen", even when they should link to their own pages.
Here is a video of our setup and whats happening. https://drive.google.com/file/d/1YfPrB2Nh9vBpBYU2WGSn3DFCWcHmOORa/view?usp=sharing
Excuses for the video looking a bit dark. Thats because I forgot to turn of HDR.

 

You must be logged in to post in the forum