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

[BUG] getUsedScalesMap fails on reports with missing taxonomy definitions #435

Closed
paulwarren-wk opened this issue May 25, 2023 · 4 comments · Fixed by #476
Closed

[BUG] getUsedScalesMap fails on reports with missing taxonomy definitions #435

paulwarren-wk opened this issue May 25, 2023 · 4 comments · Fixed by #476
Labels
bug Something isn't working

Comments

@paulwarren-wk
Copy link
Contributor

What happened?

If you open a report containing numeric concepts that are missing taxonomy definitions (e.g. because the relevant taxonomy file could not be found), then you get an error on loading the document:

Uncaught TypeError: Cannot read properties of undefined (reading 'split')
    at new QName (qname.js:17:1)
    at iXBRLReport.qname (report.js:248:1)
    at Fact.getScaleLabel (fact.js:284:1)
    at report.js:234:40
    at Array.forEach (<anonymous>)
    at iXBRLReport.getUsedScalesMap (report.js:227:1)
    at Inspector._getScalesOptions (inspector.js:344:1)
    at Inspector.setupSearchControls (inspector.js:333:1)
    at Inspector.searchReady (inspector.js:372:1)
    at inspector.js:154:17

The search controls are stuck with the "Please wait - building index..." mask.

The problem is that we don't include the units for these facts in the JSON, because, without the type information we don't know that they're numeric. getUsedScalesMap reasonably enough assumes that if they have a scale, that they're numeric and calls getScaleLabel which fails because it can't find the unit.

Obviously there are some simple fixes for this specific issue, but I do have a general concern with the approach of continuing in the face of serious XBRL validity errors, as even with this bug fixed, there will be lots of things that don't work in the viewer. I think that Arelle should make it much more obvious when you're working with a report that is not valid according to the specifications, as currently, serious validity errors are mixed in with messages relating to business-level errors from formula rules.

Version

1.1.76-dev

With which browsers are you experiencing the bug?

Chrome

Documents

No response

Screenshots

No response

@brettkail-wk
Copy link
Contributor

Obviously there are some simple fixes for this specific issue, but I do have a general concern with the approach of continuing in the face of serious XBRL validity errors, as even with this bug fixed, there will be lots of things that don't work in the viewer.

Workiva is actively interested in continuing to support these cases. It is very often the case that users want to use the iXBRL viewer on their work-in-progress documents, which might be partially/invalidly tagged.

@paulwarren-wk
Copy link
Contributor Author

Obviously there are some simple fixes for this specific issue, but I do have a general concern with the approach of continuing in the face of serious XBRL validity errors, as even with this bug fixed, there will be lots of things that don't work in the viewer.

Workiva is actively interested in continuing to support these cases. It is very often the case that users want to use the iXBRL viewer on their work-in-progress documents, which might be partially/invalidly tagged.

Understood - and there's already quite a lot of code in the viewer to cope with viewing invalid documents for this reason.

I've raised a separate issue (#474) to track what, if anything, we do on this more general issue, so that this one can deal with the getUsedScalesMap failure.

@austinmatherne-wk
Copy link
Contributor

austinmatherne-wk commented Jun 29, 2023

I think the particular problem this issue was addressing got fixed up in #446. So, we can probably close this one out and keep tabs on the broader issue over in #474.

@paulwarren-wk
Copy link
Contributor Author

Agreed - I've confirmed that it also fixes this, but have added some more tests as this was triggering the problem via a different route.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants