Hello everyone,
I am trying to migrate my custom app to v16. I am currently struggeling with one app in which the dekstop icon references the wrong url? I simplified the naming in all files to trace it down
app name: test_app
module name: test_app
desktop icon name: test_app
workspace sidebar name: test_app
The code for the desktop icon file is:
{
“app”: “test_app”,
“creation”: “2025-11-28 16:19:17.072053”,
“docstatus”: 0,
“doctype”: “Desktop Icon”,
“hidden”: 0,
“icon_type”: “Link”,
“idx”: 0,
“label”: “TEST-APP”,
“link_type”: “Workspace Sidebar”,
“link_to”: “test_app”,
“logo_url”: “/assets/test_app/img/logo.png”,
“modified”: “2026-01-20 15:26:04.057464”,
“modified_by”: “Administrator”,
“name”: “test_app”,
“owner”: “Administrator”,
“restrict_removal”: 0,
“roles”: ,
“standard”: 1
}
<a class="desktop-icon" data-id="test_app" data-logo="/assets/test_app/img/logo.png" data-icon="" data-type="" style="text-decoration:none" href="/desk/test-app?sidebar=test_app">
The workspace works, sidebar works but desktop icon always links to “/desk/test-app?…” using a hyphon not an underscore? Anyone knows what I am missing?
Thank you for any help!
Hi. Sorry for bothering again. But no-one knows how the link url of a desk icon in v16 is generated?
In Frappe v16, the system automatically converts underscores (_) in app/workspace routes to hyphens (-). This causes your desktop icon to link to /desk/test-app?... (with a hyphen) instead of matching your test_app naming.
The Solution:
-
Update hooks.py: Explicitly define the hyphenated route inside your app’s hooks.py under add_to_apps_screen:
Python
add_to_apps_screen = [
{
"name": "test_app",
"logo": "/assets/test_app/img/logo.png",
"title": "TEST-APP",
"route": "/desk/test-app",
}
]
-
Clear Cache and Migrate: Run these commands in your terminal to apply the changes:
Bash
bench --site [your-site-name] clear-cache
bench --site [your-site-name] migrate
1 Like
@Shree0990 Thank you for your help and the information. I though that something like that would take place. That caused the problem, because referring to “landing” page of the app containg a hyphon still seems to require the hyphon.
I just solved the problem 2 days ago and could not yet post my solution. Creating a desktop icon for an app using the new v16 “desk” it was not really clear to me from the docs so I decided against the hooks.py approach. That caused the problem in the end and countless days of frustration. It seems to be that when implementing workspace/app/app.json, config/desktop.py and desktop_icon/app.json they file interfere / override each other and icons get created in parallel. And naming, label and title attribute seems to play an important role. I thought “name” would be “internal variable name” and label/title the “display name”. But it seems to be not that simple. Never really sorted that out. However, after setting all alike i got it running. To be honest not fully clear to me and I wish there would be some sort of better documentation.
Hi @fixundfertig123, to create a desktop icon that navigate to external link (url), of following:
- create a desktop icon with type of external and pate desired url.
- create a workspace with type of url and paste same url.
- link the workspace to the desktop icon.
remember to clear cache and logout and login again, this should work.