-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ContentPicker returning wrong node.id when used in Nested Content #8000
Comments
I added debug to my menu output to include a "title" on the a element with the node id and url and could clearly see that what was being returned as the node id and node url was not what was being shown in the content editor. And as i said when i republish the "title" would show the correct details for this site but then the other microsite would be wrong - wac-a-mole!!!! |
I have also found publishing to be a bit flaky. In the above example i have found that when i published after deleting Menu Item (Content Picker) and inserting an External Menu Item text - that the front end display was still showing the "title" on the a element - this was only added for the Menu Item - not the External Menu Item - when i manually republished the menu worked as expected showing the external menu link. |
Thanks for the feedback. I understand this is a complicated issue - I only seem to hit the complicated issues lol. Perhaps I could ask that the person who is responsible for the nested content feature check if there is anything odd/special about the handling of the Content Picker that may be subject to ambiguity when multiple nodes of the same node name exist in the content hierarchy. It definitely does something special for that data type as the url of the node appears seconds later on the display. Also, perhaps if the team could just keep this issue in mind if there are other "odd" reports with the Nested Content. It may be a problem with publishing rather than the nested content as the order of publishing affects the manifestation of the bug. I have a workaround so this is not a priority for me - so maybe just mark this as low priority as I do believe there is an underlying issue that should be addressed in the future. Thanks. |
Yep yep, note that I'm not asking you to add a domain name, just to try getting the routing right by telling Umbraco what's what and where. I really want to know if that helps? It seems to have something to do with the content finders getting confused. |
The urls listed above already have the paths defined in "Domain*" boxes in your picture i.e. main site: https://johnblair.azurewebsites.net/ Please ignore my use of "microsite" it is just one content tree in one domain - I use the term just to section of my content into logical areas of different use. I should be able to have multiple pages anywhere in my content tree with the same name as long as it is at a different level. I really don't want to start complicating the issue unnecessarily unless you can give me a good reason why adding a path into the Domain box would help routing? Thanks. This is my live site - and I have a survey in progress so I don't really want to mess about with the menus at the moment as I have it working for now. But if you give me a good reason i'll find a quiet time and check it out. Thanks. |
Another option - if you have a resource that would be willing to look into this - I could copy the entire site to another domain, reconfigure the menus to reveal the problem, and give you access to take a look? Let me know if that would be useful. |
Sounds like this issue? #5913 If you copied the micro sites (nodes) from your first micro site and just changed the content of the items in nested content their IDs will still be the same. What if you remove all items in your nested content (on the copied site) and add new items again? Edit: The IDs/keys of each individual item in the nested content property is probably the same on all your root nodes (or where the menu is placed), this means that the cache would return the wrong content since the last published node “wins” for all places where that is is used. |
@enkelmedia , Thanks for the insight here. I think you are right. Reading through the long ongoing issue - the penny dropped for me when I read "The problem is that the copied items have the same key." - this makes sense of what i saw as a game of "wack-a-mole" where the last published nested content item appeared to update the nested content in the other "copies" of the node. My pages are made up of "page sections" nodes - so I will just delete and create new page sections where a nested content type is used. This did indeed workaround the problem - thank you. IMO this is really poor design of the nested content - they must have known nodes get copied and then edited - I've wasted a day on this. @nul800sebastiaan , I see the saga of this issue has been going on for over 9 months with multiple solutions proposed. I suggest as an interim solution: When creating a data type where the Property Editor is Nested Content is selected that property editor should display a huge warning that nodes using this type should NOT be copied. I also suggest a backwards compatible boolean Disable Key Caching property is added to the Nested Content property editor where the nested content is not key cached and hence is suitable for copying. This would be interim until a full solution was available that handled key caching. Thanks. |
Thanks for the report and investigation! I'll close this as a duplicate of #5913 - we'll have a look at this again soon! Sorry for the inconvenience. |
This is a really odd issue.
I have been happily using Nested Content for defining my menu columns since V7 without any issues.
Recently I extended my site to have "microsites" with their own menus.
you can see - main site: https://johnblair.azurewebsites.net/
Microsite #1: https://johnblair.azurewebsites.net/metropole/
Microsite #2: https://johnblair.azurewebsites.net/corona-virus-global-survey/
Each site has its own menu - essentially a nested content of menu column defintions - which includes a ContentPicker for the main menu and a Multi-Url Picker for the submenu.
Now, I recently noticed that depending on the order of publication of the above microsites - the ContentPickers would return nodes relating to the most recently published microsite where the
pages have the same node.name - in my case "Survey Results" and "Contact Me" where a different page exists for each site but each has the same node name. Depending on the publication order the level of corruption varies.
Note: No other properties in my Neted Content document type get affected - the Mutli-Url Picker works fine - only the Content Picker is affected.
As a workaround I added a text field to paste in the url that is reutrned from the Cotnent Picker and that is what I am using on the site at the moment. Before doing that , what I found was that if I republished a microsite site then the urls in that site would be fine - but the links on the other microsite and the main site with the same page names (node.name) would be broken.
This is totally bizarre - I don't know if this is a problem with publishing, or the Nested Content, or the Content Picker picking out the wrong node because there are multiple pages in the content hierarch with the same node.name?
On each site when i go in to enter the menu item in the nested content - the correct content url is always displayed - even when the wrong url is displayed on the front end.
Umbraco version
8.5.5
Reproduction
If you're filing a bug, please describe how to reproduce it. Include as much
relevant information as possible, such as:
Bug summary
Menu item above doesn't return Metropole if i publish Microsite #2 it returns /corona-virus-global-survey/
If I copy the url into the "External Menu Item" and use that for the url of my menu on display - everything is fine. Oddly it only affects the Content Picker and not the multi-url picker - and only affects pages with the same node.name across the main site and the 2 microsites. And the scope of damage is affected by the order that i publish the site in - when using the "External Menu Item" everything works fine regardless of the order of publishing.
If I unpublish the microsites then the main site menu works fine. So publishing in
Specifics
Menus of the microsite #1 and #2 - with common page names for Contact Me and Survey Results.
Steps to reproduce
described above.
Expected result
described above.
Actual result
described above.
The text was updated successfully, but these errors were encountered: