-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
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
Required extension and settings #15
Comments
Cool, happy you want to us it! In terms of support, the Wikipedia/Mediawiki loader builds a single query to your API endpoint. That needs to be supported, but I don't know which components are required on your server for that to be the case. Here is the query: https://github.com/NiklasGollenstede/wikipedia-peek/blob/master/background/loaders/wikipedia.js#L65-L71 As for settings of the extension, have a look at |
Your extension could definitely be useful to me - hence why I have spent more time than I care to admit learning some basic javascript. Unfortunately, it seems my skills are still inadequate. I can't seem to I'm trying to use the Firefox Debugger, but with no luck. I think it's more difficult because the UUID changes with each built, so when I try to look at stack trace, Firefox looks for file like this So if you please help in the right direction, by specifying how find the query, that WP sends, it would be a big help. |
Ok, so first thing I forgot to mention is that this is only available in the And then it is to note that, for security/sandboxing reasons, the (user provided) code of that function gets executed in an isolated context, which seems to swallow all debugging output (i.e.
For any given installation/profile, that UUID should remain constant. Not quite sure how you are loading the extension. Just installing the Make sure to have If you then set url = new URL(url);
if ((/(?:^|\.)(?:wiki[^.]*?|mediawiki)\.org$|^citronhat[.]miraheze[.]org$/).test(url.hostname)) {
return 'https://'+ url.host +'/w/api.php'; // always use https
}
return 'https://'+ url.host +'/api.php'; // always use https it loads from the correct API path. I could only find a single page on your Wiki. Loading for that results in the query: https://citronhat.miraheze.org/w/api.php?action=query&format=json&formatversion=2&redirects=&prop=extracts|pageimages&exintro=&piprop=thumbnail|original&pithumbsize=250&titles=Analyse_2_(2) {
"batchcomplete": true,
"warnings": {
"main": {
"warnings": "Unrecognized parameters: piprop, pithumbsize."
},
"extracts": {
"warnings": "HTML may be malformed and/or unbalanced and may omit inline images. Use at your own risk. Known problems are listed at https://www.mediawiki.org/wiki/Extension:TextExtracts#Caveats."
},
"query": {
"warnings": "Unrecognized value for parameter \"prop\": pageimages."
}
},
"query": {
"normalized": [
{
"fromencoded": false,
"from": "Analyse_2_(2)",
"to": "Analyse 2 (2)"
}
],
"pages": [
{
"pageid": 148,
"ns": 0,
"title": "Analyse 2 (2)",
"extract": ""
}
]
}
} So it seems your Wiki doesn't support thumbnail extraction, which isn't critical, but also the extract for at least this page is empty, resulting in the preview to fail. |
I'm trying to get your extension to work with my wiki at the Miraheze wiki farm. It works perfectly well with wikipedia.org, so I suspect the issue isn't with the Wikipedia Peek extension, but with rather with the localSettings.php at Miraheze or perhaps with the extensions I have enabled in my wiki.
If you could please help me understand what settings and extensions Wikipedia Peek rely on, it would be very much appreciated. Wikipedia Peek is - as far as know - the only way to get large previews that can handle
<math>
, which is a feature I find very useful.I'm pretty sure that TextExtracts is needed and that extension I do have. I use the Firefox browser.
The text was updated successfully, but these errors were encountered: