User tests: Successful: Unsuccessful:
Pull Request for Issue #39587.
This PR fixes wrong article meta-description priority as described in #39587. Basically, it should work as below:
Meta description is not handled properly.
Meta description is handled properly.
Please select:
Category | ⇒ | Front End com_content |
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
I made the same fix for category view in com_content. I agree that it should be fixed for all, but we should do the fix for a component at a time, easier to test.
Will be happy to review and apply fix for other components, in separate PR.
I've been tested - the PR, all done
Could you two please go to https://issues.joomla.org/tracker/joomla-cms/39588 and report your test result there so that your test will be counted and this PR could be merged ?
Is this really something that is safe to do. Doesn't it change the existing
expected behaviour of everyone's sits and how they may appear on search
engines etc. ??
Is this really something that is safe to do. Doesn't it change the existing expected behaviour of everyone's sits and how they may appear on search engines etc. ??
There are two ways:
@brianteeman, I don't think this change will cause serious problems.
Because now the meta settings in the menu item simply do not work if the fields are filled in the item.
If this is not corrected, then it turns out that the Joomla based logic: "Menu item has the highest priority" does not work.
Moreover, h1
works according to the principle "The menu item has the highest priority" and the rest of the meta does not.
There is also another problem. Now if you fill in the meta fields in the item, then it will not be possible to make 2 different menu items with different layouts and different meta descriptions.
I have tested this item
Accept this change or not is up to us. However, this is clear a bug fix to make meta description works in the same way with everything else: If the active menu item is linked directly to the item, the settings from menu item will take higher priority than the settings from the item itself. We can see it with the way we handle article layout or the way we merge item parameters with menu item parameters https://github.com/joomla/joomla-cms/blob/4.2-dev/components/com_content/src/View/Article/HtmlView.php#L143-L174
I have tested this item
I have tested this item
A couple of comments with respect to the B/C break concern mentioned by @brianteeman
Prior:
Proposed:
Biggest case FOR the change: the page title ("Browser title") works the "expected" way (menu wins over article) while description is currently the other way around. Really hard to figure out and handle.
B/C break:
Likely reason is if someone entered a desc in menu item (as they did with a page title) then wanted to change it, forgot about the menu item and changed it in article options.
In that case, the change in this PR will revert back to the wrong, old description.
These cases will exist, no doubt, due to description working the opposite to title. So that change is definitely a B/C break.
I still think it's worth the change despite that, due to inconsistency with how similar setting Browser title behaves.
Status | Pending | ⇒ | Ready to Commit |
RTC since there are two successful tests. Will add RLDQ label so that release lead can make final decision about this.
I spoke with several people about this change.
Everyone agrees that it is correct. The menu item must have the highest priority.
However, in fact, this is a change in long-used logic and can cause problems.
They gave me an example.
At the time of site assembly, a person created an article and a menu item. In the menu item in metadesc, I wrote "f ***" for the test, then at the stage of filling the correct metadesc was filled in the articles and everyone forgot about the menu item.
And after merge pr metadesc will become "f***" and get into search engines.
Therefore, I don’t think that people will be against making meta fields with the correct priority, but I think it’s better to postpone the release of changes to the minor version, and preferably to the major version.
Then it will be possible to add a warning before the update, and when upgrading to a major version, sites check more carefully.
As mentioned before this will impact users' sites so this is not fit for a patch or feature release. We all agree, this is a good fix but needs to go into the next major release.
Same as any other PRs for the same issue needs to be based on the 5.0-dev
branch.
@joomdonation Could you rebase this to the 5.0-dev
branch please?
Category | Front End com_content | ⇒ | Unit Tests Administration com_admin SQL Postgresql com_categories com_content com_contenthistory com_fields com_finder com_joomlaupdate com_media NPM Change JavaScript com_templates com_users Language & Strings |
Sorry, I messed up the PR while changing the branch. Will close this new and do a new PR later.
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-01-12 00:37:55 |
Closed_By | ⇒ | joomdonation | |
Labels |
Added:
?
PR-5.0-dev
Removed: ? |
thx, but need also fix metakey and all another views.
This looks like a global architectural error.
Because the priority of parameters is first Menu Item, then Item.
On the meta, it's the other way around.