[Zope] Reloading iframes with DTML

2005-06-07 Thread Wim Bekker


Hi,

Suppose I have two iframes in a DTML document. If I submit a form in one
iframe and reload this iframe, I want to also reload the other iframe.
This can be done with javascript.

Is there a way to do this with DTML or python?

Wim 


**DISCLAIMER 
** 
De informatie verzonden met dit e-mail bericht is uitsluitend voor de 
geadresseerde(n). Openbaarmaking, vermenigvuldiging, verspreiding en/of  
verstrekking aan derden is niet toegestaan. Indien U deze e-mail abusievelijk 
heeft ontvangen, verzoeken wij U het e-mail bericht te verwijderen en de 
afzender hiervan op de hoogte te stellen. VDG Nederland bv   sluit iedere 
aansprakelijkheid uit, die voortvloeit uit elektronische verzending. 
The information contained in this communication is intended solely for use of 
the individual or entity to whom it is addressed and others authorized to 
receive it. If you are not the intended recipient you are hereby notified that 
any disclosure, copying,distribution or taking any action in reliance on the 
contents of this information is strictly prohibited. If you are not the 
intended recipient, please delete this message and any attachments and advise 
the sender by return e-mail. VDG Nederland bv  rules out any and every 
liability resulting from any electronic transmission. 
*
 


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Modifying a Dictionaries in an Extenal Method

2005-06-07 Thread Dieter Maurer
Edward Huixquic wrote at 2005-6-7 01:11 -0500:
>Since you sent your reply not to the list but to my email

That was a mistake. It should have gone to the mailing list...

> I dared to
>respond directly, let me know if you prefer not to receive direct
>emails and sorry if my dare bothered you.

In principle, all Zope related messages should go to a mailing
list and not to me privately...

> ...
>That is why I am passing the "REQUEST" to the External Method, as "to
>make it aware  of the DTML variables (environment)

"REQUEST" does *not* know about DTML variables.

>, actually the ones
>that are created from the MySQLMethod.dictionaries()   So, in the
>future I will call directly like:
>
> 

I am not familiar with "dictionaries" (it is in fact less
efficient than the use of the result directly).

But, I expect that "dictionaries" is not a method of
the "Z SQLMethod" itself but instead of its result.

If I am right, then you must use "MyZSQLMethod().dictionaries()".

> ...
>> >Powerful but hard to  learn, as you
>> >probably heard before, I am trying to grab that Zope spark...fighting
>> >against namespaces, acquisition,  and other abstract  Zope concepts.
>> 
>> Maybe, you read
>> 
>>   
>
>Thanks for the suggestion.  Already  reading it.
>
>>..
>> The most natural way, you can imagine: you simple call
>> your "ExternalMethod" with this dictionary list as parameter.
>> 
>>  
>> 
>> Note that DTML performs some magic for its "name" attributes.
>> If its value is callable, it automatically calls it.
>> Inside an "expr" attribute, there is no such magic.
>> This means, that you sometimes need to call explicitly (probably
>> not in your example but sometimes...).
>
>In your example, I understand  "fields" must be preassigned to  say,
>MyZSQLMethod.dictionaries()

I used the "fields" from your example.

Whatever it is, you can pass it to an "External Method" (or
other function like object). You may need to call it explicitly
to get the same effect as you would get when you used it as
a DTML variable, as I explained above.

-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Pre-indexing filter and accented letters

2005-06-07 Thread Dieter Maurer
Yuri wrote at 2005-6-7 10:37 +0200:
> ...
>>Implement a PythonScript that performs the normalization of
>>"context.SearchableText()", say "NormalizedSearchableText".
>>
>>Ensure, it is acquirable by your indexed objects.
>>
>>Index "NormalizedSearchableText" rather than "SearchableText"
>>and use this index for your searches.
>>
>>Ensure, that you perform the same normalization on search
>>terms before you use them in a query.
>>  
>>
>
> Weel, I cannot change the index, it already has his name... it is a 
>collection of thousands of object, this one I want to pre-filter before 
>index are just a small part...

But your index currently has unnormalized values.
Thus, you must rebuild it.

When you rebuild it, you can also give it a different name.

> Or you mean I have to do something about  SearchableText()?

Yes, replace it by "NormalizedSearchableText".

> I have to index in a way the user find the term even if it does not use 
>accented letters on a current index that already has indexed thousands 
>of objects...

