You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added the Cache Dynamic Node Items setting (cacheProjectedChildren), which turns off caching for the items Dynamic nodes list.
Added DynamicSource::canCacheProjections() and DynamicSource::getNextProjectionChangeDate(), so custom Dynamic sources can let Navigation cache their projected children.
Added the customLinkAttributes GraphQL node field, which returns only the custom attributes Navigation renders on the node’s link, with their values rendered.
Added NavigationContext::activeStateKey(), which returns a key for caching a rendered menu once for each active state rather than once for each page. See Cache the Rendered Menu. (#488)
Changed
Dynamic nodes now cache their projected children between requests, so a menu that lists a section, category group, volume or product type no longer queries it on every page view. The cache clears when content in the source is saved, deleted or moved, when the node or its menu changes, and when a projected item expires or a pending one reaches its post date. Dynamic nodes with a condition, previews and custom sources that don’t opt in still project on every read. Cached items are shared by every visitor, so sites with a plugin that filters elements per visitor through query events should turn off the new Cache Dynamic Node Items setting.
Projected nodes served from the cache load their element on first access, together for each Dynamic node, and keep the URL their element had when the cache was written.
Changed craft.navigation.render() and node queries using withLinkedElements() to use the menu cache, as other menu queries do. Linked elements still load fresh on each request, but node custom field values now come from the cache profile, so templates reading them through these queries get empty values on the Lite profile. Node query events that filter nodes for each visitor now apply to the cached result that every visitor shares.
Changed active state to ignore query strings on node URLs as well as on the page’s URL, so a node whose URL or URL suffix adds a query, such as ?ref=nav, is now current on its page. Nodes that differ only by their query are all current on that page.
Changed deleting a node with its descendants through Craft’s element actions or, on Craft 5.10 and later, its delete-elements/delete action to refuse while another editor has unsaved changes beneath the node in the menu builder, as deleting it with descendants in the builder already does. Previously the node was deleted and the other editor’s unsaved nodes moved up a level.
Fixed
Fixed Navigation’s MCP tools being rejected by Claude and OpenAI clients, which don’t accept dots in tool names. The tools are now named navigation_menus_list, navigation_menus_tree and navigation_nodes_move, matching the names Craft uses for its own tools from Craft 5.12.1.
Fixed the menu builder letting you drag a node inside one already at the menu’s Max Levels, or drag a node with children deeper than the limit allows, which then failed to save with “Maximum menu depth exceeded.” (#490)
Fixed node.getLink() and node.linkAttributes() outputting a JSON array when passed a rel, target, href or custom attribute the node already has, such as rel on a link that opens in a new window. A passed class or rel is now added to the node’s own, and other attributes replace the node’s value.
Fixed nodes copied to another site with “Use elements from target site” keeping the source site’s title, and no longer following renames of the linked element on that site.
Fixed a linked node whose custom field value no longer meets the field’s settings, such as text over a lowered character limit, stopping its entry from being trashed or restored, or staying disabled when the entry is saved back to a site.
Fixed writing a menu to the cache with the Standard or Full profile running a database query for each node for every relation field, such as an Assets or Entries field, in the menu’s field layout. (#484)
Fixed node queries for a single menu, such as craft.navigation.nodes('main'), reading the structure data of every structure on the site, which slowed the first render of a menu after an entry save on sites with many sections or menus. (#483)
Fixed node queries for several menus or none, such as craft.navigation.nodes().level(1) or GraphQL navigationNodes without a menu handle, reading the structure data of every structure on the site.
Fixed a node query no longer using the menu cache once it had run, such as query.all() after query.exists().
Fixed a {% cache %} tag around a menu read from the menu cache not clearing when a node it didn’t output changed, such as a disabled node being enabled. {% cache %} tags around a menu now also clear when the menu is cleared from the menu cache, including after a menu builder publish or import and through craft.navigation.invalidateCache(). (#486)
Fixed saving an entry that a menu links to re-saving the menu’s linked nodes, clearing its cache and firing the invalidateNavigationCache event when nothing the nodes store had changed.
Fixed nodes that Craft eager-loads as children, such as GraphQL children without a menu handle or .with(['children']), loading each linked element with its own query.
Fixed marking active and current nodes reading the current URL again for every node, which slowed large menus on every request.
Fixed the navigation_menus_tree MCP tool running a query for each linked entry’s parent and authors when it includes linked elements.
Fixed the invalidateNavigationCache event firing a second time for the revision Craft saves alongside an entry.
Fixed cached menus not marking a linked entry’s node as current after a parent entry’s slug change moved the entry to a new URL.
Fixed users with the “View products” permission for a product type being unable to add or edit Products Dynamic nodes for it on Commerce 5.7 and later, and the deprecation warning those permission checks logged.
Fixed URL suffixes that start with ? producing broken links when the node’s URL already has a query string, such as a Custom URL with a query, when Craft shows index.php in URLs, or in Live Preview.
Fixed nodeUri including ?p= for linked nodes when Craft shows index.php in URLs.
Fixed uncached GraphQL requests running a database query for every menu, including for schemas without access to Navigation.
Fixed Feed Me imports linking nodes to an element of a different type, or to a draft or revision, when matching the element by slug or title.
Fixed a module that references Navigation 3 class names, such as verbb\navigation\services\Navs, in its init() causing a fatal error. These names are aliases of their Navigation 4 replacements, and event handlers registered on them still don’t fire.
Fixed duplicating a menu sharing its Matrix, Content Block or Addresses menu content with the original, so editing one changed both. Menus duplicated before this fix still share their content.
Fixed importing a menu firing the invalidateNavigationCache event and rechecking structure limits once for every node. An import now fires the event once, after it’s saved, and an import that breaks a menu’s limits shows the specific limit in its error.
Fixed Olivemenus migrations dropping the data attributes of menu items.
Fixed Free Nav migrations dropping node custom attributes, and an error when outputting customAttributesObject for nodes migrated from Free Nav.
Fixed tka Navigation migrations titling entry links with blank labels “Untitled” instead of using the entry’s title, and doubling the # in anchor links without an entry.
Fixed plugin migrations copying custom URLs that use environment variables or aliases without notice. Navigation doesn’t expand these, so each one now logs a warning to update it after migrating.
Fixed Menu plugin migrations clearing node URLs and URL suffixes on every site except the one each node was created on.
Fixed Free Nav and Navkit migrations only reading each node’s primary-site title and status, so nodes on other sites got the primary site’s title and were always enabled.
Fixed no linked node ever being current or active, and a home node being current or active on every page, when Craft shows index.php in URLs.