Open ajoudeh-personal opened 1 year ago
Hi @ajoudeh-personal
The @context
I'll fix in the upcoming release. About the query-input
: That seems to be some Google Thing, it's not documented in the specs (https://schema.org/Action). We may build something to dynamically add properties 🤔.
yes i see schema doc site, but when i fix it as workaround, its be valid in both site validation Google & Schema.
my work around is to pass potentialAction
as json ["@type" => "SearchAction", 'target' => Yii::$app->urlManager->createAbsoluteUrl(['/site/search/']) . "?q={search_term_string}", 'query-input' => 'required name=search_term_string'];
yeah but it's not even schema org property compliant (id-syntax instead of camelCase). Google 🤦🏻♂️...
Maybe user DynamicModel
as base to be able to add properties 🤔
Hi,
I use below code to generate WebSite schema
$siteLinks->potentialAction = new SearchAction(['target' => Yii::$app->urlManager->createAbsoluteUrl(['/site/search/', 'q' => '{search_term_string}']), 'query' => 'required name=search_term_string']);
i got this error from Google Search Test:
Missing field "query-input"
And '@context' => 'http://schema.org' need to be '@context' => 'https://schema.org'
Any Advice?
Thanks