This document outlines the process for reviewing a template, particularly when the HTML of the pageset has changed. Bear in mind that creating XPaths is a skill in and of itself. This support document is meant to be a guideline for troubleshooting and identifying where changes may be required. If you reach the limit of your capacity, please reach out to support@schemaapp.com and we will be happy to assist you!
TABLE OF CONTENTS
- How To: Review Highlighter Templates Following HTML Changes
- Suggestions, Best Practices, and Techniques
How To: Review Highlighter Templates Following HTML Changes
This section outlines the process of reviewing the Highlighter template and identifying highlights that need to be updated or changed.
Step 1: Open 1-3 URLs Targeted by the Template in your browser
Click on the Page Count to see the full list of URLs deployed to in the last 30 days. Select 1-3 of these URLs and open them,.
Test the URLs with the Schema Markup Validator
Use the test to assess whether the template is mapping appropriately. If there is content missing, or content is mapping in unexpected ways, you'll need to begin the process of reviewing the template and making changes. You may want to make a list of properties or highlights that are not mapping as expected so you can make all the necessary updates.
Step 2: Navigate to the Highlighter Overview page and open the template you're reviewing
Step 3: Review Highlights, and make any necessary changes
Highlights that map to page content typically come in one of two kinds: click to highlight, or manual XPaths. Subtemplate highlights could be considered a third kind, but are composed of either click to highlight or manual components.
Click to Highlight
If previous Highlights are no longer mapping, you will likely need to delete the exisitng highlight. Take note of the property path you used before you delete it. Follow the usual Click to Highlight process for the new page design.
Manual XPaths
If the previous Highlights are no longer mapping, you will likely need to create a new XPath. Unlike Click to Highlight, you don't need to delete the entire highlight. Instead you'll click to edit the highlight and replace the old XPath with a revised one.
Step 4: Navigate through Steps 3-5 and ensure all changes deploy
Confirm that the Highlighter template is mapping as expected across the sample URLs you've added in Step 3.
Test live URLs to confirm changes are live in Production
Bear in mind that caching and other factors may impact how quickly you see the changes you've made reflected in the live JSON-LD on the page.
Suggestions, Best Practices, and Techniques
This section is a non-comprehensive list of strategies we've found helpful when making adjustments to templates that channge frequently
Download and use the XPath Helper Chrome Extension
XPath Helper is a free Chorme extension that can be used to test and return the results of XPath queries. It is a useful tool for validating whether an XPath will be functional in a Production environment.
Remove sections of the previous XPath to find components that have stayed the same
Sometimes, not all components on the page have changed significantly enough to warrent starting from scratch. Recalling that each "/" represents a "step" in the XPath query, start at the end of the query and remove steps. This might not be a silver bullet but it might save your some significant rework.
"Select" an Element on the Page to review its HTML structure
With Dev Tools open, click "Select an Element" or use the CTRL/CMD + Shift + C keyboard shortcut. Hover your mouse over the on-page component you're looking to target and click. This will bring you to the place in the HTML that defines that on-page component. This can speed up the process of looking for the HTML component you're looking to target with your XPath.
Right click on an HTML component and copy XPath
This trick can be a helpful starting place for identifying unique HTML components for your XPath. With Dev Tools open, right click on the HTML component you're looking to target. Navigate to "Copy > Copy XPath" and select. You can paste this XPath into the XPath helper. The XPaths generated by this method can be fairly brittle (e.g not responsive to variations in HTML or page structure) so exercise caution if you use that exact query in your Highlighter template.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article