Jean Jordaan | 1 Nov 01:03 2002
Picon

Problem: addIndex with type as string

Hmm, looks like Plone (well, CMFTypes) specifies the type of index
as a string, when adding indexes to the 'portal_catalog'::

   catalog.addIndex('UID', 'FieldIndex', extra=None)

But Zope 2.6 (and I think 2.5.x too) doesn't like that::

  TypeError: Catalog addIndex now requires the index type to
             be resolved prior to adding; create the proper
             index in the caller.

(from the event.log). Looks like CMF also does this, at least in
CMFCore/CatalogTool.py::

         for index_name, index_type in self.enumerateIndexes():
             addIndex( index_name, index_type )

where 'index_name, index_type' are both strings.

http://plone.org/collector/539
http://collector.zope.org/CMF/86

--

-- 
Jean Jordaan
http://www.upfrontsystems.co.za

-------------------------------------------------------
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
(Continue reading)

Andy McKay | 1 Nov 02:11 2002
Picon

Re: Example in CMFTypes book b0rked

I tried the example and it mostly worked as I remember. There's that bug you
mentioned and the file listing shows .py files instead of .pt. I fixed the
book.

Thanks
--
  Andy McKay
  www.agmweb.ca

----- Original Message -----
From: "Jean Jordaan" <jean@...>
To: "'plone-developers'" <plone-developers@...>
Sent: Thursday, October 31, 2002 3:33 PM
Subject: [Plone-developers] Example in CMFTypes book b0rked

> I tried the example at
> http://plone.org/documentation/CMFTypesBook/4
> , which looks really great, but the result is:
>
> Error Type: Bad Request
> Error Value: Example: Article not found.
>
> I'm going to try and dig up the problem now ..
>
> --
> Jean Jordaan
> http://www.upfrontsystems.co.za
>
>
>
(Continue reading)

Jean Jordaan | 1 Nov 02:07 2002
Picon

Re: Example in CMFTypes book b0rked

 > Error Type: Bad Request
 > Error Value: Example: Article not found.

OK, that one was simply:

-PROJECTNAME = "Example"
+PROJECTNAME = "TypesExample"

Otherwise 'CMFTypes.Extensions.utils.install_types' calls
'typesTool.manage_addTypeInformation' with 'typeinfo_name'
equal to "Example: Article" instead of
"TypesExample: Article"::

   typesTool.manage_addTypeInformation(
                     FactoryTypeInformation.meta_type,
                     id=type.__name__,
                     typeinfo_name="%s: %s"%(
                             package_name, type.__name__))

and when 'manage_addTypeInformation' tries to lookup
"Example: Article" in 'self.listDefaultTypeInformation()'
it doesn't find anything.

--

-- 
Jean Jordaan
http://www.upfrontsystems.co.za

-------------------------------------------------------
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
(Continue reading)

Jean Jordaan | 1 Nov 02:11 2002
Picon

Re: Example in CMFTypes book b0rked

Hmm, where does this example add the generated skins as
DirectoryViews? I don't see them anywhere, and I don't
see any directories under TypesExample when trying to
add them manually. What needs to be done or registered
to make them show up?

The example Article gets added, but viewing it gives a
404 on the generated page template, which exists, but
doesn't show up.

Perhaps this is a problem: Zope runs as 'nobody', but
after CMFTypes autogenerated the views & scripts, they
were rw-------, only user 'jean' could read them.

--

-- 
Jean Jordaan
http://www.upfrontsystems.co.za

-------------------------------------------------------
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
Jean Jordaan | 1 Nov 02:15 2002
Picon

Re: Example in CMFTypes book b0rked

Hi Andy

> There's that bug you mentioned and the file listing shows .py files 
 > instead of .pt.

heh, didn't even notice ..

> I fixed the book.

Hmm? What book is that? CMFTypesBook? Ah yes I see :)  I guess then
my comments on the page can go away ..

--

-- 
Jean Jordaan
http://www.upfrontsystems.co.za

-------------------------------------------------------
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
Jean Jordaan | 1 Nov 11:51 2002
Picon

Re: [Plone-users] ActivePak and Zope 2.6.0

