Re: [Zope] ZClasses and ZCatalog: reindexing problem
Thanks Jason and Kevin for the prompt replies. But in fact my _add constructor method had been changed to include the reindex module, just as in the example below:
<dtml-with "createInObjectManager stuff...." <dtml-call "propertysheets.YourPropSheet.manage_editProperties(REQUEST)"> <dtml-call reindex_object> </dtml-with>
And that's what puzzles me: it doesn't work. I tried doing this:
<dtml-call reindex_object()>
thinking (flailing) that "()" would specify "the current REQUEST properties" even more specifically. But I'm wrong, and it doesn't work, and I'm still at wit's end. Grateful but still puzzled, Anthony _______________________________________________________ Get 100% FREE Internet Access powered by Excite Visit http://freelane.excite.com/freeisp
----- Original Message ----- From: "Anthony Monta" <apmonta@excite.com> To: <zope@zope.org> Cc: <kid@kendermedia.com>; <444@hiretechs.com> Sent: Thursday, April 20, 2000 12:57 PM Subject: Re: [Zope] ZClasses and ZCatalog: reindexing problem
Thanks Jason and Kevin for the prompt replies. But in fact my _add constructor method had been changed to include the reindex module, just as in the example below:
<dtml-with "createInObjectManager stuff...." <dtml-call "propertysheets.YourPropSheet.manage_editProperties(REQUEST)"> <dtml-call reindex_object> </dtml-with>
And that's what puzzles me: it doesn't work. I tried doing this:
<dtml-call reindex_object()>
Hmm... The example I gave you *should* work... I use it all the time. The other one you tried wouldn't work because of the way the shortcuts in DTML work. <dtml-call reindex_object> = <dtml-call name="reindex_object"> By saying, <dtml-call reindex_object()>, you're actually looking to call something called "reindex_object()". <dtml-call "reindex_object()"> is more in line with what you're thinking, but you would probably need to pass some parameters in there... You may try experimenting with things directly via URLs, just to figure out where the problem may lie. You can go to http://yoursite/yourObjURL/propertysheets/YourPropSheet/manage_changePropert ies?propname=value Then, try http://yoursite/yourObjURL/reindex_object and see if the object shows up in your catalog. Not sure what other advice to give at this point, because this generally works just great for me. Kevin
Anthony,
Thanks Jason and Kevin for the prompt replies.
No problem.
And that's what puzzles me: it doesn't work. I tried doing this:
<dtml-call reindex_object()>
No need to shoot in the dark. We'll figure it out. :) What is leading you to believe that it's not getting indexed? Is it your report page? If so, let's bypass that and ask the Catalog directly. Providing that your Catalog is named 'Catalog' make a DTMLMethod to test it: <dtml-in "Catalog(myProperty='SomevalueIthoughtIindexed')"> <dtml-var id> </dtml-in> Now view it. It should give you the 'id' of any object that has that value sotred in the index for myProperty. (You have created an index on that property, right?:-) If there is nothing, then call the url of the object that doesn't get indexed in you browser like this(assuming zope is running locally and no the default port: http://localhost:8080/Path/To/My/ZClass/Instance/reindex_object This will force the object's url to be indexed. Now view your 'test' method again. It will definately be there. Let me know what happens during these steps. All my best, 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.
participants (3)
-
Anthony Monta -
Jason Spisak -
Kevin Dangoor