Changing Nextcloud tasklist slugs

Hi All,

I’ve been using Nextcloud for a couple of years through a Nextcloud service provider. When navigating to tasklists in Nextcloud’s browser interface, the browser URL changes to the path slug of the active tasklist, as expected. For example, when navigating to a tasklist called “Személyes”, the URL changes to the following path: /apps/tasks/calendars/szemlyes.When a new tasklist is created, a tasklist-slug is generated from the ISO basic latin characters of the list’s name. (For example, when crating a tasklist called “Példa”, a the tasklist slug is registered as plda). When changing an existing tasklist’s name, its slug isn’t updated but remains the same.

Is there a way to change and edit the name of tasklist slugs after that they’ve been created from within the admin? If there’s no way to change tasklist slugs from the admin, would updating the according substrings in Nextcloud’s database work as a workaround? As these tasklist slugs sometimes need to be referenced, it’d be nice to have complete control over them.

If it isn’t possible to change tasklist slugs from the admin, then please take it as a feature request.

A somewhat related issue is that old and unused tasklist slugs can prevent new calendars or tasklists from being created. Controlling tasklist slugs would also provide a workaround for this.

Thank you,
Márton

Details

  • Nextcloud Server version:

    • 31.0.8
  • Operating system and version:

    • Linux 5.10.0-37.amd64 x86_64
  • PHP version:

    • 8.3.24

Hi @martonlente,

you’ve described three separate issues — and they are not all bugs. Let me be precise.

1. Slug generation strips non-ASCII characters — Enhancement, not a bug

The slug only needs to be unique, not human-readable. An MD5 hash would serve the same technical purpose equally well. For example, the German word “Straße” (street) becomes strae — the ß is dropped instead of being transliterated to ss. The calendar works perfectly regardless, and the slug never surfaces in the UI. Better transliteration (ß→ss, é→e, ő→o) would be nicer, but it is not broken. Enhancement request at most.

2. Slug doesn’t update on rename — By design

This is correct CalDAV behaviour. The collection URI and the display name are intentionally decoupled. Silently changing the URI on rename would break all existing CalDAV client subscriptions. What’s missing is an explicit admin UI to change the URI manually when needed. That would be a feature request.

3. Old slugs blocking new calendar creation — Potentially a bug

A deleted calendar’s URI should arguably become available again. If it doesn’t, there may be a stale row remaining in the database. This could be worth reporting at Issues · nextcloud/calendar · GitHub — but it would help to include exact steps to reproduce and confirm that the blocking slug really belongs to a fully deleted calendar.

Database workaround to rename a slug:

First, find your calendar ID — replace your_username with your actual Nextcloud username:

SELECT id, uri, displayname
FROM oc_calendars
WHERE principaluri = 'principals/users/your_username';

Then update the URI — replace 123 with the actual id from the query above:

UPDATE oc_calendars SET uri='your-desired-slug' WHERE id=123;

Important warnings:

  • Any CalDAV client that has subscribed to the old URL will lose the calendar immediately and need to be reconfigured with the new URL. Unless you have a specific operational reason to change the slug, it is not worth the disruption.
  • Before touching the database, make sure you have a current database dump. Any direct manipulation of the database carries a risk of data loss if something goes wrong.

EDIT: Regarding where to report — the Tasks app and the Calendar app are separate frontends that share the same CalDAV backend (part of nextcloud/server). The slug generation likely happens in that backend, not in either frontend app. The safest place to report is https://github.com/nextcloud/tasks/issues — the maintainers will redirect to the server repo if needed.


h.t.h.


ernolf