page.mainImage() throws error if querying in another language
See original GitHub issue TypeError: Cannot read property 'imageinfo' of undefined
at /app/node_modules/wikijs/dist/page.js:1:3865
The problem seems to be that for example in the German version (https://de.wikipedia.org/w/api.php), the prefix is not “File:” but “Datei:”, in the French version it’s “Fichier:”. For example:
rawImages: [ { ns: 6,
title: 'Datei:BatmobileBurton.jpg',
missing: '',
known: '',
imagerepository: 'shared',
imageinfo: [ [Object] ] },
{ ns: 6,
title: 'Datei:Commons-logo.svg',
missing: '',
known: '',
imagerepository: 'shared',
imageinfo: [ [Object] ] },
...
Should be possible to split by indexOf('😂?
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
RFC: Gatsby Head API · Discussion #35841 - GitHub
I am currently using react-helmet so set the language of the pages with a lang ... 0) { Err = Error; } 75...
Read more >How to query all published pages in a specific language
How to get all page nodes that are published using the API? Steps to Reproduce. Clarifying Information. Error Message. Defect Number.
Read more >php - Laravel 5.4: How to get the same result without nesting one ...
What I intend is to get the news $new in a certain language if($new_lang->lang_id == $lang_id) , then I look in the table...
Read more >R Error: Replacement has X Rows, Data has Y (2 Examples)
This tutorial explains how to handle the error message “replacement has X rows, data has Y” in the R programming language. The tutorial...
Read more >Known issues - Relativity Documentation
The following list provides descriptions of known issues in Relativity. ... setting a default OCR language may yield the error "Error in the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Check v3.1.4 ~ The π version 👍
Okay, I added the different translations of “image”, but I don’t like returning different types.
mainImage()
always returns a image URL now.