• 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.

Item5588: INCLUDE of attached HTML files fails in subwebs

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine INCLUDE Urgent Closed   patch 4.2.1

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

I am attempting to include an HTML file attached to a topic via
%INCLUDE{"%ATTACHURL%/ssd5.fit.html"}%

This works fine in a top level web, but when used in a subweb I get the dreaded

Warning
This site does not allow %INCLUDE% of URLs
error.

I've attached a patch to TWiki.pm that seems to fix the problem

-- TWiki:Main.DiabJerius - 29 Apr 2008

Can there be more than one layer of subwebs (e.g. Sandbox/A/B/...)? If so, the patch isn't complete; changing the second '?' to a '*'. in the regular expression should do the trick.

-- TWiki:Main.DiabJerius - 30 Apr 2008

Yes, there can be many layers, and you should use the $TWiki::regex regular expressions in that RE, but apart from that your analysis is spot on. Confirmed.

-- CrawfordCurrie - 30 Apr 2008

I will fix this using a twiki.pm regex also

testing the code already

-- KennethLavrsen - 01 May 2008

Fixed. Thanks Diab for the analysis. I changed the fix to use the regex for web names

    if( $url =~ /^$this->{urlHost}$TWiki::cfg{PubUrlPath}\/($regex{webNameRegex})\/([^\/\.]+)\/([^\/]+)$/ ) {

-- KennethLavrsen - 01 May 2008

ItemTemplate
Summary INCLUDE of attached HTML files fails in subwebs
ReportedBy TWiki:Main.DiabJerius
Codebase 4.2.0
SVN Range TWiki-5.0.0, Tue, 15 Apr 2008, build 16676
AppliesTo Engine
Component INCLUDE
Priority Urgent
CurrentState Closed
WaitingFor

Checkins TWikirev:16755 TWikirev:16756
TargetRelease patch
ReleasedIn 4.2.1
Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatpatch TWiki.pm.patch r1 manage 0.7 K 2008-04-29 - 21:25 DiabJerius  
Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2008-08-04 - KennethLavrsen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback