s08e06 - Site Links Search Box SUPPORT / QUESTIONS / CHAT

Open to all! Ask other shopowners for help.
Post Reply
radhavallabh
Senior Contributor
Posts: 466
Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times

s08e06 - Site Links Search Box SUPPORT / QUESTIONS / CHAT

Post 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
You do not have the required permissions to view the files attached to this post.

Tags:


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
burt
Core Team
Posts: 4546
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: s08e06 - Site Links Search Box

Post 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));
I am not here to build for you.
I am here to build with you. Let's help each other.
radhavallabh
Senior Contributor
Posts: 466
Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times

Re: s08e06 - Site Links Search Box

Post 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
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: s08e06 - Site Links Search Box

Post 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.
User avatar
mhsuffolk
Contributor
Posts: 199
Joined: Sat Oct 26, 2019 9:13 am
Phoenix Version: v1.1.0.6
Has thanked: 12 times
Been thanked: 11 times

Re: s08e06 - Site Links Search Box

Post 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
lecarlb
Contributor
Posts: 316
Joined: Mon Oct 26, 2020 5:26 pm
Phoenix Version:
Has thanked: 48 times
Been thanked: 9 times

Re: s08e06 - Site Links Search Box

Post 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.
User avatar
burt
Core Team
Posts: 4546
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: s08e06 - Site Links Search Box SUPPORT / QUESTIONS / CHAT

Post 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.
I am not here to build for you.
I am here to build with you. Let's help each other.
User avatar
burt
Core Team
Posts: 4546
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: s08e06 - Site Links Search Box SUPPORT / QUESTIONS / CHAT

Post by burt »

The download for this Addon has been removed.
I am not here to build for you.
I am here to build with you. Let's help each other.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply