You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a big Plone 5 website with about 50 languages and about 330,000 objects total. Recently, a few of the PAM translated objects are not symmetric anymore - object A is still a translation of object B, but object B is not a translation of object A anymore. It's pretty rare, but it happened 3 or 4 times in the last months. Anyone having similar problems?
To check we use the following script in debug mode ("bin/client1 -O Plone debug"):
from plone import api
from plone.app.multilingual.interfaces import ITranslationManager
from sys import stdout
brains = api.content.find(path='/')
anzahl = len(brains)
ausgabe = ''
for i,brain in enumerate(brains):
stdout.write('\r'+' '*len(ausgabe)+'\r')
try:
obj = brain.getObject()
except KeyError as e:
print ('WARN: No objekt for brain %s found' % (brain.getPath()))
continue
ausgabe = '%s/%s %s percent %s' % (i+1,anzahl,round(float(i)/anzahl*100,2),repr(obj))
stdout.write(ausgabe)
stdout.flush()
sprachversion_obj = obj.Language()
translations = ITranslationManager(obj).get_translations()
for sprachversion_uebersetzung in translations:
if sprachversion_uebersetzung == '':
continue
if not ITranslationManager(translations[sprachversion_uebersetzung]).has_translation(sprachversion_obj):
print (u'ERROR: No translation from %s to %s for %s' % (sprachversion_uebersetzung,sprachversion_obj,repr(obj)))
The text was updated successfully, but these errors were encountered:
@achimwilde I think I've seen this happen if there are two items in the same translation group with the same language. (In other words, one of the items has the wrong language for its language root folder.)
Thank you for this hint. We've had a few such objects in the website, but those weren't the same as the ones that were half-connected. We are now making sure to explicitly set the language in new objects. Hopefully this will solve the other problem, though I am not very confident about that...
We have a big Plone 5 website with about 50 languages and about 330,000 objects total. Recently, a few of the PAM translated objects are not symmetric anymore - object A is still a translation of object B, but object B is not a translation of object A anymore. It's pretty rare, but it happened 3 or 4 times in the last months. Anyone having similar problems?
To check we use the following script in debug mode ("bin/client1 -O Plone debug"):
The text was updated successfully, but these errors were encountered: