Skip to content

[DEFECT] Updating Folders: Confusing field mappings and missing URL update capability #34016

Description

@zJaaal

Problem Statement

The PUT /api/v1/assets/folders endpoint has critical field mapping issues and missing functionality:

  1. Confusing Field Mappings:

    • The name field actually updates the folder's title
    • The title field incorrectly updates the description instead
    • This inconsistent behavior makes the API confusing and error-prone
  2. Missing URL Update Capability: There is no way to update a folder's URL/path through this endpoint

These issues prevent users from intuitively managing folder metadata through the REST API and require knowledge of undocumented field mappings.

Steps to Reproduce

Issue 1: Confusing field mappings

  1. Create a folder via API or UI with specific title and description values

  2. Send a PUT request with the name field:

    {
        "assetPath": "//demo.dotcms.com/my-folder/",
        "data": {
            "name": "New Name Value"
        }
    }
  3. Observe that the folder's title is updated (not a "name" property)

  4. Send a PUT request with the title field:

    {
        "assetPath": "//demo.dotcms.com/my-folder/",
        "data": {
            "title": "New Title Value"
        }
    }
  5. Observe that the folder's description is updated instead of the title

Issue 2: Cannot update folder URL

  1. Attempt to update a folder's URL/path using the endpoint
  2. Observe that:
    • The assetPath parameter is used to locate the folder, so changing it causes a "folder not found" error
    • The data object does not accept a URL/path field to specify the new location
  3. Result: No way to update folder URL through this endpoint

Current confusing payload structure:

{
    "assetPath": "//demo.dotcms.com/blog-new/",
    "data": {
        "name": "blog",           // ← Actually updates "title"
        "title": "My blog",       // ← Actually updates "description"
        "defaultAssetType": "FileAsset",
        "showOnMenu": true,
        "sortOrder": 0
    }
}

Acceptance Criteria

  • Field mappings are consistent and intuitive:
    • title field updates the folder's title property
    • description field updates the folder's description property
    • Remove or deprecate the confusing name field
  • API documentation clearly describes all supported fields and their mappings
  • The endpoint supports updating a folder's URL/path
  • Breaking changes are properly communicated if name field is removed
  • Unit and integration tests verify correct field mappings

Proposed Solution

  1. Field Mapping Fix:

    • Make title field update the folder's title (correct behavior)
    • Make description field update the folder's description
    • Either remove name field or make it an alias for title with deprecation notice
  2. URL Update Support: Add a newPath or path field in the data object to support moving folders:

    {
        "assetPath": "//demo.dotcms.com/old-path/",
        "data": {
            "path": "/new-path/",
            "title": "Updated Title"
        }
    }

Video Evidence

Screen.Recording.2025-12-04.at.12.49.22.PM-1.mov

dotCMS Version

Latest main version

Proposed Objective

Quality Assurance

Proposed Priority

Priority 2 - High

Activity

  1. changed the title [-]PUT /api/v1/assets/folders: Confusing field mappings and missing URL update capability[/-] [+][DEFECT] Updating Folders: Confusing field mappings and missing URL update capability[/+] on Dec 4, 2025
  2. added theissue type on Dec 4, 2025
  3. moved this from New to Next 2-4 Sprints in dotCMS - Product Planningon Dec 4, 2025
  4. fabrizzio-dotCMS commented on Dec 4, 2025

    @fabrizzio-dotCMS
    Member
    __Screen.Recording.2025-12-04.at.3.09.57.PM.mov
  5. added a commit that references this issue on Dec 5, 2025
  6. added a commit that references this issue on Dec 5, 2025
  7. 15 remaining items

  8. zJaaal commented on Dec 10, 2025

    @zJaaal
    MemberAuthor

    QA Passed

    Now we are able to update the folder title and name.

    name will update the url of the folder and title the friendly title that can be used in the Navigation

  9. removed their assignment
    on Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions