User tests: Successful: Unsuccessful:
Pull Request resolves #48033.
The Schema.org JobPosting plugin emits the stored form values Telecommute, Onsite or Hybrid directly as jobLocationType in the JSON-LD output. Google for Jobs only accepts TELECOMMUTE for this property, so the generated markup is flagged as invalid by the Rich Results Test. This PR maps the stored values at output time in onSchemaBeforeCompileHead: Telecommute and Hybrid become TELECOMMUTE (a hybrid job keeps its physical jobLocation alongside, which Google interprets as hybrid), and Onsite omits jobLocationType entirely and relies on jobLocation. The form and stored data are unchanged, so existing sites need no migration.
A unit test for the plugin is included. It fails against the current code (Hybrid and Onsite pass through unchanged) and passes with this change; the rest of the Unit suite is unaffected.
Disclosure per the Generative AI policy: this contribution was created with the help of an AI assistant (Claude). The bug was reproduced, the fix was written and the tests were run and verified by the tool under human direction, and the result was reviewed before submission.
application/ld+json block in the page source, or run the URL through Google's Rich Results Test.The JSON-LD contains "jobLocationType": "Onsite" (or "Hybrid" / "Telecommute"), which Google flags as invalid.
Onsite: no jobLocationType in the output, only jobLocation. Hybrid and Telecommute: "jobLocationType": "TELECOMMUTE", with the physical jobLocation still present for Hybrid.
Please select:
No documentation changes for guide.joomla.org needed
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Category | ⇒ | Front End Plugins Unit Tests |
| Title |
|
||||||