Changing a title property to unicode (ustring)

Bug #142738 reported by Bug Importer
8
Affects Status Importance Assigned to Milestone
Zope 2
Won't Fix
Medium
Unassigned

Bug Description

In Zope 2.6.2, when I try to give my "test_folder" Zope folder a russian title:
http://profsolutions.com/zcollector/manage_page.gif
I get this error:
http://profsolutions.com/zcollector/error.gif
Error Type: UnicodeError
Error Value: Latin-1 encoding error: ordinal not in range(256)

Ok, maybe there is a solution for that (use UTF-8 as default locale, management_page_charset...) but there is another problem with that:

I have some old sites with non-unicode characters and when i try to import them into Zope > 2.6 everything goes wrong, I can't get the properties page, it doesn't work at all (Page not Found) if there is a non-latin title.

Sorry for my poor english :) It's not easy to find Zope guru in Russia, please help.

Tags: bug zope
Revision history for this message
Andreas Jung (ajung) wrote :

Can you please provide the full traceback available
from /error_log?

-aj

Revision history for this message
Andreas Jung (ajung) wrote :

Changes: edited transcript, importance (critical => medium)

Revision history for this message
Andreas Jung (ajung) wrote :

Status: Pending => Accepted

 Supporters added: ajung

Revision history for this message
Andreas Jung (ajung) wrote :

Status: Accepted => Resolved

Not a solution but a workaround:

- the 'title' property in Zope 2.7/CVS HEAD can not be
  removed for objects derived from Folder or PropertyManager

- so you can remove 'title' and re-add the property with
  type 'ustring'

If this is too complicated you might change the default type for
'title' in the files in OFS from string to ustring.
Changing this in the sources might break existing code so
for now we leave it as it is with the possibility to
change the type of the 'title' property on your own.

Hope that this is reasonable for you.

-aj

Revision history for this message
yuppie (yuppie3) wrote :

I doubt this issue is resolved.

Re-adding a 'title' property doesn't work for me. 'title' is a class attribute, so after removing the 'title' property the object has still a 'title' attribute and using that name for a new propety is not allowed.

Revision history for this message
Florent Guillaume (efge) wrote :

Status: Resolved => Accepted

Reopening in light of request in http://zope.org/Collectors/Zope/1671

Note that is has never been made clear (at least in this collector issue) what broke when the title properties is removed.

FWIW I agree that the message in the properties form is a pain. Usually it reduces the useable form width by half.

Lastly, Yuppie is of the opinion that even the workaround is not enough.

Revision history for this message
ChrisW (chris-simplistix) wrote :

Andreas introduced this change, and put in the warning message in deference to actually checking to code to see what happens when titles are deletable.

For me, it seems easiest just to make titles not deletable anymore...

What was the original reason for wanting title properties to be deletable in the first place?

Revision history for this message
Stefan H. Holek (stefanholek) wrote :

IIRC people wanted to be able to use 'ustring' titles.

Revision history for this message
ChrisW (chris-simplistix) wrote :

Was that the *only* reason for the change?
If so, and the fact that it doesnt' appear to be working for people, probably suggests the change should be reverted and a different approach sought...

Revision history for this message
Florent Guillaume (efge) wrote :

Changes: edited transcript, revised title, new comment

(changes title from "There is no way to work with Russian characters is Zope >2.6.x")

Revision history for this message
Tres Seaver (tseaver) wrote :

Chris wrote:

> Was that the *only* reason for the change?
> If so, and the fact that it doesnt' appear to be working for
> people, probably suggests the change should be reverted and a
> different approach sought...

*One* person finds the error message (which shows up only in the
ZMI) unuseful; that one complaint doesn't outweigh the possible
damage possible if someone deletes the 'title' property.

Please *don't* revert the change.

Revision history for this message
yuppie (yuppie3) wrote :

> = Comment - Entry #12 by tseaver on Jan 24, 2005 2:49 pm
>
> *One* person finds the error message (which shows up only in the
> ZMI) unuseful; that one complaint doesn't outweigh the possible
> damage possible if someone deletes the 'title' property.
>
> Please *don't* revert the change.

I think nobody proposes to remove the warning and to leave the 'title' property removable. But AFAICS the fact 'title' is now removable isn't helpful in any way.

BTW: I recently changed properties.dtml to show the warning only if 'title' is removable.

Revision history for this message
Tres Seaver (tseaver) wrote :

Status: Accepted => Wontfix

Yuppie wrote:

> AFAICS the fact 'title' is now removable isn't helpful in any way.

The *point* of the change was that people wanted to be able to
make 'title' a 'ustring' property for a given object. The
PropertyManager UI doesn't allow such a change except by first
removing the 'string' property and then replacing it with a
'ustring'.

This is WONTFIX unless somebody submits a workable patch which
allows changing the type of an existing property without requiring
the 'remove-then-readd' dance.

> BTW: I recently changed properties.dtml to show the warning only
> if 'title' is removable.

Seems reasonable to me.

Revision history for this message
yuppie (yuppie3) wrote :

> = Wontfix - Entry #14 by tseaver on Jan 24, 2005 3:21 pm
>
> The *point* of the change was that people wanted to be able to
> make 'title' a 'ustring' property for a given object. The
> PropertyManager UI doesn't allow such a change except by first
> removing the 'string' property and then replacing it with a
> 'ustring'.

And my point is that replacing it with a 'ustring' doesn't work because 'title' is a class attribute.

Revision history for this message
ChrisW (chris-simplistix) wrote :

Status: Wontfix => Accepted

...so lets resubmit this.

My point was, this change (crapping ZMI warning and allowing title property to be deleted) doesn't appear to fix the problem it was supposed to. Therefore, unless there are any other benefits to this change, both the "delete title property" and "crappy zmi warning" should be reverted.

However, that leaves the original problem still there, and given that it was important enough for someone to try and fix before, perhaps its shouldn't be wontfix'ed just yet? ;-)

Revision history for this message
Andreas Jung (ajung) wrote :

*sigh*

either come up with a suitable solution or otherwise leave this issue as it this...this ping-pong game is annoying.

Revision history for this message
yuppie (yuppie3) wrote :

@ ajung: Did you ever test your 'workaround'? Did you ever try to remove and re-add a 'title' property? I get an error.

Revision history for this message
Andreas Jung (ajung) wrote :

my point is: if there is something to fix then fix it.
but don#t play games closing-reopening-closing-reopening issues.

I am sure that the workaround once worked...if not fix it.

Revision history for this message
Florent Guillaume (efge) wrote :

Status: Accepted => Pending

 Supporters removed: ajung

Just because there is no immediate fix proposed to a bug doesn't mean the bug has to be rejected or wontfixed. The purpose of the collector is to identify issues and leave a reminder that there is a problem, so that people who have the time can fix it in the future.

I removed Andreas from the assignees of this bug.

Revision history for this message
Tres Seaver (tseaver) wrote :

Five years later, "WONTFIX" turns out to be a pretty good description of the outcome.

Changed in zope2:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.