Re: [Zope] Can't Track Simple Bug

2006-11-13 Thread Chris Withers

Nancy Donnelly wrote:

mailhost=getattr(context, context.superValues('Mail Host')[0].id)

what should I substitute for Mail Host 


MailDrop Host likely, check the source for the correct meta type.

Not really, it's a snippet for inserting into zope.conf alongside the 
other logging configuration. You appear to have chopped off the %, which 
you need to make it a valid zope.conf import statement.


Okay, corrected and entered into zope.conf


From what Tres has said, you should build yourself a new Zope instance 
with mkzopeinstance.py and then install any products you need int othe 
new instance, then finalyl move the Data.fs into it.


You config and control files are old beyond help...

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
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] Can't Track Simple Bug

2006-11-13 Thread Nancy Donnelly
- Original Message From: Chris Withers [EMAIL PROTECTED]To: Nancy Donnelly [EMAIL PROTECTED] From what Tres has said, you should build yourself a new Zope instance  with mkzopeinstance.py and then install any products you need int othe  new instance, then finalyl move the Data.fs into it.  You config and control files are old beyond help...Sounds like, but I'll work on it later. It works for the moment ;)Thanks,Nancy___
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] Can't Track Simple Bug

2006-11-10 Thread Chris Withers

Nancy Donnelly wrote:

7373


You really need to sort your mail client out...


You may also want to look at MailingLogger
(http://www.simplistix.co.uk/software/zope/mailinglogger103) so that you
get emailed salient log entries...


Nice! I like that! But I'm confused on one thing. In your instructions, you say:

import Products.MailingLogger


Not really, it's a snippet for inserting into zope.conf alongside the 
other logging configuration. You appear to have chopped off the %, which 
you need to make it a valid zope.conf import statement.


I assume that's at the instance level, where the zope.conf file is? That's a command, correct? 


No, see my previous comment.


# Zope zctl settings
ZOPE_HOME = pjoin(HERE, '../..', 'ZopeSoftwareHome')
ZOPE_OPTS = '-p - -D'
ZOPE_PORT = 7080
ZOPE_LOG = pjoin(HERE, 'var', 'debug.log')
ZOPE_ENV['PRODUCTS_PATH'] = (%(SOFTWARE_PRODUCTS)s: + pjoin(HERE, '..', 
'OtherProducts') + :%(INSTANCE_PRODUCTS)s)

ZOPE_ENV['STUPID_LOG_FILE'] = ZOPE_LOG
# ZEO Environment settings
#ZEO['ZEO_SERVER_NAME'] = 'www.example.com'
ZEO['ZEO_SERVER_PORT'] = 
# ZEO zctl settings
ZEO_WAIT_BAILOUT = 160 # Don't try for more than num seconds


What on earth is this? It's certainly note a zope.conf file...

What version of Zope are you running?


Also, can you tell me how to enter a variable into the eventlog to email 
address so that I could change it in a file on the server whenever I wanted to? I've been 
wondering how to do that.


I'm afraid I have no idea what you're talking about here...

cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
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] Can't Track Simple Bug

2006-11-10 Thread Nancy Donnelly
- Original Message From: Chris Withers [EMAIL PROTECTED]First up, rifling through my trash, I noticed a response of yours to a previous email that I missed. Concerning the line of my script:try: mailhost=getattr(context, context.superValues('Mail Host')[0].id)what should I substitute for "Mail Host" if I want to call Maildrop? I tried "Maildrop Host" but for some crazy reason the script redirected to a slightly different URL and threw an error. (That URL should have worked anyway due to inheritance, so I don't know what's up.) This is the information in the Maildrop README that
 wasn't helpful in this regard: - Now you can create emails using e.g. the dtml-sendmail tag and point the sendmail tag to the Maildrop Host instance using the mailhost="XYZ" argument inside the sendmail tag, or by using the MailHost API (see the Zope Help System).Now, the rest ;) Not really, it's a snippet for inserting into zope.conf alongside the  other logging configuration. You appear to have chopped off the %, which  you need to make it a valid zope.conf import statement.Okay, corrected and entered into zope.confYes, Chris, the below is, in fact, my zope.conf file. I inherited this box. All I can tell you is the below code does, in fact, work. I've added yours to it and now we'll see if they play nicely together ;) I am running Zope 2.7.8. I
 welcome any suggestions, of course :) # Zope zctl settings ZOPE_HOME = pjoin(HERE, '../..', 'ZopeSoftwareHome') ZOPE_OPTS = '-p - -D' ZOPE_PORT = 7080 ZOPE_LOG = pjoin(HERE, 'var', 'debug.log') ZOPE_ENV['PRODUCTS_PATH'] = ("%(SOFTWARE_PRODUCTS)s:" + pjoin(HERE, '..', 'OtherProducts') + ":%(INSTANCE_PRODUCTS)s")  ZOPE_ENV['STUPID_LOG_FILE'] = ZOPE_LOG # ZEO Environment settings #ZEO['ZEO_SERVER_NAME'] = 'www.example.com' ZEO['ZEO_SERVER_PORT'] =  # ZEO zctl settings ZEO_WAIT_BAILOUT = 160 # Don't try for more than num secondsTIA,Nancy___
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] Can't Track Simple Bug

2006-11-09 Thread Chris Withers

Nancy Donnelly wrote:

7171


What's with this appearing at the start of all your mails?


Silly me! I got so caught up in that error that I didn't think to check the 
error log! It said it couldn't find a Mail Host. Now, on the first instance, I 
just added the regular plain vanilla mail host, but on this instance, I got 
fancy with a Maildrop Host. Well, it didn't like that. It took the regular mail 
host just fine. But why didn't it like maildrop?


MailTemplates work seamlessly with either MailHosts or Maildrop Hosts

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
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] Can't Track Simple Bug

2006-11-09 Thread Chris Withers

Nancy Donnelly wrote:

I have two Zope instances. On one of them, I have a boilerplate script that I 
use for all my clients' Web sites. Works fine. Has for years. I decided to copy 
it over to my other instance and I get an error. Here's the line in question:

p 
  tal:on-error=string: mailScript() isn't defined! This should be in your *s* dir with the default installation.

  tal:replace=structure python:here.mailScript() /


This is extremely bad programming style.

Look at customising standard_error_message if you want to make error
messages prettier...

You may also want to look at MailingLogger
(http://www.simplistix.co.uk/software/zope/mailinglogger) so that you
get emailed salient log entries...

cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
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] Can't Track Simple Bug

2006-11-09 Thread Nancy Donnelly
7373- Original Message From: Chris Withers [EMAIL PROTECTED] p   tal:on-error="string: mailScript() isn't defined! This should be in your *s* dir  with the default
 installation."  tal:replace="structure python:here.mailScript()" / This is extremely bad programming style.  Look at customising standard_error_message if you want to make error messages prettier...Yeah, the above is for me :) I have customized the standard error msg for the visitor. You may also want to look at MailingLogger (http://www.simplistix.co.uk/software/zope/mailinglogger103) so that you get emailed salient log entries...Nice! I like that! But I'm confused on one thing. In your
 instructions, you say:import Products.MailingLoggerI assume that's at the instance level, where the zope.conf file is? That's a command, correct? Not something entered into the zope.conf file. I issued that command at the prompt and got this:# import Products.MailingLoggerimport: unable to open X server `'.Is there something I should edit first? Like zope.conf? Your instructions seem to indicate first issue the command, then edit zope.conf. And I'm confused as to if I should be editing zope.conf or something else, because my zope.conf file doesn't look like, for example, an httpd.conf file, where one would have syntax similar to what you propose. Here's my zope.conf:# Zope zctl settingsZOPE_HOME = pjoin(HERE, '../..', 'ZopeSoftwareHome')ZOPE_OPTS = '-p - -D'ZOPE_PORT = 7080ZOPE_LOG = pjoin(HERE, 'var', 'debug.log')ZOPE_ENV['PRODUCTS_PATH'] = ("%(SOFTWARE_PRODUCTS)s:" + pjoin(HERE, '..', 'OtherProducts') +
 ":%(INSTANCE_PRODUCTS)s")ZOPE_ENV['STUPID_LOG_FILE'] = ZOPE_LOG# ZEO Environment settings#ZEO['ZEO_SERVER_NAME'] = 'www.example.com'ZEO['ZEO_SERVER_PORT'] = # ZEO zctl settingsZEO_WAIT_BAILOUT = 160 # Don't try for more than num secondsAlso, can you tell me how to enter a variable into the eventlog "to" email address so that I could change it in a file on the server whenever I wanted to? I've been wondering how to do that.TIA,Nancy___
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] Can't Track Simple Bug

2006-11-08 Thread Nancy Donnelly
7474Hi;I have two Zope instances. On one of them, I have a boilerplate script that I use for all my clients' Web sites. Works fine. Has for years. I decided to copy it over to my other instance and I get an error. Here's the line in question:p  tal:on-error="string: mailScript() isn't defined! This should be
 in your *s* dir with the default installation." tal:replace="structure python:here.mailScript()" /When the page that has this code in it is called by a form (that has the *s* directory in the URL), it throws the tal:on-error message. Even if I surf directly to that page and put the *s* dir in the URL, it still throws the error! Even if I rewrite the tal:replace to accommodate the dir:here.s.mailScript()How in the world is it doing that? The script also lives in that dir. Strange...TIA,Nancy___
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] Can't Track Simple Bug

2006-11-08 Thread Maciej Wisniowski


p 
  tal:on-error=string: mailScript() isn't defined! This should be in your *s* dir with the default installation.

  tal:replace=structure python:here.mailScript() /
  

Use just:

p tal:replace=structure python:here.mailScript() /

and tell us what error do you see now.

tal:on-error catches all kind of errors that may happen 
and displays always same string about *s* dir (I have no 
idea what *s* is...) which just masks real error.

I mean that instead of:

'mailScript() isn't defined! This should be in your *s* dir
with the default installation.'

you may write 'I don't like you so you'll se this error :P' 
and then wonder why this page doesn't like you ;)


--
Maciej Wisniowski
___
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] Can't Track Simple Bug

2006-11-08 Thread Nancy Donnelly
7171- Original Message From: Maciej Wisniowski [EMAIL PROTECTED] Use just: p
 tal:replace="structure python:here.mailScript()" / and tell us what error do you see now.Silly me! I got so caught up in that error that I didn't think to check the error log! It said it couldn't find a Mail Host. Now, on the first instance, I just added the regular plain vanilla mail host, but on this instance, I got fancy with a Maildrop Host. Well, it didn't like that. It took the regular mail host just fine. But why didn't it like maildrop?Thanks,Nancy___
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 )