[Zope] Very important for CatalogWare zopists
Brian Lloyd
Brian@digicool.com
Fri, 14 Jan 2000 14:13:03 -0500
> I have submitted this to the Collector and it is major for people who
> have items in their ZODB that are Catalog aware.
>
> To create the bug follow these steps:
>
> 1.Create a Catalog Aware ZClass
> 2.Create an instance of that class
> 3.Make sure it is indexed by looking in the Catalog "Catolaged items"
> tab
> 4.Notice that there is *no* slash in front of the indexed url:
> "MyFolder/myobject"
> 5.Now clear the Catalog
> 6.Go to the "Find Items to Catalog"
> 7.Select just your New ZClass meta type so it is quick
> 8.Click "Find"
> 9.Make sure it is indexed by looking in the Catalog "Catolaged items"
> tab
> 10. Oh no! It has a different url. A leading slash!
> "/MyFolder/myobject"
> 11. Click on the link. It's broken!
Hi Jason - these steps are equivalent to what is currently
done on Zope.org (which is running on a checkout equivalent
to 2.1.2), and this does not seem to be a problem there.
While I won't totally rule out the possibility of something
in Zope, the fact that we don't see this behavior seems to
suggest that there might be something going awry in your
particular ZClasses. In particular, I'd look for some
difference in the way that it registers itself with the
catalog at the time that it is created versus when it is
"found" by the catalog. The difference could be a difference
in either behavior, state or environment (i.e. is the
acquisition context, etc. the same in both cases when the
"absolute_url" method gets called to generate the url for
the catalog? Is there any custom code around this logic?).
The object constructor is a good place to start looking
for this sort of thing - try to trace through the activity
in the constructor versus what happens when the existing
object is "found" by the catalog. If possible, try to see
what the value of the url given to the catalog is what you
expected it to be...
> What this means is that if you have a lot of items in you
> Catalog don't
> ever ever ever use the "Find" machinery until Digital fixes this(It
> worked in 2.0.0 Final). You will end up not being able to
> edit/reindex
> your objects, and the links in your applications may not
> function.
I have not heard any other reports of a problem like this, so
until we can verify that it is a Zope problem I think that this
is a little strong. If other Zopistas can reproduce this I would
certainly like to hear about it though.
Brian Lloyd brian@digicool.com
Product Manager 540.371.6909
Digital Creations http://www.digicool.com