Fix the Open Graph fields in a copied article template
Admin ·
A copied article template can put the site title above the story title. It can also carry an old page URL or an image width that no longer belongs to an image. Use the night train example to resolve those errors from the saved head before checking a live share.
Trace the first values back to their source lines
Load the example. The check reports one error and four warnings. The required fields table shows Travel Desk from line 3 even though the story title appears on line 4. Remove the template title so Night Train Field Notes becomes the first title.
The og:url value on line 6 uses /old-route. The supplied canonical link on line 2 uses /stories/night-train. Confirm the intended story address and change og:url to https://journal.example/stories/night-train.
The Open Graph protocol, basic metadataThe Open Graph protocol, array order
Put width, height and alt after the image declaration
Replace the relative image path with https://journal.example/images/platform.jpg. Move the og:image:width line to just below og:image. Keep the existing og:image:height next in the same group. Add og:image:alt after it with the value An empty station platform at night.
Validate again. Expect zero errors and zero warnings for this fixture. The image list should contain one URL with width 1200, height 630 and the new alt text. If you add a second og:image, append its own structured fields immediately after that URL.
The Open Graph protocol, array orderThe Open Graph protocol, structured properties
Keep the report with the markup you checked
Download the JSON report. Keep it alongside the exact source file so someone can trace each line later. If a rendered page differs, rerun the check against that version's saved HTML.
The report checks declarations in that source. Confirm separately that the page and its image are served to the sharing crawler. An absolute URL in a saved tag does not establish access, delivered image dimensions or the result of a redirect.
Common questions
What does a canonical mismatch warning establish?
It shows that two supplied URL values differ after URL parsing. Review which page they should identify before changing either tag.
Will the validator find fields that my script adds later?
It reads the pasted HTML and ignores executable code. Supply a saved copy of the relevant rendered head when that is the version you need to inspect.