Archive of UserLand's first discussion group, started October 5, 1998.

Re: Calendar and Glossary-Errors

Author:André Radke
Posted:6/3/1999; 2:38:25 PM
Topic:Calendar and Glossary-Errors
Msg #:6994 (In response to 6986)
Prev/Next:6993 / 6995

having installed the most recent version of the mainresponder.root i have to face now wrong rendered glossary-links.

It's not the rendering here that is the problem. If you check the HTML source code, you will see that the links do make sense.

The problem actually has to do with how mainResponder.respond resolves paths to tables that are rendered via a table render. The daily entries in a news site are just a particular example for this.

Here's a message I posted to our mailing list about this, describing an experimental fix for this problem:

Date: Wed, 14 Apr 1999 03:43:51 +0200
From: Andre Radke <andre@userland.com>
Subject: mainResponder redirection bug
 
There is a bug in mainResponder.respond that leads to the browser being
erroneously redirected in certain circumstances. This bug was first
mentioned in the current "curious behavior of newsy story links" thread on
this list.
 
Here's a description of the problem:
 
Suppose you point your browser to the following URL:
 
    http://news.userland.com/1999/04/01
 
On the server side, this URL corresponds to an object at 
scriptingNews.["1999"].["04"].["01"] in news.root. This object is a table.
It is rendered into a page by a special table renderer. So, the above URL
points to a page - not a directory.
 
Still, when going to that URL, mainResponder.respond will redirect you to
 
    http://news.userland.com/1999/04/01/
 
Note the trailing slash. This is the URL for a directory. But the object
requested originally is not a directory - it's a page. As a consequence of
the additional slash, relative links created thru the glossary mechanism to
other pages in the site will not work. (This is why at first this bug was
erroneously attributed to the glossPatcher.)
 
Now, point your browser to the following URL:
 
    http://news.userland.com/1999/01/01
 
On the server side, this URL corresponds to an object at
scriptingNews.["1999"].["01"].["01"] which is an outline. No redirection
occurs in this case - nor should it.
 
Logically, these two objects live at the same level of the object
hierarchy. The way mainResponder.respond treated them so far, they appear
to the browser as living on different levels - which is why relative links
break...
 
We have come up with a fix that will keep mainResponder.respond from
erroneously redirecting requests for table objects that are rendered via a
table renderer. If you want to help test this fix, follow these steps:
 
1) Open mainResponder.respond in mainResponder.root
 
2) Choose Collapse Everything from the Outliner menu
 
3) Expand the "on respond (adrparamtable, fldebug=false)" handler
 
4) Expand the "on core ()" handler
 
5) Expand the "on serveTable ()" handler
 
6) Comment out the first line that reads:
 
    pathMustEndWithSlash () //possibly redirect
 
7) Expand the "for item in defaults" block
 
8) Expand the "if defined (adritem^)" block
 
9) Inside that block, before the first line which reads "gatherattributes
(adrtable)", insert the following statement :
 
    pathMustEndWithSlash () //possibly redirect
 
10) Expand the "if flnotfound" block
 
11) Inside the "if flnotfound" block, expand the "else" block
 
12) Right above the line
 
    adrparamtable^.responseBody = tableToHTML (nomad)
     
add a line with the contents
 
    pathMustEndWithSlash () //possibly redirect
 
If you decide to test this bug fix on your machine, please let us know how
it goes.



There are responses to this message:


This page was archived on 6/13/2001; 4:50:35 PM.

© Copyright 1998-2001 UserLand Software, Inc.