[Zope-PTK] Broken Product - reload?

Shane Hathaway shane@digicool.com
Wed, 21 Mar 2001 22:12:57 -0500


Kent Polk wrote:
> 
> Ok, I broke the CMFCore with a typo. I fixed the source file, but
> I can't figure out how to get Zope to reload the fixed version.
> CMFCore remains broken and Control_panel/Products/CMFCore complains
> about the error, which no longer exists. I've tried everything
> short of nuking the CMF instance I'm running, and I'd really rather
> not do that. :^(
> 
> I've seen this once before and the only way I removed the problem
> was by deleting the instance that used the product.
> 
> How do you force Zope to reload the *new* version of the file?

Zope reloads all Python modules when it restarts.  Perhaps it's a
filesystem permissions problem or you have an INSTANCE_HOME setup where
your CMFCore is being loaded from a different filesystem path than you
expect.  You can always delete filesystem products from the control
panel BTW.  They will simply be created again upon restarting.

(Actually the most frequent cause of this problem, which happens
surprisingly often here at DC, is a background Zope process that the
user forgot to shut down.  Have you done "killall python" yet? :-) )

> BTW, Shane, I discovered that the problem with the 'recipient'
> variable was due to the RequestItem objects picking up the default
> workflow. I was attempting to determine another way to select the
> correct workflow when this problem occurred.

Good to hear you figured it out.  I'm not on the CMF team anymore, but
once in a while I add a little code or tidy things up... soon enough I
think we'll turn WorkflowTool into a folder.  Today I created
FSPythonScript, making it possible to have skinnable Python scripts
loaded from the filesystem.

Shane