Course components do not show up in Sidebar Navigation

Recently I updated site for Sumac. There is a sidebar toggled navigator, but course components do not show up. Is there anything that I can change in setting or configuration to populate the course components in sidebar?. I really appreciate for any help .

This is interesting. Are you using the Indigo theme?

Yes, I am using indigo

@hinakhadim I know you previously looked into sidebar issues with Indigo. Have you seen this?

@hkhanal01 is it possible to turn indigo off as a test and see if that resolves the issue?

@sarina Thank you for quick response. I have not seen sidebar navigation in previous version and i did not have issue using indigo

I will check with turning off Indigo

I can see Sidebar Menu in couple of courses. Seems like it is not an issue of Indio theme. But in few courses, i see an issue loading content in sidebar Navigator.

| 2025-03-19 15:28:24,447 ERROR 15 [django.request] [user 4] [ip 193.43.135.147] log.py:241 - Internal Server Error: /api/course_home/v1/navigation/course-v1:DagX+GenAI+2024Q1
tutor_local-lms-1  | Traceback (most recent call last):
tutor_local-lms-1  |   File "/openedx/venv/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner
tutor_local-lms-1  |     response = get_response(request)
tutor_local-lms-1  |                ^^^^^^^^^^^^^^^^^^^^^
tutor_local-lms-1  |   File "/openedx/venv/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response
tutor_local-lms-1  |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
tutor_local-lms-1  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tutor_local-lms-1  |   File "/opt/pyenv/versions/3.11.8/lib/python3.11/contextlib.py", line 81, in inner
tutor_local-lms-1  |     return func(*args, **kwds)
tutor_local-lms-1  |            ^^^^^^^^^^^^^^^^^^^
tutor_local-lms-1  |   File "/openedx/venv/lib/python3.11/site-packages/django/views/decorators/csrf.py", line 56, in wrapper_view
tutor_local-lms-1  |     return view_func(*args, **kwargs)
tutor_local-lms-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^
tutor_local-lms-1  |   File "/openedx/venv/lib/python3.11/site-packages/django/views/generic/base.py", line 104, in view
tutor_local-lms-1  |     return self.dispatch(request, *args, **kwargs)
tutor_local-lms-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tutor_local-lms-1  |   File "/openedx/venv/lib/python3.11/site-packages/rest_framework/views.py", line 509, in dispatch
tutor_local-lms-1  |     response = self.handle_exception(exc)
tutor_local-lms-1  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^
tutor_local-lms-1  |   File "/openedx/venv/lib/python3.11/site-packages/rest_framework/views.py", line 469, in handle_exception
tutor_local-lms-1  |     self.raise_uncaught_exception(exc)
tutor_local-lms-1  |   File "/openedx/venv/lib/python3.11/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
tutor_local-lms-1  |     raise exc
tutor_local-lms-1  |   File "/openedx/venv/lib/python3.11/site-packages/rest_framework/views.py", line 506, in dispatch
tutor_local-lms-1  |     response = handler(request, *args, **kwargs)
tutor_local-lms-1  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tutor_local-lms-1  |   File "/openedx/edx-platform/lms/djangoapps/course_home_api/outline/views.py", line 478, in get
tutor_local-lms-1  |     course_blocks = self.filter_inaccessible_blocks(course_blocks, course_key)
tutor_local-lms-1  |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tutor_local-lms-1  |   File "/openedx/edx-platform/lms/djangoapps/course_home_api/outline/views.py", line 502, in filter_inaccessible_blocks
tutor_local-lms-1  |     section_data['children'] = self.get_accessible_sequences(
tutor_local-lms-1  |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tutor_local-lms-1  |   File "/openedx/edx-platform/lms/djangoapps/course_home_api/outline/views.py", line 587, in get_accessible_sequences
tutor_local-lms-1  |     return [
tutor_local-lms-1  |            ^
tutor_local-lms-1  |   File "/openedx/edx-platform/lms/djangoapps/course_home_api/outline/views.py", line 589, in <listcomp>
tutor_local-lms-1  |     if seq_data['id'] in available_sequence_ids or seq_data['type'] != 'sequential'
tutor_local-lms-1  |        ~~~~~~~~^^^^^^
tutor_local-lms-1  | TypeError: string indices must be integers, not 'str'

What type(s) of Xblocks are failing? Are they standard blocks (capa problems, text blocks) or custom ones?

Xblocks are customized. I created following their guidelines

@Chelsea_Rathbun - so it seems the sidebar might not be working with custom XBlocks. Is there a developer of the feature we could pull in here?

@hkhanal01 are your custom blocks public, so the team could try them out?

@sarina we have not published those xblocks. Thank you for your help. I resolved the issue.

  • Review carefully to see if any structure components (especially sequentials) appear as strings
    or blank instead of JSON. tutor local run lms ./manage.py lms dump_course_structure course-v1:GenAI+2024 --settings=tutor.production
  • Delete those blanks and strings from your CMS course outline
  • Re-index the Course Structure: tutor local run cms ./manage.py cms reindex_course --course=course-v1:GenAI+2024Q1 --settings=tutor.production
  • Remove caches: tutor local exec redis redis-cli flushall
  • Restart your LMS and CMS: tutor local restart lms cms

Glad to see that you were able to resolve the issue!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.