[Zope-dev] RE: More on the Absent id bug

Jason Spisak jason@mtear.com
Tue, 11 Jan 2000 09:47:11 GMT


The Catalog I was using never had a leading slash anywhere.
All objects in it returned a:

Folder/FolderB/myobject, for getpath and Catalog view.

When I upraged to 2.1.1 as I showed you,

getpath:      FolderA/FolderB/myOjbect
url:          /FolderA/FolderB/myObject
absolute_url: http://FolderA/FolderB/myObject

Now after commenting out the line Darren suggested I get:

getpath:      /FolderA/FolderB/myOjbect
url:          /FolderA/FolderB/myObject
absolute_url: http://FolderA/FolderB/myObject

Now I don't get any barfs.  
It barfed constanly with a 'absent id' when I called uncatalog_object
before.  Is there a place that getpath() gets a url one way, and the Find
tab in the Catalog get's the url another way? That only way to explain the
top situation would be that they were using different methods to determine
the url for cataloging and uncataloging.  

Also as a side note, I am getting absent id errors now because of the
DTMLDocument subclassing %3cstring%3c bug.  The work arounds are not
working with the Catalog. 

All my best,

Jason
Michel Pelletier writes:

> > -----Original Message-----
> > From: Jason Spisak [mailto:jason@mtear.com]
> > 
> > I commented out that line, and it still has the backslash in 
> > front of the
> > catalogued url.
> > 
> > Michel, is that right?
> > 
> > Aren't they supposed to not have the leading slash?  If it 
> > has a leading
> > slash, then when you click on the link in the Catalog 
> > management interface,
> > you get and error.  (it is looking for a server @
> > http://my_object/url/object,  rather that
> > http://localhost:8080/my_object/url/object.
> > 
> > Which one is correct in in your design?
> 
> The latter, obviously.  Not putting the slash in confuses your browser
> into thinking it's a bad relative URL.
> 
> The culprit is in lib/python/Products/catalogView.dtml  Here is the
> checkin message:
> 
> 
> ----------------------------
> revision 1.10
> date: 1999/12/28 23:59:10;  author: amos;  state: Exp;  lines: +1 -1
> Fixed links to catalogged objects.
> ----------------------------
> 
> Here is the diff:
> 
> *** /tmp/catalogView.dtml.~1.9~1NAywY	Tue Jan 11 11:24:02 2000
> --- /tmp/catalogView.dtml1NA_6e	Tue Jan 11 11:24:02 2000
> ***************
> *** 48,54 ****
>         </TD>
>         <td valign="top"><dtml-var meta_type></td>
>         <td valign="top" align="left">
> !         <a href="/<dtml-var
> "getpath(data_record_id_)">/manage_workspace"><dtml-var
> "getpath(data_record_id_)">
>           <dtml-if title> (<dtml-var title>)</dtml-if></a>
>         </td> 
>       </tr>
> --- 48,54 ----
>         </TD>
>         <td valign="top"><dtml-var meta_type></td>
>         <td valign="top" align="left">
> !         <a href="<dtml-var
> "getpath(data_record_id_)">/manage_workspace"><dtml-var
> "getpath(data_record_id_)">
>           <dtml-if title> (<dtml-var title>)</dtml-if></a>
>         </td> 
>       </tr>
> 
> 
> As you can see what probably happened was that not slash before the
> <dtml-var getpath...> probably broke the catalog's ability to show good
> links in certain circumstances, which fixed one problem but manifested
> yours.
> 
> The quick fix is to remove the / in the <a> tag in this file.  But we
> MUST think more about this path stuff, Catalog was the first app to use
> it extensivly and our lack of a path framework shows.
> 
> -Michel


Jason Spisak
CIO
HireTechs.com
6151 West Century Boulevard
Suite 900
Los Angeles, CA 90045
P. 310.665.3444
F. 310.665.3544

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.