Discussion tool fails when PUTting a Page via FTP
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope CMF buildout |
New
|
Undecided
|
Unassigned |
Bug Description
I believe this bug is related to bug #1042836. When I FTP a page into Plone (such as the sample below), the value from the 'allowDiscussion' field is passed into
buildout-
as a string (i.e., either "True" or "False"), causing the line of code
content.
to fail with an error of
ValueError: invalid literal for int() with base 10: 'True'
I've patched my copy of Plone by adding the following lines of code just before the one mentioned above, and now FTPing a Page into Plone works. (I am not a Python programmer, so there's probably a much more elegant way of addressing this problem, and my hope is that my approach isn't breaking something else. :-)
Thanks!!
----------[ Potential Patch ]----------
# 8/6/2013: FTP uploads of pages (i.e., not files, etc.) send a
# string value of "True" or "False" to this function, which causes
# the int() function and thus the FTP PUT operation to fail.
if str(allowDiscus
allowDiscussion = True
elif str(allowDiscus
allowDiscussion = False
----------[ Version Information ]----------
Plone 4.3.1 (4306)
CMF 2.2.7
Zope 2.13.20
Python 2.7.4 (default, Jul 19 2013, 11:44:43) [GCC 4.6.3]
PIL 1.7.8 (Pillow)
----------[ Traceback ]----------
Traceback (innermost last):
Module ZPublisher.Publish, line 60, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module webdav.
Module Products.
Module Products.
Module Products.
Module Products.
- __traceback_info__: (<Products.
Module Products.
Module Products.
Module Products.
Module Products.
ValueError: invalid literal for int() with base 10: 'True'
----------[ Sample 'Page' I used for testing ]----------
id: mypage
title: MYPAGE
description: Sample page.
subject:
relatedItems:
location:
language:
effectiveDate: None
expirationDate: None
creation_date: 2008/08/22 09:51:5.155000 GMT-4
modification_date: 2013/08/06 10:55:59.905240 GMT-4
creators: admin
contributors:
rights:
allowDiscussion: True
excludeFromNav: False
presentation: False
tableContents: False
Content-Type: text/html
<pre>Sample page
</pre>
I recently upgraded my instances of Plone to version to 4.3.2, and one of my users just reported this same problem. I'm wondering, then, if anyone has had a chance to take a look at this problem. If it's helpful, I can offer that applying the same page I originally mentioned to this latest version of Plone addresses the problem. Thanks.