verbb / navigation

A Craft CMS plugin to create navigation menus for your site.
Other
90 stars 23 forks source link

Multisite Navigation doesn't allow cross-language linking any longer #329

Closed Mixxey closed 1 year ago

Mixxey commented 2 years ago

Describe the bug

We have a multisite setup with a German (hero-software.de) and an Austrian (hero-software.de/at) version. We used to be able to cross-link between site versions easily, but now when I try to change a node in the AT navi to a DE entry, the change isn't saved.

Steps to reproduce

  1. Open a navigation node of version A image

  2. Link it to an entry of version B and save image

  3. Re-open the node

  4. It is again linked to version A image

Craft CMS version

Craft Pro 4.3.1

Plugin version

2.0.10

Multi-site?

Yes

Additional context

There are no error messages or any hint why this is not working. And it works neither with a newly created navigation nor with an old one where it used to work before.

engram-design commented 2 years ago

What are you propagation settings set to for the Navigation? I just want to ensure that the nodes for each site are created only in the site they belong to, otherwise each node across each site will be exactly the same.

If you have "Save nodes to all sites enabled for this navigation" set, then each node in the navigation will be the same. They will resolve to the linked element of the same site that the navigation node is set to.

If you have "Only save nodes to the site they were created in" there's no issue with that for me, as each node will be targeting the specific element and site that you pick.

Mixxey commented 2 years ago

We have it set to "Only save nodes to the site they were created in" and it indeed lets us pick the desired site and entry for new nodes. However, if I try to edit an existing node, and change, let's say, an AT entry to a DE entry, it automatically switches back to the AT entry as described above.

I wonder if this happens because we work with a navigation that was created with "Save nodes to all sites enabled for this navigation" so it automatically displayed the nodes for all language versions and then was set to "Only save nodes to the site they were created in" afterwards, so we could edit the navigations independently for the different sites.

What confuses me, though, is that this worked fine in the past and seems to have broken somehow.

engram-design commented 2 years ago

There were some changes with the propagation settings which are likely the cause here, and as I might've guessed, it's probably when you've switched it from "Save nodes to all sites" to "Only save nodes to the site they were created in".

I'll investigate further.

Mixxey commented 2 years ago

Thanks a lot! :)

angieherrera commented 1 year ago

I have a multi-language site where this is happening as well. I initially had it set to "Save nodes to all sites" and then wiped it all and set propagation to "Only save nodes to the site they were created in". It worked but now if I try to edit an existing node, the change doesn't stick (quite literally the same as the steps outlined in @Mixxey's report). Wondering if a fix is on the horizon? Thanks!

engram-design commented 1 year ago

I haven't quite figured out what's going on with this, despite following those reproduction steps, it's not having an issue for me.

angieherrera commented 1 year ago

Hm, this may be a showstopper for us. Happy to provide you with more info, including staging site access if it helps.

engram-design commented 1 year ago

If you're able to send through your database to support@verbb.io that'd be amazing, but totally understand if you're unable to share that.

angieherrera commented 1 year ago

Will do!

engram-design commented 1 year ago

Fixed for the next release. To get this early, run composer require verbb/navigation:"dev-craft-4 as 2.0.10".

engram-design commented 1 year ago

Fixed in 2.0.11