|
|
 Rank: Fanatic
Joined: 8/9/2007 Posts: 284 Location: Kentucky, USA
|
Hostnames do not seem to be working right for me consistently, but maybe I'm not doing this right. I have two separate Web sites in one umbraco installation. Each site exists within separate nodes just below the content node. For each of these nodes, I did a right-click, chose Manage Hostnames, and added the appropriate host name. When I browse either site, everything works as expected. So far so good. However, when attempting to create links from one site to the other using the content picker in TinyMCE, I get inconsistent results. Sometimes, I get an absolute URL that correctly resolves to the hostname of the top level node of the tree to which the link points. Other times, I get a relative URL which then of course attempts to load the node as part of the linking page's domain, resulting in a 404. Is this the way it is supposed to work? Part of the reason we put both sites in the same installation was to facilitate cross-site linking and searching. If that won't work, then we need to rethink this. I would appreciate any thoughts on this. Thanks.
Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
|
|
 Rank: Addict
Joined: 7/19/2006 Posts: 789 Location: Århus, Denmark
|
Have you set the "enforcedomainnames" property in umbracosettings.config to true? If that setting has not been set from the start, then some nodes may need to be re-published i order to generate the correct url.
|
|
 Rank: Fanatic
Joined: 8/9/2007 Posts: 284 Location: Kentucky, USA
|
No, I didn't know about that. Can you tell me which section that should go in? The key is not present at all in my copy. Thanks!
Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
|
|
 Rank: Fanatic
Joined: 8/9/2007 Posts: 284 Location: Kentucky, USA
|
Tried to do a community search on enforcedomainnames as well as several other combinations and can't find anything to document how to do this. I tried creating the following key in the settings node and then republished both the target node and the node containing the link, but that didn't seem to fix it. I'm just guessing at the syntax -- can someone confirm if this is right nor not? Code:<enforcedomainnames enabled="true"/> I also tried this syntax: Code:<enforceDomainNames>true</enforceDomainNames> And tried moving it to the requestHandler node of the config file -- no good. I'm just shooting in the dark here. Someone must know how to do this?
Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
|
|
 Rank: Fanatic
Joined: 8/9/2007 Posts: 284 Location: Kentucky, USA
|
Anyone? This is causing us a MAJOR headache.
Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
|
|
 Rank: Fanatic
Joined: 8/9/2007 Posts: 284 Location: Kentucky, USA
|
I'm going to keep bumping this until someone has an answer or Niels kicks me off the forum ;-)
Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
|
|
 Rank: Umbracoholic
Joined: 9/8/2006 Posts: 1,693 Location: KY, USA
|
I'm going out on a limb here, but I think Morten meant the <useDomainPrefixes>true</useDomainPrefixes> setting. Also (again, guessing)... be sure that the domain names you specified in the Manage Hostnames box are all lower-case letters. I'm not 100% sure this is relevant, but I think it might be. Be sure to republish (with children) all the nodes so umbraco recalculates all urls. This may or may not fix any links you've already created and you might need to go back and manually reselect those nodes through the UI. Try a few new links on a test page. If they work, check the others. If there is no difference... we'll have to look elsewhere. cheers, doug.
MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
|
|
 Rank: Fanatic
Joined: 8/9/2007 Posts: 284 Location: Kentucky, USA
|
Doug, thanks for the reply and the helpful info. I already had Code:<useDomainPrefixes>true</useDomainPrefixes> in my umbracoSettings.config from way back. It is within the requestHandler section. I have published and re-published many times since that setting was put there. I did a page of test links as you suggested. I had done this before, but not until just now did I see a pattern: links to the home node or to children of the home node work -- but links to nodes deeper than 1 level below home do not work. In other words, when linking from a node in my.fcps.net to target nodes in www.fcps.net, umbraco outputs the fully-qualified URL when I select either the root node or a child of the root node. Otherwise, it outputs a relative URL which the browser incorrectly resolves to the my.fcps.net domain. Weird, huh?
Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
|
|
 Rank: Fanatic
Joined: 8/9/2007 Posts: 284 Location: Kentucky, USA
|
I'm going to bump this one more time in hopes someone has an idea, any idea, that might help. To summarize, I have one umbraco installation serving two separate sites with different domain names, www.fcps.net and my.fcps.net. Each site exists within separate branches of the content tree (see the image).  I have defined the domain names for the two topmost nodes in each branch, i.e., for Home (www.fcps.net) and for Staff Portal (my.fcps.net). Everything works great as far as serving up pages. Any URL within either site works as expected. The problem comes in when attempting to link from the Staff Portal back to the public site using the content picker in TinyMCE, which writes the links as {localLink:id} to the file. If I link to a 2nd level node under Home, such as News, About FCPS, or Administration, the localLink gets correctly parsed as an absolute URL (since the target content is in a different domain), e.g., http://www.fcps.net/news. However, if the target node is deeper in the content tree, for example Press Releases or Features, then the localLink gets parsed as a relative link, i.e., /news/press-releases/ which winds up as a link to the current domain thus: http://my.fcps.net/news/press-releases/Can anyone think of any reason why top level links in the target domain would get correctly parsed as absolute URLS while deeper links come out as relative?
Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
|
|
Rank: Fanatic
Joined: 3/15/2007 Posts: 378 Location: Cary, NC USA
|
do you have seperate master page templates for both sites? if so, do you have different document types for each sites? and if that is true, what do those document type template master pages point to?
|
|
 Rank: Fanatic
Joined: 8/9/2007 Posts: 284 Location: Kentucky, USA
|
Yes, each site has it's own set of templates (master and child) and doc types. I don't understand the last question. What do mean by "point to"? Thanks for taking a stab at this, John. I'm willing to follow any lead at this point as I'm getting rocks thrown at me from every direction on this problem.
Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
|
|
Rank: Fanatic
Joined: 3/15/2007 Posts: 378 Location: Cary, NC USA
|
the "Master template" property located in the assigned document type template.
we ran into the following problem (not sure it's related but will throw it out there - just a shot in the dark)... we're converting over 40+ sites and originally were going to have master pages and templates for each site while only having single document types so that we could re-use the single document types throughout all the sites. we ran into document type inheritance issues that kind of sound like what you're describing (pages will redirect to the wrong site). we ended up re-coding a single master page solution so that it could be re-used by all sites templates and all document types (since they all would inherit the single master template)... and then everything started working correctly.
|
|
 Rank: Fanatic
Joined: 8/9/2007 Posts: 284 Location: Kentucky, USA
|
Somehow I missed the last reply until just now. But I don't think this is the same issue. Each of our 2 sites has it's own unique set of doc types and templates. So I wouldn't think that would be an issue. Anyone else have any ideas? This just escalated from an annoyance to a MAJOR problem when I discovered that even if we type the fully qualified URL, including the host name, umbraco insists on removing the domain information and leaving a relative link. Yikes.
Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
|
|
Rank: Enthusiast
Joined: 11/1/2007 Posts: 32
|
Just for kicks, could you try the setting umbracoHideTopLevelNodeFromPath? It's true default right? I've been looking at the code for niceUrlDo but it's very difficult to follow. umbracoHideTopLevelNodeFromPath = false makes the code go quite a different path thou. If it doesn't work I would try to debug niceUrlDo along with it's companion getUrlByDomain in visual studio with a site similar to yours.
|
|
 Rank: Fanatic
Joined: 8/9/2007 Posts: 284 Location: Kentucky, USA
|
Carl, I appreciate your help. Currently, I have umbracoHideTopLevelNodeFromPath = true in Web.config. Changing it false completely breaks my site as it adds "home/" -- the name of my root node in the www domain -- to every path. I assume that's what umbracoHideTopLevelNodeFromPath was created to avoid. As for debugging those functions in VS, I probably wouldn't know what to look for. But when I get a few minutes to spare, I'll give it a shot. It would be nice if someone who actually knows something about the core code could take a shot at this. It almost certainly looks like a bug to me.
Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
|
|
Rank: Enthusiast
Joined: 11/1/2007 Posts: 32
|
Still, would it be possible to generate the links with the setting false? Just to see if it resolves the domain correctly? If it does I think the area of the bug is narrowed down quite a lot.
|
|
 Rank: Fanatic
Joined: 8/9/2007 Posts: 284 Location: Kentucky, USA
|
Carl wrote:Still, would it be possible to generate the links with the setting false? Just to see if it resolves the domain correctly? If it does I think the area of the bug is narrowed down quite a lot. I'll try that sometime when there's likely to be little traffic on the site.
Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
|
|
Rank: Enthusiast
Joined: 11/1/2007 Posts: 32
|
* bump *
|
|
|
Guest |