I have understood that...
And my advice applied to precisely this situation...

> Can I hook somewhere in the middle, so I Index them in the way I want? :)

You can (and must) normalized the search terms.
However, the indexed values need be normalized, too.

Almost surely, there are not now. This means, rebuilding the
index -- this time with normalization...


-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] XMLRPC problems?

2005-06-07 Thread Andreas Jung

I am now as clueless as before.

-aj

--On 6. Juni 2005 23:54:40 -0700 Dennis Allison 
<[EMAIL PROTECTED]> wrote:




There was a security fix for XMLRPC which was installed in 2.3.5 and
2.4.1 and elsewhere which is not fully backwards compatible.  I have
yet to establish whether the fix is causing problems, but that was the
information I needed.

On Tue, 7 Jun 2005, Andreas Jung wrote:




--On 6. Juni 2005 15:14:21 -0700 Dennis Allison
<[EMAIL PROTECTED]> wrote:

>
> Zope 2.7.6, ZEO,
> Python 2.4.1 (yes, I know it is not yet official but ...
> ZEO runs on the same machine but is accessed through an internal
> network ZMYSQLDA 2.0.9
> MySQL-1.1.7
>
> I've seen a couple of problems attributable to XLRPC failures in our
> system after an upgrade to Zope 2.7.6.

"a couple of problems* is a totally insufficient problem description. If
you have some problems then you would like to give a description of the
problem you encounter on your side...it's hard to investigate or even
fix  "phantom" problems. If you want that some of the Zope developers
gets  attracted to your problem you must provide reasonable evidence.
Speaking  for myself I won't ask bunch of times back...if there is a
problem then  tell us or file a bugreport but please avoid such
unspecific reports.

-aj


--
Dennis Allison * Computer Systems Laboratory * Gates 227
   * Stanford University *  Stanford CA  94305
   * (650) 723-9213 * (650) 723-0033 fax
   * [EMAIL PROTECTED]
   * [EMAIL PROTECTED]







pgpJ1Dxom1X1K.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] SQL query manage_test throws KeyError vith value 'query'

2005-06-07 Thread Dennis Allison
Failure occurs with 
Zope 2.7.6 final
Python 2.3.5 or Phython 2.4.1
MySQLdb 1.2.1 gamma or MySQLdb 1.1.1 final
ZMySQLDA 2.08 or ZMYSQLDA 2.09
Failure does not occur with 
Zope 2.6.4
python 2.3.5
MySQLdb 1.1.1 final
ZMySQLDA 2.08

The traceback is:

Time  2005/06/07 16:47:44.967 GMT-7
User Name (User Id) allison (allison)
Request URL http://dev.agilemind.com/draPlay/webpagetest/manage_test
Exception Type KeyError
Exception Value 'query'

Traceback (innermost last):

* Module ZPublisher.Publish, line 101, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 39, in call_object
* Module Shared.DC.ZRDB.DA, line 337, in manage_test
* Module DocumentTemplate.DT_String, line 474, in __call__
* Module DocumentTemplate.DT_In, line 602, in renderwb
* Module DocumentTemplate.DT_Var, line 219, in render

KeyError: 'query'

Failure is highly repeatable and happens for queries of the form

select * from table

The REQUEST shows:

form
SUBMIT 'Submit Query'
cookies
tree-s 'eJzTyCkw5NLIKTDiClZ3hANXW3WuAmOuxEQ9AIOOB9Q'
__ac_name 'allison'
lazy items
SESSION >
other
n_ 5

REQUEST_METHOD'GET'
HTTP_KEEP_ALIVE'300'
SERVER_PROTOCOL'HTTP/1.1'
QUERY_STRING'SUBMIT=Submit+Query'

Somewhere between manage_testForm and manage_test something fails,
possibly as the query goes off to be rendered through the DocumentTemplate
mechanism.  Right at the moment, I'm stuck.  Advice, clues appreciated.



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope 2.7.2 with Ape 1.0 installed in root, fails to restart, without any usefull logging, after adding a local role

2005-06-07 Thread Tim Connor
Thanks, for the hint, Dieter.  Unfortunately, I believe this doesn't 
apply in our case, as we have that set to the default (on).


Tim

Dieter Maurer wrote:


Tim Connor wrote at 2005-6-5 18:56 -0600:
 

I also get this error a lot when trying to add an object through the ZMI 
in an Apeified folder:


  * Module ZPublisher.Publish, line 92, in publish
  * Module ZPublisher.BaseRequest, line 302, in traverse
  * Module App.FactoryDispatcher, line 29, in __bobo_traverse__
  * Module App.Product, line 67, in _product

AttributeError: OFSP
   



A colleague recently got this error because he had
"enable-product-installation off" active in his configuration file.

 



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Print a web page using dtml

2005-06-07 Thread Jaroslav Lukesh
Dne neděle, 5. června 2005 10:40 Allen Huang <[EMAIL PROTECTED]> napsal(a):
> How do I use dtml or python script to print a page through a printer??

with Linux OS it is possible. But not as much easy. Keywords:

lpr ;-)

Some of few possible ways to generate PDF (search zope.org) + pdf2ps

Other ways:
html2ps
khtml2png
html2jpg

-- 

Jaroslav Lukesh
  ---
  This e-mail can not contain any viruses because I use Linux
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Product architecture question (long)

2005-06-07 Thread robert rottermann

Nikko Wolf wrote:

I've been using Zope (w/Plone) for some time now and am still trying to
understand how best to architect the solution for my site.

I'm presuming I need to create a Product for the new types of
objects/files I want, but even on that topic I'm not completely 
convinced.


My objectives and constraints are:

- The primary purpose for the site's existence is to manage some
  content files (text/ml) and allow a workflow process on those.
  The workflow will likely change and hopefully will have minimal
  programming changes when it does.

- Users will have one of several roles: Author, Reviewer (of
  which there are currently two types), and Editor.

- I do not want ANY access by unauthorized users. Obviously they
  must be able to reach a login page, and get instructions on how
  to request an account, password reset, etc.

- Here's the complication -- each file will have potentially
  multiple versions in process at once.  Each version of a file
  may have a different state, and I'd like to have a history of
  all changes to each version as they go through the workflow.


what happens to the different versions. are they merged ??


- Once a file/version is submitted for review, any of the reviewers
  may work on it, it is not necessary that one role preceded the other,
  but it is required that a user in each role approve the file.

- The workflow is subject to change (the real one that the humans
  use), so this could precipitate changes to the Zope workflow:

  - The users' roles may change (easy),
  - There might be another type of Reviewer created that gets
grafted into the review process,
  - There might be other steps ("states") added to the workflow,
and corresponding changes to the process.

- We need to have good automated backup solution for the content
  (as in mirroring the content on another host).

- And, of course, I'm under pretty extreme time pressure.

===
So my questions are:
0) Is DCWorkflow and a new Product [document type(s)] the way to go?

DCWorkflow can handle your scenario.
why do you need a new product?/document type?
You need scripts / products to handle the multiple states.

1) Is there a product that does something similar that I could use
   or adapt?
2) Barring that, is there a product that would be a good starting
   point?
3) Is there something that manages a file history (like CVS, etc.)

there are several products that do that.
we have one (called RedRevision) it is not very sophisticated but might 
be enough.
then there is CMFEdition which is still in developpement but much more 
powerful.


Robert
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Product architecture question (long)

2005-06-07 Thread Nikko Wolf

I've been using Zope (w/Plone) for some time now and am still trying to
understand how best to architect the solution for my site.

I'm presuming I need to create a Product for the new types of
objects/files I want, but even on that topic I'm not completely convinced.

My objectives and constraints are:

- The primary purpose for the site's existence is to manage some
  content files (text/ml) and allow a workflow process on those.
  The workflow will likely change and hopefully will have minimal
  programming changes when it does.

- Users will have one of several roles: Author, Reviewer (of
  which there are currently two types), and Editor.

- I do not want ANY access by unauthorized users. Obviously they
  must be able to reach a login page, and get instructions on how
  to request an account, password reset, etc.

- Here's the complication -- each file will have potentially
  multiple versions in process at once.  Each version of a file
  may have a different state, and I'd like to have a history of
  all changes to each version as they go through the workflow.

- Once a file/version is submitted for review, any of the reviewers
  may work on it, it is not necessary that one role preceded the other,
  but it is required that a user in each role approve the file.

- The workflow is subject to change (the real one that the humans
  use), so this could precipitate changes to the Zope workflow:

  - The users' roles may change (easy),
  - There might be another type of Reviewer created that gets
grafted into the review process,
  - There might be other steps ("states") added to the workflow,
and corresponding changes to the process.

- We need to have good automated backup solution for the content
  (as in mirroring the content on another host).

- And, of course, I'm under pretty extreme time pressure.

===
So my questions are:
0) Is DCWorkflow and a new Product [document type(s)] the way to go?
1) Is there a product that does something similar that I could use
   or adapt?
2) Barring that, is there a product that would be a good starting
   point?
3) Is there something that manages a file history (like CVS, etc.)
   that can be easily used within Zope?
4) How does one secure a Zope+Plone site?

I'm running on FC3, Zope 2.7.6-final, Plone 2.0.5, Python 2.3.4

Thanks in advance!
Nikko




___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Zope product tree inheritance...

2005-06-07 Thread J Cameron Cooper

Joe Bezier wrote:

I'm using Zope 2.7.5 and have various instances running from the same 
code base - I've edited one of my products and I'd like to test it in 
one particular instance. Can anyone tell me whether Zope will use the 
Product in the [instance]/Products folder ahead of the one in the main 
code tree?


It should. Did you try?

If not, it probably took more time to write this than to test it.

Note that placing your own products in the zope software home is not the 
best idea. If you want to share Products, symlink them from a common 
source. Though, I admit, this is a problem in Windows.


You can also edit zope.conf to provide extra 'products' directives. 
Quoth 'zope.conf':


# Directive: products
#
# Description:
#  Name of a directory that contains additional Product packages.  This
#  directive may be used as many times as needed to add additional
#  collections of products.  Each directory identified will be
#  added to the __path__ of the Products package.  All Products are
#  initialized in ascending alphabetical order by product name.  If
#  two products with the same name exist in two Products directories,
#  the order in which the packages appear here defines the load
#  order.  The master Products directory exists in Zope's software home,
#  and cannot be removed from the products path (and should not be added
#  to it here).
#
# Default: $INSTANCE/Products
#
# Example:
#
#products /home/chrism/projects/myproducts

--jcc
--
"Building Websites with Plone"
http://plonebook.packtpub.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] DiskBased Product question

2005-06-07 Thread J Cameron Cooper

Haim Ashkenazi wrote:

I'm looking for documentation or simple examples on how to create a disk
based product that when I install it, it also adds some third party
products.

for example, If I select my product from the "Add" list, it'll create a
folder, insert my code into it, but also insert mailhost, database
connector, exuserfolder etc...

is it even possible?


In your install script you can call 'installProduct("productname")' on 
the quickinstaller tool itself. Many products do this. Many more should. 
(Everything that uses Archetypes, for instance, should probably try to 
install AT.)


CMFMember does try to install AT:
http://svn.plone.org/view/collective/CMFMember/trunk/Extensions/Install.py?rev=8422&view=markup

ATContentTypes does some complex checking and installing:
http://svn.plone.org/view/collective/ATContentTypes/trunk/Extensions/Install.py?rev=7860&view=markup

--jcc
--
"Building Websites with Plone"
http://plonebook.packtpub.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Z SQL test in the ZMI aborts on key error

2005-06-07 Thread Allen Schmidt

This bounced around on the list recently. It is supposed to be fixed now but 
the solution is modifying the source and changing how the batching is done. It 
works if less than 20 records returned...blows up if more. You can test this by 
forcing your query to only return a few records. Can't remember the exact 
location of the code now. Will see what I can find it.

Allen


Dennis Allison wrote:


I've never had any problem with parameterless queries.  (-:

No, this is a simple case of a parameter somehow being lost in 
the ZMI interface.  



On Tue, 7 Jun 2005, Joe Bezier wrote:



Hi there,

By any chance are you trying to test a ZSQL method that doesn't 
(shouldn't) need any query parameters? For some reason (and I'm not the 
guy who can tell you why...) these types of tests always break - try 
adding '?query=' to the end of the URL. and see if that helps.


Cheers,

Joe.
On 7 Jun 2005, at 11:41, Dennis Allison wrote:



Zope 2.7.6
Python 2.3.5
MySQLDA-1.2.1c3
ZMYSQLDA-2.09b3


Site Error

An error was encountered while publishing this resource.

Error Type: KeyError
Error Value: 'query'

Troubleshooting Suggestions

   * This resource may be trying to reference a nonexistent object or
variable 'query'.
   * The URL may be incorrect.
   * The parameters passed to this resource may be incorrect.
   * A resource that this resource relies on may be encountering an
error.


--
Error log:

2005/06/07 03:33:03.344 GMT-7
User Name (User Id) allison (allison)
Request URL http://group1.agilemind.com/Scratch/simpleq/manage_test
Exception Type KeyError
Exception Value 'query'

Traceback (innermost last):

   * Module ZPublisher.Publish, line 101, in publish
   * Module ZPublisher.mapply, line 88, in mapply
   * Module ZPublisher.Publish, line 39, in call_object
   * Module Shared.DC.ZRDB.DA, line 337, in manage_test
   * Module DocumentTemplate.DT_String, line 474, in __call__
   * Module DocumentTemplate.DT_In, line 602, in renderwb
   * Module DocumentTemplate.DT_Var, line 219, in render

KeyError: 'query'


There does not seem to be a bug like this in the collectors.

Any help/pointers appreciated.


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )





___ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com






___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Z SQL test in the ZMI aborts on key error

2005-06-07 Thread Dennis Allison
I've never had any problem with parameterless queries.  (-:

No, this is a simple case of a parameter somehow being lost in 
the ZMI interface.  


On Tue, 7 Jun 2005, Joe Bezier wrote:

> Hi there,
> 
> By any chance are you trying to test a ZSQL method that doesn't 
> (shouldn't) need any query parameters? For some reason (and I'm not the 
> guy who can tell you why...) these types of tests always break - try 
> adding '?query=' to the end of the URL. and see if that helps.
> 
> Cheers,
> 
> Joe.
> On 7 Jun 2005, at 11:41, Dennis Allison wrote:
> 
> > Zope 2.7.6
> > Python 2.3.5
> > MySQLDA-1.2.1c3
> > ZMYSQLDA-2.09b3
> >
> >
> > Site Error
> >
> > An error was encountered while publishing this resource.
> >
> > Error Type: KeyError
> > Error Value: 'query'
> >
> > Troubleshooting Suggestions
> >
> > * This resource may be trying to reference a nonexistent object or
> > variable 'query'.
> > * The URL may be incorrect.
> > * The parameters passed to this resource may be incorrect.
> > * A resource that this resource relies on may be encountering an
> > error.
> >
> >
> > --
> > Error log:
> >
> >  2005/06/07 03:33:03.344 GMT-7
> > User Name (User Id) allison (allison)
> > Request URL http://group1.agilemind.com/Scratch/simpleq/manage_test
> > Exception Type KeyError
> > Exception Value 'query'
> >
> > Traceback (innermost last):
> >
> > * Module ZPublisher.Publish, line 101, in publish
> > * Module ZPublisher.mapply, line 88, in mapply
> > * Module ZPublisher.Publish, line 39, in call_object
> > * Module Shared.DC.ZRDB.DA, line 337, in manage_test
> > * Module DocumentTemplate.DT_String, line 474, in __call__
> > * Module DocumentTemplate.DT_In, line 602, in renderwb
> > * Module DocumentTemplate.DT_Var, line 219, in render
> >
> > KeyError: 'query'
> >
> >
> > There does not seem to be a bug like this in the collectors.
> >
> > Any help/pointers appreciated.
> >
> >
> > ___
> > Zope maillist  -  Zope@zope.org
> > http://mail.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://mail.zope.org/mailman/listinfo/zope-announce
> >  http://mail.zope.org/mailman/listinfo/zope-dev )
> >
> 
> 
>   
> ___ 
> How much free photo storage do you get? Store your holiday 
> snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
> 

-- 
Dennis Allison * Computer Systems Laboratory * Gates 227
   * Stanford University *  Stanford CA  94305
   * (650) 723-9213 * (650) 723-0033 fax
   * [EMAIL PROTECTED]
   * [EMAIL PROTECTED]


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] DiskBased Product question

2005-06-07 Thread Andreas Jung



--On 7. Juni 2005 19:35:23 +0300 Haim Ashkenazi <[EMAIL PROTECTED]> wrote:


Hi

I'm looking for documentation or simple examples on how to create a disk
based product that when I install it, it also adds some third party
products.



The Zope Developers Guide from zope.org? There are also some example 
products

floating around on zope.org. It's best to learn from existing projects
*and* the documentation.

-aj




pgpSIBuSgtvsO.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] DiskBased Product question

2005-06-07 Thread Haim Ashkenazi
Hi

I'm looking for documentation or simple examples on how to create a disk
based product that when I install it, it also adds some third party
products.

for example, If I select my product from the "Add" list, it'll create a
folder, insert my code into it, but also insert mailhost, database
connector, exuserfolder etc...

is it even possible?

one if the reasons I want to create it this way, and not just instruct the
user to add these products and only then add mine, is because I want to
have a few levels of folders with "acl_users" inside them instead of
defining all the users in one folder and start playing with roles and
permissions...

thanx

-- 
Haim


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] zope 2.7: Unauthorized "in this context"

2005-06-07 Thread John Hunter

I recently upgraded my zope server to 2.7 and a product I wrote which
makes heavy use of Z-Classes is now broken.  This is a workflow site
for a course, and there are Course, Section, Student,
ProjectSubmission, etc as ZClasses.  To view the page at all students
undergo basic authentication.  When students want to submit some
homework (the have the "Add Project Submissions" Class Permission)
they click on a link like the following for the ProjectSubmission add
form

http://myserver.com/Sections/S1/J%20Hunter/manage_addProduct/Course/ProjectSubmission_addForm?project_id=A%20Proj&student_id=J%20Hunter

Where "J Hunter" is the Student, "S1" is the Section and "A Proj" is
the ProjectSubmission.  This was working fine until the upgrade, the
link took them to the ProjectSubmission_addForm and they could add
their submission.  After the upgrade, now they get another
authentication dialog box and after reentering their username and
password, they get the dialog box again, and then if they hit cancel
they get (verbose info below)


Traceback (innermost last):

* Module ZPublisher.Publish, line 101, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 39, in call_object
* Module OFS.DTMLMethod, line 130, in __call__
  
  URL: 
http://srp.uchicago.edu/2005/Sections/B1/Amrita%20Arora/ProjectSubmission_addForm/manage_main
  Physical Path:/srp/2005/Sections/B1/Amrita Arora/ProjectSubmission_addForm
* Module DocumentTemplate.DT_String, line 474, in __call__
* Module DocumentTemplate.DT_With, line 76, in render

Unauthorized: You are not allowed to access 'mentor' in this context


"mentor" is a field in the StudentPropertySheet.
 
Interestingly, the same result occurs even if I enter a manager or
site-root username/password in the authentication dialog box.

I googled for the error message and found

  http://mail.zope.org/pipermail/zope-dev/2004-January/021501.html

Based on my read of this, I tried adding the "Manager" proxy role to
ProjectSubmission_addForm but this did not help.

Any ideas?  The add form and the verbose traceback are included below.
As I say, all was working fine until a server upgrade so I suspect
there is a recent zope feature that I am not handling properly.


Thanks,
JDH

Here is  DTML Method ProjectSubmission_addForm


 -*- mode: dtml; dtml-top-element: "body" -*- 



  
>

  




  >Email
  





  >Mentor
  



  >Mentor email
  




  >File
  



>Title:



 
>Synopsis:








  
Note:hidden must come last, right before the  tag
  
  
  

   
 name="remote_address" >


   












Time2005/06/07 09:54:55 GMT-5
User Name (User Id) student (student)
Request URL 
http://bace.bsd.uchicago.edu/srp/jdh/Sections/S1/J%20Hunter/manage_addProduct/Course/ProjectSubmission_addForm
Exception Type  Unauthorized
Exception Value You are not allowed to access 'mentor' in this context

Traceback (innermost last):

* Module ZPublisher.Publish, line 101, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 39, in call_object
* Module OFS.DTMLMethod, line 130, in __call__
  
  URL: 
http://bace.bsd.uchicago.edu/srp/jdh/Sections/S1/J%20Hunter/ProjectSubmission_addForm/manage_main
  Physical Path:/srp/jdh/Sections/S1/J Hunter/ProjectSubmission_addForm
* Module DocumentTemplate.DT_String, line 474, in __call__
* Module DocumentTemplate.DT_With, line 76, in render

Unauthorized: You are not allowed to access 'mentor' in this context

Display traceback as text

REQUEST
form
student_id  'J Hunter'
project_id  'A Proj'
cookies
tree-s  
'eJzTyCkw5NLIKTDiClZ3hANPW3WuAmOuRKCECUjWFEU2EiRrBpY1B8laoMimg2QtwbKGBiBpQ0MkeeMgV5C8oRFXIhiA5I2R5bNDwfImEANMwQaYIRQ4hbnngxWYQw3QAwBNLzCv'
__cp
'x%DA%D3%60b%60%60%C8%04b%86hF%20%A1%C1%02%24%8AA%DCbf%10QTP%0C%121200-%E6%03%09d%96%A4%C6%17%24%16%25%E6%16%C7%17T%02%00%D9w%0A%F9'
_ZopeId '88234626A13Ni1oME3c'
lazy items
SESSION >
other
URL5'http://bace.bsd.uchicago.edu/srp/jdh/Sections'
URL4'http://bace.bsd.uchicago.edu/srp/jdh/Sections/S1'
URL7'http://bace.bsd.uchicago.edu/srp'
URL6'http://bace.bsd.uchicago.edu/srp/jdh'
URL3'http://bace.bsd.uchicago.edu/srp/jdh/Sections/S1/J%20Hunter'
URL2
'http://bace.bsd.uchicago.edu/srp/jdh/Sections/S1/J%20Hunter/manage_addProduct'
URL8'http://bace.bsd.uchicago.edu'
AUTHENTICATED_USER  student
SERVER_URL  'http://bace.bsd.uchicago.edu'
AUTHENTICATION_PATH 'srp/jdh'
URL 
'http://bace.bsd.uchicago.edu/srp/jdh/Sections/S1/J%20Hunter/manage_addProduct/Course/ProjectSubmission_addForm'
BASE9   
'http://bace.bsd.uchicago.edu/srp/jdh/Se

[Zope] Re: userFolder that holds user's email

2005-06-07 Thread Haim Ashkenazi
On Tue, 07 Jun 2005 12:37:36 +0100, Joe Bezier wrote:

> Have a look at ExUserFolder 
> (http://sourceforge.net/projects/exuserfolder/) we use it and I think 
> it's great...
yes, it sure looks like a great product. thanx...

Bye
-- 
Haim


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Zope product tree inheritance...

2005-06-07 Thread Joe Bezier

Hi there,

I'm using Zope 2.7.5 and have various instances running from the same 
code base - I've edited one of my products and I'd like to test it in 
one particular instance. Can anyone tell me whether Zope will use the 
Product in the [instance]/Products folder ahead of the one in the main 
code tree?


Thanks for any help.

Cheers,

Joe.





___ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Z SQL test in the ZMI aborts on key error

2005-06-07 Thread Tino Wildenhain
Am Dienstag, den 07.06.2005, 12:03 +0100 schrieb Joe Bezier:
> Hi there,
> 
> By any chance are you trying to test a ZSQL method that doesn't 
> (shouldn't) need any query parameters? For some reason (and I'm not the 
> guy who can tell you why...) these types of tests always break - try 
> adding '?query=' to the end of the URL. and see if that helps.
> 

No, they dont always break - if you use a sane *SQLDA, they
work perfectly.


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] userFolder that holds user's email

2005-06-07 Thread Joe Bezier
Have a look at ExUserFolder 
(http://sourceforge.net/projects/exuserfolder/) we use it and I think 
it's great...


Cheers,

Joe
On 7 Jun 2005, at 12:27, Haim Ashkenazi wrote:


Hi

I'm looking for a zope (not plone) userFolder that can hold the user's
email and perhaps full name. It should be the same authentication 
method,

but with additional fields. Do I have to write one myself or are there
already products that have this feature?

thanx
--
Haim


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )





___ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] userFolder that holds user's email

2005-06-07 Thread Haim Ashkenazi
Hi

I'm looking for a zope (not plone) userFolder that can hold the user's
email and perhaps full name. It should be the same authentication method,
but with additional fields. Do I have to write one myself or are there
already products that have this feature?

thanx
-- 
Haim


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Z SQL test in the ZMI aborts on key error

2005-06-07 Thread Joe Bezier

Hi there,

By any chance are you trying to test a ZSQL method that doesn't 
(shouldn't) need any query parameters? For some reason (and I'm not the 
guy who can tell you why...) these types of tests always break - try 
adding '?query=' to the end of the URL. and see if that helps.


Cheers,

Joe.
On 7 Jun 2005, at 11:41, Dennis Allison wrote:


Zope 2.7.6
Python 2.3.5
MySQLDA-1.2.1c3
ZMYSQLDA-2.09b3


Site Error

An error was encountered while publishing this resource.

