I have create umbraco website which content 3 language as structure bellow:
Root - en (http://mydomain.com/en) ---Home ---Contact ......
- vi (http://mydomain.com/vi) ---Trang-Chu ---Lien-He
- ru (http://mydomain.com/ru) --- ---contact
I have used multilanguage tool package by Yannick Smits, Everything work ok except ru site. In umbraco config file (umbracoSettings.config), I have configured
I always get page not found when I switch to russia website which contain russia url character, but If I open such as: http://mydomain.com/ru/contact, It work fine, I don't know how to config or change my configuration to by pass this issue
Hint: all russia url characters didn't work: , & , ... here is my replace character list
I'm trying to understand what you describe... so domain.com/ru/contact works, but domain.com/ru does not? It's only the home page that fails?
I your tree it looks like the EN homepage is _Home_, the VI homepage is _Trang-Chu_, but the RU homepage has no name? What is the exact name of the node in the tree?
I solved my issue when I get the lastest version of umbraco (source code) which includes "U4-1089 - non-ascii chars in urls cause 404", I named my russia home page is , then replace with "dm".
I also got another issue when I working on souce code version, I didn't use call service by using restExtensions.config, although I have configured like your wiki example
Oh so you are running 4.10. Fine. Glad that the issue is fixed.
Now about REST extensions... your restExtensions.config files looks good. It means you have a class BaseTest.TestClass in assembly TestClass.dll, and that class has a public static method Hello. You can call it by calling domain.com/base/TestClass/Hello and it should return whatever the method returns. If you get a NullRef exception when hitting that url, can you post more details about the exception: stacktrace, etc?
The firstly! I would like to thank you for your contribution!
I have spent all night to figure out this issue, I'm new in umbraco world, I did try to dig into your source code, then I fixed before you have pulled your bug fix to repository, I realize that maybe your code still have some issue because of confliction in your configuration file and your code.
I guess that you always get the message like: "Extension or method not found.", because there is no node with RestExtensions, instead of BaseRestExtensions.
When I swith to restExtensions.config, I got your note:
<!-- this is the pre-4.10 rest configuration --> <!-- you should use BaseRestExtensions.config instead -->
Now question for you: 1. What are differentiate between BaseRestExtensions.config and restExtensions.config 2. When I mark my method as: [RestExtensionMethod(returnXml = false)] and then in the config file I set It to <permissionmethod="GoHome"returnXml="true"allowAll="true"/>What is the return attritbute of GoHome method?
Please suggest me if i was worng! Thanks QuachNguyen
Both are supported with 4.10. But if you're building a new project I'd recommend going with the new one and leaving the old one empty.
Now, as for attributes: they are another way of declaring your methods, but configuration always go first. So, if your method is described in one of the configuration files, then your attribute is ignored. On the other hand, if you want to configure through attributes, you don't need to put anything in the configuration files. It's one or the other.
So,
1. BaseRestExtensions is the new config file for 4.10, resteExtensions is the old one, still supported in 4.10, but will be eventually deprecated
2. returnXml for GoHome will be true because that's what's in the config file, and because your method is in a config file, its attribute is ignored.
Hope it helps. Feel free to come back with more questions -- it will help me write a better documentation.
Umbraco Russia multi website language bug
Dear all,
I have create umbraco website which content 3 language as structure bellow:
Root
- en (http://mydomain.com/en)
---Home
---Contact
......
- vi (http://mydomain.com/vi)
---Trang-Chu
---Lien-He
- ru (http://mydomain.com/ru)
---
---contact
I have used multilanguage tool package by Yannick Smits, Everything work ok except ru site. In umbraco config file (umbracoSettings.config), I have configured
I always get page not found when I switch to russia website which contain russia url character, but If I open such as: http://mydomain.com/ru/contact, It work fine, I don't know how to config or change my configuration to by pass this issue
Hint: all russia url characters didn't work: , & , ... here is my replace character list
Please help me to fix this issue
QuachNguyen
Which version of Umbraco are you running?
I'm trying to understand what you describe... so domain.com/ru/contact works, but domain.com/ru does not? It's only the home page that fails?
I your tree it looks like the EN homepage is _Home_, the VI homepage is _Trang-Chu_, but the RU homepage has no name? What is the exact name of the node in the tree?
Thanks Stephen for your reply!
I have been working on source code version on https://hg.codeplex.com/umbraco
I solved my issue when I get the lastest version of umbraco (source code) which includes "U4-1089 - non-ascii chars in urls cause 404", I named my russia home page is , then replace with "dm".
I also got another issue when I working on souce code version, I didn't use call service by using restExtensions.config, although I have configured like your wiki example
I always get null object reference error message. tell me if I missing something
Thanks
Nguyen
Oh so you are running 4.10. Fine. Glad that the issue is fixed.
Now about REST extensions... your restExtensions.config files looks good. It means you have a class BaseTest.TestClass in assembly TestClass.dll, and that class has a public static method Hello. You can call it by calling domain.com/base/TestClass/Hello and it should return whatever the method returns. If you get a NullRef exception when hitting that url, can you post more details about the exception: stacktrace, etc?
Here is my death yellow screen
Thank you
Nguyen
Great. Now if you could also sent the DLL that contains the method, along with your config file... sgay _at_ pilotine.com. Thanks!
edit: that would be resetExtensions.config, web.config, and BaseRestExtensions.config _if_ you have it.
OK, I *think* I know what's wrong. I just have pushed a fix to 4.10 so if you can pull from Codeplex and try again...
The firstly! I would like to thank you for your contribution!
I have spent all night to figure out this issue, I'm new in umbraco world, I did try to dig into your source code, then I fixed before you have pulled your bug fix to repository, I realize that maybe your code still have some issue because of confliction in your configuration file and your code.
Here is an issue:
In web.config I got BaseRestExtensions
And
<BaseRestExtensions configSource="config\BaseRestExtensions.config" />
Here is BaseRestExtentions.config's content:
xml version="1.0" encoding="utf-8"?> <BaseRestExtensions> BaseRestExtensions>
But in your Umbraco.Web\umbraco.presentation\umbracobase\restExtension.cs file
I guess that you always get the message like: "Extension or method not found.", because there is no node with RestExtensions, instead of BaseRestExtensions.
When I swith to restExtensions.config, I got your note:
<!-- this is the pre-4.10 rest configuration --> <!-- you should use BaseRestExtensions.config instead -->
Now question for you:
1. What are differentiate between BaseRestExtensions.config and restExtensions.config
2. When I mark my method as: [RestExtensionMethod(returnXml = false)] and then in the config file I set It to <permissionmethod="GoHome"returnXml="true"allowAll="true"/> What is the return attritbute of GoHome method?
Please suggest me if i was worng!
Thanks
QuachNguyen
You either use restExtensions.config (old system) or BaseRestExtensions.config (new system) and they don't have the same syntax.
Old one (restExtensions.config):
New one (BaseRestExtensions.config):
Both are supported with 4.10. But if you're building a new project I'd recommend going with the new one and leaving the old one empty.
Now, as for attributes: they are another way of declaring your methods, but configuration always go first. So, if your method is described in one of the configuration files, then your attribute is ignored. On the other hand, if you want to configure through attributes, you don't need to put anything in the configuration files. It's one or the other.
So,
1. BaseRestExtensions is the new config file for 4.10, resteExtensions is the old one, still supported in 4.10, but will be eventually deprecated
2. returnXml for GoHome will be true because that's what's in the config file, and because your method is in a config file, its attribute is ignored.
Hope it helps. Feel free to come back with more questions -- it will help me write a better documentation.
Oh and the code is in Umbraco.Web.BaseRest.
The code in Umbraco.Web\umbraco.presentation\umbracobase does not run anymore and will be removed eventually.
is working on a reply...