#87677Pasting content element to page does not work
Description
- Copy any content element like textmedia from page A.
- Go to page B – currently empty.
- Paste record in. Works.
- Copy another content element form page A.
- Go to page B.
- Paste record in after previously pasted record. Works.
- Copy another content element form page A.
- Go to page B.
- Paste record in on top (“Paste into this column”). Error.
1: Attempt to insert record "tt_content:123" on a page (Page Title) that can't store record type. 1: Attempt to insert record on page '[root-level]' (0) where this table, tt_content, is not allowed
Problem, it seems, lies in incorrect request parameters when calling the SimpleDataHandlerController.
Request parameters of a paste operation that works:
Array
(
[route] => /ajax/record/process
[token] => abc
[cmd] => Array
(
[tt_content] => Array
(
[123] => Array
(
[copy] => Array
(
[action] => paste
[target] => 3
[update] => Array
(
[colPos] => 0
[tx_gridelements_container] => NaN
[tx_gridelements_columns] => 0
[sys_language_uid] => 0
)
)
)
)
)
)
Note that [target] is an integer referring to the page being copied to.
Request parameters of a paste operation that fails:
Array
(
[route] => /ajax/record/process
[token] => qwe
[cmd] => Array
(
[tt_content] => Array
(
[123] => Array
(
[copy] => Array
(
[action] => paste
[target] => Page Title
[update] => Array
(
[colPos] => 0
[tx_gridelements_container] => NaN
[tx_gridelements_columns] => 0
[sys_language_uid] => 0
)
)
)
)
)
)
Note that [target] now is the page title (?!).
This leads to $this->tce->start($this->data, $this->cmd); in SimpleDataHandlerController being initialized with an invalid pageId value, and therefore failing to create correct cmd parameters. initializeClipboard will then also not be called.
I tried to debug this behaviour for about an hour, but I cannot for the love of anything find out, where this originates from.
This error also happens in some combinations with copying to different language columns.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.