Bug #27287
closedBug #46389: Faulty Workspace Placeholders
Wrong languages in page module & Fatal error
0%
Description
The function exec_languageQuery in cms/layout/db_layout doesn't care about workspaces which brings a lot of troubles including a fatal error
How to reproduce:- You need to have at least 2 sys_language
- Create a page in live WS & create a tanslation in language 1
- Switch to a workspace and create a translation in language 2
- Switch back to live and go to the page
- => Boooom
It wouuld be easy to use a typecast in class.tx_cms_layout.php, line 685 below the "list($lpRecord);
$lpRecord = (array)$lpRecord;
please proceed with that patch to see further problem: When you switch back to live workspaces, you will now see both languages on that page but the language #2 has been created in a workspace, so it shouldn't be visible, right? You will also see the 2nd language in the select box at the top left corner of the module.
Hiding the language would be very easy:
cms/layout/db_layout.php in function exec_languageQuery below the $exQ = t3lib_BEfunc:::deleteClause add this line
t3lib_BEfunc::versioningPlaceholderClause('pages_language_overlay');
Now everything looks fine as you only see the language #1 which has been created in live workspace and you can also remove the typecast and it still works but there is now another issue:
if you want to create the 2nd language in live WS, you will have this language twice (easly to spot in the list module).
So I really don't know how to proceed and what the best way is.
thanks for feedback, also for retesting everything!