Skip to content
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

XML viewer not working: Cannot read property textContent of null #7066

Closed
benaltair opened this issue May 18, 2021 · 2 comments
Closed

XML viewer not working: Cannot read property textContent of null #7066

benaltair opened this issue May 18, 2021 · 2 comments

Comments

@benaltair
Copy link
Contributor

Describe the bug
I can't view any JATS XML files that I've uploaded. I just see the spinner and get this error in the console:

Uncaught TypeError: Cannot read property 'textContent' of null
    at s.test (lens.js:3)
    at l.convertDocument (lens.js:5)
    at Object.<anonymous> (lens.js:5)
    at c (jquery.min.js?v=3.2.1.2:2)
    at Object.fireWith [as resolveWith] (jquery.min.js?v=3.2.1.2:2)
    at l (jquery.min.js?v=3.2.1.2:2)
    at XMLHttpRequest.<anonymous> (jquery.min.js?v=3.2.1.2:2)

To Reproduce
Steps to reproduce the behavior:

  1. Add the XML file as a Galley (example)
  2. Click on the galley to open it on the publication page
  3. See spinner

What application are you using?
OJS version 3.2.1.2

Additional information
image

@benaltair benaltair changed the title XML viewer not working XML viewer not working: Cannot read property 'textContent' of null May 18, 2021
@benaltair benaltair changed the title XML viewer not working: Cannot read property 'textContent' of null XML viewer not working: Cannot read property textContent of null May 18, 2021
@benaltair
Copy link
Contributor Author

On a second read, might be related to: #6307

@NateWr
Copy link
Contributor

NateWr commented May 18, 2021

Yeah, the Lens Reader breaks when it encounters JATS XML that it doesn't understand. And unfortunately JATS XML is very diverse so most XML won't load in it. I'll close this as a duplicate, but point you to this issue in our docs hub, where we discuss an XML Production Guide. The guide doesn't exist yet, and the short answer is that JATS XML is still very difficult to do reliably. But you may find some links to different tools and display strategies there.

@NateWr NateWr closed this as completed May 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants