• Home
  • Get help
  • Ask a question
Last post 1 hour 28 min ago
Posts last week 110
Average response time last week 29 min
All time posts 67418
All time tickets 10424
All time avg. posts per day 21

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.

#6802 – article tittle [id] | subcategory | category

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.
Tuesday, 03 December 2019 12:16 UTC
AGuerrero
 I have a joomla site where the <title> tag format in every article is like this:
<title>title of the article</title>

For example:
https://www.test.xxxx.com/es/masters-postgrados-medio-ambiente/master-gestion-medio-ambiente-imf-2019-17818

But i don't know why we have a category where the format is:
<title>article tittle [id] | subcategory | category </title>

For example:
https://www.test.xxxx.com/es/empresas-medio-ambiente/am-formacion-empresarial-16210

If I set "Enable URL optimization" to "NO" the problem disappears.

Any idea?
Tuesday, 03 December 2019 16:37 UTC
wb_weeblr
Hi

If I set "Enable URL optimization" to "NO" the problem disappears.
If you do that, sh404SEF is disabled and it's like it's not installed on your site so it does not have any effect on titles or URLs.

The first question is: are those Joomla article? or coming from another extension, K2, Zoo, FlexiContent, etc?

Then, if we are talking about Joomla regular article:

I have a joomla site where the <title> tag format in every article is like this:
That's not a title sh404SEF would produce by default. By default, it should be something like:

Article title | Sub-category title | Category title


There are settings under Extensions -> Joomla, under the SEO section at the bottom of that configuration tab, to change the title layout:



So you may have changed them to achieve the above result.

This:
<title>article tittle [id] | subcategory | category </title>


would look more like what sh404SEF would do by default.

Settings are global however so they won't change from one category to another.

Best regards
 
Thursday, 05 December 2019 15:43 UTC
AGuerrero
Thanks for answering.

The first question is: are those Joomla article? or coming from another extension, K2, Zoo, FlexiContent, etc?

We use joomla core articles and no other SEO extension.


There are settings under Extensions -> Joomla, under the SEO section at the bottom of that configuration tab, to change the title layout:

The results are not as expected.

First of all I have discovered why only happens in some categories:

If you go to the Joomla Menu Item Type"category blog" and you fill the option "Page Display > Browser Page Title" the SEO settings of SH404SEF for Joomla Articles have no effect.
This is strange, because "Browser Page Title" is a Joomla option for the Joomla Categories, not for the Joomla Articles. So, the SEO settings of SH404SEF for Joomla Articles should work.

After that, if you leave blank this option (so SEO settings of SH404SEF for Joomla Articles works) the result I get is with the [id] in tittle:
Article title [id] | Sub-category title | Category title


I have tested this in two websites with the same result.
Thursday, 05 December 2019 16:31 UTC
wb_weeblr
Hi

This is strange, because "Browser Page Title" is a Joomla option for the Joomla Categories, not for the Joomla Articles.
This is totally expected and exactly how Joomla works. You do not set a title "for Joomla categories". You set a title for a menu item. Now if your articles are displayed using the same joomla menu item, then Joomla uses that title for any item displayed with that same menu item. In your case, any article from that category will get this title - unless somewhere you link that article directly from another menu item.
If you do that, then the "Browser page title" from the article menu item will have priority. If you don't, and the category the article belongs to is linked through a menu item (as in your case) then that menu item (and browser title) will have priority.

So, the SEO settings of SH404SEF for Joomla Articles should work.
We only create a title automatically IF none exists. If Joomla figures out that you have manually set up a "Browser title" for the current menu item (whether an article, a category or anything else), then it will set the title. If a title is set for the current page, we do not automatically compute any but respect the manually set one.
The only way in this case to force a title is to set a title for that particular URL inside of sh404SEF. That will override any title set otherwise.

