Ticket #6981 (closed Bug: fixed)
Portal type criterion does not preserve selection in non-english portal.
| Reported by: | naro | Owned by: | naro |
|---|---|---|---|
| Priority: | critical | Milestone: | 3.0.4 |
| Component: | Infrastructure | Keywords: | |
| Cc: | jlp@… |
Description
Collection's PortalTypeCriterion is not usable in Plone 3, because both key and values are translated to local language:
<select multiple="multiple" class="blurrable" size="5"
name="crit__Type_ATPortalTypeCriterion_value:list"
id="crit__Type_ATPortalTypeCriterion_value">
collection <option value="Rešerše">Rešerše</option>
event <option value="Událost">Událost</option>
favorite <option value="Oblíbená položka">Oblíbená položka</option>
file <option value="Soubor">Soubor</option>
folder <option value="Složka">Složka</option>
etc...
If you select any of type, selection is not preserved, because translated "value" is not correct portal type.
Change History
comment:1 Changed 4 years ago by naro
- Summary changed from Portal type criterion noes not preserver selection in non-english portal. to Portal type criterion does not preserve selection in non-english portal.
comment:3 Changed 4 years ago by jlp
Is there any workaround for this? Is it possible to set the types manually somewhere?
comment:6 Changed 4 years ago by naro
Workaround I used: force English language (use browser settings or portal_language tool), set-up your Collection and switch language back to your preferred language. You should not modify criteria settings afterwards.
comment:7 Changed 4 years ago by naro
I dig into this issue again. I have no idea why, but changing nocall:item to "string:${item}" solved it and multiselection works as expected. It seems TAL is doing translations automatically in some cases.
comment:8 Changed 4 years ago by squat
Any update on this issue? We have the same problem here with plone 3.0.2 (unified installer)
comment:9 Changed 4 years ago by squat
- Owner changed from hannosch to limi
- Component changed from Internationalization to Visual and templates
comment:10 Changed 4 years ago by naro
- Owner changed from limi to naro
- Component changed from Visual and templates to Infrastructure
Jensens fantasticaly helped me to spot the right place of problem. http://dev.plone.org/collective/browser/ATContentTypes/branches/1.2/criteria/portaltype.py#L67
portal_type key is not string, but Message object. I'm going to fix it in ATCT.
comment:11 Changed 4 years ago by naro
- Status changed from new to closed
- Resolution set to fixed
Fixed in ATCT 1.2 and trunk.
comment:12 Changed 4 years ago by daftdog
- Status changed from closed to reopened
- Resolution fixed deleted
I have this problem in Plone 3.0.3 with ATCT 1.2.2, am I halucinating or did something go wrong when merging the fix?
comment:13 Changed 4 years ago by daftdog
Apparently the bug IS fixed in ATContentTypes 1.2.3 (not 1.2) which does not ship with Plone 3.0.3, ticket can be closed again.
comment:14 Changed 4 years ago by naro
- Status changed from reopened to closed
- Resolution set to fixed
ATContentTypes 1.2.3 will be part of Plone 3.0.4
comment:15 Changed 4 years ago by daftdog
Is it possible that bug #7467 is somewhat related to the fix to this bug here?