Error Type: KeyError
Error Value: 'query'

Troubleshooting Suggestions

* This resource may be trying to reference a nonexistent object or
variable 'query'.
* The URL may be incorrect.
* The parameters passed to this resource may be incorrect.
* A resource that this resource relies on may be encountering an
error.


--
Error log:

 2005/06/07 03:33:03.344 GMT-7
User Name (User Id) allison (allison)
Request URL http://group1.agilemind.com/Scratch/simpleq/manage_test
Exception Type KeyError
Exception Value 'query'

Traceback (innermost last):

* Module ZPublisher.Publish, line 101, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 39, in call_object
* Module Shared.DC.ZRDB.DA, line 337, in manage_test
* Module DocumentTemplate.DT_String, line 474, in __call__
* Module DocumentTemplate.DT_In, line 602, in renderwb
* Module DocumentTemplate.DT_Var, line 219, in render

KeyError: 'query'


There does not seem to be a bug like this in the collectors.

Any help/pointers appreciated.


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )





___ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Z SQL test in the ZMI aborts on key error

2005-06-07 Thread Dennis Allison
Zope 2.7.6
Python 2.3.5 
MySQLDA-1.2.1c3
ZMYSQLDA-2.09b3


Site Error

An error was encountered while publishing this resource.

Error Type: KeyError
Error Value: 'query'

Troubleshooting Suggestions

* This resource may be trying to reference a nonexistent object or 
variable 'query'.
* The URL may be incorrect.
* The parameters passed to this resource may be incorrect.
* A resource that this resource relies on may be encountering an 
error.


--
Error log:

 2005/06/07 03:33:03.344 GMT-7
User Name (User Id) allison (allison)
Request URL http://group1.agilemind.com/Scratch/simpleq/manage_test
Exception Type KeyError
Exception Value 'query'

Traceback (innermost last):

* Module ZPublisher.Publish, line 101, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 39, in call_object
* Module Shared.DC.ZRDB.DA, line 337, in manage_test
* Module DocumentTemplate.DT_String, line 474, in __call__
* Module DocumentTemplate.DT_In, line 602, in renderwb
* Module DocumentTemplate.DT_Var, line 219, in render

KeyError: 'query'


There does not seem to be a bug like this in the collectors.

Any help/pointers appreciated.


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Pre-indexing filter and accented letters

2005-06-07 Thread Yuri

Dieter Maurer ha scritto:


Yuri wrote at 2005-6-6 11:56 +0200:
 

I would like to index a text property of an object in the ZCatalog. The 
text is in French language, but I have a problem: I have to find results 
for the related non accented letters!


I mean, If I do a search for  "actualite", the index should return also 
the object which text contains "actualitè".
   



Implement a PythonScript that performs the normalization of
"context.SearchableText()", say "NormalizedSearchableText".

Ensure, it is acquirable by your indexed objects.

Index "NormalizedSearchableText" rather than "SearchableText"
and use this index for your searches.

Ensure, that you perform the same normalization on search
terms before you use them in a query.
 



Weel, I cannot change the index, it already has his name... it is a 
collection of thousands of object, this one I want to pre-filter before 
index are just a small part...


Or you mean I have to do something about  SearchableText()?

I have to index in a way the user find the term even if it does not use 
accented letters on a current index that already has indexed thousands 
of objects...


Can I hook somewhere in the middle, so I Index them in the way I want? :)


By the way, "ManagableIndex" greatly facilitates the inclusion
of normalizers. However, it currently does not interface with
a "TextIndex" (only a "WordIndex").
 



I'll take a look, thanks :)
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] XMLRPC problems?

2005-06-07 Thread Tino Wildenhain
Am Montag, den 06.06.2005, 15:14 -0700 schrieb Dennis Allison:
> Zope 2.7.6, ZEO, 
> Python 2.4.1 (yes, I know it is not yet official but ...
 ^^^ if you use it, you are on your own to fix or at least
_file_ bugs.


> ZEO runs on the same machine but is accessed through an internal network
> ZMYSQLDA 2.0.9 \
> MySQL-1.1.7/ do you really think they can be related to XMLRPC
problems you yet failed to toll us?

> I've seen a couple of problems attributable to XLRPC failures in our 
> system after an upgrade to Zope 2.7.6.  Has anyone else experienced 
> problems?   I know there were issues at one point, but I believed that 
No. Nobody :-)



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )