Bug #22680
closedDraft workspace content gets lost on publishing using translated items
0%
Description
Use draft-workspace to create translated page language and translated content-elements. When you publish, the elements get lost because the pid gets corrupted (-1).
1) Create a page in "draft-workspace"
2) Add content-element (eg. text), type some text and save/close.
3) Add new page-translation (save/close)
4) Click to edit translated text from content-element (save/close)
Now (pid values for better explaination) we have one CE (pid:2065) and one translated CE (pid:2067)
The pageID is: pid:312 and the alternative page-languages' pid is 269.
Now move to workspace and you'll see:
1) the page itself
2) the page translation
3) the two CEs
Now we'll start publishing:
1) publish the page itsself, this works (is viewable in live-workspace)
2) publish the non-translated CE, this works
3) now the 1st problem:
Look at table page_language_overlay, there are 2 rows for the alternative-page-language, in this case:
uid 269 - pid:332 - INITIAL PLACEHOLDER
uid 270 - pid:-1 - First draft version
Now publish the alternative-page-language and it gets lost on viewing the list of the page!
The database shows, uid 270 is removed and 269 has the pid:-1 !! This pid has to be 332 to work as expected. With -1 you'll neven get access to the alternative-page-language without using raw database editing.
4) now the 2nd problem (it's similar):
Look at table tt_content, there are 2 rows for the translated CE, in this case:
uid 2067 - pid:332 - INITIAL PLACEHOLDER
uid 2068 - pid:-1 - First draft version
Now publish the translated CE and it gets lost on viewing the list of the page!
The database shows, uid 2068 is removed and 2067 has the pid:-1 !! This pid has to be 332 to work as expected. With -1 you'll neven get access to the translated CE without using raw database editing.
I hope this is understandable :-)
(issue imported from #M14431)
Files
Updated by Graham Solomon over 14 years ago
I have uploaded a patch for this issue which has resolved the problem for me, the issue is the $keepFields loop and the fact that "pages_language_overlay" uses "pid" as it's "l18n_parent" field.
Not sure if this way is best or to add a condition to the loop whereby it continues if the fieldname is "pid".
Graham
Updated by Benni Mack about 14 years ago
Please check if this issue still exists with trunk or 4.4.2, should be fixed since 4.4.1. Could not really reproduce this issue.
Updated by Graham Solomon about 14 years ago
I can confirm I can't reproduce this any more with 4.4.2 :)