0

The following error occurs on all pages of my site:

https://www.newworldproductions.net/{search_term_string}Video, Production, Services, Marketing, Minneapolis, Minnesota, Corporate Videos, Commercial Videos (There is an error in your Sitelinks Search Box template: INVALID_SYNTAX.)

The error takes place on line #9:

{
    "@context": "https://schema.org/",
    "@type": "WebSite",
    "name": "New World Productions",
    "url": "https://www.newworldproductions.net/",
    "potentialAction": {
        "@type": "SearchAction",
        "target": "https://www.newworldproductions.net/{search_term_string}Video, Production, Services, Marketing, Minneapolis, Minnesota, Corporate Videos, Commercial Videos",
        "query-input": "required name=search_term_string"
    }
}
unor
  • 92,415
  • 26
  • 211
  • 360

1 Answers1

2

It would seem that the target is implemented wrong, as detailed in this article. There is no need to list your desired search terms in the string, and you aren't even looking for a query in your current code anyway. Try implementing the following:

<script type="application/ld+json">
{
   "@context": "http://schema.org",
   "@type": "WebSite",
   "url": "https://www.newworldproductions.net/",
   "potentialAction": {
     "@type": "SearchAction",
     "target": "https://query.newworldproductions.net/search?q={search_term_string}",
     "query-input": "required name=search_term_string"
   }
}
</script>

Also, keep in mind that not every website qualifies for the searchAction schema. If they did, everyone would be doing it. There are guidelines, which are touched on in the linked article. More research may be required on your part.

Claire
  • 3,146
  • 6
  • 22
  • 37
  • Thanks Claire! I appreciate your time on this. I did a test and it appears your code correction has done the trick. – New World Productions Jun 28 '19 at 17:18
  • Hey Claire, For the life of me, I'm not seeing anywhere that clearly displays an option to "Accept answer as correct". I've been looking into this for 30 minutes now. Am I some how over looking the obvious here? Again, i'm happy to do so I just done't seem to see where I can implement this. – New World Productions Jul 02 '19 at 14:58
  • @NewWorldProductions haha sorry for the confusion. Just click the check mark to the left of the answer – Claire Jul 02 '19 at 18:21