logo       
Bookmark and Share

Re: urls in Plone with IE and Moz*: msg#00056

web.kupu.devel

Subject: Re: urls in Plone with IE and Moz*

Gilles Lenfant wrote:

> I noticed that when inserting a link to an object with a Moz* browser,
> all links are converted to relative links (this is perfect to me) but
> links inserted with IE remain absolute links.
>
> This is an issue for one of my project where the customer's authors
> start creating content in http://somehost:8080/some/plone, then the site
> will be moved (Apache rewrite) to http://www.somedomain.com.

Are you absolutely certain that you are getting absolute links? This sort
of question comes up quite frequently because people don't realise that the
source view shows you what the browser is working with internally, not what
is being saved. Using 'view source' in your browser on the page view, not
page edit will give you a better idea of what has been saved, but even this
may not be accurate as Plone can perform transforms on the data when
rendering it.


Some of the transformations which may happen to your links:

When you start editing in Kupu, IE will convert all links from relative to
absolute.

During editing, Firefox will sometimes convert absolute links to relative
(if you drag/drop images Firefox will convert absolute links to the *wrong*
relative links which will break the images unless you also enable the link-
by-uid feature).

When you save, Kupu will convert all absolute links to relative (obviously
only where the links can be expressed as relative). Also, if you have
enabled the link-by-uid feature it will reduce such links down to just a
'resolveuid' call.

When the page is rendered it is possible that some transforms may run on
the page. One such transform supplied with Kupu but not enabled by
default will replace all the 'resolveuid' links with the absolute url for
the target. If you are using Apache rewrites this will result in an
absolute http://www.somedomain.com link rather than the somehost:8080 link
from when you edited the page.

Neither relative nor absolute links give the correct result in all
circumstances: you already noted the commonest situation where absolute
links break but if you use any type of composite pages then relative links
are likely to break, also moving a page containing links may break relative
links and moving a link target will break absolute links.

The link-by-uid option fixes all of these issues but introduces some new
ones: you either need extra work to enable a transform to replace the UID
based URLs or you will get an extra server hit for each link which is
followed and nasty urls exposed to the users.


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | Mail Home | sitemap | FAQ | advertise