Umbraco routing not working outside Home node - umbraco

To reproduce the issue create the following hierarchy:
Content
Home
Foo
Bar - The published URL will be <domain>/foo/bar
Foo
Bar - The published URLwill be <domain>/bar
Why does umbraco skip /foo/ when creating a page outside of Home? Is there a way to make nodes outside of Home stack the path as the nodes under Home?
Umbraco v7

Home is your root node so / will show your home page and /foo/ will show the home>foo page.
The only way to show nodes under the root foo node is to provide a hostname on the root foo node using 'culture and hostnames'
Obviously once you do that, you will also have to set that hostname up as a binding on the same website in iis as well.
It would probably also be good practice to set a hostname for the home node as well if you add one for the foo node

I've managed to understand what's going on with the help from Umbraco community.
By default umbraco treats each child of Content as a root node aka home page. This is controlled by the following setting in web.config <add key="Umbraco.Core.HideTopLevelNodeFromPath" value="true" />
If I would extend my example by adding 3rd level like so: Content > Foo > Bar > Baz I would see that the published path of Baz is /bar/baz. Umbraco does stack the path but it removes the 1st level because it's considered the default route.

Related

TFS template rule on Area Path

We are using TFS 2017 Update 3 on premise. I have the ability to edit the process template for our projects, and wish to make a change to the area path. I wish to implement a rule on the Area Path to prevent it from being left as the root project name when a new feature/story/bug/task is created. I've tried to use PROHIBITEDVALUES with the root path explicitly stated, but when I save the template I get the following error:
Microsoft Visual Studio
Work Item Type: Bug
TF26062: Rule '' is not supported for the field 'System.AreaPath'.
There were validation errors. Continuing to save may cause the file to become unloadable, do you want to continue?
Yes No
If I click Yes, I then get:
Microsoft Visual Studio
Failed to save the 'Bug' Work Item Type to the server.
TF26062: Rule '' is not supported for the field 'System.AreaPath'.
OK
So my question is, what rule can I apply to the Area Path field to prevent users from saving work items with the root/default area?
Based on my test all the existing rules are not available for the System.AreaPath filed. No built-in rules to validate the Area Path.
However you can follow below steps to change the default Area Path to prevent it from being left as the root project name when a new feature/story/bug/task is created.
Navigate to Settings --> Work --> Areas
Click the link: the default team's settings.
Area --> Default Area --> Change --> Select the specific area -->
Set
Besides, if you want to validate the Area Path, as a workaround you can create a new field to assist on that, you can refer to this article for details: Work Item Rules Workarounds: Validating Area Path

Umbraco IContentFinder Virtual Node

I'm trying to load a node under a diffrent parent through the IContentFinder. I can locate the correct node by useing some kind of wildcard system.
So an example:
www.example.com/group1/overview/id
www.example.com/globalOverview/id
The node from group1 can be shown with the correct URL in the global overview. The downside is that the parent is the group overview instead of the globalOverview. This will screw up the breadcrumb and other parent related things.
Is there any way to change the node it's parent for only that request. Or assign a virutal Path/Parent. If there are other posibilities shoot!
Cheers, Tom
Umbraco Forum post
Umbraco 7.2.x

Typo3 : using typoscript to modify the base-url

I am trying out TYPO3's introduction package. For that I am using Xampp on my computer.
I have installed it in a subdirectory, but since it uses "real-url", I need to modify the generated links, so that instead of http://localhost/about-typo3/ I get http://localhost/subfolder/about-typo3/
I believe it must be done via "typo-script", and from what I have read on the Internet, this line should do the job :
config.baseURL = http://localhost/subfolder/
But I don't know where I should put it. I have tried different locations, but with no apparent effect.
So what I would like to know is : am I on the good path for what I need to do, and if yes, what should I try now ?
This is a bug in the 4.6 Introduction Package. 4.7 will ship with a correct version, so you might just want to go ahead and try the Introduction Package from 4.7RC2 (Preview Releases).
For now, just choose Template in the module menu on the left. Then use the dropdown to select Constant Editor. Now choose the page HOME in the pagetree on the middle.
Now use the second dropdown to select CONFIG. There modify the topmost setting Absolute URI prefix. Input your full domain without the last slash (/). That means copy your current URL from the browser and strip /typo3/backend.php. Now save with the little save icon in the top toolbar.
This will also invalidate all caches for you (because you changed the topmost template). No need to install extra extensions or to do this manually.
Alternative you can fix the actual bug. Go to template module and select the folder TypoScript Templates / page_configuration. Now select Info/Modify instead of Constant Editor and directly above the table page.config. The click the pencil left of Setup. Find the line absRefPrefix = {$config.absRefPrefix}/. This should be around line 62 (4.7RC2). Remove the last slash (/) from that line and save. Because you are not on the topmost template, you need to clear the cache. On the topright of your screen, you can find the yellow flash icon. Click it and select Clear all caches (red flash). Now go to you website again.
A general note about (config.)baseURL. This is more a hack, because it just tells the browser to behave as if the website would be at another place. The correct way is to create correct links in first place. You should use (config.)absRefPrefix instead. To make this work in auto mode, it must be completely empty (config.absRefPrefix =).
Do not use baseURL any more. The next Introduction Package will not have this setting.
Yet another note: If you use the config.absRefPrefix, you have to include the last slash (/). The only reason why you do not have to do so above (in the constants), is because it is hardcoded in the template and thus also preventing the automatic detection to work.
If you are using different hosts, you can use typoscript conditions in your root template:
# Default:
config.baseURL = http://www.example.com/
[globalString = ENV:HTTP_HOST=sub1.example.com]
config.baseURL = http://sub1.example.com/
[global]
[globalString = ENV:HTTP_HOST=sub2.example.com]
config.baseURL = http://sub2.example.com/
[global]
if you are using introduction package. there is Constant for set the base url
Go to 'Template' and 'Constant Editor.. you can find 'Domain name for Base URL [config.domain]' .. for setting base url
also you can put the
config.baseURL = http://localhost/subfolder/
on 'Info Modify' Setup field
hope will help you .. sorry for my bad english

Drupal - Multi language site - Home page language is hardcoded

I'm to setup a Drupal (version 7) website with multilingual support. Being very new to Drupal, I can't seem to fix this simple issue: The default home page won't allow me to change the language (admin > configuration > system > informations), as you can see on this image:
http://imageshack.us/photo/my-images/824/screenshot20111122at101.png
I could suppose this has to do with the configuration of a module, but can't find which one. I'd love the result to be for instant http://localhost/?q=home instead of including a language tag.
enable the path module
set the same URL alias (eg: "home") for every node you want to be set as homepage, for every language.
Eg: let's say that you have node/1 for english and node/2 for french as homepages. you should set the same alias for node/1 and node/2, something like "home" or "homepage" etc
go to admin > configuration > system > informations and set your homepage to that alias you set earlier.

Umbraco cannot browse page by pagename.aspx

I have two seperate clean installations of Umbraco 4.5.x and both are having similar problems with page handling. If I browse pages by ID like /1083.aspx the page displays correctly, but if I try to browse by name like /about-us.aspx it gives 404 - file or directory not found.
Thanks in advance.
Sanjay
Sanjay,
This is because when you're hunting for root content nodes, the umbracoHideTopLevelNodeFromPath appSetting in the web.config is set to true by default.
As the name might imply, this hides the top-level node from the URL path. You can set it to "false" to override this behaviour.
HTH,
Benjamin

Resources