Re: xaraya header responses (bug 1155) : possible/partial fixes
Roger Rogerson <[email protected]> Tue, 7 Jul 2009 17:13:11 +0000
| Newsgroups | gmane.comp.cms.xaraya.devel |
|---|---|
| Message-ID | <[email protected]> |
Scratch that ... I could simply cache (or pull from the cache) the currently displayed items URL. xarmod URL would show it in it's preferred form (short or not). Then examine the existing/requested URL. IF no match (would have to look at additional URL paramters ... but still) ... then I could handle it? (is that what you meant about the canonical element?) Hmmm ... need to have a smoke and a think ... now I have both braincells in gear :D . Regarding the Tweaks done for hteSystem Responses. I'm having an issue identifying some of the files There are 4 tempaltes in teh base template directory for displaying of errors. Yet in the includes/exceptions directory - there is only 3 files for default error types. So what is the 4th template for ? And which of the templates handles the SiteLocked resposne (as I tried testing it and couldn't get the error message to display ?) > From: [email protected] > Date: Tue, 7 Jul 2009 17:14:20 +0100 > To: [email protected] > Subject: Re: [Xaraya_devel] xaraya header responses (bug 1155) : possible/partial fixes > > Roger Rogerson wrote: > > ... > > As I have you here, I'm looking for a method to spot incorrect URL to Xarpage issues. > > As it currently stands, if I have a parent page (PageA), and a child page (PageA1) ...then delete the child page - anyone following a link to the child page ends up viewing the parent page. > > Yes, that is by design. The path matches the page that has the most parts to the > path, and any additional parts to the path are passed to the page to do with as > it likes. A page could display news items, for example, based on the title: > > e.g. /path/to/my/page/the-title-of-the-article-which-is-not-a-xarpage > > If you want to raise an error, then a custom api function > (xarpages/xarfuncapi/...) could be written. That function would simply look for > any additional path parts and raise an error if there were any. You would need > to add the function to every page though, at least those pages where you do > specifically want an error to be raised. > > Each page can also have its own custom short URL decoder and encoder, so that > may be an additional place where could raise an error. The custom URL decoder is > meant to be the place to decode those additional parts to the path anyway. > > Another possible approach would be to use the canonical URL tag > (http://yoast.com/canonical-url-links/). When a page is selected in the > short-URL decode in xarpages, the canonical tag can be set to the actual URL, > i.e. the shortest path that matches the current page. That way search engines, > having stumbled upon a parent page after a child page has been removed, will see > that the two URLs are equivalent, and would remove all but one of the pages from > it index (without hurting your ranking). You would probably put the tag into the > 'meta' block template. It wouldn't hurt to use the canonical tag across all the > modules, especially articles where the same article can be displayed against > many different URLs. > > > > thus; > > /pagea/pagea1 > > ?module=xarpages&func=display&pid=2 > > ends up showing the contents of > > /pagea/pagea > > > > ?module=xarpages&func=display&pid=1 > > > > I need to figure a way of internally figuring out that the contents displayed is Not the content for that URL - so I can send the right response. > > (else it stil lsends a 200, and I could end up with copies of the parent page showing). > > > > > > If I was using system URLs it may be possible, but with Short URLs I don't see anyway to identify things :( > > > > Any ideas how I can check whether what is asked for and what is displayed matches? > > > > . > > > > Aside from that question - Thanks for the contact. > > Very much appreciated, and I hope you are well, > > Yep - very well and very busy. There are just too many pies I would like to get > my fingers into, but can barely lick the pastry on each :-) > > -- Jason > _______________________________________________ > Xaraya_devel mailing list > [email protected] > http://xaraya.com/mailman/listinfo/xaraya_devel _________________________________________________________________ Get the best of MSN on your mobile http://clk.atdmt.com/UKM/go/147991039/direct/01/