CMFEditions: commented out code

4 messages Options
Embed this post
Permalink
Maurits van Rees-3

CMFEditions: commented out code

Reply Threaded More More options
Print post
Permalink
Hi all,

Especially hello to Hanno as he did this changeset in February of this
year in CMFEditions: http://dev.plone.org/collective/changeset/81465
with checkin message "I think I fixed the UnicodeDecodeError..."

A couple of quick questions:

1. Do you remember why you made line 107 and following an html
   comment?

2. Any idea why that line says 'Xdiff' instead of just 'diff'?  Xdiff
   is not defined anywhere.  Seems like this is meant to disable it.

I just tried it in a Plone 3.3 site.  I changed title, description and
text of the front page, added a change note and viewed the difference
in the history.  Title and description complain that "This field has
no inline difference view.".  The text field diffs do show up.

Clicking on 'as code' shows nothing for the title and shows the new
and old versions of description and text next to each other.  When I
uncomment line 107 and following and replace Xdiff with diff and click
on 'as code' description and text are shown like before and title now
correctly has two lines with minus and plus.  Seems like it works
fine with those changes.  Have I overlooked anything?

BTW, when I add some accents or Chinese characters to the three fields
I get no errors, so the unicode error seems indeed to have been fixed.

This is both on branch 1.2 and trunk.

--
Maurits van Rees | http://maurits.vanrees.org/
            Work | http://zestsoftware.nl/
"This is your day, don't let them take it away." [Barlow Girl]


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Hanno Schlichting-4

Re: CMFEditions: commented out code

Reply Threaded More More options
Print post
Permalink
Hi.

On Wed, Nov 4, 2009 at 10:01 PM, Maurits van Rees
<[hidden email]> wrote:

> Especially hello to Hanno as he did this changeset in February of this
> year in CMFEditions: http://dev.plone.org/collective/changeset/81465
> with checkin message "I think I fixed the UnicodeDecodeError..."
>
> A couple of quick questions:
>
> 1. Do you remember why you made line 107 and following an html
>   comment?
>
> 2. Any idea why that line says 'Xdiff' instead of just 'diff'?  Xdiff
>   is not defined anywhere.  Seems like this is meant to disable it.

I don't remember the details of this anymore. Wichert created the new
inline versioning view and it gave strange Unicode errors. I tried to
fix this and made a couple of commits both in CMFEditions and
CMFDiffTool IIRC. Whatever I did back then seemed to work :-)

Hanno

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Maurits van Rees-3

Re: CMFEditions: commented out code

Reply Threaded More More options
Print post
Permalink
Hanno Schlichting, on 2009-11-05:

> Hi.
>
> On Wed, Nov 4, 2009 at 10:01 PM, Maurits van Rees
><[hidden email]> wrote:
>> Especially hello to Hanno as he did this changeset in February of this
>> year in CMFEditions: http://dev.plone.org/collective/changeset/81465
>> with checkin message "I think I fixed the UnicodeDecodeError..."
>>
>> A couple of quick questions:
>>
>> 1. Do you remember why you made line 107 and following an html
>>   comment?
>>
>> 2. Any idea why that line says 'Xdiff' instead of just 'diff'?  Xdiff
>>   is not defined anywhere.  Seems like this is meant to disable it.
>
> I don't remember the details of this anymore. Wichert created the new
> inline versioning view and it gave strange Unicode errors. I tried to
> fix this and made a couple of commits both in CMFEditions and
> CMFDiffTool IIRC. Whatever I did back then seemed to work :-)

When inserting Chinese/Japanese characters on plonenext 3.3 both with
and without my changes I get a DeprecationWarning from
Products/CMFPlone/patches/unicodehacks.py:

  Insertion of non-unicode non-ascii non-utf8 encoded text in TAL is
  deprecated and will be broken in Plone 4.0 !!!

On Plone 4 the try/except in unicodehacks.py is gone but I don't get
this warning, so it looks like something in a different spot has been
fixed.

I committed my changes (restore the commented out code and replace
Xdiff with diff) on branch 1.2 and trunk of CMFEditions.

--
Maurits van Rees | http://maurits.vanrees.org/
            Work | http://zestsoftware.nl/
"This is your day, don't let them take it away." [Barlow Girl]


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Alec Mitchell

Re: CMFEditions: commented out code

Reply Threaded More More options
Print post
Permalink
On Thu, Nov 5, 2009 at 7:28 AM, Maurits van Rees
<[hidden email]> wrote:

> Hanno Schlichting, on 2009-11-05:
>> Hi.
>>
>> On Wed, Nov 4, 2009 at 10:01 PM, Maurits van Rees
>><[hidden email]> wrote:
>>> Especially hello to Hanno as he did this changeset in February of this
>>> year in CMFEditions: http://dev.plone.org/collective/changeset/81465
>>> with checkin message "I think I fixed the UnicodeDecodeError..."
>>>
>>> A couple of quick questions:
>>>
>>> 1. Do you remember why you made line 107 and following an html
>>>   comment?
>>>
>>> 2. Any idea why that line says 'Xdiff' instead of just 'diff'?  Xdiff
>>>   is not defined anywhere.  Seems like this is meant to disable it.
>>
>> I don't remember the details of this anymore. Wichert created the new
>> inline versioning view and it gave strange Unicode errors. I tried to
>> fix this and made a couple of commits both in CMFEditions and
>> CMFDiffTool IIRC. Whatever I did back then seemed to work :-)
>
> When inserting Chinese/Japanese characters on plonenext 3.3 both with
> and without my changes I get a DeprecationWarning from
> Products/CMFPlone/patches/unicodehacks.py:
>
>  Insertion of non-unicode non-ascii non-utf8 encoded text in TAL is
>  deprecated and will be broken in Plone 4.0 !!!
>
> On Plone 4 the try/except in unicodehacks.py is gone but I don't get
> this warning, so it looks like something in a different spot has been
> fixed.
>
> I committed my changes (restore the commented out code and replace
> Xdiff with diff) on branch 1.2 and trunk of CMFEditions.

I found some issues with the htmldiff at the Budapest sprint, but
these could not be properly corrected for Plone 3.x because the python
difflib in python 2.4 didn't support unicode input and seemed to do
strange things to multi-byte characters encoded as utf-8.  Perhaps
this was related?  Other than that I'm not sure what the issues were,
but it sounds like Maurits has things working.  I can release a new
version with these changes.

Alec

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers