-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[6.0] Enable Schemaorg plugin support via API #45319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 6.0-dev
Are you sure you want to change the base?
Conversation
@Sanjana2906 The title of your PR starts with "[5.3]", but you have made the PR for the 5.2-dev branch. As there will not be any further 5.2.x release, and 5.3.0 will be the next: Could you rebase your PR to the 5.3-dev branch? If you are not sure how to do that, let me know, then I can do that. Thanks in advance. |
3f2dcab
to
e27958c
Compare
@Sanjana2906 Thanks for rebasing. Unfortunately you have also pished your .htaccess file. Could you revert that? |
e27958c
to
67d9dfa
Compare
@richard67 Thanks for the review! I've reverted the '.htaccess' commits . The branch is now synced with '5.3-dev' . |
@Sanjana2906 Now you deleted the |
@brianteeman Appreciate the link- that was helpful, Thank you! |
@Sanjana2906 Thanks. PR looks good now. |
@richard67 Thanks for catching that! I've reverted the accidental deletion of 'htaccess.txt' and restored it from '5.3-dev'. The PR now only includes schema.org API support changes. |
can you please document what the payload should be ? for POST/PATCH/GET the schemaorg |
@alikon |
with this pr {
"title" : "Test Article",
"catid": 2,
"language": "*",
"@type" : "Article",
"articletext" : "Content",
"author": {
"type" : "Person",
"name" : "John-doe",
"email" : "[email protected]"
}
} but when i execute the GET {
"links": {
"self": "http://localhost/530/api/index.php/v1/content/articles/107"
},
"data": {
"type": "articles",
"id": "107",
"attributes": {
"typeAlias": "com_content.article",
"id": 107,
"asset_id": 168,
"title": "Test Article",
"alias": "test-article",
"state": 0,
"created": "2025-04-15 12:54:59",
"created_by": 506,
"created_by_alias": "",
"modified": "2025-04-15 12:54:59",
"modified_by": 506,
"publish_up": null,
"publish_down": null,
"images": [],
"urls": [],
"version": 1,
"metakey": "",
"metadesc": "",
"access": 1,
"hits": 0,
"metadata": [],
"featured": 0,
"language": "*",
"note": "",
"tags": [],
"featured_up": null,
"featured_down": null,
"text": "Content "
},
"relationships": {
"category": {
"data": {
"type": "categories",
"id": "2"
}
},
"created_by": {
"data": {
"type": "users",
"id": "506"
}
},
"tags": {
"data": []
},
"modified_by": {
"data": {
"type": "users",
"id": "506"
}
}
}
}
} i don't see any schemaorg related data , all the schemaorg plugins are enabled |
Hi @alikon , |
I rebased this feature pr against 6.0, also please remove the documentation from the pr and create an entry in manual.joomla.org (since we don't have a clean documentation for api in the manual yet please add it to this section. I also changed the pr to draft till it's complete |
I'll be drafting the updated API documentation and adding it to Joomla Manual by tomorrow. Please let me know if there are specific guidelines or details you'd like me to include. |
Hi @HLeithner, @alikon, Thanks for the feedback and for moving the PR to 6.0-dev. I've written the documentation under docs/webservices/schemaorg-api-support.md as suggested — feel free to let me know if the placement looks okay. I’ve also tested again by POSTing an article with the schema.org metadata, but I’m still not seeing any schema data returned in the GET response. The Schemaorg plugins are all enabled, but it doesn’t seem like they’re being triggered. I’ve tried using the onAfterApiData event to inject the structured data, but I’m not fully sure if that’s the best or only way — would appreciate a little guidance if I’m missing something here. Thanks again for your help and for reviewing the PR. |
Pull Request for Issue #45178.
Summary of Changes
This PR updates the Schemaorg system plugin to allow it to be executed when content is saved via API client, in addition to administrator client. This enables schema metadata to be processed properly for content created or updated through Joomla's REST API.
Testing Instructions
Enable the Schemaorg plugin in the backend.
Use Joomla REST API to create or update an article.
Check if schema metadata is generated or excepted.
Verify that the plugin continues to work correctly in the admin interface as before.
Actual result BEFORE applying this Pull Request
Schemaorg plugin does not execute when content is saved via API.
Expected result AFTER applying this Pull Request
Schemaorg plugin supports execution via both admin and API clients.
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