Copied to clipboard

Flag this post as spam?

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


  • Matt Brailsford 4125 posts 22222 karma points MVP 9x c-trib
    Feb 19, 2010 @ 21:17
    Matt Brailsford
    0

    Child page with the same name as homepage node routes to homepage

    Hi Guys,

    I have a site structure as follows:

    Home
    - About
    - Members
    - - Home

    I seem to have a problem that when I navigate to /members/home umbraco actualy returns the content for /home

    Anybody know why this might be?

    Many thanks

    Matt

  • Matt Brailsford 4125 posts 22222 karma points MVP 9x c-trib
    Feb 19, 2010 @ 21:54
    Matt Brailsford
    0

    Looking into it a little further, it looks like you can call anything like the following:

    http://domain.com/ANYTHING/HOMEPAGENAME

    and it will always resolve to the homepage, even if ANYTHING doesn't exist.

  • Matt Brailsford 4125 posts 22222 karma points MVP 9x c-trib
    Feb 19, 2010 @ 22:41
    Matt Brailsford
    0

    I've managed to resolve the issue for now by registering a rewrite rule to redirect to the permenant url for the page.

    Would still be interested to know why it would do this?

    Matt

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Feb 20, 2010 @ 16:41
    Dirk De Grave
    0

    Matt,

    You could find out how umbraco is fetching the node if you add ?umbDebugShowTrace=true. Can you do that and show us what output you get. On the other hand, there's other options that may change this behaviour.

    - umbracoHideTopLevelNodeFromPath: if set to true then you'd get /home.aspx, /about.aspx, /members.aspx and /members/home.aspx. If set to false then /home will be put in front, so /home.aspx (remains), /home/about.aspx, /home/members.aspx and /home/members/home.aspx

    - ensureUniqueNaming from umbracoSettings.config -> shouldn't change anything in your setup as it only ensures uniqueness for pages with the same parent

    Let us know the output of the trace and we'll get it sorted.

    Cheers,

    /Dirk

     

  • Matt Brailsford 4125 posts 22222 karma points MVP 9x c-trib
    Feb 20, 2010 @ 20:25
    Matt Brailsford
    0

    Hey Dirk,

    Sure thing, here is the output from the trace (NB it should resolve to a page with ID 1149)

    Request Details 
    Session Id: z313oviuiwj3lm55jlsdvd3u Request Type: GET
    Time of Request: 20/02/2010 19:19:29 Status Code: 200
    Request Encoding: Unicode (UTF-8) Response Encoding: Unicode (UTF-8)
    Trace Information
    Category Message From First(s) From Last(s)
    aspx.page Begin PreInit  
    umbracoInit handling request 6.11215287287515E-05 0.000061
    request handler current url '/members/home.aspx' 0.000144638732106206 0.000084
    umbracoRequestHandler Just before xPath query (True, '1060') 0.00021742467471449 0.000073
    umbracoRequestHandler After xPath query 0.000269681248894797 0.000052
    umbracoRequestHandler Access checking started 0.000403588720231833 0.000134
    umbracoRequestHandler Page not protected 0.000463777095850221 0.000060
    umbracoRequestHandler Access checking ended 0.000506702138926902 0.000043
    umbracoInit Done handling request 0.000553359794445033 0.000047
    umbracoPage Element loaded: bodyContent 0.000715261859092947 0.000162
    umbracoPage Element loaded: feature1 0.00077311735193543 0.000058
    umbracoPage Element loaded: feature2 0.00082304104333983 0.000050
    umbracoPage Element loaded: feature3 0.000873431311299411 0.000050
    umbracoPage Element loaded: siteName 0.000925221308924536 0.000052
    umbracoPage Element loaded: siteDescription 0.00100547247641572 0.000080
    umbracoPage Element loaded: analyticsCode 0.00106192823959266 0.000056
    umbracoPage Element loaded: spotlight1 0.00111371823721779 0.000052
    umbracoPage Element loaded: umbracoNaviHide 0.00116970742383954 0.000056
    umbracoPage Element loaded: showInMainNav 0.00122056426835431 0.000051
    umbracoPage Element loaded: showInFooterNav 0.0012681550769828 0.000048
    umbracoPage Element loaded: summaryIntro 0.00132461084015974 0.000056
    umbracoPage Pagedata loaded for Home (ID: 1060, Version: 1147664a-db7f-44ca-bc5f-8c0108791363) 0.00137406795500896 0.000049
    aspx.page End PreInit 0.00207113332844983 0.000697
    aspx.page Begin Init 0.00212665593851641 0.000056
    umbracoMacro Macro loaded from cache (ID: 7, Meta Tag) 0.00220410764667651 0.000077
    renderMacro Rendering started (macro: Meta Tag, type: 1, cacheRate: 0) 0.00226102998640862 0.000057
    umbracoMacro Xslt node adding search start (name,'description') 0.00235667818022079 0.000096
    umbracoMacro Xslt node adding search start (content,' ') 0.00239027169219385 0.000034
    umbracoMacro Before adding extensions 0.00241966601517027 0.000029
    umbracoXsltExtension Extension added: urn:Exslt.ExsltCommon, ExsltCommon 0.00310320066851089 0.000684
    umbracoXsltExtension Extension added: urn:Exslt.ExsltDatesAndTimes, ExsltDatesAndTimes 0.00314612571158757 0.000043
    umbracoXsltExtension Extension added: urn:Exslt.ExsltMath, ExsltMath 0.00317132084556736 0.000025
    umbracoXsltExtension Extension added: urn:Exslt.ExsltRegularExpressions, ExsltRegularExpressions 0.00319791570921269 0.000027
    umbracoXsltExtension Extension added: urn:Exslt.ExsltStrings, ExsltStrings 0.0032226442666373 0.000025
    umbracoXsltExtension Extension added: urn:Exslt.ExsltSets, ExsltSets 0.00324597309439637 0.000023
    umbracoMacro After adding extensions 0.00326836876904507 0.000022
    umbracoMacro Before performing transformation 0.00329636336235595 0.000028
    umbracoMacro After performing transformation 0.00348532686720438 0.000189
    umbracoMacro Macro loaded from cache (ID: 7, Meta Tag) 0.00354411551315723 0.000059
    renderMacro Rendering started (macro: Meta Tag, type: 1, cacheRate: 0) 0.00357397641268883 0.000030
    umbracoMacro Xslt node adding search start (name,'keywords') 0.00363976370696939 0.000066
    umbracoMacro Xslt node adding search start (content,' ') 0.00367382379549763 0.000034
    umbracoMacro Before adding extensions 0.00370508442469478 0.000031
    umbracoXsltExtension Extension added: urn:Exslt.ExsltCommon, ExsltCommon 0.00505022463328249 0.001345
    umbracoXsltExtension Extension added: urn:Exslt.ExsltDatesAndTimes, ExsltDatesAndTimes 0.00511414562134233 0.000064
    umbracoXsltExtension Extension added: urn:Exslt.ExsltMath, ExsltMath 0.00514540625053948 0.000031
    umbracoXsltExtension Extension added: urn:Exslt.ExsltRegularExpressions, ExsltRegularExpressions 0.00517013480796409 0.000025
    umbracoXsltExtension Extension added: urn:Exslt.ExsltStrings, ExsltStrings 0.00519393021227833 0.000024
    umbracoXsltExtension Extension added: urn:Exslt.ExsltSets, ExsltSets 0.0052172590400374 0.000023
    umbracoMacro After adding extensions 0.00524012129124128 0.000023
    umbracoMacro Before performing transformation 0.00527324822665916 0.000033
    umbracoMacro After performing transformation 0.00544354866930034 0.000170
    umbracoMacro Macro loaded from cache (ID: 9, Page Title) 0.00551400172913271 0.000070
    renderMacro Rendering started (macro: Page Title, type: 1, cacheRate: 0) 0.00554619551144022 0.000032
    umbracoMacro Before adding extensions 0.00561011649950006 0.000064
    umbracoXsltExtension Extension added: urn:Exslt.ExsltCommon, ExsltCommon 0.00670097248551396 0.001091
    umbracoXsltExtension Extension added: urn:Exslt.ExsltDatesAndTimes, ExsltDatesAndTimes 0.00674949644725282 0.000049
    umbracoXsltExtension Extension added: urn:Exslt.ExsltMath, ExsltMath 0.00677889077022924 0.000029
    umbracoXsltExtension Extension added: urn:Exslt.ExsltRegularExpressions, ExsltRegularExpressions 0.00680268617454349 0.000024
    umbracoXsltExtension Extension added: urn:Exslt.ExsltStrings, ExsltStrings 0.00682554842574737 0.000023
    umbracoXsltExtension Extension added: urn:Exslt.ExsltSets, ExsltSets 0.00684794410039608 0.000022
    umbracoMacro After adding extensions 0.00686940662193442 0.000021
    umbracoMacro Before performing transformation 0.00690020067457638 0.000031
    umbracoMacro After performing transformation 0.00713022291628077 0.000230
    item Start parsing 'template' 0.0071843457966818 0.000054
    item Done parsing 'template' 0.00723193660531029 0.000048
    item Start parsing 'pageID' 0.00726459696417299 0.000033
    item Done parsing 'pageID' 0.00730192308858749 0.000037
    umbracoMacro Macro loaded from cache (ID: 6, Main Navigation) 0.00735044705032635 0.000049
    renderMacro Rendering started (macro: Main Navigation, type: 1, cacheRate: 0) 0.00737844164363723 0.000028
    umbracoMacro Before adding extensions 0.0074264990288209 0.000048
    umbracoXsltExtension Extension added: urn:Exslt.ExsltCommon, ExsltCommon 0.00822154547884985 0.000795
    umbracoXsltExtension Extension added: urn:Exslt.ExsltDatesAndTimes, ExsltDatesAndTimes 0.00825747187359881 0.000036
    umbracoXsltExtension Extension added: urn:Exslt.ExsltMath, ExsltMath 0.00828453331379933 0.000027
    umbracoXsltExtension Extension added: urn:Exslt.ExsltRegularExpressions, ExsltRegularExpressions 0.00830786214155839 0.000023
    umbracoXsltExtension Extension added: urn:Exslt.ExsltStrings, ExsltStrings 0.0083302578162071 0.000022
    umbracoXsltExtension Extension added: urn:Exslt.ExsltSets, ExsltSets 0.0083526534908558 0.000022
    umbracoMacro After adding extensions 0.00837411601239414 0.000021
    umbracoMacro Before performing transformation 0.00840164402914984 0.000028
    umbracoMacro After performing transformation 0.0112990844368258 0.002897
    item Start parsing 'bodyContent' 0.0113499412813405 0.000051
    item Done parsing 'bodyContent' 0.0113989318196346 0.000049
    umbracoMacro Macro loaded from cache (ID: 24, Splash Redirect) 0.0131299308393572 0.001731
    renderMacro Rendering started (macro: Splash Redirect, type: 3, cacheRate: 0) 0.0131840537197583 0.000054
    umbracoMacro Usercontrol added (/usercontrols/SplashRedirect.ascx) 0.013214381195845 0.000030
    loadUserControl Usercontrol added with id 'SplashRedirect_5' 0.0134014783944727 0.000187
    macro.loadControlProperties Property added 'DisplayOnceOnly' with value 'False' 0.01345886731076 0.000057
    macro.loadControlProperties Property added 'SplashPage' with value '1154' 0.0135031920835023 0.000044
    macro.loadControlProperties Property added 'SessionId' with value 'welcome' 0.013535852442365 0.000033
    macro.loadControlProperties Property added 'DisplayOncePerSession' with value 'True' 0.0135619807294551 0.000026
    macro.loadControlProperties Property added 'AllowCrawlers' with value 'True' 0.0135946410883178 0.000033
    umbracoMacro Macro loaded from cache (ID: 4, Feature) 0.0138773864807577 0.000283
    renderMacro Rendering started (macro: Feature, type: 1, cacheRate: 0) 0.0139198449472792 0.000042
    umbracoMacro Xslt node adding search start (class,'feature1') 0.0139902980071116 0.000070
    umbracoMacro Xslt node adding search start (nodeId,'1065') 0.0140243580956398 0.000034
    umbracoMacro Before adding extensions 0.0140588847607232 0.000035
    umbracoXsltExtension Extension added: urn:Exslt.ExsltCommon, ExsltCommon 0.0146915625695491 0.000633
    umbracoXsltExtension Extension added: urn:Exslt.ExsltDatesAndTimes, ExsltDatesAndTimes 0.0147246895049669 0.000033
    umbracoXsltExtension Extension added: urn:Exslt.ExsltMath, ExsltMath 0.0147484849092812 0.000024
    umbracoXsltExtension Extension added: urn:Exslt.ExsltRegularExpressions, ExsltRegularExpressions 0.0147713471604851 0.000023
    umbracoXsltExtension Extension added: urn:Exslt.ExsltStrings, ExsltStrings 0.014794209411689 0.000023
    umbracoXsltExtension Extension added: urn:Exslt.ExsltSets, ExsltSets 0.0148166050863377 0.000022
    umbracoMacro After adding extensions 0.0148418002203174 0.000025
    umbracoMacro Before performing transformation 0.0148735274260698 0.000032
    umbracoMacro After performing transformation 0.0164006324911782 0.001527
    umbracoMacro Macro loaded from cache (ID: 4, Feature) 0.016461754019907 0.000061
    renderMacro Rendering started (macro: Feature, type: 1, cacheRate: 0) 0.0164911483428834 0.000029
    umbracoMacro Xslt node adding search start (class,'feature2') 0.0165396723046222 0.000049
    umbracoMacro Xslt node adding search start (nodeId,'1070') 0.0165727992400401 0.000033
    umbracoMacro Before adding extensions 0.0166012604099062 0.000028
    umbracoXsltExtension Extension added: urn:Exslt.ExsltCommon, ExsltCommon 0.0171966120943175 0.000595
    umbracoXsltExtension Extension added: urn:Exslt.ExsltDatesAndTimes, ExsltDatesAndTimes 0.017228805876625 0.000032
    umbracoXsltExtension Extension added: urn:Exslt.ExsltMath, ExsltMath 0.0172526012809393 0.000024
    umbracoXsltExtension Extension added: urn:Exslt.ExsltRegularExpressions, ExsltRegularExpressions 0.0172782629914742 0.000026
    umbracoXsltExtension Extension added: urn:Exslt.ExsltStrings, ExsltStrings 0.0173015918192333 0.000023
    umbracoXsltExtension Extension added: urn:Exslt.ExsltSets, ExsltSets 0.017323987493882 0.000022
    umbracoMacro After adding extensions 0.0173459165919755 0.000022
    umbracoMacro Before performing transformation 0.0173725114556209 0.000027
    umbracoMacro After performing transformation 0.0185921425708648 0.001220
    umbracoMacro Macro loaded from cache (ID: 4, Feature) 0.0186434659919348 0.000051
    renderMacro Rendering started (macro: Feature, type: 1, cacheRate: 0) 0.0186719271618008 0.000028
    umbracoMacro Xslt node adding search start (class,'feature3') 0.0187185848173189 0.000047
    umbracoMacro Xslt node adding search start (nodeId,'1070') 0.0187512451761816 0.000033
    umbracoMacro Before adding extensions 0.0187797063460477 0.000028
    umbracoXsltExtension Extension added: urn:Exslt.ExsltCommon, ExsltCommon 0.0193325995639376 0.000553
    umbracoXsltExtension Extension added: urn:Exslt.ExsltDatesAndTimes, ExsltDatesAndTimes 0.0193647933462451 0.000032
    umbracoXsltExtension Extension added: urn:Exslt.ExsltMath, ExsltMath 0.0193885887505593 0.000024
    umbracoXsltExtension Extension added: urn:Exslt.ExsltRegularExpressions, ExsltRegularExpressions 0.0194114510017632 0.000023
    umbracoXsltExtension Extension added: urn:Exslt.ExsltStrings, ExsltStrings 0.0194427116309603 0.000031
    umbracoXsltExtension Extension added: urn:Exslt.ExsltSets, ExsltSets 0.0194749054132679 0.000032
    umbracoMacro After adding extensions 0.0194968345113614 0.000022
    umbracoMacro Before performing transformation 0.0195229627984515 0.000026
    umbracoMacro After performing transformation 0.0207099335548328 0.001187
    umbracoMacro Macro loaded from cache (ID: 10, Spotlight) 0.0207668558945649 0.000057
    renderMacro Rendering started (macro: Spotlight, type: 1, cacheRate: 0) 0.0207962502175413 0.000029
    umbracoMacro Xslt node adding search start (nodeId,'1123') 0.0208461739089457 0.000050
    umbracoMacro Before adding extensions 0.020880233997474 0.000034
    umbracoXsltExtension Extension added: urn:Exslt.ExsltCommon, ExsltCommon 0.0241733313239436 0.003293
    umbracoXsltExtension Extension added: urn:Exslt.ExsltDatesAndTimes, ExsltDatesAndTimes 0.0242255878981239 0.000052
    umbracoXsltExtension Extension added: urn:Exslt.ExsltMath, ExsltMath 0.0242498498789934 0.000024
    umbracoXsltExtension Extension added: urn:Exslt.ExsltRegularExpressions, ExsltRegularExpressions 0.0242731787067524 0.000023
    umbracoXsltExtension Extension added: urn:Exslt.ExsltStrings, ExsltStrings 0.0242960409579563 0.000023
    umbracoXsltExtension Extension added: urn:Exslt.ExsltSets, ExsltSets 0.0243240355512672 0.000028
    umbracoMacro After adding extensions 0.0243464312259159 0.000022
    umbracoMacro Before performing transformation 0.0243758255488923 0.000029
    umbracoPage Element loaded: newsSrc 0.024632442654242 0.000257
    umbracoPage Element loaded: maxItems 0.0246623035537736 0.000030
    umbracoPage Pagedata loaded for White News (ID: 1123, Version: 6dae5a6c-586f-4ba7-902f-29086625171d) 0.0246874986877534 0.000025
    template Master template is the same as the current template. It would course an endless loop! 0.0252847166783855 0.000597
    template Begining of parsing rutine... 0.0253360400994555 0.000051
    umbTemplate Outputting item: <?UMBRACO_MACRO  macroAlias="header" text="White News" /> 0.0254293554104917 0.000093
    template Begining of parsing rutine... 0.025491876668886 0.000063
    umbracoMacro Macro loaded from cache (ID: 12, Header) 0.0255390009009593 0.000047
    renderMacro Rendering started (macro: Header, type: 1, cacheRate: 0) 0.0255669954942702 0.000028
    umbracoMacro Xslt node adding search start (text,'White News') 0.0256225181043368 0.000056
    umbracoMacro Before adding extensions 0.0256551784631995 0.000033
    umbracoXsltExtension Extension added: urn:Exslt.ExsltCommon, ExsltCommon 0.0267917589516211 0.001137
    umbracoXsltExtension Extension added: urn:Exslt.ExsltDatesAndTimes, ExsltDatesAndTimes 0.0268346839946978 0.000043
    umbracoXsltExtension Extension added: urn:Exslt.ExsltMath, ExsltMath 0.0268589459755673 0.000024
    umbracoXsltExtension Extension added: urn:Exslt.ExsltRegularExpressions, ExsltRegularExpressions 0.026886473992323 0.000028
    umbracoXsltExtension Extension added: urn:Exslt.ExsltStrings, ExsltStrings 0.026909802820082 0.000023
    umbracoXsltExtension Extension added: urn:Exslt.ExsltSets, ExsltSets 0.0269326650712859 0.000023
    umbracoMacro After adding extensions 0.0269545941693794 0.000022
    umbracoMacro Before performing transformation 0.0269839884923558 0.000029
    umbracoMacro After performing transformation 0.0272210093823879 0.000237
    umbracoMacro After performing transformation 0.0286226053541526 0.001402
    umbracoMacro Macro loaded from cache (ID: 10, Spotlight) 0.0286804608469951 0.000058
    renderMacro Rendering started (macro: Spotlight, type: 1, cacheRate: 0) 0.028708455440306 0.000028
    umbracoMacro Xslt node adding search start (nodeId,'[$spotlight2]') 0.0288367639929808 0.000128
    umbracoMacro Before adding extensions 0.0288717572346194 0.000035
    umbracoXsltExtension Extension added: urn:Exslt.ExsltCommon, ExsltCommon 0.0296406753975582 0.000769
    umbracoXsltExtension Extension added: urn:Exslt.ExsltDatesAndTimes, ExsltDatesAndTimes 0.0296770683688624 0.000036
    umbracoXsltExtension Extension added: urn:Exslt.ExsltMath, ExsltMath 0.0297041298090629 0.000027
    umbracoXsltExtension Extension added: urn:Exslt.ExsltRegularExpressions, ExsltRegularExpressions 0.0297274586368219 0.000023
    umbracoXsltExtension Extension added: urn:Exslt.ExsltStrings, ExsltStrings 0.0297512540411362 0.000024
    umbracoXsltExtension Extension added: urn:Exslt.ExsltSets, ExsltSets 0.0297736497157849 0.000022
    umbracoMacro After adding extensions 0.0297951122373232 0.000021
    umbracoMacro Before performing transformation 0.0298212405244134 0.000026
    umbracoMacro After performing transformation 0.0299224876368877 0.000101
    umbracoMacro Macro loaded from cache (ID: 10, Spotlight) 0.0299686787158507 0.000046
    renderMacro Rendering started (macro: Spotlight, type: 1, cacheRate: 0) 0.0299976064622719 0.000029
    umbracoMacro Xslt node adding search start (nodeId,'[$spotlight3]') 0.0301147171776224 0.000117
    umbracoMacro Before adding extensions 0.0301487772661507 0.000034
    umbracoXsltExtension Extension added: urn:Exslt.ExsltCommon, ExsltCommon 0.0306148872447768 0.000466
    umbracoXsltExtension Extension added: urn:Exslt.ExsltDatesAndTimes, ExsltDatesAndTimes 0.0306456812974188 0.000031
    umbracoXsltExtension Extension added: urn:Exslt.ExsltMath, ExsltMath 0.0306722761610641 0.000027
    umbracoXsltExtension Extension added: urn:Exslt.ExsltRegularExpressions, ExsltRegularExpressions 0.0306956049888232 0.000023
    umbracoXsltExtension Extension added: urn:Exslt.ExsltStrings, ExsltStrings 0.0307180006634719 0.000022
    umbracoXsltExtension Extension added: urn:Exslt.ExsltSets, ExsltSets 0.0307403963381206 0.000022
    umbracoMacro After adding extensions 0.0307618588596589 0.000021
    umbracoMacro Before performing transformation 0.0307870539936387 0.000025
    umbracoMacro After performing transformation 0.0308757035391231 0.000089
    umbracoMacro Macro loaded from cache (ID: 5, Footer Navigation) 0.0309204948884205 0.000045
    renderMacro Rendering started (macro: Footer Navigation, type: 1, cacheRate: 0) 0.0309475563286211 0.000027
    umbracoMacro Before adding extensions 0.0309918811013633 0.000044
    umbracoXsltExtension Extension added: urn:Exslt.ExsltCommon, ExsltCommon 0.0314309296397889 0.000439
    umbracoXsltExtension Extension added: urn:Exslt.ExsltDatesAndTimes, ExsltDatesAndTimes 0.0314607905393205 0.000030
    umbracoXsltExtension Extension added: urn:Exslt.ExsltMath, ExsltMath 0.0314841193670796 0.000023
    umbracoXsltExtension Extension added: urn:Exslt.ExsltRegularExpressions, ExsltRegularExpressions 0.0315069816182835 0.000023
    umbracoXsltExtension Extension added: urn:Exslt.ExsltStrings, ExsltStrings 0.0315326433288184 0.000026
    umbracoXsltExtension Extension added: urn:Exslt.ExsltSets, ExsltSets 0.0315559721565775 0.000023
    umbracoMacro After adding extensions 0.0315769681015607 0.000021
    umbracoMacro Before performing transformation 0.0316021632355404 0.000025
    umbracoMacro After performing transformation 0.0335216591835563 0.001919
    item.recursive Item loaded from 1060 0.0335921122433887 0.000070
    item Start parsing 'analyticsCode' 0.0336177739539237 0.000026
    item Done parsing 'analyticsCode' 0.0336616321501107 0.000044
    aspx.page End Init 0.0337026908869667 0.000041
    aspx.page Begin InitComplete 0.0337264862912809 0.000024
    aspx.page End InitComplete 0.0337484153893745 0.000022
    aspx.page Begin PreLoad 0.0337698779109128 0.000021
    aspx.page End PreLoad 0.0337904072793408 0.000021
    aspx.page Begin Load 0.0338118698008791 0.000021
    aspx.page End Load 0.0338617934922835 0.000050
    aspx.page Begin LoadComplete 0.0338897880855944 0.000028
    aspx.page End LoadComplete 0.0339117171836879 0.000022
    aspx.page Begin PreRender 0.0339327131286711 0.000021
    aspx.page End PreRender 0.0339653734875338 0.000033
    aspx.page Begin PreRenderComplete 0.0339905686215136 0.000025
    aspx.page End PreRenderComplete 0.0340120311430519 0.000021
    aspx.page Begin SaveState 0.0353772341435124 0.001365
    aspx.page End SaveState 0.0355013435071906 0.000124
    aspx.page Begin SaveStateComplete 0.0355307378301671 0.000029
    aspx.page End SaveStateComplete 0.0355517337751502 0.000021
    aspx.page Begin Render 0.0355731962966886 0.000021
    aspx.page End Render 0.0371796193761778 0.001606
  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Feb 20, 2010 @ 21:01
    Douglas Robar
    0

    This line is particularly curious if /members/home.aspx is id=1149

    umbracoRequestHandler Just before xPath query (True, '1060')

    Becuase it shouldn't be for node 1060.

    But since it IS for id=1060 you get the following...

    umbracoPage Pagedata loaded for Home (ID: 1060, ...... )

    That's the crux of the issue. The question is... why?

     

    Any chance you've to urlRewriting (in the /config/urlrewriting.config or using another url rewriter) active on the site? Or maybe a docType alias with umbracoUrlAlias or one of the other umbracoXYZ properties set?

    Do you have hostheaders in use on your site? If so, have you used the Manage Hostnames menu for *every* top-most node on your site? If you only set some and leave some unset you can run into weird problems like this.

    If you were to right-click on the top-most page of your site and select 'publish' from the menu, and choose the box for all child nodes as well... that will force umbraco to re-calculate all the urls for all the pages below the one you selected. Repeat this for all the top-level nodes on your site so that all nodes get recalculated urls. You need to do this after you use manage hostnames, for instance.

    Let us know what you find out.

    cheers,
    doug.

  • Matt Brailsford 4125 posts 22222 karma points MVP 9x c-trib
    Feb 20, 2010 @ 21:15
    Matt Brailsford
    0

    Hi Doug,

    In response to your questions:

    1. I don't have any other rewrite rules setup in the urlrewriting.config (other than the one I have setup to bypass this issue for now). I don't have any other type of rewriting setup on the site. I do have umbraco properties defined for redirecting on my templates, but none are actualy set for eaither node.
    2. I do have host headers setup on IIS, but I only have one site setup in umbraco so I haven't used the Manage Hostnames feature as I just want everything to map to the main site.
    3. Republishing (either by "Republish entire site" or by right clicking the top most not and selecting "Publish") doesn't seem to resolve the issue.

    Let me know if you have any other thoughts.

    Many thanks

    Matt

  • Matt Brailsford 4125 posts 22222 karma points MVP 9x c-trib
    Feb 20, 2010 @ 22:04
    Matt Brailsford
    0

    By the way, I've noticed that if the second homepage is more than 2 levels deep, it does resolve correctly

    ie http://domain.com/members/something/home.aspx does resolve correctly.

    Matt

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Feb 20, 2010 @ 22:15
    Morten Bock
    3

    Just spent a couple of hours debugging this with the source, and I have found the code that causes this. The reason that you trace does not reveal it is, that the result of the requestmodule is cached, so if the page has been requested before, then the ID of the query will be retrieved from cache.

    Now, the code causing this trouble is:

    bool rootAdded = false;
    if (GlobalSettings.HideTopLevelNodeFromPath && requestRawUrl.Length == 1) {
        HttpContext.Current.Trace.Write("umbracoRequestHandler", "xpath: '" + _tempQuery + "'");
        if (_tempQuery == "")
            _tempQuery = "/root/node";
        _tempQuery = "/root/node [" + _urlName +
                     " = \"" + requestRawUrl[0].Replace(".aspx", "").ToLower() + "\"] | " + _tempQuery;
        HttpContext.Current.Trace.Write("umbracoRequestHandler", "xpath: '" + _tempQuery + "'");
        rootAdded = true;
    }
    
    
    for (int i = 0; i <= requestRawUrl.GetUpperBound(0); i++) {
        if (requestRawUrl[i] != "")
            _tempQuery += "/node [" + _urlName + " = \"" + requestRawUrl[i].Replace(".aspx", "").ToLower() +
                          "\"]";
    }
    
    if (GlobalSettings.HideTopLevelNodeFromPath && requestRawUrl.Length == 2) {
        _tempQuery += " | " + pageXPathQueryStart + "/node [" + _urlName + " = \"" +
                      requestRawUrl[1].Replace(".aspx", "").ToLower() + "\"]";
    }

    Note the last if sentence. That matches urls with exactly two parts, and joins a new xpath to the query.

    This actually means that _both_ pages are matched by the query, but later in the code, only the first match is used, which will be the root node.

    It seems like a bug, but I imagine that it might be used because it is possible to add hostnames like this in the "manage hostnames" part: "example.com/en-us". So that means that your home page _could_ be fetched with "example.com/en-us/home.aspx".

    So the question remains if this is a feature or a bug, but at least it explains the behavior you are experiencing.

    Let me know if you need more details in case you want to report it as a bug on codeplex.

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Feb 20, 2010 @ 22:38
    Douglas Robar
    0

    Fantastic research, as always, Morten!

    It has be considered a bug, doesn't it? I mean, this is not some behavior one could argue is appropriate or expected behavior.

    Not sure how it might be coded to handle the different scenarios but there must be a way to handle this with/without HideTopLevelNodeFromPath, at any level in the tree, and with/without manage hostnames being involved. (says the guy who doesn't have to code a solution :) )

     

    If I understand you correctly, this means that Matt has a few options to work-around this issue:

    1. Use a urlrewriting rule to get around the problem
    2. Rename the /members/home.aspx page to something else (that is, ensure that no second-level node has the same name as a top-level node
    3. Move the /members/home.aspx page to anywhere other than the second level in the content tree since home.aspx also matches the top-level node.

    Is that right?

     

    cheers,
    doug.

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Feb 20, 2010 @ 23:38
    Morten Bock
    0

    Yes, that is the three options that I see currently.

    A classic is to rename the /members/home.aspx node to "home " (note the trailing space). This will give it the url /members/home-.aspx, but it is not transparent for the editor who might rename it at some time...

  • Matt Brailsford 4125 posts 22222 karma points MVP 9x c-trib
    Feb 20, 2010 @ 23:53
    Matt Brailsford
    0

    Awesome work Morten,

    I'm happy to keep the custom URL rewrite rule for my purposes as the page is unlikley to move/change.

    Does anybody know what the specific length check is for? If it is purely for the country code, could you not just add a regex to match the pattern?

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft