4.3.8 (2019-12-14)

Overview of merged pull requests

BUGFIX: Invalid ratio mode during site import

Sigh… This fixes one blocking and one small issue with the ratio mode that still occurred when importing sites from XML. The error fixed is:

During the import of the “Sites.xml” from the package “Neos.Demo” an exception occurred: Error: During import an exception occurred: “Could not convert target type “Neos\Media\Domain\Model\ImageVariant”: Could not convert target type “Neos\Media\Domain\Model\Adjustment\ResizeImageAdjustment”: Invalid mode “” specified, supported modes are: “inset”, “outbound” (but use the ImageInterface::RATIOMODE_* constants)”., see log for further information.

The fix brings back setting the ratio mode to the default of ImageInterface::RATIOMODE_INSET when an empty string is given and fixes the error message sprintf pattern.

  • Packages: Media

BUGFIX: Set default ratio mode in ResizeImageAdjustment

The default was assigned during runtime, but this lead to getRatioMode() potentially failing, since it was declared to return a string, non-nullable.

This is a followup to #2716

Fixes #2811

  • Packages: Media Neos

BUGFIX: Add leave statements for apply early returns

Small bugfix to have an even count of enter and leave calls, even if apply values cause an early return.

This should be refactored anyway to a more efficient solution (see #2737) where no cache context is prepared unless an object is evaluated - but it doesn’t hurt and helps the Flowpack.Fusion.Tracing package to produce correct traces.

Replaces #2739

  • Packages: Fusion Neos

BUGFIX: Handle unavailable asset proxies in edit view

When an asset is not found, some actions threw an 404 status, which leads to Neos showing the “404 page” under certain circumstances.

This change assigns the exception just like in the case of a connection error, leaving handling to the media browser.

Now when an asset is not available, the edit template reacts to the connectionError´. This avoids an error with the `format.relativeDate VH and informs the user correctly about the fact an asset could not be found.

  • Packages: Browser

BUGFIX: Allow content cache flush for asset references in other use workspaces

Asset change leads to exception if unpublished changes in others users workspaces exists, which are referenced to affected asset. Neos tries to access the others user workspace to get the node with the reference to flush there caches. By privilege Neos.Neos:Backend.OtherUsersPersonalWorkspaceAccess this is not allowed.

``` Access denied for method Method: Neos\ContentRepository\Domain\Service\Context::validateWorkspace()

Evaluated following 1 privilege target(s): “Neos.Neos:Backend.OtherUsersPersonalWorkspaceAccess”: ABSTAIN (0 granted, 0 denied, 1 abstained)

Authenticated roles: Neos.Flow:Everybody, Neos.Flow:AuthenticatedUser, Neos.Neos:Editor, Neos.Neos:AbstractEditor, Neos.ContentRepository:Administrator, Neos.ContentRepository:InternalWorkspaceAccess, Neos.Neos:LivePublisher, Neos.Neos:Administrator ```

This fixes that behaviour by allowing access to the content repository without authorization checks during retrieval of affected nodes.

  • Packages: Neos

BUGFIX: Allow HtmlAugmenter operate on script tags

What I did Regarding #2763 the HtmlAugmenter does not find script tags as root elements. Ths DomDocument->loadHTML() puts them automatically into html/head instead of html/body as it does with other tags.

How I did it Extend XPath query to search in head AND body for root elements.

How to verify it For script-tag: ` $html = '<script>console.log("fooo");</script>'; $domDocument = new \\DOMDocument('1.0', 'UTF-8'); $domDocument->loadHTML((substr($html, 0, 5) === '<?xml') ? $html : '<?xml encoding="UTF-8"?>' . $html); var_dump($domDocument->saveHTML()); ` it returns: ` string(195) "<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <?xml encoding="UTF-8"?><html><head><script>console.log("fooo");</script></head></html> " `

For other tags: ` $html = '<a>console.log("fooo");</a>'; $domDocument = new \\DOMDocument('1.0', 'UTF-8'); $domDocument->loadHTML((substr($html, 0, 5) === '<?xml') ? $html : '<?xml encoding="UTF-8"?>' . $html); var_dump($domDocument->saveHTML()); ` it returns: ` string(185) "<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <?xml encoding="UTF-8"?><html><body><a>console.log("fooo");</a></body></html> " `

  • Packages: Fusion

TASK: Remove showInvisible query parameter handling again

The correct preview of a hidden document is not showing it, after all…

Related to https://github.com/neos/neos-ui/issues/2500

  • Packages: AssetList BaseMixins ColumnLayouts ContentReferences Form Html Neos NodeTypes

BUGFIX: setting Headers while evaluating PluginView.

This results in redirects without delay working not only for Plugins but also for PluginViews.

While updating a Neos Project from 3.3 to 4.3 I encountered an issue with the PluginViewImplementation. Redirects without a delay inside controllers of the plugin views did not work anymore, while redirects in the controllers of the master plugin still worked. This problem occurred because the implementation of AbstractController::redirectToUri() changed in Neos 4. In Neos 3 the line $this->response->setContent(‘<html><head><meta http-equiv=”refresh” content=”’ . (int)$delay . ‘;url=’ . $escapedUri . ‘”/></head></html>’); was always executed – in Neos 4 it is only executed if a delay is set. Without a delay only the “Location” in the Response-Header is set. The PluginViewImplementation (in contrast to the PluginImplementation) does not append these Headers to the ParentRequest. I copied the lines from the PluginImplementation to the PluginViewImplementation and the redirects worked fine again.

(Actually this was also kind of a Problem in Neos 3, because it resulted in redirects from PluginViews always having a visible delay in the Frontend, even if the delay was 0. But I don’t know if you still want to patch it in Neos 3.3 or only in 4.3 where it does not work at all.)

  • Packages: AssetList BaseMixins ColumnLayouts ContentReferences Form Html Neos NodeTypes

BUGFIX: Add missing translation in pagination

The labels were only partially translated in https://github.com/neos/neos-development-collection/commit/`8d1c98a9999fac1830b78f17c08f87c0f67a6065 <https://github.com/neos/neos-development-collection/commit/8d1c98a9999fac1830b78f17c08f87c0f67a6065>`_#diff-86d35dae35fd27aa00b7d0723d538960

  • Packages: Browser ContentRepository

BUGFIX: MariaDB 10.4 compatibility for events migration

See https://jira.mariadb.org/browse/MDEV-19598

This will first rename the existing index before adding a new primary key as MariaDB 10.4 would complain about the existing unique key „uid“ and not allow adding the primary key with the same name.

As the behavior for MariaDB 10.2 and 10.4 is different we also need to check for the existence of the indices before changing them or it will cause trouble with 10.2.

Replaces: #2665 Resolves neos/flow-development-collection#1704

  • Packages: Neos

Detailed log