Repository navigation
best-practices: set folder menu settings and find unpublished sites - #2
Merged
Merged
Conversation
Folders created with default settings are not on the menu, so a folder-driven VTL menu renders empty with HTTP 200. The endpoint that sets title, Show on Menu and Sort Order is not in the MCP's bundled spec, and /api/v1/folder has no update, so agents copying a site left the menu empty. Unwraps 01-site.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
perPage is ignored (default page of 10 sites), and the plain listing skips unpublished sites, so a re-run missed the site it had just created. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two fixes to
dotcms-best-practices,reference/core/01-site.md, found while running the "create a site from an existing one" use case against a multi-site estate.Folders and the menu
Folders created with default settings are not on the menu: Show on Menu off, no title, sort order 0. A copied site then renders with an empty header. The endpoint that sets these,
POST/PUT /api/v1/assets/folders, is not in the MCP server's bundled API spec, so the agent can't find it withsearch./api/v1/folderhas no update.$navtool.getNav(),GET /api/v1/nav). The agent reads the model site's menu withGET /api/v1/nav/?depth=2&host_id=<siteId>. Because the Navigation API is read-only, it sets each folder's title, Show on Menu and Sort Order through/api/v1/assets/folders, called withexecute.depth=2andhost_id, and it works on an unpublished site.SKILL.md"Also worth checking" gets a "Menu is empty" row.Before: the agent tried
PUT /api/v1/folder, which doesn't exist, and handed the menu to a person. After: in three runs out of three (Claude Code with Opus, and VS Code with Copilot on Sonnet) it set the folder titles, Show on Menu and sort order to match the source site, and the menu rendered in every language.Site lookup
The lookup was
GET /api/v1/sitewithperPage. Two problems:perPageis ignored; the parameter isper_page. Without it only 10 sites come back.archive=falsereturns active and unpublished sites;archive=truereturns only archived ones.The lookup is now
GET /api/v1/site?per_page=100&archive=false, in the steps and in "Done when".Related: dotCMS/core#38739 (the MCP page tools have the same unpublished-site lookup bug).
🤖 Generated with Claude Code