Closed drnow4u closed 10 years ago
Strange that I have not noticed this before. I can reproduce it in Plone 3.3.6 by creating a task with accented characters.
In Products.eXtremeManagement.browser.xm_kss
we call this line, which is where it goes wrong:
obj.content_status_modify(action)
A workaround would be to change this to change the title of the object to something safe, then call this line, then change the title back again. But that is a bit too silly for my taste.
The real problem is in the script that is called here. It is in Products/CMFPlone/skins/plone_form_scripts/content_status_modify.cpy
and goes wrong in this line:
note = 'Changed status of %s at %s' % (wfcontext.title_or_id(), wfcontext.absolute_url())
You could customize that script in your site and change title_or_id
to getId
to fix it.
I fix this problem changing xm_kss.py line 116 from:
obj.content_status_modify(action)
to
wftool = getToolByName(context, 'portal_workflow')
wftool.doActionFor(obj, action=action)
It's working fine. Could you release Products.eXtremeManagement 2.0.5 with your or mine path?
Ah, that is much better of course. Thanks! I have released 2.1a7 with this fix. There should be no reason to stay on 2.0.x and I am not planning to make any releasing in that line again. We are using 2.1x on our production Plone 3.3.6 site.
Extreme Management (XM)2.0.4 is installed on Plone 3.3.6 and when I try to change the workflow status for task (task title containing ex. ł letter) on the story page it wouldn't work. In the prefs_error_log_form is the following message:
Moreover the same trace back message is in replay part of the POST message. There is no such problem when I change workflow status form task view. The different is only URL Referer in the POST. The not working POST Referer is:
http://localhost:8084/dev/p6-control/control/poprawki
The working POST Referer is: http://localhost:8084/dev/p6-control/control/poprawki/2
The is some related to this problem information:
https://dev.plone.org/ticket/12765
https://github.com/spereverde/Products.CMFPlone/commit/bc052c9133c81bb0555e449fc0b7d4cbb7454d70
I have already above path in the source code.
Probably somewhere in the source of ZOPE/Plone/CMF/XM is obj.title_or_id() instead of obj.getId(). One of ZOPE/Plone/CMF/XM function is expecting regular ANSII string in the argument and instead of it get UNICODE string.
If the problem is not in the XM itself maybe it should be patched in the XM?
Component version:
Above problem not appear in the following configuration:
Honestly, I like to move from Plone 3.3.6 to Plone 4 but issue:
https://github.com/zestsoftware/Products.eXtremeManagement/issues/1 https://github.com/zestsoftware/xm.theme/issues/1
is blocking so I keep production portal on Plone 3.