PBF bug RMDQ PR-5.1-dev Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
16 Jan 2024

Summary of Changes

When having the schema.org plugin enabled and opening a URL with a non-existing Itemid, the plugin throws a fatal error.

Testing Instructions

  1. Open a URL like index.php?Itemid=666&option=com_content&view=category&id=2
  2. See the fatal error
  3. Apply patch
  4. See error go away.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar Hackwar Hackwar - open - 16 Jan 2024
avatar Hackwar Hackwar - change - 16 Jan 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 16 Jan 2024
Category Front End Plugins
avatar fgsw
fgsw - comment - 17 Jan 2024

Error View not found [name, type, prefix]: category, html, Administrator stay with applied patch.

avatar Hackwar
Hackwar - comment - 17 Jan 2024

You have to open the URL in the frontend.

avatar fgsw fgsw - test_item - 17 Jan 2024 - Tested successfully
avatar fgsw
fgsw - comment - 17 Jan 2024

I have tested this item ✅ successfully on 0c0938c


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

avatar viocassel viocassel - test_item - 17 Jan 2024 - Tested successfully
avatar viocassel
viocassel - comment - 17 Jan 2024

I have tested this item ✅ successfully on 0c0938c


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

avatar rdeutz rdeutz - change - 17 Jan 2024
Status Pending Ready to Commit
avatar Quy Quy - change - 17 Jan 2024
Labels Added: RTC PR-5.0-dev
avatar bembelimen
bembelimen - comment - 18 Jan 2024

I think tis is the wrong approach, just because there is no menu (not sure if this ever should happen...but that's another topic) you should not skip all the output.

It just needs a headline and a clean check for meta data. The headline should be available somewhere (I mean, it's there in the normal output) and the if for the meta can add the $menu && ....

But again, don't disable the whole schema output just because there is no menu.

avatar Quy Quy - change - 20 Jan 2024
Status Ready to Commit Pending
avatar Hackwar
Hackwar - comment - 21 Jan 2024

This issue only shows up when the Itemid is invalid, so when the Itemid points to a non-existing menu item. In that case we are missing large parts of our configuration and should thus disable the schema output. This is NEVER a site which you want to have indexed. Remember, when we have a /component/content/category page, we still fall back to the default menu item. This only happens when the page really is broken. I also don't see how we could do this more gracefully, since we are missing a name for the blog and the description. I would still ask to merge this as is.

avatar bembelimen
bembelimen - comment - 23 Jan 2024

If it's a broken page, then throw an error? Make a redirect? Make it no-index?

avatar formfranska
formfranska - comment - 23 Jan 2024

If it's a broken page, then throw an error? Make a redirect? Make it no-index?

The page does not exist. It's an empty category with no articles in it as I described in https://forum.joomla.org/viewtopic.php?f=834&t=1006471

I have disabled the Schema org plugin which fixes the issue for now (to avoid getting 500 errors in Google Search Console).

avatar Hackwar Hackwar - change - 21 Feb 2024
Title
[5.0] Schema.org: Fix error when menu item doesn't exist
[5.1] Schema.org: Fix error when menu item doesn't exist
avatar Hackwar Hackwar - edited - 21 Feb 2024
avatar TLWebdesign TLWebdesign - test_item - 24 Feb 2024 - Tested successfully
avatar TLWebdesign
TLWebdesign - comment - 24 Feb 2024

I have tested this item ✅ successfully on 949a0da

Works fine!
After applying patch i got this message instead of an error: There are no articles in this category. If subcategories display on this page, they may have articles.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42662.
avatar crimle crimle - test_item - 24 Feb 2024 - Tested successfully
avatar crimle
crimle - comment - 24 Feb 2024

I have tested this item ✅ successfully on 949a0da


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

avatar 7at1blow 7at1blow - test_item - 24 Feb 2024 - Tested successfully
avatar 7at1blow
7at1blow - comment - 24 Feb 2024

I have tested this item ✅ successfully on 949a0da


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

avatar Hackwar Hackwar - change - 24 Feb 2024
Labels Added: PBF bug RMDQ PR-5.1-dev
Removed: RTC PR-5.0-dev
avatar miguelvazquez
miguelvazquez - comment - 24 Feb 2024

I have tested this item ✅ successfully on 0c0938c


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

avatar bembelimen
bembelimen - comment - 2 Mar 2024

Removed RTC, see: #42662 (comment)

Just fix line 319 + 323 instead of throwing everything away

avatar HLeithner
HLeithner - comment - 2 Sep 2024

This pull request has been automatically rebased to 5.2-dev.

avatar HLeithner HLeithner - change - 2 Sep 2024
Title
[5.1] Schema.org: Fix error when menu item doesn't exist
[5.2] Schema.org: Fix error when menu item doesn't exist
avatar HLeithner HLeithner - edited - 2 Sep 2024

Add a Comment

Login with GitHub to post a comment