Tags:
create new tag
view all tags

Question

I am testing the ability to attach and then include an HTML file.

First I tested on an 01 September 2004 installation of TWiki on Mac OS X. This is a new installation. I uploaded the file, VTL.html into the top of the web (http://catnip.local/twiki/bin/edit/Engineering/WebHome)

The page looks like this:

Welcome to the home of <b>%WIKITOOLNAME%.%WEB%</b>. This is a web-based collaboration area for software engineering and coding...

   * [[%ATTACHURL%/VTL.html][VTL.html]]: Design Spec

----
%INCLUDE{"%ATTACHURL%/VTL.html"}%

The result after savng is exactly as expected. The file is linked at the bullet and the contents is inlined below the horizontal separator.

I then went to another TWiki installation, this one also 01 September 2004 but an upgrade of a Feb 2003 installation.

I went to a page that is another levels below the top of the web: https://int.company.com/twiki/bin/view/Dev/InlinedAttachments. I uploaded the identical file, again with the link and made the same separator and include code. There is some additional text on the page:

This page presents an example of attaching a design spec (written in HTML) and then inlining the results as if the spec was created in the Wiki. The Best of Both Worlds. Check it out.

-- Main.VickiBrown - 04 Nov 2004

First, I attached the file using the Attach... link. I checked the box to make a link to the file on the page. Note that the link shows up as a bullet item (just below) and the attachment is available through a nice table at the bottom of the page.
 
   * [[%ATTACHURL%/VTL.html][VTL.html]]: The Design spec

After I attached the file, I went back into "Edit" mode and added explanatory text above the link as well as below (what you're reading Right Now :-). 

Now I'll put in a horizontal separator line (just begin any line with at least three dashes, no spaces) and below that, I'll inline the VOF spec.  Watch closely now...

----

%INCLUDE{"%ATTACHURL%/VTL.html"}%

When I save, the page shows the link (which works), the attachment and a note

    Note:  Included topic https:..int.company.com.twiki.pub.Dev.InlinedAttachments.VTL.html does not exist yet 

but it does exist. I can click on the linked copy and Go To The Page.

What's going on? Help?


I did another experiment on another TWiki installation, also 01 September 2004 (upgraded from Feb 2003), also running on FreeBSD 4.7. However, this installation is running Perl 5.8.5.

Can I blame the ancient and molding Perl version for the problem? Is this a way to comvince my employer to update to a more modern Perl on their server?

Environment

TWiki version: TWikiRelease01Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: FreeBSD 4.7
Web server: Apache
Perl version: Perl 5.005_03 (:-(
Client OS: Mac OS X
Web Browser: Safari
Categories: Missing functionality

-- VickiBrown - 04 Nov 2004

Answer

TWiki currently does not support the https protocol for INCLUDE.

TWiki does handle an INCLUDE of an attachment specially, it reads the file directly. You might be able to convince your TWiki to do that with https. in TWikipm, function handleIncludeFile change:

    if( $incfile =~ /^http\:/ ) {
to:
    if( $incfile =~ /^https?\:/ ) {

This is not tested, but worth a try.

-- PeterThoeny - 04 Nov 2004

Tested now (at least here) and works. Thanks. Please consider folding this into the code base.

I also made a similar change to the set of if statements in sub handleIncludeUrl. Now, at least, I get Found The file has moved here instead of https: unsupported protocol

-- VickiBrown - 08 Nov 2004

See IncludeAttachmentWithHttps and IncludeUrlWithHttpsProtocol.

-- PeterThoeny - 09 Nov 2004

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2004-11-09 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.