Re: xaraya header responses (bug 1155) : possible/partial fixes

Roger Rogerson <[email protected]> Tue, 7 Jul 2009 17:09:27 +0000
Newsgroups gmane.comp.cms.xaraya.devel
Message-ID <[email protected]>
Well, the Canonical element is a whole other kettle of fish - we need a way to pull apart URLs and identify "duplciates" and "variants" ...

startnum=1&sort=price_asc
startnum=1&price=price_desc
startnum=1&numitems=30
startnum=1&numitems=60

not to mention the various orders of Cat/Aid etc. we can have :(

The problem is that there isn't really - and not likely to be an easy way to do it eithr - have a centralised URL system - as so much is module specific.

What would be nice is if it was possible to "order" the URL parameters in a predefined manner - aand ensure that they are conformed to.
Thus things like Module / Type / Func  should always appears first, in that order
then prioritise what comes after - so ItemType and ItemID, additional parameters for that (such as CatID), then StartNum, NumItems, Sort/Filter etc.
I suppose we could simply do it in alpha-order.

We would also need a way to specific the "preferred" URL - and if the URL used isn't that - then it's either an internal/scripted 301, or the inclussion of the canonical element


Not a pleasant job :(

.

As for the xarpages ...
the problem is - even if I could write an API - I stil ldo Not know how to identify what is being displayed nor what is being asked for - not if short URLs are being used.
Is there a Reverse-Lookup option?
Is the ShortURL stored anywhere?
Else attempting to go thorugh all the various pages and enc/de-code them to test the URL path seems a little chunky.

Does that make sense?
(I'm probably explaining it badly)

But basically, I'm not seeing any way to identify stuff requested.



> 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

_________________________________________________________________
With Windows Live, you can organise, edit, and share your photos.
http://clk.atdmt.com/UKM/go/134665338/direct/01/