dotCMS / dotCMS/core

`POST /api/v1/browser` returns a folder's name in `title`, and its real title in `description`

Open
#36,757 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

OKR : Customer Support
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Problem Statement

For folder results, the Site Browser endpoint (POST /api/v1/browser) mislabels two
fields relative to the Folder resource (GET /api/v1/folder/...):

  • browser item title → the folder name/slug (e.g. headless-and-sdks)
  • browser item description → the folder's actual title (e.g. Headless and SDKs)

The Folder resource returns the same object with title set to the real title and
no description. So the two endpoints disagree on what title means for the same
folder. Any consumer that reads browser.title as a display label gets the URL
slug instead of the human title.

Steps to Reproduce

Pick any folder whose title differs from its name (create one if needed: folder
name headless-and-sdks, title Headless and SDKs).

Image

1. Folder resource — title is correct:

curl -s -H "Authorization: Bearer $TOKEN" \
  "https://{host}/api/v1/folder/sitename/{siteId}/uri/docs/build/headless-and-sdks" \
  | jq '.entity | {name, title, description}'
{ "name": "headless-and-sdks", "title": "Headless and SDKs", "description": null }

2. Browser endpoint — title is the name; real title hides in description:

curl -s -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -X POST "https://{host}/api/v1/browser" \
  -d '{"hostFolderId":"{parentFolderInode}","showFolders":true,"showFiles":false}' \
  | jq '.entity.list[] | select(.name=="headless-and-sdks") | {name, title, description}'
{ "name": "headless-and-sdks", "title": "headless-and-sdks", "description": "Headless and SDKs" }
Acceptance Criteria

browser item title should equal the folder's title (Headless and SDKs), matching
the Folder resource. description should carry the folder description (or be omitted),
not the title.

dotCMS Version

dotcms-core 26.07.27-01 (July 27, 2026 12:44 PM)

Severity

Low - Minor issue or cosmetic

Links

NA

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the handlers or resource mappings for POST /api/v1/browser and GET /api/v1/folder/...; compare how folder name, title, and description are assembled. Reproduce the mismatch with a folder whose name differs from its title, then verify that browser.title matches the folder title and description contains only the folder description or is omitted.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.