Bug #87677

Updated by Philipp Seiler 10 months ago

# 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 ("Page into this column"). Error.

<pre>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</pre>

Problem, it seems, lies in incorrect request parameters when calling the _SimpleDataHandlerController_.

*Request parameters of a paste operation that works:*
<pre>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
)

)

)

)

)

)
</pre>

Note that [target] is an integer referring to the page being copied to.

*Request parameters of a paste operation that fails:*
<pre>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
)

)

)

)

)

)
</pre>

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.

Back