Error: Page contains property “query-input” which is not part of the schema

為{幸葍}努か 提交于 2019-12-06 11:40:43

It’s explained in the documentation about Actions:

Additional information is often required from a user or client in order to formulate a complete request. To facilitate this process we need the ability to describe within a potential action how to construct these inputs. Since we need this capability for filling in any property of an Action, we introduce a notion of property annotations using a hypen ("-") delimiter. For example, by specifying a "location-input" property on a potential action we are indicating that "location" is a supported input for completing the action.

But as this property does not exist (i.e., it’s not defined in the property table on SearchAction), validators report it as an error.

This issue already gets discussed on Schema.org’s GitHub: SearchAction example uses "query-input" property that is not defined

So you did not do something wrong. Unless Schema.org decides that Actions should be handled in a different way, validators should probably update and allow -input and -output suffixes.

The problem is that the query-input value (in your case search_term_string) must match the input field name.

in your case:

<input id="ajaxSearch" type="text" value="" name="search_term" itemprop="query-input">

must be:

<input id="ajaxSearch" type="text" value="" name="search_term_string" itemprop="query-input">
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!