• Home
  • Get help
  • Ask a question
Last post 2 min ago
Posts last week 94
Average response time last week 34 min
All time posts 67896
All time tickets 10495
All time avg. posts per day 20

Helpdesk is open from Monday through Friday CET

Please create an (free) account to post any question in the support area.
Please check the development versions area. Look at the changelog, maybe your specific problem has been resolved already!
All tickets are private and they cannot be viewed by anyone. We have made public only a few tickets that we found helpful, after removing private information from them.

#2474 – sh404 generates bad URLs

Posted in ‘sh404SEF’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Thursday, 07 July 2016 16:53 UTC
dagroupinc
 When we create a new article in Joomla, sh404sef generates a bad sef URL. We then have to go into sh404 and fix it each time we create a new article.

Any thoughts?
Thursday, 07 July 2016 16:56 UTC
wb_weeblr
Hi

Any thoughts?
No, there isn't enough information for that.

At the very least:

1 - Which extension is this URL for?
2 - Provide one, just one, example of such URL, including: the full SEF URL and the full non-SEF URL as listed in the URL manager.

Rgds

 
Friday, 08 July 2016 20:42 UTC
dagroupinc
The issue was created in sh404sef and resolved under SEF URLs:

The Joomla article that was created:
http://www.xxxx.com/news-events/lake-michigan-sailboat-show.html

The default URL that sh404sef generated when the article was inititally created:
index.php?option=com_content&Itemid=301&catid=188&id=417&lang=en&view=article

The 'duplicate' URL that I had to manually redirect to, and which works:
index.php?option=com_content&Itemid=64&catid=38&id=417&lang=en&view=article

This seems to be happening a lot, that is having to change the default SEF URL after a new Joomla article has been created.

The only thing I can think of is we're also using K2 and Filter for K2 on another area of the site and we were told to turn off the plugin sh404SEF - K2 for things to work properly.

See attached screenshots.
Monday, 11 July 2016 10:06 UTC
wb_weeblr
Hi

There seem to be a bit of confusion here:
The default URL that sh404sef generated when the article was inititally created:

index.php?option=com_content&Itemid=301&catid=188&id=417&lang=en&view=article
Euh no. That is the URL generated BY JOOMLA. This is an "internal" URL, created by Joomla, or by an extension on your site, the type of URL Joomla uses. Before displaying, that non-sef URL is passed to sh404SEF to be transformed into a SEF URL, such as /news-events/lake-michigan-sailboat-show.html

One problem in Joomla, as you just experienced, is that it can create multiple (many) different URLs for the same content. In your example, it created at least 2:

index.php?option=com_content&Itemid=301&catid=188&id=417&lang=en&view=article
and
index.php?option=com_content&Itemid=64&catid=38&id=417&lang=en&view=article

The main difference between those 2 URLs is the Itemid: the first one has an Itemid = 101, the second is Itemid = 64.
The Itemid is the menu item identifier in Joomla, this is what decides on the template being used, the modules being displayed. 101 is the Itemid of the home page.

This an example of the "duplicate" content issue in Joomla: it created 2 links to the same content, one in the "display" content of the home page, and one in the display content of this other menu item you probably created specifically to show your articles.

sh404SEF consolidate all different URLs (non-sef) created by Joomla under one single SEF URL (/news-events/lake-michigan-sailboat-show.html), so that search engines and visitors always use one single URL to reach the same content.
But we have no way to know which one is the "good" one, the one you want, so we just use the first one. In your case, that's the Itemid=101 version, and so the article is displayed in the context of the home page, which is probably why you say "it's wrong".

The 'duplicate' URL that I had to manually redirect to
Not sure you actually mean "redirect". What needs to be done to change that is open the list of Duplicates URLs, and select the one you want as the "Main" URL. is this what you are doing?

On a more general stand, you may want to find why those incorrect non-sef URLs are created. Maybe you have a module displaying links to the "most recent articles" or such? or you are using a preview feature?

The only thing I can think of is we're also using K2 and Filter for K2 on another area of the site and we were told to turn off the plugin sh404SEF - K2 for things to work properly.

The example you gave above are for com_content, Joomla regular articles, so I don't see what K2 has to do with them. Note however that the same issue of JOomla generated duplicate non-sef may happen with any extension as well.

As to whether the K2 plugin for sh404SEF should be disabled:

- who told you that?
- the plugin itself is provided by K2 themselves, I don't see why they would recommend to disable it. I would suggest to contact them directly about that.

But again, we were talking about com_content here, not K2.

Rgds
 
Monday, 11 July 2016 16:11 UTC
dagroupinc
Thank you for the detailed explanation. I do understand how Joomla creates non-sef URLs and that it can create multiples of that. I am not using the correct terms as you have pointed out.

To answer your other questions:

---------
Not sure you actually mean "redirect". What needs to be done to change that is open the list of Duplicates URLs, and select the one you want as the "Main" URL. is this what you are doing?

—Yes, that's what I mean. After the article is created I have to go into sh404sef and select the correct non-sef URL as the 'main' URL as the wrong one is always chosen. I don't recall having to go in and do this in the past. It 'might' only be happing with the news articles which posts the article to the news category on the website but also displays the title of the article on the home page.
—Yes we have the Regular Labs Extension manager running 'Better Preview'. I believe that was a recent addition.
—I'll look around and see if a setting was changed here.

---------
Yes that was what I was saying—that K2 itself shouldn't be influencing this problem. However what I was saying is that the developer of "Filter for K2" has told us to turn off the "K2 plugin for sh404sef" because it creates a conflict with "sh404sef" and "Filter for K2" when enabled at the same time. So my question for you is, with the "K2 plugin for sh404sef" disabled, could this be creating the above issue?
Tuesday, 12 July 2016 07:45 UTC
wb_weeblr
Hi

—I'll look around and see if a setting was changed here.
Better preview might be doing it. There is no setting in sh404SEF that can have an effect on this.
When a non-sef URL is passed to sh404SEF, we check if we've seen it before. IF new, we create the SEF, store the non-sef along, and this becomes the "main" non-sef.
If the URL has been seen before, then we store the non-sef as a duplicate.

If you see more of this now, it's because for some reason non-sef with the home page Itemid are created first, before the "right ones".

"Filter for K2" has told us to turn off the "K2 plugin for sh404sef" because it creates a conflict with "sh404sef" and "Filter for K2" when enabled at the same time


1 - I have no idea what "Filter for K2" is, never heard of it, and have no opinion on it. That it asks to entirely disable the K2-developed plugin for sh404SEF doesn't sound very good though. How can he not work with that??
2 - Whatever happens in K2 plugin cannot have any influence on com_content URLs.

Rgds
 
Wednesday, 27 July 2016 05:34 UTC
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.