Can't add content to new content libraries

Hi,

We are trying to use the Libraries v2. When we try to add content to the libraries, no error is displayed, but no content is actually added.

The logs show this when trying to add a “teste de text” text element to the libraries.

cms-1  | 2026-03-03 16:06:35,213 INFO 39 [openedx.core.djangoapps.content.search.tasks] [user 5] [ip 57.134.91.53] tasks.py:74 - Updating content index document for library block with id: lb:Calcul_Quebec:fin:html:teste-de-texte-93151b3c8b8f
cms-1  | 2026-03-03 16:06:35,778 INFO 39 [celery.app.trace] [user 5] [ip 57.134.91.53] trace.py:128 - Task openedx.core.djangoapps.content.search.tasks.upsert_library_block_index_doc[0f4f23a7-39a1-4083-ab67-cfa12ec6fab1] succeeded in 0.5657392009161413s: None
cms-1  | 2026-03-03 16:06:35,778 INFO 39 [openedx_events.tooling] [user 5] [ip 57.134.91.53] tooling.py:179 - Responses of the Open edX Event <org.openedx.content_authoring.library_block.created.v1>:
cms-1  | [(<function auto_tag_library_block at 0x7f9dd9db7600>, None),
cms-1  |  (<function library_block_updated_handler at 0x7f9dd9dde340>, None)]
cms-1  | [pid: 39|app: 0|req: 302/821] 172.18.0.3 () {70 vars in 4344 bytes} [Tue Mar  3 16:06:35 2026] POST /api/libraries/v2/lib:Calcul_Quebec:fin/blocks/ => generated 409 bytes in 671 msecs (HTTP/1.1 200) 10 headers in 510 bytes (1 switches on core 0)
cms-1  | [pid: 38|app: 0|req: 324/822] 172.18.0.3 () {58 vars in 1245 bytes} [Tue Mar  3 16:06:35 2026] OPTIONS /api/xblock/v2/xblocks/lb:Calcul_Quebec:fin:html:teste-de-texte-93151b3c8b8f/fields/ => generated 0 bytes in 1 msecs (HTTP/1.1 200) 9 headers in 491 bytes (1 switches on core 0)
cms-1  | 2026-03-03 16:06:35,847 INFO 39 [eventtracking.backends.async_routing] [user 5] [ip 57.134.91.53] async_routing.py:41 - [EventEmissionExit] skipping event /api/xblock/v2/xblocks/lb:Calcul_Quebec:fin:html:teste-de-texte-93151b3c8b8f/fields/
cms-1  | 2026-03-03 16:06:35,848 INFO 39 [tracking] [user 5] [ip 57.134.91.53] logger.py:41 - {"name": "/api/xblock/v2/xblocks/lb:Calcul_Quebec:fin:html:teste-de-texte-93151b3c8b8f/fields/", "context": {"user_id": 5, "path": "/api/xblock/v2/xblocks/lb:Calcul_Quebec:fin:html:teste-de-texte-93151b3c8b8f/fields/", "course_id": "", "org_id": "", "enterprise_uuid": ""}, "username": "mboisson", "session": "16a1b0fbdc9c92712cd61107a088ddb5", "ip": "57.134.91.53", "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36", "host": "studio.edx.evolo.calculquebec.cloud", "referer": "https://apps.edx.evolo.calculquebec.cloud/", "accept_language": "fr-CA,fr;q=0.9,en-US;q=0.8,en;q=0.7,fr-FR;q=0.6", "event": "{\"GET\": {}, \"POST\": {}}", "time": "2026-03-03T16:06:35.847794+00:00", "event_type": "/api/xblock/v2/xblocks/lb:Calcul_Quebec:fin:html:teste-de-texte-93151b3c8b8f/fields/", "event_source": "server", "page": null}
cms-1  | 2026-03-03 16:06:35,854 INFO 39 [edx_rest_framework_extensions.auth.jwt.middleware] [user 5] [ip 57.134.91.53] middleware.py:79 - ('The view BlockFieldsView allows Jwt Authentication. The required permission class, NotJwtRestrictedApplication,', ' was automatically added.')
cms-1  | 2026-03-03 16:06:35,893 INFO 39 [openedx.core.djangoapps.content.search.tasks] [user 5] [ip 57.134.91.53] tasks.py:74 - Updating content index document for library block with id: lb:Calcul_Quebec:fin:html:teste-de-texte-93151b3c8b8f
cms-1  | 2026-03-03 16:06:36,449 INFO 39 [celery.app.trace] [user 5] [ip 57.134.91.53] trace.py:128 - Task openedx.core.djangoapps.content.search.tasks.upsert_library_block_index_doc[894ee687-f569-4e37-b477-012f59c529c8] succeeded in 0.5565991010516882s: None
cms-1  | 2026-03-03 16:06:36,449 INFO 39 [openedx_events.tooling] [user 5] [ip 57.134.91.53] tooling.py:179 - Responses of the Open edX Event <org.openedx.content_authoring.library_block.updated.v1>:
cms-1  | [(<function auto_tag_library_block at 0x7f9dd9db7600>, None),
cms-1  |  (<function library_block_updated_handler at 0x7f9dd9dde340>, None)]
cms-1  | [pid: 39|app: 0|req: 303/823] 172.18.0.3 () {70 vars in 4419 bytes} [Tue Mar  3 16:06:35 2026] POST /api/xblock/v2/xblocks/lb:Calcul_Quebec:fin:html:teste-de-texte-93151b3c8b8f/fields/ => generated 169 bytes in 636 msecs (HTTP/1.1 200) 10 headers in 510 bytes (1 switches on core 0)
cms-1  | 2026-03-03 16:06:36,505 INFO 38 [eventtracking.backends.async_routing] [user 5] [ip 57.134.91.53] async_routing.py:41 - [EventEmissionExit] skipping event /api/libraries/v2/lib:Calcul_Quebec:fin/
cms-1  | 2026-03-03 16:06:36,505 INFO 38 [tracking] [user 5] [ip 57.134.91.53] logger.py:41 - {"name": "/api/libraries/v2/lib:Calcul_Quebec:fin/", "context": {"user_id": 5, "path": "/api/libraries/v2/lib:Calcul_Quebec:fin/", "course_id": "", "org_id": "", "enterprise_uuid": ""}, "username": "mboisson", "session": "16a1b0fbdc9c92712cd61107a088ddb5", "ip": "57.134.91.53", "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36", "host": "studio.edx.evolo.calculquebec.cloud", "referer": "https://apps.edx.evolo.calculquebec.cloud/", "accept_language": "fr-CA,fr;q=0.9,en-US;q=0.8,en;q=0.7,fr-FR;q=0.6", "event": "{\"GET\": {}, \"POST\": {}}", "time": "2026-03-03T16:06:36.505183+00:00", "event_type": "/api/libraries/v2/lib:Calcul_Quebec:fin/", "event_source": "server", "page": null}
cms-1  | [pid: 38|app: 0|req: 325/824] 172.18.0.3 () {64 vars in 4193 bytes} [Tue Mar  3 16:06:36 2026] GET /api/libraries/v2/lib:Calcul_Quebec:fin/ => generated 512 bytes in 32 msecs (HTTP/1.1 200) 10 headers in 519 bytes (1 switches on core 0)

