Keyword

Duplicate pages

  • Jordan Ramstad
  • Jordan Ramstad's Avatar Topic Author
  • Offline
  • New Member
More
11 years 4 months ago #113491 by Jordan Ramstad
Duplicate pages was created by Jordan Ramstad
First of all I would like to point out that I love k2, it is handy to make more advanced sites with joomla.

However lately my office has noticed either a serious flaw. Pages will get duplicate url's witch cripples any SEO benefit k2 might give.

I have made a stack overflow question at stackoverflow.com/questions/16593121/joomla-k2-seo-consistency going into some detail.

Even if it is a tag view, witch is our way to get around the fact that you cannot use multiple categories on one item. You run into the problem that each tag takes the page under its menu structure. We have looked into some SEF solutions but short of adding template overrides on all links there does not seem to be a simple solution.

We develop through a local server, so it is hard for me to show examples. The easiest way to replicate the issue is to create 2 tags and 2 menu items that list the tag view. Then add one k2 item that will have both tags. In both tag views the page will go to the-tag/item and the-tag2/item witch is a duplicate page for one item.

This problem also appears in category views but is less apparent. Normally if you have the category set to use only one category any items that are under a different category should 404 if you navigate to the page forcibly. However it does not. Here is an example of how to replicate it.

Create 2 categories and 1 k2 item for each category. This is the general structure:
Category 1
Item 1
Category 2
Item 2

If you make a menu item to reference each category you can navigate to the item like so:
category-1/item-1
However the problem lies in that the following link will work:
category-1/item-2

The reason I wanted to bring this up is I find myself rewriting k2 far to often. It is a great plugin but there is a lack of documentation for such a feature rich plugin. Under the documentation tab here there is a few video tutorials some simple articles. Nothing diving into the functionality to give developers a starting point.

Most of the time if I need to lets say pull items into a dynamic list, I use a file separate from Joomla to manually query the database, creating a plugin usually takes too much time and I would not even know where to begin to find out how to comunicate with the k2 plugin.

Our company has been working with k2 for a number of projects now and I feel the it has a lot of potencial. I will try to get into more detail of the problems we found. It could be a major bug, or just something we are missing a key factor in that might be good to have in some type of documentation.

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #113492 by Peter Grube
Replied by Peter Grube on topic Re: Duplicate pages
Hi Jordan,

I remember reading on sh404sef forum that the duplicates are caused, by some of K2s Module, are you using any, plus this link may help.

Please Log in or Create an account to join the conversation.

  • Jordan Ramstad
  • Jordan Ramstad's Avatar Topic Author
  • Offline
  • New Member
More
11 years 4 months ago #113493 by Jordan Ramstad
Replied by Jordan Ramstad on topic Re: Duplicate pages
It is not a problem caused by the rewriting of the url's it is caused by how k2 apparently builds the default links. They should be consistent and not based off of the menu item you are in. If i am understanding the structure anyway.

We typically only use k2, most of the plugins for it don't quite suit our needs. So these problems are all from base k2.

As for sh404sef, we have been trying to use it. However without using it in a fresh install we run into problems with the default link paths and our "fixes" need to be rewritten to suit its forced url structure. Although we have not extensively tested it with the bugs I have described it is reasonable to assume based on how it works that it does nothing to help remedy the duplicated pages.

I don't mean anything bad about sh404sef, it has a lot of useful features but unless it is used from the beginning of development of a Joomla site it can lead to confusion.

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #113494 by Peter Grube
Replied by Peter Grube on topic Re: Duplicate pages
Hi Jordan,

Sorry I couldn't explain myself better in original post but iy was a bit late here, I am not advocating sh404sef, I have in fact stopped using it, but when I was, that was the reason they gave why K2 creates duplicates, also I posted an incorrect link, this is what I meant to post

NEW LINK

You might have read it already, I do have a question, I presume you use Google Webmaster Tools, when I was getting duplicates, I was expecting to see about in Google Webmaster Tools, but I never seen any warnings. Could you tell me where you found out about the duplicates ?.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 4 months ago #113495 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Duplicate pages
Hello to all,

Sh404 like many other SEO/SEF extensions use a forced 301 redirect to a specific url.
All the duplicate urls are from the Joomla! router.

You currently have two options. Either map all your content into menus and/or use K2's advanced SEF features and use a K2 plugin to generate the canonical tag which will resolve all the duplicate content issues.

Or you can use an extension like the aforementioned which will always redirect you to a specific path.

Google loves both ways, the canonical link and the 301 redirect.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Jordan Ramstad
  • Jordan Ramstad's Avatar Topic Author
  • Offline
  • New Member
More
11 years 4 months ago #113496 by Jordan Ramstad
Replied by Jordan Ramstad on topic Re: Duplicate pages
I have a feeling that I might of explained it incorrectly.

We have only tried sh404sef to try to fix the problem. The problem is not caused by how url's are handled in general but how they are rendered in the templates of k2.

so in the template in lets say tag.php links are created like this
<?php echo $item->link; ?>

However if it is the same item it can create an infinite amount if different links depending on what the tag is.

if the tag is 'k2' the link will be k2/item1
if the tag is 'sh404sef' the link will be sh404sef/item1

I feel there should never be a place that a CMS has multiple url's for one content page. The links I would usually have to force to be like so:
component/k2/item1

This however can create problems later on. But so far I have noticed i have had to do this on pretty much every site we have used k2.

This means that in every template I have to change where <?php echo $item->link; ?> is to <?php echo JURI::base()'/component/k2/'.$item->alias; ?>
(I may not have made that proper, but it is close enough to show my point)

I will look into plugins, but a plugin to fix something seems like an incorrect use of a plugin, it should be to add features. also 301 redirects would work, however you would need to add over 300 in some of our sites, and make sure to add another every time you update.

Thank you for your replies, I how what I have added here may clear up any confusion.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 4 months ago #113497 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Duplicate pages
301 are provided automatically from the plugin.

As for the permalinks all Joomla! components works that way, Joomla! renders it's urls depending on the menu item.

You can try the same with com_content. This how the Joomla! router works.
You should not try to force these urls (also the are not SEO friendly) and instead use the SEO extension and map ALL you content in menus. That way it would be impossible to have duplicate content.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Jordan Ramstad
  • Jordan Ramstad's Avatar Topic Author
  • Offline
  • New Member
More
11 years 4 months ago #113498 by Jordan Ramstad
Replied by Jordan Ramstad on topic Re: Duplicate pages
So if my understanding is correct. It is a problem with Joomla's normal router?

So that seems to bring me back to square one, either use a "bug fix" plugin or just fix it myself. 301 redirects and canonical links are not really an option. I will however take a look at some of them and what they do before I make a final call on it.

If I manage to get a good way to fix this without interfering with base k2, i will try to package it in a plugin, That way everyone else experiencing this problem can have a way to resolve it.

I would say on the k2 side of things is to remake the tag view menu item type. Since multiple tags are used on one item, everything within tag view must direct the user to a specific page for the item and not be under the structure of tags.

If a menu item is set for category views it can use that as well, but an item not living under that category cannot be seen from that category.

I will check out Joomla 3.0 to see if the router works better with k2. Though it is still some ways off from being stable enough to be used on major projects.

The problem with mapping all content is the site(s) in question have over 15 thousand items. So you can see that if google see's those 15 thousand items having 20 duplicate pages....... goodbye page ranking. This site is a sports history database, so its page rank is vital.

If we use some sort of extension to automatically create menu's then we bloat the database far more then necessary. Leading to page speed issues.

Thank you for your helpful comments.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 4 months ago #113499 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Duplicate pages
Jordan, I don't think your approach is quite correct. Maybe I am to blame a bit for this. The 301 redirects are not done with your .htaccess files.

With a similar extension or sh404 you can have a normal domain/tag/tag-name url for all your tags and a unique url for your items. My personal opinion is that developing a plugin on your own for this functionality will cost you a lot more in time and effort.

I will however take a look at some of them and what they do before I make a final call on it.


The best approach is this actually, experiment on a dev site and I m sure you 'll figure out the best approach.

Regards.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Jordan Ramstad
  • Jordan Ramstad's Avatar Topic Author
  • Offline
  • New Member
More
11 years 4 months ago #113500 by Jordan Ramstad
Replied by Jordan Ramstad on topic Re: Duplicate pages
I guess the main thing is it would take me 5 minutes to fix it myself and hours of effort to work with a plugin. Making a plugin is only something to do over time, I work at a web design studio so having something made like that can prove useful.

We have to launch the site monday, so we have voted to not be picky about it yet and just leave it as is. We will make a revision to fix it later.

I do know the 301's will not be through the htaccess, but to reference them all through standard Joomla it is 1 database row per item. for 15 thousand items with 20 different url's that is 285 thousand database rows (300 thousand if it has a new url that is not referenced by one of them)

Even one that automatically does it would have extra queries to find out if it is improper, witch in the case of a large site like this will cause overhead. Eventually leading to scaling problems (having to upgrade hardware before it is normally needed). Although this option is much more useful (my argument could be over thinking), it is still one I would like to avoid if possible.

as for sh404, it seems to have problems if it is not done on a fresh install, as it depends on default functionality and we end up "trimming the fat" in every site we do. What I mean by that is that we never have had a use for k2's default layouts and always have to change them to using twitter bootstrap (we do responsive web design). This leads to sometimes confusing Joomla from what we have noticed.

Most plugins we end up buying, then never using as they say they do what we need, but after extensive testing we end up making something ourselves. One of the inconveniences to Joomla that no one but us can be blamed for, we are picky. K2 is actually the only plugin that allows us to still be picky, as it is made as a base to be changed to suit the needs of the user (though the lack of documentation has always been a problem).

Another problem with plugins is forcing more Javascript, almost every plugin that loads something in the frontend seems to add jQuery, in most cases with no option to turn it off, witch overrides our latest version of jQuery we use and even deleting jQuery UI. K2 gives an option to turn it off, witch is something most other plugins lack. If a plugin adds jQuery without an option to disable it, it is always a plugin that we can never use.

You don't need to test plugins for us, we can probably find a way around this at some point.

I am starting to go into a little to much detail, sorry for the long read.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum