Issue Bug Closed

#33093'Missing "affected items" in $parameters array' on publish (4.6)

Jari no-lastname-given 01/10/12, 15:29 updated 10/02/18, 12:19

Description

In the latest stable typo3-version (4.6.3) the publish button in workspace preview does not work.

Error message: Missing “affected items” in $parameters array
Screenshot attached.

I’ve fixed this problem by modifying one condition in “typo3_src/typo3/sysext/workspaces/Classes/ExtDirect/ActionHandler.php” line 324.

From

if (!is_array($parameters->affects) || count($parameters->affects) == 0) {

To

if (!is_object($parameters->affects) || count($parameters->affects) == 0) {

The check is_array seems wrong as $parameters->affects is an object.
I didnt dig into this further but seems like $parameters->affects implements the interface “Interator” or something similar. Maybe a check like “$parameters->affects instanceof Iterator” would be better.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.