Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Osman Coskun 164 posts 378 karma points
    Mar 17, 2017 @ 12:45
    Osman Coskun
    0

    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...

  • Micha Somers 134 posts 597 karma points
    Mar 17, 2017 @ 12:58
    Micha Somers
    0

    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?

  • Osman Coskun 164 posts 378 karma points
    Mar 17, 2017 @ 13:12
    Osman Coskun
    0

    I get the following errors

    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
    
  • Micha Somers 134 posts 597 karma points
    Mar 17, 2017 @ 13:39
    Micha Somers
    0

    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.

  • Osman Coskun 164 posts 378 karma points
    Mar 17, 2017 @ 14:20
    Osman Coskun
    0

    Couldn't find the option to ignore warnings.

  • Osman Coskun 164 posts 378 karma points
    Mar 17, 2017 @ 13:42
    Osman Coskun
    0

    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

    Unable to connect
    
    Firefox can’t establish a connection to the server at localhost:55988.
    

    I noticed the pages work with first language values (English) in Umbraco Canvas Designer when i hit Preview button.

  • Frans de Jong 548 posts 1840 karma points MVP 3x c-trib
    Mar 17, 2017 @ 13:47
    Frans de Jong
    0

    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

  • Osman Coskun 164 posts 378 karma points
    Mar 17, 2017 @ 14:11
    Osman Coskun
    0

    I read the topic and couldn't find a clue :(

  • Frans de Jong 548 posts 1840 karma points MVP 3x c-trib
    Mar 17, 2017 @ 14:23
    Frans de Jong
    0

    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.

  • Osman Coskun 164 posts 378 karma points
    Mar 18, 2017 @ 09:55
    Osman Coskun
    1

    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.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    May 22, 2017 @ 12:32
    Jeroen Breuer
    0

    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

  • Frans de Jong 548 posts 1840 karma points MVP 3x c-trib
    May 22, 2017 @ 13:15
    Frans de Jong
    0

    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.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    May 22, 2017 @ 13:32
    Jeroen Breuer
    0

    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

  • Micha Somers 134 posts 597 karma points
    May 22, 2017 @ 13:37
    Micha Somers
    0

    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 ...

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    May 22, 2017 @ 13:43
    Jeroen Breuer
    0

    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

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    May 24, 2017 @ 09:35
    Jeroen Breuer
    1

    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

Please Sign in or register to post replies

Write your reply to:

Draft