Sitelinks search box js code error

#58722
  • Resolved Gustav Ljungars
    Rank Math free

    Hi RankMath!

    This is the code generated for the Google WebSite structured data on https://www.nicecycletours.com/nl/:

    <script type=”application/ld+json”>{“@context”:”https:\/\/schema.org”,”@graph”:[{“@type”:”WebSite”,”@id”:”https:\/\/www.nicecycletours.com\/nl\/?#website”,”url”:”https:\/\/www.nicecycletours.com\/nl”,”name”:”TAG TOURS SAS”,”potentialAction”:{“@type”:”SearchAction”,”target”:”https:\/\/www.nicecycletours.com\/nl\/?s=%7Bsearch_term_string%7D”,”query-input”:”required name=search_term_string”}},{“@type”:”LocalBusiness”,”@id”:”https:\/\/www.nicecycletours.com\/nl#organization”,”name”:”TAG TOURS SAS”,”url”:”https:\/\/www.nicecycletours.com”,”email”:”b******@a***************”,”address”:{“@type”:”PostalAddress”,”streetAddress”:”1 rue de Potin”,”addressLocality”:”Nice”,”addressRegion”:””,”postalCode”:”06300″,”addressCountry”:”France”},”openingHours”:[“Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday 09:00-17:00″],”priceRange”:”$”,”telephone”:”+33 9 86 65 75 17″}]}</script>

    Google reports 2 problems with this data, namely “Missing field ‘image'” and “Custom query parameter not defined in target URL”:

    https://search.google.com/test/rich-results?utm_campaign=devsite&utm_medium=jsonld&utm_source=sitelinks-searchbox&id=9OuJfO1txlCaoNs–p1D0A

    Can you please check?

    Thanks,

    Gustav LJUNGARS

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hello,

    Thank you for contacting Rank Math today.

    I have tested your site in all the three language it has and seems your translation plugin is encoding the curly brackets from {search_term_string} to %7Bsearch_term_string%7D. Would you please let us know the translation plugin you are using so we can look into this further.

    Looking forward to helping you. Thank you.

    ​​​​​​

    Hi,

    Thanks for your reply.

    Ah, OK, that would make “sense” somehow!

    I use Bogo Language Switcher for the translation. I just deactivated it and that appears to resolve the problem.

    I guess I have to approach Bogo Language Switcher then?

    Thanks,

    Gustav

    Just a precision: The English version of the site is not on WP, I’ve installed the code for the sitelinks search box there manually.

    I wasn’t able to deactivate Bogo and then test the French and Dutch versions of the site as they don’t work without Bogo.

    But I re-jigged my .htaccess so I could check the homepage of the English version of the WP site and there, the curly brackets came back the moment I deactivated Bogo, so I guess there’s the answer.

    Alberto
    Rank Math business

    Hello,

    Yes, in that case, you should contact Bogo developers since after all your testings everything points to it.

    Looking forward to help you.

    Thanks, I will approach Bogo with the curly brackets problem.

    What about the other problem reported by Google: “Missing Image”?

    https://search.google.com/test/rich-results?id=KGIZ3uS8XkBZCeJ6HgB2hA

    Thanks,

    Gustav

    I am facing same issue with Rank Math and WPML. There are supposed to be compatible the plugins though, correct? How is this fixed in WPML?

    What’s strange as well is that if I inject the sitelinks searchbox manually myself (using wp_head), the curly brackets are not modified:

    <script type=”application/ld+json”>
    {
    “@context”: “https://schema.org&#8221;,
    “@type”: “WebSite”,
    “url”: “https://www.nicecycletours.com/fr/&#8221;,
    “potentialAction”: {
    “@type”: “SearchAction”,
    “target”: “https://www.nicecycletours.com/fr/?s={search_term_string}”,
    “query-input”: “required name=search_term_string”
    }
    }

    Thanks,

    Gustav

    Alberto
    Rank Math business

    Hello,

    Let’s wait what they tell you about it and based on that we will be able to help you to find the issue then.

    Looking forward to help you.

    Hello,

    Thank you for the update.

    I have forwarded this to the dev team so they can also dig further.

    Looking forward to helping you. Thank you.

    ​​​​​​

    Todd
    Rank Math free

    Hi,

    We might need to take a closer look at the settings. Please include your WP logins in the designated Sensitive Data section.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:
    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):
    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

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

The ticket ‘Sitelinks search box js code error’ is closed to new replies.