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
I am quite unsure what caused this issue, but suddenly in an A3 app, the current localization key stopped appearing. The localization object started pointing to the previous doc version. I don't really know why the previous doc versions of the home page were created in the first place.
I dug deeper into the codebase and found that the localizations array consists of few different docs:
Hi @stepanjakl !
Thank you for this detailed issue.
You're right this is a bug from apostrophe, but in the localization the previous docs should not be available.
The issue comes from the property aposMode that is not properly updated when switching a published doc into a previous one.
I'm currently working on a fix, I keep you informed.
Hello,
I am quite unsure what caused this issue, but suddenly in an A3 app, the
current
localization key stopped appearing. The localization object started pointing to theprevious
doc version. I don't really know why theprevious
doc versions of the home page were created in the first place.I dug deeper into the codebase and found that the
localizations
array consists of few different docs:apostrophe/modules/@apostrophecms/i18n/index.js
Line 130 in f130c24
It just happens to pick the first object that satisfies this condition (which in our case is the
previous
doc version):apostrophe/modules/@apostrophecms/i18n/index.js
Line 148 in f130c24
I managed to fix it with a modified condition:
I can create a PR for this if you think it's a suitable solution.
However, my suggestion only treats the symptomps as the cause of the issue (i.e. the generated
previous
docs) might lay somewhere else.The text was updated successfully, but these errors were encountered: