• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

external HTTP docs included in TWiki topics via %INCLUDE% containing relative urls are not correctly patched (IMG for example). Sub TWiki.pm:_rewriteUrlInInclude use full site URL rather than dirname($theAbsPath), so all patched URLs also contains target HTTP filename.

For example : %INCLUDE%{"http://home.tele2.fr/nomblot/photos/Famille/Aurelie/index.html"}%

will use as absolute path : http://home.tele2.fr/nomblot/photos/Famille/Aurelie/index.html, and will path all IMGs with this URL, which is wrong :

and must be in fact
  • image1.gif

Just try to include http://home.tele2.fr/nomblot/photos/Famille/Aurelie/index.html to see, example given in this topic content, view http page source to check img urls.

Suggested fix :

TWiki.pm : sub _rewriteURLInInclude

    use File::Basename;
    $theAbsPath = dirname($theAbsPath);

Alternate fix: (TWiki:Main.AlexSchuilenburg)

The above fix is incorrect as URLs use dir separator of '/' while dirname will operate according to the server's OS. e.g. On a Windows/DOS based system, separators are '\'. I propose instead:

TWiki.pm : sub _rewriteURLInInclude

    $theAbsPath = $1 if ($theAbsPath =~ /(.*\/)/);

This was fixed in 10720 by TWiki:Main.SteffenPoulsen, so it's closed.


4.1.0 released


Summary Include of external doc set wrong url in relative links
ReportedBy TWiki:Main.PatrickNomblot
Codebase 4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.0.4, ~twiki4
SVN Range TWiki-4.1-beta1, Sun, 23 Jul 2006, build 11129
AppliesTo Engine

Priority Normal
CurrentState Closed

Checkins 10720
TargetRelease minor
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r6 - 2007-01-16 - KennethLavrsen
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback