umbraco / Umbraco-CMS

Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
https://umbraco.com
MIT License
4.39k stars 2.66k forks source link

Long file paths in backoffice files #16763

Closed LennardF1989 closed 1 month ago

LennardF1989 commented 1 month ago

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

v14

Bug summary

Upon publishing a v14 website, the new backoffice tends to create some pretty deeply nested folder structures. I've already seen a situation where I had to apply some trickery on Umbraco Cloud to work around it.

Specifics

Example paths that Umbraco Cloud was struckling with:

error: unable to create file output/wwwroot/umbraco/backoffice/packages/block/block-grid/components/block-grid-area-config-entry/workspace/block-grid-area-type-workspace-editor.element.d.ts: Filename too long
error: unable to create file output/wwwroot/umbraco/backoffice/packages/block/block-grid/components/block-grid-area-config-entry/workspace/block-grid-area-type-workspace-editor.element.js: Filename too long
error: unable to create file output/wwwroot/umbraco/backoffice/packages/block/block-grid/property-editors/block-grid-group-configuration/property-editor-ui-block-grid-group-configuration.element.d.ts: Filename too long
error: unable to create file output/wwwroot/umbraco/backoffice/packages/block/block-grid/property-editors/block-grid-group-configuration/property-editor-ui-block-grid-group-configuration.element.js: Filename too long
error: unable to create file output/wwwroot/umbraco/backoffice/packages/block/block-grid/property-editors/block-grid-layout-stylesheet/property-editor-ui-block-grid-layout-stylesheet.element.d.ts: Filename too long
error: unable to create file output/wwwroot/umbraco/backoffice/packages/block/block-grid/property-editors/block-grid-layout-stylesheet/property-editor-ui-block-grid-layout-stylesheet.element.js: Filename too long
error: unable to create file output/wwwroot/umbraco/backoffice/packages/block/block-grid/property-editors/block-grid-type-configuration/property-editor-ui-block-grid-type-configuration.element.d.ts: Filename too long
error: unable to create file output/wwwroot/umbraco/backoffice/packages/block/block-grid/property-editors/block-grid-type-configuration/property-editor-ui-block-grid-type-configuration.element.js: Filename too long
error: unable to create file output/wwwroot/umbraco/backoffice/packages/block/block-list/property-editors/block-list-type-configuration/property-editor-ui-block-list-type-configuration.element.d.ts: Filename too long
error: unable to create file output/wwwroot/umbraco/backoffice/packages/block/block-list/property-editors/block-list-type-configuration/property-editor-ui-block-list-type-configuration.element.js: Filename too long
error: unable to create file output/wwwroot/umbraco/backoffice/packages/block/block-type/property-editors/block-type-group-configuration/property-editor-ui-block-type-group-configuration.element.d.ts: Filename too long
error: unable to create file output/wwwroot/umbraco/backoffice/packages/block/block-type/property-editors/block-type-group-configuration/property-editor-ui-block-type-group-configuration.element.js: Filename too long

error: unable to create file output/wwwroot/umbraco/backoffice/packages/core/workspace/components/workspace-breadcrumb/workspace-variant-menu-breadcrumb/workspace-variant-menu-breadcrumb.element.d.ts: Filename too long
error: unable to create file output/wwwroot/umbraco/backoffice/packages/core/workspace/components/workspace-breadcrumb/workspace-variant-menu-breadcrumb/workspace-variant-menu-breadcrumb.element.js: Filename too long
error: unable to create file output/wwwroot/umbraco/backoffice/packages/core/workspace/components/workspace-breadcrumb/workspace-variant-menu-breadcrumb/workspace-variant-menu-breadcrumb.kind.d.ts: Filename too long
error: unable to create file output/wwwroot/umbraco/backoffice/packages/core/workspace/components/workspace-breadcrumb/workspace-variant-menu-breadcrumb/workspace-variant-menu-breadcrumb.kind.js: Filename too long
error: unable to create file output/wwwroot/umbraco/backoffice/packages/documents/document-types/property-editors/document-type-picker/property-editor-ui-document-type-picker.element.d.ts: Filename too long
error: unable to create file output/wwwroot/umbraco/backoffice/packages/documents/documents/user-permissions/input-document-granular-user-permission/input-document-granular-user-permission.element.d.ts: Filename too long
error: unable to create file output/wwwroot/umbraco/backoffice/packages/documents/documents/user-permissions/input-document-granular-user-permission/input-document-granular-user-permission.element.js: Filename too long
error: unable to create file output/wwwroot/umbraco/backoffice/packages/language/collection/views/table/column-layouts/entity-actions/language-table-entity-actions-column-layout.element.d.ts: Filename too long
error: unable to create file output/wwwroot/umbraco/backoffice/packages/language/collection/views/table/column-layouts/entity-actions/language-table-entity-actions-column-layout.element.js: Filename too long
error: unable to create file output/wwwroot/umbraco/backoffice/packages/property-editors/content-picker/dynamic-root/input-content-picker-document-root/input-content-picker-document-root.element.d.ts: Filename too long
error: unable to create file output/wwwroot/umbraco/backoffice/packages/property-editors/content-picker/dynamic-root/input-content-picker-document-root/input-content-picker-document-root.element.js: Filename too long
error: unable to create file output/wwwroot/umbraco/backoffice/packages/templating/modals/templating-page-field-builder/components/template-field-dropdown-list/template-field-dropdown-list.element.d.ts: Filename too long
error: unable to create file output/wwwroot/umbraco/backoffice/packages/templating/modals/templating-page-field-builder/components/template-field-dropdown-list/template-field-dropdown-list.element.js: Filename too long
error: unable to create file output/wwwroot/umbraco/backoffice/packages/webhook/collection/views/table/column-layouts/entity-actions/webhook-table-entity-actions-column-layout.element.d.ts: Filename too long
fatal: Could not reset index file to revision 'HEAD'.

The path this is run from: C:\home\site\repository

Combine that with a random path from the log: C:\home\site\repository/output/wwwroot/umbraco/backoffice/packages/webhook/collection/views/table/column-layouts/entity-actions/webhook-table-entity-actions-column-layout.element.d.ts and this alone is already 184 characters, where the theoretical legacy limit of Windows is 260.

Steps to reproduce

Have a long path 😅.

Expected result / actual result

I propose this is something that is actively being monitored on the code base, where a full path starting from the root can never exceed about 110 characters.

That would mean something like: /umbraco/backoffice/packages/block/block-grid/components/block-grid-area-config-entry/workspace/block-grid-area-type-workspace-editor.element.d.ts (147)

Becomes: /umbraco/backoffice/packages/block/grid/components/area-config-entry/workspace/type-editor.element.d.ts (110)

I understand this may be less readable that you would like, but it makes sense to not repeat keywords. Eg. When inside a block-folder, it's logical block-grid is in there, which you can then just call grid, etc.

All-in-all: really just want to raise awareness on this!

github-actions[bot] commented 1 month ago

Hi there @LennardF1989!

Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.

We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.

We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.

Thanks, from your friendly Umbraco GitHub bot :robot: :slightly_smiling_face:

iOvergaard commented 1 month ago

Yup, it's a known problem, but 14.1 will already see a vast improvement on the paths and the amount of files loaded; we have shortened and bundled the bigger culprits. Version 14.1 will be out later this week.

elit0451 commented 1 month ago

Hi @LennardF1989 👋

Thanks for reaching out! As pointed out by @iOvergaard, v14.1 is already out and it came with many improvements. Can you let us know if this is still an issue for you after upgrading?