Links are not saved/propagating to other sites
Describe the bug
I have a Hyper link field with multiple links enabled but the links saved in 1 site do not get propagated to the others sites resulting in my Hyper field i'm using for my main navigation is out of sync between two sites/languages.
So my Hyper field is set to multiple links enabled and my translation method is set to Translate for each site, as I want to be able to translate the Link Text on a per site/language basis. The only way to make the links sync between the sites is to choose another translation method, for example translate for each site group or do not translate but then I cannot change the Link Text on a per site basis.
I've made a video to help understand the problem.
https://github.com/user-attachments/assets/327538a6-cf6e-461f-9ee4-9d3957f125f5
Steps to reproduce
- Create a Multi site/language Craft CMS setup
- Create a Hyper link field with multiple links enable
- Set the translation method to Translate for each site
- Add links in site A
- Confirm they are not saved in the links in site B
Craft CMS version
Craft Pro 5.5.5
Plugin version
2.2.1
Multi-site?
Yes
Additional context
No response
Hi @engram-design
Any update on this? Or is this not a bug?
As of now this is really time consuming (i've got 30+ sites), when changing the menu I have to change it on 30+ sites.
I was struggling to reproduce this one, but I think I've figured out the steps as per your video now.
However, this is a tricky one to cater for. Unlike the similar behaviour with Matrix, where each block is an element, knowing how to handle new links is a little tricky. We need to know if they're new in order to propagate them.
I'm looking into adding a flag for this when you create those links, there's just some complications with regard to saving these values. For example, what if the other site links have a different collection of links? There's no guarantee they're in the some order, the same amount or even the same links. Not to mention, we don't treat each link individually (e.g. we don't save them like Matrix elements), so we'll have to add handling for that.
But the short of it, is looking into it!
Thanks for looking into it.
How did/does Typed link field handle this? In that plugin you could select pages and it would propagate to other sites/languages, only the label was translatable.
If for some reason one page was not available or inactive the link is just empty.
Should I change the setup of navigation fields? Is there a better way? Hard to believe I am the only one running into this wall. At the moment my client has to re-enter 50 links per site/language, and they have 20+.
Interesting topic but the behavior from the video looks identical to crafts entry field. If you create a new page and select an entry it's propagated to each site (translate to each site is active) but it selects the same entry in the language where it's propagated if enabled/available. Otherwise it selects the entry from what's selected in the which was created first. But if you change the field and you select a different entry on one of your translated pages later it's out of sync. Long story short. What you have tried in the video should just work for the first version of the entry. I plater around with that few weeks back for testing. The question is if hyper acts 100% the same. I would say yes from the video above.
But please correct me if I'm wrong.