#14 — DataGridWidget and LinguaPlone

by Daniel Widerin last modified Nov 07, 2009 01:44 AM
State Resolved
Version: 1.5.0
Area Functionality
Issue type Bug
Severity Important
Submitted by Daniel Widerin
Submitted on Jan 15, 2007
Responsible Maurits van Rees
Target release: 1.8a1


I'm using DataGridField to display some technical data on a pdf - wich i generate using reportlab's pdf generator. this special contenttype has 5 datagridwidgets, 3 of them are language independent. if you translate an object, i noticed that the language independent fields are displayed correctly, but the others are displaying the wrong data if you enter the side-by-side view from linguaplone. left column should display data of the orginal object, but it shows the values of the translated object.
Steps to reproduce:
install linguaplone 0.9, datagridwidget 1.5 and use the demo types to reproduce.
Attached:
tuning-page.jpg — JPEG image, 110 kB (112992 bytes)
Added by Daniel Widerin on Jan 15, 2007 02:36 PM
Severity: ImportantMedium
Responsible manager: miohtama(UNASSIGNED)
i spend some time into this and recognized that the widget does not use the canonical context. so i replaced context with context.getCanonical() in datagridwidget.pt for the view macro and this works for me :-)
Added by Mikko Ohtamaa on Oct 21, 2007 05:25 PM
Issue state: unconfirmedopen
Severity: MediumImportant
Responsible manager: (UNASSIGNED)miohtama
I am preparing a DGF release 1.6. Can you please submit patch for this? Looks like context doesn't have method getCanonical (no LinguaPlone) installed. Is this the case?
Added by Maurits van Rees on Nov 06, 2009 10:52 PM
Issue state: ConfirmedResolved
Responsible manager: miohtamamaurits
Target release: None1.8
I don't see any of the standard archetypes widgets using context.getCanonical. In fact, searching for Canonical in the Products.Archetypes code returns no search results. So I don't think this is something that can be fixed in DataGridField; the widget should be called with the correct context.

Hm, actually, I see that the archetypes widgets usually call the 'accessor' which is available, where we have 'field.getAccessor(context)()'. If I use accessor instead everything seems to work on edit and view, both with and without LinguaPlone, and both on the canonical object and a translation.

Fixed on trunk in r11628.
Added by Maurits van Rees on Nov 07, 2009 01:44 AM
Target release: 1.81.8a1

No responses can be added.