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]: Cannot read properties of undefined (reading 'length') at ClassroomAdminPageComponent.getPrerequisiteLength #20892

Open
HardikGoyal2003 opened this issue Aug 25, 2024 · 1 comment
Labels
bug Label to indicate an issue is a regression frontend Impact: Low -- ONLY DO IF GOOD FIRST ISSUE Postponing for now, since it doesn't affect users much. Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet.

Comments

@HardikGoyal2003
Copy link
Member

Describe the bug

ERROR TypeError: Cannot read properties of undefined (reading 'length')
    at ClassroomAdminPageComponent.getPrerequisiteLength (classroom-admin-page.component.ts:569:66)
    at Object.eval [as updateDirectives] (ClassroomAdminPageComponent.html:165:25)
    at Object.debugUpdateDirectives [as updateDirectives] (core.js:32850:21)
    at checkAndUpdateView (core.js:32245:14)
    at callViewAction (core.js:32486:21)
    at execEmbeddedViewsAction (core.js:32449:17)
    at checkAndUpdateView (core.js:32246:5)
    at callViewAction (core.js:32486:21)
    at execEmbeddedViewsAction (core.js:32449:17)
    at checkAndUpdateView (core.js:32246:5)
View_ClassroomAdminPageComponent_31 @ ClassroomAdminPageComponent.html:165
logError @ core.js:33039
handleError @ core.js:6700
handleError @ app-error-handler.ts:89
eval @ core.js:30009
ZoneDelegate.invoke @ zone.js:390
Zone.run @ zone.js:147
runOutsideAngular @ core.js:28951
tick @ core.js:30009
eval @ core.js:29878
ZoneDelegate.invoke @ zone.js:390
onInvoke @ core.js:29022
ZoneDelegate.invoke @ zone.js:389
Zone.run @ zone.js:147
run @ core.js:28906
next @ core.js:29877
SafeSubscriber.__tryOrUnsub @ Subscriber.js:201
SafeSubscriber.next @ Subscriber.js:139
Subscriber._next @ Subscriber.js:85
Subscriber.next @ Subscriber.js:62
Subject.next @ Subject.js:57
emit @ core.js:26382
checkStable @ core.js:28959
onHasTask @ core.js:29039
ZoneDelegate.hasTask @ zone.js:445
ZoneDelegate._updateTaskCount @ zone.js:466
Zone._updateTaskCount @ zone.js:288
Zone.runTask @ zone.js:209
drainMicroTaskQueue @ zone.js:605
ZoneTask.invokeTask @ zone.js:511
invokeTask @ zone.js:1675
globalZoneAwareCallback @ zone.js:1701
Show 30 more frames
Show lessUnderstand this error

URL of the page where the issue is observed.

http://localhost:8181/classroom-admin

Steps To Reproduce

  1. Assign yourself curriculum-admin rights
  2. Generate a dummy math classroom from the activities tab
  3. Go to /classroom-admin page
  4. Create 3 new classrooms (other than maths)
  5. Now, unassign 3 topics from the maths classroom and try to add one of the unassigned to the newly created classroom.
  6. You will be able to see the error in the console.

Expected Behavior

It should not show any error!!

Screenshots/Videos

Screencast.from.25-08-24.12.36.32.PM.IST.webm

What device are you using?

Desktop

Operating System

Linux

What browsers are you seeing the problem on?

Chrome

Browser version

No response

Additional context

No response

Tips for developers

Before addressing the bug, please identify which PR caused the issue (you can follow the steps here). If you identify the PR, comment on the issue with a link to it. If not, mention the commit hash of the oldest commit you saw the bug on (and the month and year it was made in).

Then, please leave a comment with details of the approach that you plan to take to fix the issue (see example).

Note: If this is your first Oppia issue, please make sure to follow our guidelines for choosing an issue and setting things up. You will also need to show a demo of the fix working correctly on your local machine. Thanks!

@HardikGoyal2003 HardikGoyal2003 added triage needed bug Label to indicate an issue is a regression labels Aug 25, 2024
@AFZL210 AFZL210 moved this from Todo to In Progress in LaCE Quality Team Aug 25, 2024
@oppia oppia deleted a comment Aug 25, 2024
@AFZL210
Copy link
Contributor

AFZL210 commented Aug 25, 2024

@AlecsSantos Please don't share any file links here.

@oppia oppia deleted a comment Aug 25, 2024
@seanlip seanlip added Impact: Low -- ONLY DO IF GOOD FIRST ISSUE Postponing for now, since it doesn't affect users much. Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet. labels Aug 27, 2024
@AFZL210 AFZL210 removed their assignment Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Label to indicate an issue is a regression frontend Impact: Low -- ONLY DO IF GOOD FIRST ISSUE Postponing for now, since it doesn't affect users much. Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet.
Projects
Status: In Progress
Development

No branches or pull requests

4 participants
@seanlip @AFZL210 @HardikGoyal2003 and others