Issue Bug Closed

#72797EditDocumentController / languageSwitch / localized records without a default language record relation

Wolfgang Klinger 01/18/16, 18:39 updated 10/02/18, 11:20

Description

The ‘Language’ menu on top of the edit document view makes no sense and results in strange behaviour if you edit a record that has no default language (0) record relation.
The languageSwitch method of class EditDocumentController relies on an existing default language (0) record.
Generated links look like:

<option value="tce_db.php?&amp;cmd[tt_content][][localize]=8&amp;redirect=alt_doc.php…">Italian [NEW]</option>

(‘localize’ with an empty id key)
and in the end redirects to an edit view of a randomly selected record(?)

I would suggest to remove the menu if the open record has no default language record relation.

Reviews 4