#14 — DataGridWidget and LinguaPlone

StateResolved
Version: 1.5.0
AreaFunctionality
Issue typeBug
SeverityImportant
Submitted byDaniel Widerin
Submitted onJan 15, 2007
Responsible Maurits van Rees
Target release: 1.8a1
Return to tracker
Last modified on Nov 07, 2009 by Maurits van Rees


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, 110Kb
Added byDaniel WiderinonJan 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 byMikko OhtamaaonOct 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 byMaurits van ReesonNov 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 byMaurits van ReesonNov 07, 2009 01:44 AM
Target release: 1.81.8a1

No responses can be added.