0

I'm using Drupal 7 and Ubercart 3. Using pathauto I generate clean url's. However there are two paths to my catalog pages.

product_main_category/category

product_main_category/category-0

I think it has something to do with the fact that there is a catalog path and a taxonomy path, but i don't know why. My installation is very basic so i would assume a lot of people should have seen this problem before.

1

This problem arises because the Ubercart Catalog takes over the display of the taxonomy term pages for the Catalog vocabulary, as well as creating its own set of URL aliases for the Catalog terms.

I solved this problem quite simply, by disabling Ubercart's Catalog module and deleting all the aliases for the Catalog terms (as opposed to the Catalog taxonomy terms).

To achieve this, I had to:

  • create a new view that mimicked the the Catalog
  • ensure that the Catalog term pages used my new view. There are various ways to do this in Drupal including overriding the taxonomy default view, enabling a module like TVI, and Panels. I prefer Panels, so that's the route I took.
  • Optional - replace the Catalog block (which is useful as a sidebar menu for your Ubercart store). I did this using Taxonomy Menu and Menu Block.
  • Deleting all the aliases for the Catalog and Catalog Taxonomy, and bulk regenerating the Catalog Taxonomy aliases.

In the end, my site looked the same as it did before, but I no longer have the duplicate URL problem, and I'm no longer tied to the rather awkward Catalog module in Ubercart.

0

Pathauto will not create duplicate paths. If the patterm defined for your catalog page and for your taxonomy path are the same, pathauto will append a '-0' to prevent duplication. Whatever your patterns are, you will always have two url's for each page; one based on the pattern for the entity type, and one based on the taxonomy pattern.

  • yes that is what i said. Two different url's to one piece of content. Having two url's to one page is seen as duplicate content and not good for seo. – DD dev Mar 19 '13 at 7:54
  • Your question was about two paths, not SEO. If you are interested in SEO, I suggest you check out the many discussions on groups.drupal.org. In the meantime have a look at the Metatag module which will let you define a canonical url to avoid your multiple path worries. – Triskelion Mar 19 '13 at 12:09
  • Well yea I do have two paths and I only want one. – DD dev Mar 19 '13 at 12:16
  • You actually have three. You forgot about the un-aliased path. If you REALLY want only one path, de-activate pathauto. You will then be left with the un-aliased path, but the effect on your SEO will be negative. Otherwise set up the metatag module and define a canonical url so the search engine know how to index the page no matter what path they used to get there – Triskelion Mar 19 '13 at 12:26
  • I was thinking about doing it like this. I exclude the taxonomy vocab from the xml. Try to add the catalog paths to the xml. And block acces for users and searchengines to the taxonamy path by using robotx.txt and htaccess. Al i need now is a way to add the catalog paths to the xml – DD dev Mar 19 '13 at 13:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.