Title: Error in SearchAction-code
Last modified: May 24, 2019

---

# Error in SearchAction-code

 *  Resolved [YuriV](https://wordpress.org/support/users/yuriv/)
 * (@yuriv)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/error-in-searchaction-code/)
 * Hi,
 * Google Search Console is giving errors on the sitelinks search box. It’s says:
   missing target and missing url. The source code of our homepage is showing this
   at the moment:
 * `{"@type":"SearchAction","target":"https://domain.net/?s={search_term_string}","
   query-input":"required name=search_term_string"}}`
 * I guess it has to be something like:
 *     ```
       "@type": "SearchAction",
       "target": "https://domain.net/?s={search_term_string}",
       "query-input": "required name=search_term_string"
       ```
   
 * As far as I can see the false code is generated by Yoast in this file: plugins/
   wordpress-seo/frontend/schema/class-schema-website.php
 * Where I found:
 *     ```
       $data['potentialAction'] = array(
       				'@type'       => 'SearchAction',
       				'target'      => $search_url,
       				'query-input' => 'required name=search_term_string',
       			);
       		}
       ```
   
 * Any clue what’s wrong in that code?
 * Thanks in advance
    -  This topic was modified 6 years, 11 months ago by [YuriV](https://wordpress.org/support/users/yuriv/).
    -  This topic was modified 6 years, 11 months ago by [YuriV](https://wordpress.org/support/users/yuriv/).
    -  This topic was modified 6 years, 11 months ago by [YuriV](https://wordpress.org/support/users/yuriv/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Md Mazedul Islam Khan](https://wordpress.org/support/users/mazedulislamkhan/)
 * (@mazedulislamkhan)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/error-in-searchaction-code/#post-11585746)
 * Can you please share the exact site URL here with us where the issue remains 
   occurring for you so that we can take a look at it?
 *  Thread Starter [YuriV](https://wordpress.org/support/users/yuriv/)
 * (@yuriv)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/error-in-searchaction-code/#post-11585868)
 * You van find it on
 * `view-source:https://historiek.net`
 * But also on
 * `view-source:https://yoast.com`
 *  [Md Mazedul Islam Khan](https://wordpress.org/support/users/mazedulislamkhan/)
 * (@mazedulislamkhan)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/error-in-searchaction-code/#post-11593672)
 * We see the exact same Schema that you have shared with us and the only difference
   is the first example Schema isn’t indented but the second one is indentended.
 *     ```
       "@type": "SearchAction",
       "target": "https://domain.net/?s={search_term_string}",
       "query-input": "required name=search_term_string"
   
       "@type": "SearchAction",
       "target": "https://domain.net/?s={search_term_string}",
       "query-input": "required name=search_term_string"
       ```
   
 * That said we have tested your site [https://historiek.net/](https://historiek.net/)
   using the [Google Structured Data Testing tool](https://search.google.com/structured-data/testing-tool)
   and we don’t see any errors at all.
 *  [Jerlyn](https://wordpress.org/support/users/jerparx/)
 * (@jerparx)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/error-in-searchaction-code/#post-11614626)
 * Closed. No further questions.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Error in SearchAction-code’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Jerlyn](https://wordpress.org/support/users/jerparx/)
 * Last activity: [6 years, 11 months ago](https://wordpress.org/support/topic/error-in-searchaction-code/#post-11614626)
 * Status: resolved