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

Unstable - Create new exercise - ReferenceError: node details must be defined #4763

Open
pcenov opened this issue Sep 27, 2024 · 3 comments
Open
Labels
P3 - low Priority: Stretch goal

Comments

@pcenov
Copy link
Member

pcenov commented Sep 27, 2024

Observed behavior

This is a follow-up to #4761. Each time I create a new exercise I am seeing the following error in the console without any user facing consequences:

validation.js:42 Uncaught (in promise) ReferenceError: node details must be defined
    at isNodeComplete (validation.js:42:11)
    at updateNodeComplete (actions.js:8:20)
    at actions.js:92:13
    at dexie.min.mjs:1:15533
    at Me (dexie.min.mjs:1:10267)
    at Le (dexie.min.mjs:1:11024)
    at $e (dexie.min.mjs:1:10875)
    at dexie.min.mjs:1:15533

Expected behavior

It should be investigated whether this is problematic and the error should be fixed.

Steps to reproduce the issue

  1. Go to https://unstable.studio.learningequality.org/en/accounts/#/ and sign in
  2. Open a channel and create a new exercise
  3. Observe the error in the console

Additional information

2024-09-27_13-00-41

Usage Details

@pcenov
Copy link
Member Author

pcenov commented Sep 27, 2024

@radinamatic

@manzil-infinity180
Copy link

manzil-infinity180 commented Nov 7, 2024

Image

here const node = context.rootGetters['contentNode/getContentNode'](nodeId);
(/studio/contentcuration/contentcuration/frontend/channelEdit/vuex/assessmentItem/actions.js)

need nodeId as 4d5556cd94b046c3818ea092686ed496 but getting df153f3201ce49ed83363e26192b379f
i tried with hardcoded with the nodeId 4d5556cd94b046c3818ea092686ed496 and see i am not getting any error

just one doubt?
why two contendNode id ? so I can try to fix this issue
I am currently reading docs soon will fix it?

Assign me !!

@bjester
Copy link
Member

bjester commented Nov 7, 2024

Hi @manzil-infinity180,

From your screenshot, the ID 4d5556cd94b046c3818ea092686ed496 appears to be the parent ID of the folder containing the exercise (assessment). In the case of the channel in your screenshot, that appears to be a root node of the channel. A Studio channel uses a recursive hierarchical structure where a content node of kind = topic can have children, who would have their parent / parent_id match the parent content node's ID.

The code you referenced retrieves from the vuex state a content node with ID of nodeId. In other words, the nodeId variable referenced by the code is actually the ID of the content node. In addition, content nodes have another field called node_id which is distinctly different and used for other purposes. I do not believe there's a mismatch with the IDs as that would lead to a more widespread problem, and does not align with the report that this happens "without any user facing consequences".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 - low Priority: Stretch goal
Projects
None yet
Development

No branches or pull requests

4 participants