Pending

User tests: Successful: Unsuccessful:

avatar Otto-Deviant1904
Otto-Deviant1904
12 Jul 2026

Pull Request resolves #48033.

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

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.

Testing Instructions

  1. Enable the "System - Schema.org" and "Schema.org - JobPosting" plugins, and set Schema.org as active for articles.
  2. Create an article, open its Schema tab, select the JobPosting type, and set the job location field to Onsite (repeat later with Hybrid and Telecommute). Save.
  3. View the article on the frontend and inspect the application/ld+json block in the page source, or run the URL through Google's Rich Results Test.

Actual result BEFORE applying this Pull Request

The JSON-LD contains "jobLocationType": "Onsite" (or "Hybrid" / "Telecommute"), which Google flags as invalid.

Expected result AFTER applying this Pull Request

Onsite: no jobLocationType in the output, only jobLocation. Hybrid and Telecommute: "jobLocationType": "TELECOMMUTE", with the physical jobLocation still present for Hybrid.

Link to documentations

Please select:

  • No documentation changes for guide.joomla.org needed

  • No documentation changes for manual.joomla.org needed

avatar Otto-Deviant1904 Otto-Deviant1904 - open - 12 Jul 2026
avatar Otto-Deviant1904 Otto-Deviant1904 - change - 12 Jul 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 12 Jul 2026
Category Front End Plugins Unit Tests
avatar richard67 richard67 - change - 13 Jul 2026
Title
[AI] Fix invalid jobLocationType values in JobPosting schema output
[5.4] [AI] Fix invalid jobLocationType values in JobPosting schema output
avatar richard67 richard67 - edited - 13 Jul 2026

Add a Comment

Login with GitHub to post a comment