Page 1 of 1
s08e06 - Site Links Search Box SUPPORT / QUESTIONS / CHAT
Posted: Mon Jun 13, 2022 8:47 am
by radhavallabh
Hi dear;
I am getting this error by google which is not allowing page to be valid for indexing ,
Attaching screenshot
Screenshot 2022-06-13 at 14-15-11 Sitelinks searchbox - URL inspection.png
Please can you help fix this issue dear?
Thank you in advance,
Very Warm Regds./
radhavallabh
Re: s08e06 - Site Links Search Box
Posted: Mon Jun 13, 2022 9:04 am
by burt
Ask google for more help. Report back what they say.
In the meantime, at least you have provided something that can help to diagnose;
The search_term is urlencoded, so what should be:
{search_term}
is
%7Bsearch_term%7D
Therefore this is at a higher level than this addon, so may need attention -
@ecartz will have a better idea of the practicalities of this.
In the meantime you can rawurldecode the URL as so, at L17 of this addon;
Code: Select all
$sb_link = rawurldecode($GLOBALS['Linker']->build('advanced_search_result.php', ['keywords' => '{search_term}'], false));
Re: s08e06 - Site Links Search Box
Posted: Mon Jun 13, 2022 10:09 am
by radhavallabh
burt wrote: ↑Mon Jun 13, 2022 9:04 am
Ask google for more help. Report back what they say.
In the meantime, at least you have provided something that can help to diagnose;
The search_term is urlencoded, so what should be:
{search_term}
is
%7Bsearch_term%7D
Therefore this is at a higher level than this addon, so may need attention - @ecartz will have a better idea of the practicalities of this.
In the meantime you can rawurldecode the URL as so, at L17 of this addon;
Code: Select all
$sb_link = rawurldecode($GLOBALS['Linker']->build('advanced_search_result.php', ['keywords' => '{search_term}'], false));
Hi
The issue fixed dear!
And now when I submitted site for indexing it went through seamlessly....
Thank you so much for the fix!
Very Warm Regds./
radhavallabh
Re: s08e06 - Site Links Search Box
Posted: Mon Jun 13, 2022 2:31 pm
by ecartz
Rather than decoding the entire URL, it would probably be better to just str_replace:
Code: Select all
$sb_link = str_replace('%7Bsearch_term%7D', '{search_term}', $sb_link);
Then it won't accidentally decode something that should be encoded.
Re: s08e06 - Site Links Search Box
Posted: Wed Jun 15, 2022 3:46 pm
by mhsuffolk
ecartz wrote: ↑Mon Jun 13, 2022 2:31 pm
Rather than decoding the entire URL, it would probably be better to just str_replace:
Code: Select all
$sb_link = str_replace('%7Bsearch_term%7D', '{search_term}', $sb_link);
Then it won't accidentally decode something that should be encoded.
I have done this as a precaution but I have now had an email from Google Search saying
Search Console has identified that your site is affected by 1 Sitelinks searchbox structured data issue(s):
Top critical issues
Critical issues prevent your page or feature from appearing in Search results. The following critical issues were found on your site:
Missing field 'target' (in 'potentialAction')
We recommend that you fix these issues when possible to enable the best experience and coverage in Google Search
Re: s08e06 - Site Links Search Box
Posted: Wed Oct 11, 2023 2:59 am
by lecarlb
Maybe here's some insight:
A line from the Sitelinks Searchbox hook from a 1.0.7.15 shop that Google has no problems with
Code: Select all
$sb_link = tep_href_link('advanced_search_result.php', 'keywords={search_term}', 'SSL', false);
Here's the same line from Sitelinks Searchbox hook from a newer version of the addon in 1.0.8.16+ shops that Google has issues with
Code: Select all
$sb_link = $GLOBALS['Linker']->build('advanced_search_result.php', ['keywords' => '{search_term}'], false);
And this one also, which is an edit from
@ecartz I believe
Code: Select all
$sb_link = str_replace('%7Bsearch_term%7D', '{search_term}', $sb_link);
I think
tep_href_link is deprecated but still recognized
I hope I helped.
Re: s08e06 - Site Links Search Box SUPPORT / QUESTIONS / CHAT
Posted: Tue Apr 15, 2025 9:44 am
by burt
Sitelinks Searchbox has been deprecated by Google.
https://developers.google.com/search/bl ... search-box
Therefore this addon will not be updated for 1.1.0.0, and should be considered END OF LIFE
Anyone using this addon on an older version of Phoenix can leave it alone - according to the blog post above, this will not hurt anything. Or you can remove it by
deleting the following file;
/includes/hooks/shop/index/sitelinks_searchbox.php
If it was me making the decision for your site, I would delete the file.
Re: s08e06 - Site Links Search Box SUPPORT / QUESTIONS / CHAT
Posted: Tue Apr 15, 2025 9:47 am
by burt
The download for this Addon has been removed.