This is using Ulmo, on an instance that first existed on Sumac, then upgraded to Teak and now to Ulmo. I am specifying this just in case. We have never used the libraries before, but maybe some upgrade steps were missed.

Hi @mboisson I’m recategorizing this to Site Operators. Would you mind editing your post to indicate which version of the platform you’re using?

Done. This is on Ulmo.

@mboisson From the logs, it looks like the block is being created successfully. I don’t see any errors. The block is being created, assigned an ID (lb:Calcul_Quebec:fin:html:teste-de-texte-93151b3c8b8f), and added to the search index.

Perhaps the error occurs when querying the search engine to list the contents of the library.

  1. Go to the empty library in Studio.
  2. Open your browser’s dev tools and go to the “Network” tab to start recording network requests. If there are any existing entries, clear them.
  3. Click on the “Components” tab at the top of the library.
  4. You should see two requests to Meilisearch (a POST and an OPTIONS). On a devstack it will have the URL http://meilisearch.local.openedx.io:7700/multi-search but yours will have a different URL. Check both for any errors, either in the “headers” or the “response”.
2 Likes

Thank you!

This was it. meilisearch.edx was not in the prefixes configured in our external caddy server. Fixing that config fixed it.

1 Like

By the way in case anyone encounters a similar issue that’s not solved by the above, I recently received a PR fixing a related bug:

When a course creator [who is not a “global staff” user] creates a new library, the cached [auth] token for Meilisearch needs to be refreshed to include the new library’s access_id. Without this, newly added components won’t appear in search results until the page is refreshed.