> Yes, ActivePak was a patch to fix a bug in Zope 2.5.1, it's not needed for
> 2.6.0. It's supposed to deactivate itself if you run 2.6.0, 

Here's a Zope 2.6.0 restart, where you can see ActivePak being applied
although it shouldn't be:

------
2002-11-01T11:39:38 INFO(0) Z2 Caught signal SIGTERM
------
2002-11-01T11:39:38 INFO(0) Z2 Closing all open ZODB databases
------
2002-11-01T11:39:38 INFO(0) Z2 Shutting down
------
2002-11-01T11:39:39 INFO(0) zdaemon Started subprocess: pid 22891
------
2002-11-01T11:39:44 INFO(0) ZODB Opening database for mounting: 
'144369040_1036091007.491401'
------
2002-11-01T11:39:44 INFO(0) ZODB Mounted database 
'144369040_1036091007.491401' at /temp_folder
------
2002-11-01T11:39:44 INFO(0) Plone:
Active Pak 0.1 has been applied
------
2002-11-01T11:39:45 INFO(0) Plone Database Init
No config file found, this is probably fine [exceptions.IOError, [Errno 
2] No such file or directory: 
'/home/httpd/zope-instances/jean/2-6-0/plone.ini']
------
2002-11-01T11:39:45 INFO(0) ZServer HTTP server started at Fri Nov  1 
(Continue reading)

Jean Jordaan | 1 Nov 12:18 2002
Picon

ZopeZen: 'localTimeFormat' and 'user_slot' not being found?

Hmm, in ZopeZen/CustomizationPolicy.py it looks like this::

  portal._updateProperty('left_slots', left_slots)
  portal._updateProperty('right_slots', right_slots)
  portal._updateProperty('localTimeFormat', '%b. %d, %y')
  portal._updateProperty('localLongTimeFormat', '%b. %d, %y %I:%M %p')

in order for 'localTimeFormat' to be found, I changed that to::

  portal._updateProperty('left_slots', left_slots)
  portal._updateProperty('right_slots', right_slots)
  portal.portal_properties.site_properties._updateProperty(
   'localTimeFormat', '%b. %d, %y')
  portal.portal_properties.site_properties._updateProperty(
   'localLongTimeFormat', '%b. %d, %y %I:%M %p')

is that the right thing to do? Anyway, now 'index_html' is
raising KeyError: user_slot ...

/me is experience a major configuration pile up :(

--

-- 
Jean Jordaan
http://www.upfrontsystems.co.za

-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
(Continue reading)

Jean Jordaan | 1 Nov 12:25 2002
Picon

ZopeZen: CMFCore.TypesTool TypeInformation.Type() is deprecated, use Title().

ZopeZen/CustomizationPolicy.py::

   if typeInfo.Type() not in typesToSkip:

makes Plone-1_0 branch complain::

   CMFCore.TypesTool TypeInformation.Type() is deprecated, use Title().

Changing that to::

   if typeInfo.Title() not in typesToSkip:

looks like a fix. Now to find out why ZopeZen consistenly says:
"Error enabling syndication" upon installation.

--

-- 
Jean Jordaan
http://www.upfrontsystems.co.za

-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
Andy McKay | 1 Nov 17:32 2002
Picon

Re: Old CMF Docs - Are they still any good?

> Some of the stuff is relevant, some is not. We should probably see what is
> relevant for Plone and the latest CMF, and put that into the Plone book
> (with due credits to the original writers, of course). There is valuable
and
> well-written documentation here, and as it is already in STX format, it
> should transfer nicely.

Yeah I just think we want to be careful about not trying to document the
whole CMF as well, there are obviously places where we have to do this to
explain Plone. Just be careful. We should probably ask the authors prior to
using it, as a courtesy.
--
  Andy McKay
  www.agmweb.ca

-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
Jean Jordaan | 1 Nov 20:48 2002
Picon

How 'bout adding ExternalEditor to plone.org?

It'll be very impressive to edit RTF docs over the web seamlessly ;)

--

-- 
Jean Jordaan
http://www.upfrontsystems.co.za

-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en

Gmane