I'm a little lost again.
A client of u wants to have 2 different languages on the same node. I made a class that inherits UmbracoApplication and added a Application_Beginrequest. This code does run and it does set the culture to the correct culture.
After the code changes the culture, umbraco changes it to some default for no apparent reason.
I have the rootnode culture set to inherit.
I found a lot of possible clues but all are for Umbraco 6 or below.
Can someone point me in the right direction?
Thanks
Edit: For now I've build a helper that switches the culture from every view. It works but the dictionary returns nothing anymore...
It probably work without vorto but you need to do some coding.
The client rejected vorto for this project and she wanted to habe
multiple content tabs.
What was the reason for this. IMHO vorto is the best solution for 1-on-1 multilanguage sites at the moment. Maybe you still can try to convince her that her choice is not the best solution.
They didn't want the hidden languages. So everything has to be shown on a separate tab.
Is it possible to use vorto like a separate content tab? So not the visible tab but wrap it around the grid with or without doctype grid editor for example?
So use it like some sort of wrapper? That would make it a lot easier to convince them.
We've decided to go with your solution but I ran into a problem straight away...
Did you ever use the grid in this solution?
When I switch languages it doesn't rerender the richtext editors in the grid.
Frans
Edit: The error I get
TypeError: Cannot read property 'getContent' of null
at umbraco.directives.js?cdv=1581952791:3833
at Object.$broadcast (angular.min.js?cdv=1581952791:94)
at nestedcontent.directives.js?cdv=1581952791:23
at Object.$broadcast (angular.min.js?cdv=1581952791:94)
at updateModel (nestedcontent.controllers.js?cdv=1581952791:364)
at nestedcontent.controllers.js?cdv=1581952791:395
at Object.$broadcast (angular.min.js?cdv=1581952791:94)
at vorto.js?cdv=1581952791:402
at Object.$broadcast (angular.min.js?cdv=1581952791:94)
at vorto.js?cdv=1581952791:196
I added a tab to the newsitem with a datatype nestedcontent. In there I've put the NewsDetached wit the grid. In the content section I made 2 items with nested content and filled the grid with content. After that I started switching between items and everything kept working.
So it seems to be a nestedcontent -> vorto -> grid combination.
I'll go and try if grid works in Vorto without nested content.
I've got the Extensions project up and running without any build errors.
Something strange is happening... When I start the application I get a 404 straight away on the homepage. When I log in to umbraco I see the document is published but not in cache.
Url preview shows me a #. Can you please tell me where to look to solve this problem?
I've made a few extra changes to see where it could go wrong.
I've added a url http://localhost:57700 to the culture and hostname of the rootnode. This changed the # in url preview to a url.
The url still gives a 404 so no help there.
I've noticed in the demo project that you use documenttype inheritance and not composition. Also I noticed that in the MultilingualUrlProvider.cs you do the following:
var content = umbracoContext.ContentCache.GetById(id) as UmbMaster;
In my case with compositions I do the following:
var content = umbracoContext.ContentCache.GetById(id) as BaseProperties;
This always returns null
If I leave out the as BaseProperties it gives back the rootnode.
I'm going to copy everything to my existing site now. That is a multisite Umbraco install.
When everything works I'm going to tidy up my code and share it somehow.
Only one mistery remains...
I don't get access to DeepCloneRuntimeCacheProvider when I add my own class. If I copy your project it works like a charm. Where have you set the access to the internal class?
You don't need the DeepCloneRuntimeCacheProvider. It's a piece of legacy code. It was fixed in Umbraco 7.4.2, but at the time this project was still at 7.3. More info here: http://issues.umbraco.org/issue/U4-8027
I got the multisite working to. The backend aswell as the frontend. and I've build a dynamic language menu.
Love how your example project pulled me to a new level. H5YR!!!
When Carnaval is over I'll go and clean and document the code and filter out everything that has nothing to do with the multilingual urls and upload the project to git.
Override Culture for 1-1 translation
Hi guys,
I'm a little lost again. A client of u wants to have 2 different languages on the same node. I made a class that inherits UmbracoApplication and added a Application_Beginrequest. This code does run and it does set the culture to the correct culture.
After the code changes the culture, umbraco changes it to some default for no apparent reason. I have the rootnode culture set to inherit.
I found a lot of possible clues but all are for Umbraco 6 or below.
Can someone point me in the right direction?
Thanks
Edit: For now I've build a helper that switches the culture from every view. It works but the dictionary returns nothing anymore...
Hi Frans,
Have a look at this post by my colleague Jeroen Breuer : http://24days.in/umbraco-cms/2015/multilingual-vorto-nested-content/
He explains setting up 1-on-1 with the use of vorto. He has also created a sample project with example code.
Dave
Thanks Dave,
I've looked in to this. Will this work without vorto to? The client rejected vorto for this project and she wanted to habe multiple content tabs.
Frans
Hi Frans
It probably work without vorto but you need to do some coding.
What was the reason for this. IMHO vorto is the best solution for 1-on-1 multilanguage sites at the moment. Maybe you still can try to convince her that her choice is not the best solution.
Dave
They didn't want the hidden languages. So everything has to be shown on a separate tab.
Is it possible to use vorto like a separate content tab? So not the visible tab but wrap it around the grid with or without doctype grid editor for example?
So use it like some sort of wrapper? That would make it a lot easier to convince them.
Frans
Hi Frans,
Read the article from Jeroen. He explains how we make all properties on a tab a nested content doctype. So switching languages is like switching tabs.
Dave
Hi Dave,
We've decided to go with your solution but I ran into a problem straight away... Did you ever use the grid in this solution? When I switch languages it doesn't rerender the richtext editors in the grid.
Frans
Edit: The error I get
Hi Frans,
Haven't seen this one.
dave
Ok, thanks. I'll try and reproduce this issue in a empty solution.
Ok, this solution isn't working with the grid.
What I did:
The result is a broken rte in the grid (screenshot). Do you know or can you ask Jeroen if there is a easy fix?
If you need more info please ask. I'm getting desperate looking for a 1-1 multilingual solution.
Thanks Frans
Hi Frans,
this is probably because the grid is used inside Nested Content. Have yout tried if that works without vorto ?
Dave
I added a tab to the newsitem with a datatype nestedcontent. In there I've put the NewsDetached wit the grid. In the content section I made 2 items with nested content and filled the grid with content. After that I started switching between items and everything kept working.
So it seems to be a nestedcontent -> vorto -> grid combination.
I'll go and try if grid works in Vorto without nested content.
It seems to be a grid in vorto issue...
I'll post it in the vorto section. Thanks for the help!
I found a solution here:
https://github.com/impelsystems/umbraco-vorto-grid-rte
Nice...gonna bookmark that one myself.
Dave
I see you already found this topic ;-) https://our.umbraco.org/projects/backoffice-extensions/vorto/bugs-feedback-suggestions/75842-vortogridrte-switching-issue
Yep,
The only thing that needed to be fixed is one line in the nested content css:
.nested-content__content .umb-control-group { padding-bottom: 0; }
This fixes the grid going over the pagetitle.
Hi Dave, Jeroen,
I've got the Extensions project up and running without any build errors.
Something strange is happening... When I start the application I get a 404 straight away on the homepage. When I log in to umbraco I see the document is published but not in cache.
Url preview shows me a #. Can you please tell me where to look to solve this problem?
Thanks for the help!!
I've made a few extra changes to see where it could go wrong.
I've added a url http://localhost:57700 to the culture and hostname of the rootnode. This changed the # in url preview to a url. The url still gives a 404 so no help there.
I've noticed in the demo project that you use documenttype inheritance and not composition. Also I noticed that in the MultilingualUrlProvider.cs you do the following:
var content = umbracoContext.ContentCache.GetById(id) as UmbMaster;
In my case with compositions I do the following:
var content = umbracoContext.ContentCache.GetById(id) as BaseProperties; This always returns null
If I leave out the as BaseProperties it gives back the rootnode.
Hi Frans,
Are you talking about the 1-1 Multilingual example? https://github.com/jbreuer/1-1-multilingual-example
The example project always needs to have the domains added to the highest node. In this case the homepage. See this comment: https://github.com/jbreuer/1-1-multilingual-example/blob/master/Sources/Umbraco.Extensions/UrlProviders/MultilingualUrlProvider.cs#L132
Maybe first try to make it work without compositions. This project uses a starter kit which was using the documenttype inheritance already.
Did you watch the video? https://www.youtube.com/watch?v=DWjbJiIUQdk
Jeroen
Yep, thats the example I'm using.
I have to incorporate it in a site that uses compositions so I have to get it to work with compositions. I didn't see the video. I'll look in to that.
It looks like I got the homepage working now, at least the url provider. Now I have to get the contentfinder up and running.
This is so much fun if the deadline wasn't so close.
Hi Frans,
Is you "BaseProperties" a composition ?
Dave
Yep, its a composition.
Victory!!!
I got it all working.
I'm going to copy everything to my existing site now. That is a multisite Umbraco install.
When everything works I'm going to tidy up my code and share it somehow.
Only one mistery remains... I don't get access to DeepCloneRuntimeCacheProvider when I add my own class. If I copy your project it works like a charm. Where have you set the access to the internal class?
Thanks guys!!
You don't need the DeepCloneRuntimeCacheProvider. It's a piece of legacy code. It was fixed in Umbraco 7.4.2, but at the time this project was still at 7.3. More info here: http://issues.umbraco.org/issue/U4-8027
You can just remove the CustomBootManager class.
Jeroen
Ok, thanks
Since I moved everything to my own project. I suddenly have a url that is
"*1060"
so star and rootId in my case.Any clue where that may come from? I don't know when It started to appear. It shows in the UrlPreview as well.
I stopped the unwanted behaviour by doing
domains.RemoveAll(x=>x.StartsWith("*"))
in the MultilingualUrlProviderI got the multisite working to. The backend aswell as the frontend. and I've build a dynamic language menu.
Love how your example project pulled me to a new level. H5YR!!!
When Carnaval is over I'll go and clean and document the code and filter out everything that has nothing to do with the multilingual urls and upload the project to git.
Thanks Dave and Jeroen!!
is working on a reply...