question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 6 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
dijscommented, Jul 28, 2017

Check v3.1.4 ~ The π version 👍

0reactions
dijscommented, Jul 28, 2017

Okay, I added the different translations of “image”, but I don’t like returning different types. mainImage() always returns a image URL now.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found