Tags:
create new tag
view all tags

Question

On pages protected from read (%ALLOWTOPICREAD% tag for instance), with the method using a viewauth script clone of the view script, the %TOC% tag is not working in the sense that clicking on headers in it just reload the page

  • TWiki version: Sep 2001
  • Web server: apache
  • Server OS: linux
  • Web browser: Netscape, opera
  • Client OS: linux

The problem is that the links are of the form /.../bin/view/Web/ToPic#header But the URL of this page is of the form /.../bin/viewauth/Web/ToPic

So for the browser, this link is non-local, it tries to reload the page and get lost in the process

Possible solutions I can see:

  1. in view script, if we are in viewauth, replace strings /view/ by /viewauth/ in the relevant places
  2. change the base href=... tag to use viewauth
  3. define a new var %VIEWSCRIPT%, expansed to view or viewauth depending on the context
  4. use relative URLs for links (may be impossible for links into other topics)

-- ColasNahaboo - 23 Oct 2001

Answer

I implemented a low-tech (but effifient) solution based on 2: create a new template for viewauth, with just the name of the script changed in it. This is done by a:

  sed -e 's|URL%/view%SCRIPT|URL%/viewauth%SCRIPT|' <templates/view.tmpl  >templates/viewauth.tmpl
  • pro: it works with no overhead
  • con: you must re-update the viewauth template if you change the view template (add a reminder comment in templates/view.tmpl )

-- ColasNahaboo - 22 Nov 2001

This is fixed and in TWikiAlphaRelease. The fix is in TWiki.pm, it figures out to use viewauth instead of view for TOC. See also Codev.ViewAuthHandlingForTOC

-- PeterThoeny - 24 Nov 2001

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2001-11-24 - 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.