?
avatar chemik147
chemik147
19 Jul 2016

Steps to reproduce the issue

On fresh install of Joomla 3.6.0 create category "News", then create "Sport" subcategory within it and add an article to "Sport" subcategory. Create menu item of "List all categories" type pointed to "News" category. Then at frontend navigate to "Sport" subcategory through menu.

Expected result

Page title (title html tag) should be "Sport".

Actual result

Page title is "News" - same as menu title.

System information (as much as possible)

Joomla 3.6.0

Additional comments

avatar chemik147 chemik147 - open - 19 Jul 2016
avatar chemik147 chemik147 - change - 19 Jul 2016
The description was changed
avatar chemik147 chemik147 - change - 19 Jul 2016
The description was changed
avatar chemik147 chemik147 - change - 19 Jul 2016
The description was changed
avatar chemik147 chemik147 - change - 19 Jul 2016
The description was changed
avatar andrepereiradasilva
andrepereiradasilva - comment - 19 Jul 2016

confirmed, but i think it also worked like that in 3.5.x

And actually you get the menu title, not the category title

avatar chemik147
chemik147 - comment - 20 Jul 2016

Correct, description was updated.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11199.

avatar chemik147 chemik147 - change - 20 Jul 2016
The description was changed
avatar chemik147 chemik147 - change - 20 Jul 2016
The description was changed
avatar mbabker
mbabker - comment - 20 Jul 2016

This is expected behavior, even if not friendly. The subcategory is still using the parent category's menu item and as such it has pulled in and uses that configuration (same goes for category -> article relationships, the <h1> title on https://www.joomla.org/announcements/release-news/5664-joomla-3-6-is-here.html comes from the menu item which is a category view).

avatar andrepereiradasilva
andrepereiradasilva - comment - 20 Jul 2016

if expected behavior IMHO is not good behaviour, because if you then enter in the article inside the subcategory the title is the title of the article, not of the menu item. So it seems not logic to me.

so let's see it, how it currently works:

  • /menu-item - menu item title
  • /menu-item/xx-subcategory - menu item title
  • /menu-item/xx-subcategory/xx-article - article title

So, IMHO it should work like this:

  • /menu-item - menu item title
  • /menu-item/xx-subcategory - subcategory title
  • /menu-item/xx-subcategory/xx-article - article title
avatar mbabker
mbabker - comment - 20 Jul 2016

Agree but we've created a system where the menu item seems to win on all settings so good luck changing that paradigm. Not to mention there's this really messy crap with JViewCategory.

avatar ggppdk
ggppdk - comment - 20 Jul 2016

@mbabker

We could check menu query variables to decide
if active menu item is a direct match of current view

  • if not then calculate a custom page title and possible other too

(i am using something like the following in all my custom views)

$menu_is_view_direct_match = ... check active menu item query variables

if ($menu_is_view_direct_match)
{
   // Use menu title for page title
}
else 
{
   // Calculate custom page title e.g. use sub-category title
}
avatar mbabker
mbabker - comment - 20 Jul 2016

It's still a behavior change that has to be introduced very carefully. People notice SEO stuff long before anything else, and changing page titles changes SEO stuff ?

avatar ggppdk
ggppdk - comment - 20 Jul 2016

@mbabker
yes

  • indeed it is behavour change (but towards a desired thing, since current behaviour)
  • and it will effect SEO

but if done well it will be better SEO, and people will not complain,
instead will be happier / like it,

there is a little risk to it not being done right on 1st try, since amount of code is rather small too
and testable (visit all possible combinations of Active Menu item - view)

maybe good for J3.7 ?
(Just personally i don't have time for new PRs now, if this gets label J3.7.0 i could do later, or some else would want to do it, i already want to contribute some nice JS related PRs like AJAX submit for all forms, and i don't know when i will have time again for them)

avatar chemik147
chemik147 - comment - 20 Jul 2016

@mbabker
I've created this issue because of SEO :) With current behaviour I get multiple "Duplicate title tags" warnings in Google Webmasters Tools.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11199.

avatar mbabker
mbabker - comment - 20 Jul 2016

Just goes to prove my point ?

Still something you have to be careful about changing though because it has the chance to affect existing sites, even if it's an improvement over the current behavior. Since the dev strategy generally promises to not make major changes to page structures (and I'd say metadata would be covered by that), it's a change that has to be pointed out very explicitly in a release announcement.

avatar brianteeman
brianteeman - comment - 7 Sep 2016

Hi

I am going to have to close this as expected behaviour. As Michael said thats the way that joomla operates and it just couldnt be changed without effecting existing web sites. There may be seo extensions available at the Joomla Extensions Directory that will handle this for you but its not a change that can be made in the core.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11199.

avatar brianteeman brianteeman - change - 7 Sep 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-09-07 08:07:45
Closed_By brianteeman
avatar brianteeman brianteeman - close - 7 Sep 2016

Add a Comment

Login with GitHub to post a comment