We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In the search function, a piece of code create an url 'wikipedia_article'.
$collection = $wikidata->search($keyword);
This url is the simple concatenation of the domain name and the label.
$output = $collection->map(function ($item) use ($lang) { $item['wikipediaArticle'] = 'https://' . $lang . '.wikipedia.org/wiki/' . rawurlencode($item['label']); return new SearchResult($item, $lang); });
But the label does not contain the differentiation information between the different results. So, sometimes they all have the same URL...
The text was updated successfully, but these errors were encountered:
Thank you for noticing that! I'll see what I can do about it as soon as I have some free time.
Sorry, something went wrong.
I, for one, did this to get around the problem...
public function autocomplete($keyword, $limit = 10) : Collection { $wikidata = new Wikidata(); $collection = $wikidata->search($keyword, 'fr', $limit); return $collection->map(static function (SearchResult $item) { $item->wikipedia_article = 'http://www.wikidata.org/entity/' . $item->id; return $item; }); }
composer.json : "freearhey/wikidata": "^3.5", (3.5.1)
"freearhey/wikidata": "^3.5",
Other than that, this bundle is great. Thanks :)
I have just published an updated version of the package, hopefully this will finally solve this problem.
No branches or pull requests
In the search function, a piece of code create an url 'wikipedia_article'.
This url is the simple concatenation of the domain name and the label.
But the label does not contain the differentiation information between the different results. So, sometimes they all have the same URL...
The text was updated successfully, but these errors were encountered: