Closed ablears closed 1 month ago
Hi @ablears thanks for sending this - I will see what has happened and fix today.
Can you confirm that this is the payload you sent into the POST /api/new call?
[ { "anchor": "/01/00701197903555", "itemDescription": "VivaFizz Naturale: A Refreshing Twist on Health and Flavour", "defaultLinktype": "gs1:pip", "links": [ { "linktype": "gs1:pip", "hreflang": [ "en" ], "type": "text/html", "title": "VivaFizz Naturale", "href": "https://future-products.com.au/vivafizz-naturale/" }, { "linktype": "gs1:pip", "hreflang": [ "pt" ], "type": "text/html", "title": "VivaFizz Naturale", "href": "https://future-products.com.au/vivafizz-naturale-br/" }, { "linktype": "gs1:faqs", "hreflang": [ "en" ], "type": "text/html", "title": "VivaFizz Naturale", "href": "https://future-products.com.au/faq/" }, { "linktype": "gs1:sustainabilityInfo", "hreflang": [ "en" ], "type": "text/html", "title": "VivaFizz Naturale", "href": "https://future-products.com.au/nurturing-nature-sustaining-flavour/" }, { "linktype": "gs1:homepage", "hreflang": [ "en" ], "type": "text/html", "title": "VivaFizz Naturale", "href": "https://future-products.com.au/about-us/" } ] } ]
HI @ablears - Your test revealed that the code was not removing the ';q=' sub-part of the language so that it was not getting always getting a language match when a web browser was used that includes the q= in its list. This is now fixed and unveiled another bug which was going through the URL list and seeing if there was a language match, rather than going through the languages and see if there is a URL list match. I've updated the tests in setup_test.py to reflect this test for the correct langauge. So thank you! And please test to make sure it works for you before I close this issue.
Hi @nicklansley, this is confirmed working. Thank you for your time.
Hi, I upgraded to 3 from 2.6.
Resolver links that were working OK, such as https://id.ibn.link/01/00701197903555 now do not resolve to the default link. They instead show a linkset json response, presumably because of the change to how default links are handled.
{"linkset": [{"href": "https://future-products.com.au/vivafizz-naturale/", "title": "VivaFizz Naturale", "type": "text/html", "hreflang": ["en"]}, {"href": "https://future-products.com.au/vivafizz-naturale-br/", "title": "VivaFizz Naturale", "type": "text/html", "hreflang": ["pt"]}]}
Given the request is from a browser with EN language, why is it not resolving to the EN link? Is there a new syntax for retrieving the default link?
Here's what our UI sends in this example:
[{"anchor":"/01/00701197903555","itemDescription":"<p>VivaFizz Naturale: A Refreshing Twist on Health and Flavour</p>\r\n","defaultLinktype":"gs1:pip","links":[{"linktype":"gs1:pip","hreflang":["en"],"type":"text/html","title":"VivaFizz Naturale","href":"https://future-products.com.au/vivafizz-naturale/"},{"linktype":"gs1:pip","hreflang":["pt"],"type":"text/html","title":"VivaFizz Naturale","href":"https://future-products.com.au/vivafizz-naturale-br/"},{"linktype":"gs1:faqs","hreflang":["en"],"type":"text/html","title":"VivaFizz Naturale","href":"https://future-products.com.au/faq/"},{"linktype":"gs1:sustainabilityInfo","hreflang":["en"],"type":"text/html","title":"VivaFizz Naturale","href":"https://future-products.com.au/nurturing-nature-sustaining-flavour/"},{"linktype":"gs1:homepage","hreflang":["en"],"type":"text/html","title":"VivaFizz Naturale","href":"https://future-products.com.au/about-us/"}]}]"
My expectation is that https://id.ibn.link/01/00701197903555 will resolve to https://future-products.com.au/vivafizz-naturale/ or https://future-products.com.au/vivafizz-naturale-br/ if the request comes from a browser with Portuguese language set.
Here is what I see in the resolver logs: