User tests: Successful: Unsuccessful:
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.
Delete any item of custom component which doesn't implement SchemaorgServiceInterface or doesn't have id attribute.
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
No warning, only items which support schemaorg and with ID column are deleted.
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
| Status | New | ⇒ | Pending |
| Category | ⇒ | Front End Plugins |
| Labels |
Added:
PR-5.1-dev
|
||
| Labels |
Added:
bug
PR-5.2-dev
Removed: PR-5.1-dev |
||
| Build | 5.1-dev | ⇒ | 5.2-dev |
| Title |
|
||||||
| Title |
|
||||||
| Labels |
Added:
PR-5.3-dev
|
||
| Title |
|
||||||
| Labels |
Added:
PR-5.4-dev
Removed: PR-5.2-dev PR-5.3-dev |
||
Delete any item of custom component which doesn't implement SchemaorgServiceInterface or doesn't have
idattribute.
@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.
@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.
I have tested this item ✅ successfully on 6ed047e
On review, calling deleteSchemaOrg() with empty ID does not make sense
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.
| Status | Pending | ⇒ | Ready to Commit |
RTC
| Labels |
Added:
RTC
|
||
| 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 |
Thank you @Denitz for your contribution. Thank you @Fedik and @richard67 for testing.
This pull request has been automatically rebased to 5.3-dev.