I don't have a developer degree, I'm a self learned Umbraco implementer. I was building multi language web sites with content copying method before. Now ı started a new project and i have to build a 1-1 multilingual system as described with this example.
I followed uHangout EP078, followed the blog post, did research on web but unfortunately i couldn't manage to generate localized urls on a 1-1 multilingual web site.
When i open the provided example solution on Visual Studio it works. But i couldn't manage to make the same setup from scratch.
Alternatively i tried to publish the example site and continue developing web site over it, but couldn't manage to publish site due to some errors that i didn't understand.
May be the reason is my insufficient knowledge. But i have to learn and apply this in a short time :(
Alternatively i tried to publish the example site and continue
developing web site over it, but couldn't manage to publish site due
to some errors that i didn't understand.
What errors do you get when you try to publish you adjusted example site?
Severity Code Description Project File Line Suppression State
Warning CS0618 'Document' is obsolete: 'Obsolete, Use Umbraco.Core.Models.Content' Umbraco.Extensions D:\Projeler\1-1-multilingual-example-master\Sources\Umbraco.Extensions\Controllers\UrlPreviewApiController.cs 68 N/A
Warning CS0618 'ManyObjectsResolverBase<PropertyExtractResolver, PropertyExtractBase>.ManyObjectsResolverBase(IEnumerable<Type>, ObjectLifetimeScope)' is obsolete: 'Use ctor specifying IServiceProvider instead' Umbraco.Extensions D:\Projeler\1-1-multilingual-example-master\Sources\Umbraco.Extensions\Extract\PropertyExtractResolver.cs 32 N/A
Warning CS0618 'UmbracoAuthorizedApiController.UmbracoUser' is obsolete: 'This should no longer be used since it returns the legacy user object, use The Security.CurrentUser instead to return the proper user object, or Security.GetUserId() if you want to just get the user id' Umbraco.Extensions D:\Projeler\1-1-multilingual-example-master\Sources\Umbraco.Extensions\Controllers\UrlPreviewApiController.cs 69 N/A
Warning CS0618 'UmbracoAuthorizedApiController.UmbracoUser' is obsolete: 'This should no longer be used since it returns the legacy user object, use The Security.CurrentUser instead to return the proper user object, or Security.GetUserId() if you want to just get the user id' Umbraco.Extensions D:\Projeler\1-1-multilingual-example-master\Sources\Umbraco.Extensions\Controllers\UrlPreviewApiController.cs 70 N/A
Warning CS0618 'UmbracoContext.Application' is obsolete: 'Do not access the ApplicationContext via the UmbracoContext, either inject the ApplicationContext into the services you need or access it via it's own Singleton accessor ApplicationContext.Current' Umbraco.Extensions D:\Projeler\1-1-multilingual-example-master\Sources\Umbraco.Extensions\ContentFinders\MultilingualContentFinder.cs 44 N/A
Warning CS0618 'UmbracoContext.Application' is obsolete: 'Do not access the ApplicationContext via the UmbracoContext, either inject the ApplicationContext into the services you need or access it via it's own Singleton accessor ApplicationContext.Current' Umbraco.Extensions D:\Projeler\1-1-multilingual-example-master\Sources\Umbraco.Extensions\Controllers\ExtractApiController.cs 27 N/A
Warning CS0618 'UmbracoContext.Application' is obsolete: 'Do not access the ApplicationContext via the UmbracoContext, either inject the ApplicationContext into the services you need or access it via it's own Singleton accessor ApplicationContext.Current' Umbraco.Extensions D:\Projeler\1-1-multilingual-example-master\Sources\Umbraco.Extensions\UrlProviders\MultilingualUrlProvider.cs 48 N/A
Warning CS0618 'UmbracoContext.Application' is obsolete: 'Do not access the ApplicationContext via the UmbracoContext, either inject the ApplicationContext into the services you need or access it via it's own Singleton accessor ApplicationContext.Current' Umbraco.Extensions D:\Projeler\1-1-multilingual-example-master\Sources\Umbraco.Extensions\UrlProviders\MultilingualUrlProvider.cs 106 N/A
So far, I see only warnings about obsolete code; are there no real errors?
As far as I know, for that piece of code (UrlPreviewApiController.cs), there's no good alternative available to replace it with code that does about the same thing.
Without any good alternatives, best option is to just ignore the warnings.
There is a lot of legacy code in the project. That is givving you the warnings and that prevents you from starting the project in a new solution. I ended up using the projects URL provider and contentfinder as a example and rebuild them from scratch. I got it working that way for a multilingual multisite.
More info on how to get it to work can be found here:
I removed the customBootmanager.cs and the global.cs and remove the reference in the default.aspx and the global.asax for it to work . I thought I specified it in that topic but I didn't.
Finally i managed to publish the project.
I upgarded Umbraco version to latest via Nuget. Then updated all the dependent files and made the corrections (or fixes) Visual Studio suggested.
Then i had to download missing files from github (about files) to overcome publish errors.
I published the project as Umbraco 7.5.11. It works on local machine and live server. One thing i couldn't understand is, i had to uninstall and reinstall vorto first time i launch the project.
This topics mentions some legacy code and changes people need to make in order for the project to work. Could everyone please mention what should be changed? I want to update this project to Umbraco 7.6.1 soon and also want to fix the legacy issues.
I am using your solution with a multisite setup and had to change some code and remove some. I'm overloaded with work until codegarden but after that I will have a week off. I can make some pull requests if that's not to late.
One of the things I removed all together was the CustomBootManager.
I also had to customize the contentfinder and url provider to support multiple root nodes.
Tell me if you need more info at codegarden. I'll be glad to share my solution with you.
Thanks I'll remove the CustomBootManager and will check if there are other improvements. I want to submit the 1-1 multilingual package for BETAGarden at CodeGarden so I need to fix it soon :-).
As Frans mentioned, main thing I needed to remove was the CustomBootManager.
Further, I updated several (NuGet) packages to a newer version. (Don't remember exactly which ones; probably Vorto, NestedContent and ModelsBuilder related packages)
I also made some changes to the application eventhandlers in UmbracoEvents.
My comment in this topic about obsolete code, had to do with obsolete Umbraco code for showing previewcontent as posted here
Not sure if that can already be replaced with a good alternative ...
Thanks for you feedback. I will update the NuGet packages. Some of them actually have a PR fix from me which I needed for preview so it's time to update them ;-).
For the preview API it indeed uses some obsolete classes. I think that won't be fixed until Umbraco 8 comes out.
Unable to generate and use localized Urls
Hello,
I don't have a developer degree, I'm a self learned Umbraco implementer. I was building multi language web sites with content copying method before. Now ı started a new project and i have to build a 1-1 multilingual system as described with this example.
I followed uHangout EP078, followed the blog post, did research on web but unfortunately i couldn't manage to generate localized urls on a 1-1 multilingual web site.
When i open the provided example solution on Visual Studio it works. But i couldn't manage to make the same setup from scratch.
Alternatively i tried to publish the example site and continue developing web site over it, but couldn't manage to publish site due to some errors that i didn't understand.
May be the reason is my insufficient knowledge. But i have to learn and apply this in a short time :(
Can anyone please guide me?
Best regards...
What errors do you get when you try to publish you adjusted example site?
I get the following errors
So far, I see only warnings about obsolete code; are there no real errors?
As far as I know, for that piece of code (UrlPreviewApiController.cs), there's no good alternative available to replace it with code that does about the same thing.
Without any good alternatives, best option is to just ignore the warnings.
Couldn't find the option to ignore warnings.
If i copy 24days folder to another location and open as site with web matrix, Umbraco backoffice works. This time front end fails. I get
I noticed the pages work with first language values (English) in Umbraco Canvas Designer when i hit Preview button.
There is a lot of legacy code in the project. That is givving you the warnings and that prevents you from starting the project in a new solution. I ended up using the projects URL provider and contentfinder as a example and rebuild them from scratch. I got it working that way for a multilingual multisite.
More info on how to get it to work can be found here:
https://our.umbraco.org/forum/extending-umbraco-and-using-the-api/83938-override-culture-for-1-1-translation
I read the topic and couldn't find a clue :(
I removed the customBootmanager.cs and the global.cs and remove the reference in the default.aspx and the global.asax for it to work . I thought I specified it in that topic but I didn't.
Finally i managed to publish the project. I upgarded Umbraco version to latest via Nuget. Then updated all the dependent files and made the corrections (or fixes) Visual Studio suggested. Then i had to download missing files from github (about files) to overcome publish errors. I published the project as Umbraco 7.5.11. It works on local machine and live server. One thing i couldn't understand is, i had to uninstall and reinstall vorto first time i launch the project.
http://www.codesign.name.tr/haberler/grid-ara-yuzunun-gelecegi/ Turkish
http://www.codesign.name.tr/en/news/the-future-of-grid-layouts/
http://www.codesign.name.tr/fr/neauws/lavenir-de-la-grille-layouts/
http://www.codesign.name.tr/nl/nieuws/de-toekomst-van-grid-layouts/
It's working for now. I'll build my own project over Jeroen's base after importing database to SQL Server.
Thank you all.
Hello,
This topics mentions some legacy code and changes people need to make in order for the project to work. Could everyone please mention what should be changed? I want to update this project to Umbraco 7.6.1 soon and also want to fix the legacy issues.
Jeroen
I am using your solution with a multisite setup and had to change some code and remove some. I'm overloaded with work until codegarden but after that I will have a week off. I can make some pull requests if that's not to late.
One of the things I removed all together was the CustomBootManager.
I also had to customize the contentfinder and url provider to support multiple root nodes.
Tell me if you need more info at codegarden. I'll be glad to share my solution with you.
Thanks I'll remove the CustomBootManager and will check if there are other improvements. I want to submit the 1-1 multilingual package for BETAGarden at CodeGarden so I need to fix it soon :-).
https://codegarden17.com/sessions/betagarden/
Jeroen
As Frans mentioned, main thing I needed to remove was the CustomBootManager.
Further, I updated several (NuGet) packages to a newer version. (Don't remember exactly which ones; probably Vorto, NestedContent and ModelsBuilder related packages)
I also made some changes to the application eventhandlers in UmbracoEvents.
My comment in this topic about obsolete code, had to do with obsolete Umbraco code for showing previewcontent as posted here
Not sure if that can already be replaced with a good alternative ...
Thanks for you feedback. I will update the NuGet packages. Some of them actually have a PR fix from me which I needed for preview so it's time to update them ;-).
For the preview API it indeed uses some obsolete classes. I think that won't be fixed until Umbraco 8 comes out.
Jeroen
I've updated the 1-1 multilingual example.
It now runs on Umbraco 7.6.1 + Nested Content 0.4.0 + Vorto 1.5.3.
Property value converters are enabled so Models Builder returns IPublishedContent for the media picker instead of an id.
Also removed the CustomBootManager code.
https://github.com/jbreuer/1-1-multilingual-example/commits/master
Jeroen
is working on a reply...