Open jlachancekffein opened 2 months ago
This is a good point, and It's something that's been on my list to do for a while now. Essentially, we need to create a record of a node for each site enabled for a node.
While Craft does this automatically for a Node, because it's an element, there's only a few things that are stored site-specific through that. The title
, slug
, uri
and content
are site-specific for all Elements. You can see this in the elements_sites
table.
However, the things that Navigation Nodes have such as the url
, classes
, urlSuffix
, etc are not site-specific.
This'll be part of a larger refactor coming soon!
@engram-design We've also run into this problem. Can you give an ETA for this large refactor?
I think Craft also solved this issue for a couple of native properties, like the alt
field which was moved to the elements_sites
table to be able to translate it.
No ETA sorry, and yes those work due to them being stored as content due the field layout being localized.
Describe the bug
When the propagation method of a navigation is set to Save nodes to all sites enabled for this navigation, the modification of the url of a node of type Custom Url, the modification is applied to each site.
However, the label is correctly translated on each site. The issue is only with the URL.
I understand that, when I create a new node, that the same value is save in each others sites, but after modification, is suppose to apply only to the selected site.
For now, we fix it by changing the propagation mode to Only save nodes to the site they were created in but it break the relation between the navigation between site.
Im pretty sure that Craft, by default with the propagation mode set to Save nodes to all sites enabled, duplicate the content of the element in each site, but manage by sites after modification.
Steps to reproduce
Craft CMS version
5.4.2
Plugin version
3.0.4
Multi-site?
Yes
Additional context
No response