G
G
Gluck Virtualen2015-02-14 22:19:43
Google
Gluck Virtualen, 2015-02-14 22:19:43

Why is Sitelinks Search Box throwing an error?

I do as indicated here: https://developers.google.com/structured-data/slsb...

<div id="search_block_top" itemscope itemtype="http://schema.org/WebSite" />
  <meta itemprop="url" content="http://motokofr.com/"/>

  <form method="get" action="{$base_dir}search.php" id="searchbox" itemprop="potentialAction" itemscope itemtype="http://schema.org/SearchAction">
        <meta  itemprop = "target"  content = "http://motokofr.com/search.php?search_query={$smarty.get.search_query}" /> 

        <input required type="text" id="search_query" name="search_query" 
 value="{if $smarty.get.search_query}{$smarty.get.search_query|htmlentities:$ENT_QUOTES:'utf-8'|stripslashes}{/if}"
 itemprop="query-input" />

    <input type="hidden" name="orderby" value="position" />
    <input type="hidden" name="orderway" value="desc" />

<input id="submit" type="submit" name="Submit" value=""/>
  </form>
  </div>

The validator stubbornly replies: "Required: Site Links Search Window".
What is the "search box"? What other "links"? I showed him the Form, the input too, the metas... what does he need?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JULIKK, 2016-01-11
@gluck59

I recently encountered the same thing, but then I realized that the fact is that in the example like this

<meta itemprop="target" content="https://query.example.com/search?q={search_term_string}"/>
    <input itemprop="query-input" type="text" name="search_term_string" required/>

i.e. search_term_string is the 'name' of the search input, i.e. what would work for you write
content = "http://motokofr.com/search.php?search_query={search_query}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question