After that, if you leave blank this option (so SEO settings of SH404SEF for Joomla Articles works) the result I get is with the [id] in tittle:
Which is then happening because I think you have enabled ids in URLs ( ie "/es/masters-postgrados-medio-ambiente/master-gestion-medio-ambiente-imf-2019-17818"). When that happens we basically use the same format for the title and the URL. Is this correct?

Best regards
 
Friday, 06 December 2019 16:42 UTC
AGuerrero
You do not set a title "for Joomla categories". You set a title for a menu item. Now if your articles are displayed using the same joomla menu item, then Joomla uses that title for any item displayed with that same menu item. In your case, any article from that category will get this title - unless somewhere you link that article directly from another menu item.


That is absolutely false. "Browser Page Title" is an option to change only the title of that menu item. In my case a "Category Blog View". Nothing changes in the title (<title>) of the Joomla Articles if you fill in that option or if you leave it blank.

Which is then happening because I think you have enabled ids in URLs ( ie "/es/masters-postgrados-medio-ambiente/master-gestion-medio-ambiente-imf-2019-17818"). When that happens we basically use the same format for the title and the URL.


Regarding the fact that sh404sef inserts [id] in the title of my articles, it is not expected at all. Nowhere have I seen this notice. I chose "insert id of articles in the url" (very useful for sites with thousands of articles), but another very different is that it affects the titles of the articles are modified.

So sh404sef has two unexpected behaviors from the user's point of view:
(Attention, from the point of view of the programmer, obviously the result is as expected, since this is how the program works, but that does not imply that it is correct).

1. If you activate the "Browers Page Title" menu item option, sh404sef SEO options stops acting, not only on that menu item (expected), but also on all the articles in that category.

2. If you activate the "insert ID in the URL" option, sh404SEF will also insert the ID in the article titles (<title>)

This is especially annoying, since the ID will appear in Google search results.

How can I do so that sh404SEF does not modify the titles of the articles by inserting the ID, while still having the ID in the URLs?





Friday, 06 December 2019 17:27 UTC
wb_weeblr
Hi

That is absolutely false. "Browser Page Title" is an option to change only the title of that menu item. In my case a "Category Blog View". Nothing changes in the title (<title>) of the Joomla Articles if you fill in that option or if you leave it blank.
Sorry, that's correct, I spoke too fast.

1. If you activate the "Browers Page Title" menu item option, sh404sef SEO options stops acting, not only on that menu item (expected), but also on all the articles in that category
This looks like a never reported bug. But I can reproduce it on a fresh Joomla install so I can look into it and figure out exactly what happens here.

2. If you activate the "insert ID in the URL" option, sh404SEF will also insert the ID in the article titles (<title>)



This is especially annoying, since the ID will appear in Google search results.


The rationale is rather simple: having ids in URL is usually not very good (because it can cause nigthmare when doing Joomla versions migrations). But it can be useful in some circumstances, as you pointed out, if you run into a chance that 2 articles may have the same alias. This cannot really happen as Joomla would prevent you from doing that unless you create those 2 articles in 2 different categories but configured sh404SEF to NOT include categories in URLs. Of course, it can be also useful so that you can retrieve articles by searching by id but then you can also search by title.
The point is that if 2 URLs must be different, you also do not want the title to be the same. You need to differentiate them and the only way to do that is with their id.
What's your requirement? do you search by ID? is this why you want to have ids in URLs?

How can I do so that sh404SEF does not modify the titles of the articles by inserting the ID, while still having the ID in the URLs?
You cannot at this stage. I have taken good note of your feature request and I will look at adding it in a future release. Most likely this will not be through the UI but instead through a filter, ie a couple of lines of code to customize the title as you see fit.

Best regards
 
Friday, 06 December 2019 20:56 UTC
AGuerrero
Thanks for anwering.

The rationale is rather simple: having ids in URL is usually not very good (because it can cause nigthmare when doing Joomla versions migrations)


I am sorry to say that this is not true. Maybe in the past, I don't know, but today it isn't. Simply keep the ID of the articles in the migration and that's it.
I have migrated sites from joomla 1.5 to joomla 3 with more than 10,000 articles and the id in the url without problem.

The point is that if 2 URLs must be different, you also do not want the title to be the same.


The URL and the title are very different things and to assume that they should go "together" is very exaggerated. Great newspapers in the world work like this:
Newspapers with id in the URL, for technical reasons, but obviously not in the <tittle> for SEO reasons:
https://www.wsj.com/articles/schiff-impeaches-biden-11575591017
https://elpais.com/sociedad/2019/12/06/actualidad/1575630273_996971.html

What's your requirement? do you search by ID? is this why you want to have ids in URLs?


No. We dont search by ID. We started using IDs in URLs 15 years ago, among other reasons because Google News required it to index us when they started working. The problem is that now removing the ID from the URLs would mean changing the url of thousands of articles and it would be a serious SEO problem.
I wish we could remove the ID from the URLs of the articles without affecting SEO.

You cannot at this stage. I have taken good note of your feature request and I will look at adding it in a future release. Most likely this will not be through the UI but instead through a filter, ie a couple of lines of code to customize the title as you see fit.

I thank you very much, and we will be aware of upcoming changes, but in summary: Please do not add the ID to <title> automatically! Thank you very much and greetings from spain.



Monday, 09 December 2019 10:38 UTC
wb_weeblr
Hi

I am sorry to say that this is not true. Maybe in the past, I don't know, but today it isn't. Simply keep the ID of the articles in the migration and that's it.

I have migrated sites from joomla 1.5 to joomla 3 with more than 10,000 articles and the id in the url without problem.
This is totally true. You're only talking of a very small subset of possible migrations. Should one day Joomla universal content system (UCM) be generalized or com_content be reworked, you'll see what I mean.

The URL and the title are very different things and to assume that they should go "together" is very exaggerated
Not what I said. I said that two different page, with 2 different URLs, must have 2 different titles. If that title is to be determined automatically, as is th case here, I see not other option than including the id.

among other reasons because Google News required it to index us when they started working.
At this time, the item id was not valid for Google News (it was too small). sh404SEF had a Google News-compatible id system:



You can still use is, it's still there for backward-compatibility reasons.

The problem is that now removing the ID from the URLs would mean changing the url of thousands of articles and it would be a serious SEO problem.

I wish we could remove the ID from the URLs of the articles without affecting SEO.
Better not change indeed. The "right" way would probably be to keep them both but insert a canonical from the id-version to the non-id-version. Minimal benefit and risks associated with possible errors in the process makes it a non-starter for me.

I thank you very much, and we will be aware of upcoming changes, but in summary: Please do not add the ID to <title> automatically! Thank you very much and greetings from spain.
The default behavior will not change (sh404SEF is backward compatible to its mambo version, I don't change things at all, usually). However you'll be able to customize the automatically generated title as you see fit, as I said, with a few lines of code. Something like that:

ShlHook::add(
	'sh404sef_should_insert_article_id_in_title',
	function (
		$shouldInserArticleId,
		$use,
		$item) {

		$shouldInserArticleId = $item->id != 17;

		return $shouldInserArticleId;
	}
);


This is a "filter" and we have started adding many of them throughout sh404SEF, based on what we do for our WordPress plugin: it allows fine-grained customization in a very simple manner without cluttering the user interface and documentation with hundreds of settings - sh404SEF currently has more than 300 options.

Best regards

 
Monday, 09 December 2019 15:51 UTC
AGuerrero
Thank you very much
Monday, 09 December 2019 18:26 UTC
wb_weeblr
Hi

You're welcom! Closing this ticket now, feel free to open a new one as needed. If you do so, please mention this ticket number in the new one.

If you created any superadmin account for us, be sure to delete or block it now to avoid unnecessary risk in the future.

Be sure to also check out wbAMP, our Accelerated Mobiles pages plugin for Joomla - without AMP, you're missing out on mobile visitors!



Best regards

 
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.