Commit Graph

70389 Commits

Author SHA1 Message Date
Andy Butland
e6c7ef8904 Segments: Only validate segment values for cultures they are defined for (closes #21029) (#21033)
* Only validate segment values for cultures they are defined for.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Integration test suppressions.

* Remove previous implementation using ISegmentService and rely on values provided in the model to determine segments with cultures.

* Omit null culture and remove passing but unrealistic tests.

* Fixed nullability error.

* Apply suggestions from code review

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>

* Relocated function following code review.

* Reset unchanged files.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-12-04 12:54:44 +01:00
Rick Butterfield
effccef81d Collections: Add selection mode toggle in UmbTableElement update lifecycle (#20486)
* Add selection mode toggle in UmbTableElement update lifecycle

* Update src/Umbraco.Web.UI.Client/src/packages/core/components/table/table.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Markup attribute consistency

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-12-04 11:25:19 +00:00
Engiber Lozada
88f04cd722 Document Tree: Fix undefined name for variants without fallback. (#21046)
* fix(backoffice): Tree menu item shows undefined for variant names without fallback

When a document variant has no name set and there's no fallback language
configured, the tree now falls back to the first variant with any name
instead of displaying "undefined".

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(backoffice): Show (Untitled) when no variant has a name

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-04 10:01:57 +00:00
Nicklas Kramer
26efa520bc Packaging: Fixing bad serialization for data types in packages (#21043)
* Changing data type serialization to datatype

* Moving and correcting comment
2025-12-04 10:52:23 +01:00
Jacob Overgaard
d8c03c426e Property Editors: Fix localization of user-provided labels (closes #20974) (#21045)
* fix: uses localization string() to localize user-provided labels

* fix: localizes placeholder as well

* Refinements to the Toggle input

The localizations can happen in the `config` setter,
then they don't need to re-get the localization each re-render.

Added a `when` directive to show/hide the label `<span>` tag.

Removed `_currentLabel` as unused.

* Refinements to the Textbox input

The localizations can happen in the `config` setter,
then they don't need to re-get the localization each re-render.

Refactored the `uui-input` attributes/properties.

* Refinements to the Number input

The localizations can happen in the `config` setter,
then they don't need to re-get the localization each re-render.

Refactored the `uui-input` attributes/properties.

* Update src/Umbraco.Web.UI.Client/src/packages/core/components/input-toggle/input-toggle.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/property-editors/text-box/property-editor-ui-text-box.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/property-editors/number/property-editor-ui-number.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Updates based on Copilot feedback

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
Co-authored-by: Lee Kelleher <leekelleher@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-04 09:20:33 +00:00
Lee Kelleher
455e7027a0 Block Grid: Sort mode (#20869)
* Added `icon-sort`

from Lucide's "arrow-down-up" icon.

* Added "Sort" package

with property action and context.

* Adds the "sort" property action and context to the Block Grid property

* [WIP] Observing sort mode toggle on Block Grid editor

* [WIP] Further work on Block Grid editor sort-mode

* Added "umb-sort-mode-toolbar" component

* Fixed typo of private method "renderNoting"

* Renamed "sort" property-action to "sort-mode"

* Corrected bad copypasta!

* Renamed "Sort" package to "Sorter"

to include the Sorter controller and maintain backwards-compatibility.

* Code updates based on @copilot feedback

* Fixed circular references

* Removed reference to "sorter/index.ts"

that I'd missed when relocating the package.

* Moved "sorter" back into "core" package

* Moved the "sort" property-action to a combined "property-actions" location

Fixed up other code, use of constants and manifest clarity.

* rename with claude code (#21036)

* rename with claude code

* include property action in name

* renaming

* Rename sortingMode to isSortMode in property sort context

Refactored property sort mode context and related components to use 'isSortMode'

* add jsdocs

* Update vite.config.ts

* no need to export as element

* add tests

* Ordered the tsconfig namespaces

* Reverted the relocation of the "sorter" controller files

* Import ordering

* Reverted some code style tweaks

* Renamed `sortingMode` to `isSortMode`

* Renamed `sortModeEnabled` to `isSortMode`

* Add tests for property sort mode action

* add js docs

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-12-04 09:03:58 +00:00
Jacob Overgaard
26679d17db build(deps): bumps monaco-editor from 0.54.0 to 0.55.1 (#21054) 2025-12-04 08:51:45 +00:00
Andreas Zerbst
7b462c17f9 E2E: QA updated flaky acceptance tests (#21012)
* Updated tests

* Updated tests

* Cleane up

* Bumped version of test helpers

* Updated tests

* Bumped test helpers
2025-12-04 08:26:47 +00:00
Jacob Overgaard
cb454372f2 Debug mode: Marks UMB-DEBUG cookie as HttpOnly and Secure (#21032)
* fix: sets profiling cookie to httpOnly and strict in order to run non-secure

* fix: adds extra message to explain when you can set a cookie

* fix: simplify cookie explanation comment in WebProfilerRepository

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: checks that the profiler is actually enabled and/or disabled and warns the user if that is not the case

* Update src/Umbraco.Web.UI.Client/src/assets/lang/en.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-04 08:55:39 +01:00
Jacob Overgaard
84fecd3521 Backoffice: CTRL+Click to open in a new tab should work on Linux (closes #21009) (#21027)
* fix: uses 'href' as property instead of attribute

* build: runs on PR to release branches

* Content references: Avoid requesting references for content that is not yet persisted server side (#21035)

* Avoid requesting references for content that is not yet persisted server side.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* refactor to use condition

* revert

* danish translations

* da translation

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>

* fix: CTRL+Click now opens links in new tab on Linux

The router's anchor click handler incorrectly assumed non-Windows
platforms use Meta (⌘) key for "open in new tab". This broke
CTRL+Click on Linux, which uses CTRL like Windows.

Changed detection from "is Windows" to "is Mac" so Linux correctly
uses CTRL+Click while Mac continues to use Meta+Click.

Also replaced deprecated navigator.platform with navigator.userAgent.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-03 15:03:18 +00:00
Jacob Overgaard
c35fcf181b Merge remote-tracking branch 'origin/release/17.0' 2025-12-03 15:10:47 +01:00
Andy Butland
86411e4ae3 Content references: Avoid requesting references for content that is not yet persisted server side (#21035)
* Avoid requesting references for content that is not yet persisted server side.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* refactor to use condition

* revert

* danish translations

* da translation

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-12-03 12:25:06 +00:00
Bjarne Fyrstenborg
6104ae60ce Image cropper modal import missing component (#20651)
* Import missing component

* Handle nullable type

* Vertically center image

* Add minimum width for SVG without dimensions

* 100% height until max height

* 100% height minus top/bottom padding

* Revert "100% height minus top/bottom padding"

This reverts commit 67ada4c70f4b75dfcfa2b54ce139ec7465a17ce1.

* Revert "Handle nullable type"

This reverts commit 3130e11a4be83a18b5a7d8c1c24ee23c94d8765d.

* Removed flexbox style

* Fixed circular dependency

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-12-02 17:07:01 +00:00
Lee Kelleher
bcec927e64 Modal: Remove unused uui-dialog element in modal component (#21030)
refactor(backoffice): remove unused uui-dialog element in modal component

Remove dead code that created an unnecessary uui-dialog element inside uui-modal-dialog. The uui-modal-dialog component already manages its own internal dialog element, making the manual creation redundant.

This aligns the dialog implementation with the sidebar implementation pattern, where container elements manage their own internal structure.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-02 18:04:19 +01:00
Andy Butland
5e1f758117 Merge branch 'release/17.0' 2025-12-02 15:57:09 +01:00
Andy Butland
b0e5cd768d Reverted accidental change to Program.cs. 2025-12-02 15:56:30 +01:00
Andy Butland
a9d8d13735 Merge branch 'release/17.0'
# Conflicts:
#	tests/Umbraco.Tests.Integration/CompatibilitySuppressions.xml
2025-12-02 15:42:32 +01:00
Niels Lyngsø
857f2900bb Segments: Fix for processing data for Segments-variants (#21018)
* refactor to load segments before processing incoming data

* clean up

* remove unused segment promise
2025-12-02 15:00:25 +01:00
Mads Rasmussen
876fc5fff9 Collection: Introduce Collection Item Ref extension type (#20994)
* Add entity collection item card extension type + default elements

* implement user collection item card

* fix selection events

* map to prop

* add prop/attr for href

* add support for which detail properties to show

* update type import

* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/item/entity-collection-item-card/entity-collection-item-card.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* import card in correct file

* Fix event listener binding for selection events

* implement disabled property for collection item cards

* init commit of collection item ref extension

* fix imports

* add element interface

* Implement UmbEntityCollectionItemElement interface in item cards

Added the UmbEntityCollectionItemElement interface to document and user collection item card elements for improved type safety and consistency. Updated type exports to include the new interface.

* Update collection item ref to use uui-ref-node

Replaces the placeholder div with a uui-ref-node component, passing relevant item properties and event handlers. Adds dynamic icon rendering using umb-icon.

* Refactor entity collection item elements to use shared base

Introduces a new abstract base class for entity collection item elements, consolidating shared logic for card and ref variants. Updates card and ref element implementations to extend the new base, and refactors extension manifest interfaces for consistency. This improves maintainability and reduces code duplication.

* use class instead of magic string

* Use ifDefined for href in item card element

* Fix href attribute handling in collection item ref

* Make meta property optional in ManifestEntityCollectionItemBase

* Use ifDefined for href binding in document card

* Fix user card href binding with ifDefined

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-02 13:07:52 +00:00
Jacob Overgaard
c612fcc866 Localization: Adds termOrDefault() method to accept a fallback value (#20947)
* feat: adds `termOrDefault` to be able to safely fall back to a value if the translation does not exist

* feat: accepts 'null' as fallback

* feat: uses 'termOrDefault' to do a safe null-check and uses 'willUpdate' to contain number of re-renders

* feat: uses null-check to determine if key is set

* chore: accidental rename of variable

* uses `when()` to evaluate

* revert commits

* fix: improves the fallback mechanism

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-02 11:58:25 +00:00
Niels Lyngsø
c885922a64 Block: open-interaction only available when Content is Editable (#20833)
Only interactive-open area when editable
2025-12-02 10:57:17 +00:00
Mads Rasmussen
1cdc15efda Collection: Introduce Collection Item Card extension type (#20954)
* Add entity collection item card extension type + default elements

* implement user collection item card

* fix selection events

* map to prop

* add prop/attr for href

* add support for which detail properties to show

* update type import

* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/item/entity-collection-item-card/entity-collection-item-card.element.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* import card in correct file

* Fix event listener binding for selection events

* implement disabled property for collection item cards

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-02 10:43:43 +00:00
Kenn Jacobsen
657ccbd104 Delivery API: Retain the Delivery API login redirect behavior in .NET 10 (closes #21000) (#21023)
* Retain the Delivery API login redirect behavior in .NET 10

* Retrofit fix for backwards compatability
2025-12-02 11:02:18 +01:00
Niels Lyngsø
e0999c186b Chore: Move old icons into legacy folder, make new folder for custom. (#20990)
* move legacy icons into a folder

* regenerate icons

* icon compile script for custom

* Reverts "icon-company" to use "building-2" from latest Lucide version

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-12-02 09:49:23 +00:00
Engiber Lozada
da66cbdcf4 Property Editors: Added form control and mandatory support(User, Member, Member Group) (#20672)
* Implement form control for user picker property editor.

* Added form control support to member picker property editor.

* Added form control support to member group picker property editor and removed super.value.

* Reverted max state to infinity.

* Removed console.log inside the render.

* Removed duplicated import.

* Import missing input components in member picker tests

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-12-02 07:44:08 +00:00
Andy Butland
7d0101170e Management API: Return not found from request for content references when entity does not exist (closes #20997) (#20999)
* Return not found when request for content references when entity does not exist.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Move check for entity existence from controller to the service.

* Update OpenApi.json.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Addressed points raised in code review.

* Update OpenApi.json

* Resolved breaking changes.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit da94e0953b)
2025-12-02 13:28:50 +09:00
Andy Butland
da94e0953b Management API: Return not found from request for content references when entity does not exist (closes #20997) (#20999)
* Return not found when request for content references when entity does not exist.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Move check for entity existence from controller to the service.

* Update OpenApi.json.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Addressed points raised in code review.

* Update OpenApi.json

* Resolved breaking changes.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-02 13:25:43 +09:00
Andy Butland
706ac2d8f6 Static files: Fix tree to only provide items from expected folders (closes #20962) (#21001)
* Applies checks for root folders to static file tree service.

* Add integration tests.

* Fix ancestor test.

* Amends from code review.

* Integration test compatibility suppressions.

* Reverted breaking change in test base class.

(cherry picked from commit 84c15ff4d7)
2025-12-02 10:22:15 +09:00
Andy Butland
84c15ff4d7 Static files: Fix tree to only provide items from expected folders (closes #20962) (#21001)
* Applies checks for root folders to static file tree service.

* Add integration tests.

* Fix ancestor test.

* Amends from code review.

* Integration test compatibility suppressions.

* Reverted breaking change in test base class.
2025-12-02 10:20:08 +09:00
Andy Butland
f408d2a1b3 Migrations: Optimise ConvertLocalLinks migration to process data in pages, to avoid having to load all property data into memory (#21003)
* Optimize ConvertLocalLinks migration to process data in pages, to avoid having to load all property data into memory.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Updated obsoletion warning.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit 742de79f46)
2025-12-02 10:18:48 +09:00
Andy Butland
742de79f46 Migrations: Optimise ConvertLocalLinks migration to process data in pages, to avoid having to load all property data into memory (#21003)
* Optimize ConvertLocalLinks migration to process data in pages, to avoid having to load all property data into memory.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Updated obsoletion warning.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-02 10:09:54 +09:00
Jacob Overgaard
1694e3bad2 Tree: Fix incorrect error notification when deleting last child (closes #20977) (#20985)
* Fix infinite recursion and incorrect error notifications in tree children loading

This commit addresses two critical issues in the tree item children manager:

1. **Infinite recursion vulnerability**: The #resetChildren() method called
   loadChildren(), which could recursively call #resetChildren() again if
   the underlying issue persisted, creating an infinite loop.

2. **Inappropriate error messages**: The "Menu loading failed" notification
   was shown even in legitimate scenarios, such as when deleting the last
   child of a node, where an empty tree is the expected outcome.

Changes made:

- Add ResetReason type ('error' | 'empty' | 'fallback') to differentiate
  between error states and expected empty states

- Extract #loadChildrenWithOffsetPagination() as a terminal fallback method
  that uses only offset pagination and never calls #resetChildren(),
  structurally preventing recursion

- Update #resetChildren() to:
  - Accept a reason parameter to determine whether to show error notification
  - Reset all retry counters (#loadChildrenRetries, #loadPrevItemsRetries,
    #loadNextItemsRetries) to ensure clean state
  - Call #loadChildrenWithOffsetPagination() instead of loadChildren()
  - Only show error notification when reason is 'error'

- Update all call sites of #resetChildren() with appropriate reasons:
  - 'error' when retries are exhausted (actual failures)
  - 'empty' or 'fallback' when no new target is found (may be expected,
    e.g., after deleting items)

The fix makes infinite recursion structurally impossible by creating a
one-way flow: target-based loading can fall back to #resetChildren(),
which calls offset-only loading that never recurses back.

* Fix undefined items array causing tree to break after deletion

This fixes the root cause of issue #20977 where deleting a document type
would cause the tree to "forever load" with a JavaScript error.

The error occurred in #getTargetResultHasValidParents() which called .every()
on data without checking if it was undefined. When the API returned undefined
items (e.g., after deleting the last child), this caused:

TypeError: can't access property "every", e is undefined

The fix adds a guard to check if data is undefined before calling .every(),
returning false in that case to trigger the proper error handling flow.

* Address code review feedback on terminal fallback method

- Change error throwing to silent return for graceful failure handling
- Remove target pagination state updates from offset-only loading method
- Update JSDoc to clarify that method does not throw errors
2025-12-01 20:12:23 +01:00
Andy Butland
35f73a8a31 Migrations: Set a long timeout by default on the migration of system dates (closes #21013) (#21022)
Set a long timeout by default on the migration of system dates.
2025-12-01 19:24:26 +01:00
Andy Butland
24b3f11329 Migrations: Set a long timeout by default on the migration of system dates (closes #21013) (#21022)
Set a long timeout by default on the migration of system dates.
2025-12-01 19:13:55 +01:00
Andy Butland
025a4e056f Merge branch 'release/17.0'
# Conflicts:
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	version.json
2025-12-01 19:06:16 +01:00
Andy Butland
822a2fcf70 Migrations: Ensure umbracoPropertyData column casing (#21015)
* Add migration to fix umbracoPropertyData column casing.

* Improve migration with column existence check and logging

- Add ILogger to log when column is renamed
- Check if column exists with incorrect casing before renaming
- Use fluent Rename API instead of raw SQL
- Add XML remarks documentation

?? Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Clarify what old and new column name really is

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: kjac <kja@umbraco.dk>
# Conflicts:
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
2025-12-01 19:01:55 +01:00
Andy Butland
34aabb8413 Migrations: Ensure umbracoPropertyData column casing (#21015)
* Add migration to fix umbracoPropertyData column casing.

* Improve migration with column existence check and logging

- Add ILogger to log when column is renamed
- Check if column exists with incorrect casing before renaming
- Use fluent Rename API instead of raw SQL
- Add XML remarks documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Clarify what old and new column name really is

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: kjac <kja@umbraco.dk>
2025-12-01 17:47:31 +00:00
Laura Neto
1d59e20daa Delivery API: Missing Member Open API security scheme references (#21020)
Use AddComponent for OpenAPI security scheme registration

Fixes security requirements being serialized as empty objects in the
OpenAPI document by using the document's AddComponent method instead
of directly manipulating the SecuritySchemes dictionary.
2025-12-01 17:24:28 +01:00
Mads Rasmussen
1c922f34f5 Table Collection View: Update table view icon to 'icon-table' (#20970)
Update table view icon to 'icon-table'

Replaces the 'icon-list' icon with 'icon-table' for all table view manifests across multiple packages to improve consistency and better represent the table view visually.
2025-12-01 16:09:55 +00:00
Mads Rasmussen
18bbf5609b Data Type Workspace: Enable client mandatory field validation for configuration properties (#20799)
* Add validation property to PropertyEditorSettingsProperty

Introduces a 'validation' field to the PropertyEditorSettingsProperty interface, allowing configuration of mandatory status and custom mandatory messages for property editor settings.

* Pass validation property to umb-property component
2025-12-01 16:03:14 +00:00
Mads Rasmussen
0210e942ed Folder Workspace: Support menu expansion and breadcrumbs (closes #20675) (#20712)
* add menu context and breadcrumbs for document type folders

* add menu context and breadcrumbs for media type folders

* add menu context and breadcrumbs for media type folders

* add menu context and breadcrumbs for partial view folders

* add menu context and breadcrumbs for partial view folders

* add menu context and breadcrumbs for script folders

* Register menu structure workspace contexts and breadcrumbs for document blueprints

* fix menu alias

* remove from blueprints

* fix wrong path when navigating from an inner folder to an outer

* remove debugger

* fix structure link between variant to invariant

* fix up path generation

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-12-01 14:00:00 +00:00
Jacob Overgaard
bbc0f1f894 Upgrade: Deprecates Mangement API controller for defunct our.umbraco.com version checker (#21011)
* fix: deprecates the upgrade checker

* fix: removes any deprecated UI that no longer has a function for upgrade checks in the backoffice

* chore: generates new api types

* chore: deprecates types

* chore: returns direct task

* docs: explains deprecation

* chore: deprecated model

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-12-01 12:50:51 +00:00
Mole
75b40e79a2 Cache: Add awaits to memory cache rebuilds to fix race conditions (#20960)
* Await rebuilds and fix multiple open DataReaders

* Add additional missing awaits

(cherry picked from commit eaf5960a4d)
2025-12-01 13:46:23 +01:00
Jacob Overgaard
09844204b7 History: Take URL objects into consideration when storing Backoffice history (#20986)
* fix: allows URL to be passed to navigator

* Also adds fix to Block workspace

---------

Co-authored-by: leekelleher <leekelleher@gmail.com>
2025-12-01 12:29:07 +00:00
Kenn Jacobsen
1c4b4c90c9 Rendering: Don't use element cache level on snapshot cache level properties (#21006)
Don't use element cache level on snapshot cache level propreties
2025-12-01 12:52:35 +01:00
Jacob Overgaard
820c34432a Preview: Fix preview showing published version when Save and Preview is clicked multiple times (closes #20981) (#20992)
* Fix preview showing published version when Save and Preview is clicked multiple times

Fixes #20981

When clicking "Save and Preview" multiple times, the preview tab would show the published version instead of the latest saved version. This occurred because:

1. Each "Save and Preview" creates a new preview session with a new token
2. The preview window is reused (via named window target)
3. Without a URL change, the browser doesn't reload and misses the new session token
4. The stale page gets redirected to the published URL

Solution: Add a cache-busting parameter (?rnd=timestamp) to the preview URL, forcing the browser to reload and pick up the new preview session token. This aligns with how SignalR refreshes work.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Improve Save and Preview to avoid full page reloads when preview is already open

When clicking "Save and Preview" multiple times with a preview tab already open, the entire preview tab would reload. This enhancement makes it behave like the "Save" button - only the iframe reloads, not the entire preview wrapper.

Changes:
- Store reference to preview window when opened
- Check if preview window is still open before creating new session
- If open, just focus it and let SignalR handle the iframe refresh
- If closed, create new preview session and open new window

This provides a smoother UX where subsequent saves don't cause the preview frame and controls to reload, only the content iframe refreshes via SignalR.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Close preview window when ending preview session

Changes the "End Preview" behavior to close the preview tab instead of navigating to the published URL. This provides a cleaner UX and ensures subsequent "Save and Preview" actions will always create a fresh preview session.

Benefits:
- Eliminates edge case where preview window remains open but is no longer in preview mode
- Simpler behavior - preview session ends and window closes
- Users can use "Preview website" button if they want to view published page

Also removes unnecessary await on SignalR connection.stop() to prevent blocking if the connection cleanup hangs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix preview cookie expiration and add proper error handling

This commit addresses cookie management issues in the preview system:

1. **Cookie Expiration API Enhancement**
   - Added `ExpireCookie` overload with security parameters (httpOnly, secure, sameSiteMode)
   - Added `SetCookieValue` overload with optional expires parameter
   - Marked old methods as obsolete for removal in Umbraco 19
   - Ensures cookies are expired with matching security attributes

2. **PreviewService Cookie Handling**
   - Changed to use new `ExpireCookie` method with explicit security attributes
   - Maintains `Secure=true` and `SameSite=None` for cross-site scenarios
   - Uses new `SetCookieValue` overload with explicit expires parameter
   - Properly expires preview cookies when ending preview session

3. **Frontend Error Handling**
   - Added try-catch around preview window reference checks
   - Handles stale window references gracefully
   - Prevents potential errors from accessing closed window properties

These changes ensure preview cookies are properly managed throughout their
lifecycle and support both same-site and cross-site scenarios (e.g., when
the backoffice is on a different domain/port during development).

Fixes #20981

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Track document ID for preview window to prevent reusing window across different documents

When navigating from one document to another in the backoffice, the preview window reference was being reused even though it was showing a different document. This meant clicking "Save and Preview" would just focus the existing window without updating it to show the new document.

Now we track which document the preview window is showing and only reuse the window if:
1. The window is still open
2. The window is showing the same document

This ensures each document gets its own preview session while still avoiding unnecessary full page reloads when repeatedly previewing the same document.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Remove updates to ICookieManager and use Cookies.Delete to remove cookie.

* Fix file not found on click to save and preview.

* Removed further currently unnecessary updates to the cookie manager interface and implementation.

* Fixed failing unit test.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-12-01 11:16:35 +00:00
Engiber Lozada
b40ea0df8c Content Type Workspace: Create condition that checks content type uniques. (#20906)
* Created condition for workspace content type unique.

* Changed import.

* Revert import.

* Updated name in the alias example and also import.

* Update src/Umbraco.Web.UI.Client/examples/entity-content-type-condition/index.ts

Co-authored-by: Mads Rasmussen <madsr@hey.com>

* Update src/Umbraco.Web.UI.Client/examples/entity-content-type-condition/workspace-view-unique.element.ts

Co-authored-by: Mads Rasmussen <madsr@hey.com>

* Moved the manifest definition to the manifest file.

* Changed default export.

* Updated example element to render the real GUID.

* Fixed import.

* Replaced CONTENT_WORKSPACE for PROPERTY_STRUCTURE_WORKSPACE context.

* Moved content type unique condition to the content type folder.

* Fixed import.

* final adjustments

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-12-01 11:01:09 +01:00
Jacob Overgaard
050b37ed1a Installer: Removes unused telemetry functionality (#20995)
* fix: removes the non-functioning installer telemetry and obsoletes all InstallHelper functionality

* fix: deprecates related cookie

* fix: adds ActivatorUtilitiesConstructor for DI

* fix: obsoletes and removes more telemetry functionality

* fix: removes uneeded modifier

* docs: removes docs

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-28 22:21:04 +01:00
Mathias Helsengren
f99e9394f8 Culture and Hostnames: Add ability to sort hostnames (closes #20691) (#20826)
* Adding the sorter controller, and fixing some ui elements so you are able to drag the hostname elements around to sort them

* Fixed sorting

* Changed the html structure and tweaked around with the css to make it look better.
Added a description for the Culture section.
Alligned the rendered text to allign better with the name "Culture and Hostnames"

* Update src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/culture-and-hostnames/modal/culture-and-hostnames-modal.element.ts

Forgot to remove this after I was done testing

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/culture-and-hostnames/modal/culture-and-hostnames-modal.element.ts

Changing grid-gap to just gap

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Removed the disabled and readonly props I added since they are not needed.
Removed the conditional rendering that was attached to the readonly and disabled properties

* Removed the item id from the element and changed css and sorter logic to target the hostname-item class instead

* Updated test

* Bumped helpers

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
2025-11-28 10:06:20 +01:00
Andy Butland
9c038bc68b Re-enable package validation (#20964)
* Re-enable package validation.

* Remove unnecessary supressions file.

* Removed unnecessary suppressions.

* Restored and obsoleted all overload.
2025-11-28 09:48:06 +01:00