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

Fix null content import error - [closed] #52

Closed
cswendrowski opened this issue Feb 2, 2022 · 6 comments
Closed

Fix null content import error - [closed] #52

cswendrowski opened this issue Feb 2, 2022 · 6 comments

Comments

@cswendrowski
Copy link

In GitLab by @mod100 on Feb 2, 2022, 04:02

Merges master -> master

I hit an error when trying to import my WorldAnvil content because of this line (252) in framework.js.

const isLongContent = section.content.length > 100;

In some cases section.content is null and so this line fails, hence the change.

@cswendrowski
Copy link
Author

In the case that section.content is null as you describe, do we have section.content_parsed that we will need on line 261, or is there going to be a further failure later down the line?

@cswendrowski
Copy link
Author

In GitLab by @nickm2402 on Feb 2, 2022, 09:54

I was just looking for help on the fvtt discord because of this I believe. When trying to import I'm getting this in Chrome

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'length') at getArticleContent (framework.js:252:45) at importArticle (framework.js:108:19)

Or this in Firefox:

Uncaught (in promise) TypeError: section.content is null getArticleContent https://mydomainhere/modules/world-anvil/module/framework.js:252 importArticle https://mydomainhere/modules/world-anvil/module/framework.js:108 [...]

Weirdly enough, I can't import ANY of my articles and always get this error no matter what I try. Did something change recently, maaybe in regards to the WA API? I can't imagine this being unnoticed for 2 months since 1.3.1 released

@cswendrowski
Copy link
Author

In GitLab by @mod100 on Feb 2, 2022, 10:08

Commented on module/framework.js line 252

When I checked in my import job, content_parsed always existed and was just an empty string, even when content was null.

@cswendrowski
Copy link
Author

In GitLab by @mod100 on Feb 2, 2022, 10:10

Hi @nickm2402 yes, this is the same error that I found, that I think the change above resolves.

@cswendrowski
Copy link
Author

It sounds like this is a new issue related to an update just pushed (today) on the WA side. I mentioned it to Dimitris and he thinks he can resolve it on his side without us needing to make a code change. Let's sit tight for a couple hours and see what happens.

@cswendrowski
Copy link
Author

In GitLab by @nickm2402 on Feb 2, 2022, 11:06

This issue seems to be resolved for me. Working flawlessly now :) Thank you and give Dimitris my thanks!

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

1 participant