[Zope-PTK] Portal Failure

Chip Vanek chip@upcast.com
Sat, 5 Feb 2000 02:18:35 -0800


Hi,

I encountered the same problem earlier this week and made a change
to get around it.  I cannot say that I fixed it only that I quit
having that error ;)  I got the latest CVS this evening and installed
on a freash system and found the same error so applied this workaround
again to get back going.  I will just paste a message I sent to Mike
on Wendsday with the strong caviot that I still do not know what I am
doing and it may break more then it fixes.

Best of luck,

Chip Vanek
chip@upcast.com


____________________________________________________________
Hi,

Getting the files from your CVS was easy but, getting a sample
portal site has proven hard.  I got a type error after the final
PortalWizard form (02).  The trace showed a problem in the addIndex
lines of the install method of Portal.py.  I am new to both Zope and
python so still feel very uncomfortable with what does what and how.
Based on looking at your Zdiscussion product it looks like there
might be another way to create the indexes.  Because this is working
for you I assume there is something wrong with my configuration but,
I have looked everywhere and reinstalled from scratch to check.

Well after changing portal.py everything seems to work.  The only
thing I see that might not be working is the review capabilities.
I am assuming from reading the documents that only public items
are in searchable but, when I look in the site index only the
new private test items I created are cataloged.  And these
items are filtered out of the search until they are public (right?).
Is there a problem with the catalog because of my changes that
do not allow it to reindex the existing public items?

The software is looking much better then 0.3 and I am beginning to
understand some of the parts.  This will be fun.



I just clipped the text below in case I made no sense above.

Best,

Chip Vanek
chip@upcast.com
_______________________________________________________________

Clip from PTKBase/DemoApp/Portal.py

        # Install PortalCatalog
        id = 'SiteIndex'
        catalog = PortalCatalog(id, '')
        self._setObject(id, catalog)
        catalog = self.SiteIndex
        # Reviewing indexes
        catalog._catalog.addIndex('review_state', 'FieldIndex')
        catalog._catalog.addIndex('Date', 'FieldIndex')
        # Content indexes
        catalog._catalog.addIndex('Creator', 'FieldIndex')
        catalog._catalog.addIndex('Title', 'TextIndex')
        catalog._catalog.addIndex('Description', 'TextIndex')
        catalog._catalog.addIndex('Searchable Text', 'TextIndex')
        #catalog.manage_addIndex('Searchable Text', 'TextIndex')
        # Catalog meta-data
        catalog._catalog.addColumn('Title')
        catalog._catalog.addColumn('Description')
        catalog._catalog.addColumn('review_state')
        catalog._catalog.addColumn('Creator')
        catalog._catalog.addColumn('Date')
        catalog._catalog.addColumn('icon')
        #catalog.manage_addColumn('icon')

Method definition in ZCatalog.py

	def manage_addIndex(self, name, type, REQUEST, RESPONSE, URL1):
        """ add an index """
        self._catalog.addIndex(name, type)

        RESPONSE.redirect(URL1 +
'/manage_catalogIndexes?manage_tabs_message=Index%20Added')

Anopther example of adding Zcatalog Indexes from your ZDiscussion product.

    def __init__(self, id, title=''):

	# Initialise ZCatalog
	ZCatalog.ZCatalog.__init__(self, id, title)

	# Set up the indexes
	self._catalog.addIndex('body', 'TextIndex')
	self._catalog.addIndex('author', 'FieldIndex')
	self._catalog.addIndex('email', 'FieldIndex')
	self._catalog.addIndex('in_reply_to', 'FieldIndex')
	self._catalog.addIndex('created', 'FieldIndex')
	self._catalog.addIndex('modified', 'FieldIndex')

	# Set up meta-data columns
	self._catalog.addColumn('body')
	self._catalog.addColumn('author')
	self._catalog.addColumn('email')
	self._catalog.addColumn('in_reply_to')
	self._catalog.addColumn('created')
	self._catalog.addColumn('modified')


>-----Original Message-----
>From: zope-ptk-admin@zope.org [mailto:zope-ptk-admin@zope.org]On Behalf
>Of Andrew Kenneth Milton
>Sent: Saturday, February 05, 2000 2:00 AM
>To: zope-ptk@zope.org
>Subject: [Zope-PTK] Portal Failure
>
>
>This is in the last step of installing a 'Portal'
>
>This is from the latest CVS
>---------------------------------------------------------------
>---------
>
>Zope Error
>
>       Zope has encountered an error while publishing this resource.
>
>       Error Type: TypeError
>       Error Value: not enough arguments; expected 6, got 3
>---------------------------------------------------------------
>---------
>
>--
>Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   |
>Andrew Milton
>The Internet (Aust) Pty Ltd          |  F:+61 7 3870 4477   |
>ACN: 082 081 472                     |  M:+61 416 022 411   |
>Carpe Daemon
>PO Box 837 Indooroopilly QLD 4068    |akm@theinternet.com.au|
>
>_______________________________________________
>Zope-PTK maillist  -  Zope-PTK@zope.org
>http://lists.zope.org/mailman/listinfo/zope-ptk
>
>