RTC bug PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar Denitz
Denitz
5 Sep 2024

Summary of Changes

Schemaorg system plugin onContentAfterDelete event tries do delete the schema even if context is not supported, and we have a warning if an item doesn't have id attribute.

Testing Instructions

Delete any item of custom component which doesn't implement SchemaorgServiceInterface or doesn't have id attribute.

Actual result BEFORE applying this Pull Request

See a similar warning in error log:

PHP Warning:  Undefined property: Xxx\\Component\\Xxx\\Administrator\\Table\\Xxx::$id in /var/www/public_html/plugins/system/schemaorg/src/Extension/Schemaorg.php on line 545

Expected result AFTER applying this Pull Request

No warning, only items which support schemaorg and with ID column are deleted.

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 Denitz Denitz - open - 5 Sep 2024
avatar Denitz Denitz - change - 5 Sep 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 Sep 2024
Category Front End Plugins
avatar Denitz Denitz - change - 5 Sep 2024
Labels Added: PR-5.1-dev
avatar richard67 richard67 - change - 22 Sep 2024
Labels Added: bug PR-5.2-dev
Removed: PR-5.1-dev
avatar richard67 richard67 - change - 22 Sep 2024
Build 5.1-dev 5.2-dev
avatar HLeithner HLeithner - change - 15 Nov 2024
Title
Schemaorg system plugin onContentAfterDelete issue
[5.2] Schemaorg system plugin onContentAfterDelete issue
avatar HLeithner HLeithner - edited - 15 Nov 2024
avatar HLeithner
HLeithner - comment - 15 Apr 2025

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

avatar HLeithner HLeithner - change - 15 Apr 2025
Title
[5.2] Schemaorg system plugin onContentAfterDelete issue
[5.3] Schemaorg system plugin onContentAfterDelete issue
avatar HLeithner HLeithner - edited - 15 Apr 2025
avatar Denitz Denitz - change - 16 Apr 2025
Labels Added: PR-5.3-dev
avatar Denitz Denitz - change - 21 Aug 2025
Title
[5.3] Schemaorg system plugin onContentAfterDelete issue
[5.4] Schemaorg system plugin onContentAfterDelete issue
avatar Denitz Denitz - edited - 21 Aug 2025
avatar richard67 richard67 - change - 21 Aug 2025
Labels Added: PR-5.4-dev
Removed: PR-5.2-dev PR-5.3-dev
avatar richard67
richard67 - comment - 22 Aug 2025

Delete any item of custom component which doesn't implement SchemaorgServiceInterface or doesn't have id attribute.

@Denitz Do you know a publicly available example for such an extension? If so, please add that info to your testing instructions. It could make it much easier to find testers for this PR, e.g. at the Pizza, Bugs & Fun (PBF) event tomorrow.

avatar Denitz
Denitz - comment - 22 Aug 2025

@richard67 Unfortuntely, I don't remember now what was the origin for this error. It could be Hikashop: the #__hikashop_product table of products has product_id primary key. There is a free starter version.

avatar richard67
richard67 - comment - 22 Aug 2025

@Denitz Maybe you know a small extension which could be modified e.g. by changing the context? Or could a core extension like e.g. com_contact be modified in that way for testing?

avatar Fedik Fedik - test_item - 22 Aug 2025 - Tested successfully
avatar Fedik
Fedik - comment - 22 Aug 2025

I have tested this item ✅ successfully on 6ed047e

On review, calling deleteSchemaOrg() with empty ID does not make sense


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

avatar richard67 richard67 - test_item - 22 Aug 2025 - Tested successfully
avatar richard67
richard67 - comment - 22 Aug 2025

I have tested this item ✅ successfully on 6ed047e

Tested by code review. The deleteSchemaOrg method is not called when there is no item id, and regarding the check if the context is supported the behaviour is not changed, only code is optimised to avoid multiple calls for the same thing.


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

avatar richard67 richard67 - change - 22 Aug 2025
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 22 Aug 2025

RTC


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

avatar richard67 richard67 - change - 22 Aug 2025
Labels Added: RTC
avatar muhme muhme - change - 23 Aug 2025
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-08-23 08:09:47
Closed_By muhme
avatar muhme muhme - close - 23 Aug 2025
avatar muhme muhme - merge - 23 Aug 2025
avatar muhme
muhme - comment - 23 Aug 2025

Thank you @Denitz for your contribution. Thank you @Fedik and @richard67 for testing.

Add a Comment

Login with GitHub to post a comment