Skip to content

Commit

Permalink
MERGE: Merge branch '5.3' into 7.0
Browse files Browse the repository at this point in the history
Neos.Neos/Documentation/References/Signals/ContentRepository.rst
Neos.Neos/Documentation/References/ViewHelpers/ContentRepository.rst
  • Loading branch information
Bernhard Schmitt committed Jul 22, 2021
2 parents 3ead3d2 + 3a04436 commit 7af5303
Show file tree
Hide file tree
Showing 15 changed files with 445 additions and 106 deletions.
4 changes: 4 additions & 0 deletions Neos.ContentRepository/Classes/Domain/Model/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,10 @@ public function getChildNodes($nodeTypeFilter = null, $limit = null, $offset = n
*/
public function getNumberOfChildNodes($nodeTypeFilter = null): int
{
$nodes = $this->context->getFirstLevelNodeCache()->getChildNodesByPathAndNodeTypeFilter($this->getPath(), $nodeTypeFilter);
if ($nodes !== false) {
return count($nodes);
}
return $this->nodeData->getNumberOfChildNodes($nodeTypeFilter, $this->context->getWorkspace(), $this->context->getDimensions());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1618,6 +1618,10 @@ protected function addIdentifierConstraintToQueryBuilder(QueryBuilder $queryBuil
*/
protected function filterNodeDataByBestMatchInContext(array $nodeDataObjects, Workspace $workspace, array $dimensions, $includeRemovedNodes = false)
{
if (!$nodeDataObjects) {
return [];
}

$workspaces = $this->collectWorkspaceAndAllBaseWorkspaces($workspace);
$nonPersistedNodes = [];
$nodeIdentifier = [];
Expand Down
21 changes: 12 additions & 9 deletions Neos.Media.Browser/Resources/Private/Translations/af/Main.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@
<target state="needs-translation">Descending</target></trans-unit>
<trans-unit id="sortDirection.asc.tooltip" xml:space="preserve">
<source>Sort direction Ascending</source>
<target state="needs-translation">Sort direction Ascending</target></trans-unit>
<target state="translated">Sorteer rigting Stygend</target></trans-unit>
<trans-unit id="sortDirection.desc.tooltip" xml:space="preserve">
<source>Sort direction Descending</source>
<target state="needs-translation">Sort direction Descending</target></trans-unit>
<target state="translated">
Sorteer rigting Dalend</target></trans-unit>
<trans-unit id="dragAndDropOnTagOrCollection" xml:space="preserve">
<source>Drag and drop on tag or collection</source>
<target state="needs-translation">Drag and drop on tag or collection</target></trans-unit>
Expand Down Expand Up @@ -103,13 +104,13 @@
<target state="needs-translation">This operation cannot be undone.</target></trans-unit>
<trans-unit id="cancel" xml:space="preserve">
<source>Cancel</source>
<target state="needs-translation">Cancel</target></trans-unit>
<target state="translated">Kanselleer</target></trans-unit>
<trans-unit id="replace" xml:space="preserve">
<source>Replace</source>
<target state="needs-translation">Replace</target></trans-unit>
<trans-unit id="replaceAssetResource" xml:space="preserve">
<source>Replace asset resource</source>
<target state="needs-translation">Replace asset resource</target></trans-unit>
<target state="translated">Vervang batehulpbron</target></trans-unit>
<trans-unit id="saveEditing" xml:space="preserve">
<source>Save</source>
<target state="needs-translation">Save</target></trans-unit>
Expand Down Expand Up @@ -262,7 +263,7 @@
<target state="needs-translation">Basics</target></trans-unit>
<trans-unit id="delete" xml:space="preserve">
<source>Delete</source>
<target state="needs-translation">Delete</target></trans-unit>
<target state="translated">verwyder</target></trans-unit>
<trans-unit id="clickToDelete" xml:space="preserve">
<source>Click to delete</source>
<target state="needs-translation">Click to delete</target></trans-unit>
Expand Down Expand Up @@ -316,7 +317,7 @@
<target state="needs-translation">Cannot upload the file</target></trans-unit>
<trans-unit id="noFileSelected" xml:space="preserve">
<source>No file selected</source>
<target state="needs-translation">No file selected</target></trans-unit>
<target state="translated">Geen lêer is gekies nie</target></trans-unit>
<trans-unit id="fileSizeExceedsAllowedLimit" xml:space="preserve">
<source>The file size of {0} exceeds the allowed limit of {1}</source>
<target state="needs-translation">The file size of {0} exceeds the allowed limit of {1}</target></trans-unit>
Expand Down Expand Up @@ -422,13 +423,15 @@
<target state="needs-translation">Generate redirects from original file url to the new url</target></trans-unit>
<trans-unit id="resourceCanOnlyBeReplacedBySimilarResource" xml:space="preserve">
<source>'Resources of type "{0}" can only be replaced by a similar resource. Got type "{1}"'</source>
<target state="needs-translation">'Resources of type "{0}" can only be replaced by a similar resource. Got type "{1}"'</target></trans-unit>
<target state="translated">
'Hulpbronne van die tipe' {0} 'kan slegs deur 'n soortgelyke bron vervang word. Het tipe "{1}" 'gekry</target></trans-unit>
<trans-unit id="noAccessToWorkspace" xml:space="preserve">
<source>No access to workspace "{0}"</source>
<target state="needs-translation">No access to workspace "{0}"</target></trans-unit>
<target state="translated">Geen toegang tot werkruimte "{0}"</target></trans-unit>
<trans-unit id="missingDocumentNode" xml:space="preserve">
<source>No document node found for this node</source>
<target state="needs-translation">No document node found for this node</target></trans-unit>
<target state="translated">
Geen dokumentknoop gevind vir hierdie knoop nie</target></trans-unit>
</body>
</file>
</xliff>
2 changes: 1 addition & 1 deletion Neos.Neos/Classes/EventLog/Domain/Model/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class Event
* Child events, of this event
*
* @var ArrayCollection<Neos\Neos\EventLog\Domain\Model\Event>
* @ORM\OneToMany(targetEntity="Neos\Neos\EventLog\Domain\Model\Event", mappedBy="parentEvent", cascade="persist")
* @ORM\OneToMany(targetEntity="Neos\Neos\EventLog\Domain\Model\Event", mappedBy="parentEvent", cascade={"persist"})
*/
protected $childEvents;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ protected function hasHiddenNodeParent(NodeInterface $node): bool
$rootNode = $node->getContext()->getRootNode();
$nodesOnPath = $node->getContext()->getNodesOnPath($rootNode, $node);

return count($nodesOnPath) < $node->getDepth();
// Because the depth is 0-based, but the nodes returned by getNodesOnPath()
// contain the root node, less-than-or-equal must be used.
return count($nodesOnPath) <= $node->getDepth();
}
}
11 changes: 6 additions & 5 deletions Neos.Neos/Classes/Service/Controller/NodeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

use Neos\Flow\Annotations as Flow;
use Neos\Eel\FlowQuery\FlowQuery;
use Neos\Flow\Http\Helper\SecurityHelper;
use Neos\Flow\Property\TypeConverter\PersistentObjectConverter;
use Neos\Neos\Domain\Repository\DomainRepository;
use Neos\Neos\Domain\Service\NodeSearchServiceInterface;
Expand Down Expand Up @@ -184,7 +185,7 @@ public function createAction(Node $referenceNode, array $nodeData, $position)
{
$newNode = $this->nodeOperations->create($referenceNode, $nodeData, $position);

if ($this->request->getHttpRequest()->isMethodSafe() === false) {
if (SecurityHelper::hasSafeMethod($this->request->getHttpRequest()) === false) {
$this->persistenceManager->persistAll();
}

Expand Down Expand Up @@ -237,7 +238,7 @@ public function moveAction(Node $node, Node $targetNode, $position)
{
$node = $this->nodeOperations->move($node, $targetNode, $position);

if ($this->request->getHttpRequest()->isMethodSafe() === false) {
if (SecurityHelper::hasSafeMethod($this->request->getHttpRequest()) === false) {
$this->persistenceManager->persistAll();
}

Expand Down Expand Up @@ -280,7 +281,7 @@ public function copyAction(Node $node, Node $targetNode, $position, $nodeName =
{
$copiedNode = $this->nodeOperations->copy($node, $targetNode, $position, $nodeName);

if ($this->request->getHttpRequest()->isMethodSafe() === false) {
if (SecurityHelper::hasSafeMethod($this->request->getHttpRequest()) === false) {
$this->persistenceManager->persistAll();
}

Expand Down Expand Up @@ -333,7 +334,7 @@ public function copyAndRenderAction(Node $node, Node $targetNode, $position, $fu
*/
public function updateAction(Node $node)
{
if ($this->request->getHttpRequest()->isMethodSafe() === false) {
if (SecurityHelper::hasSafeMethod($this->request->getHttpRequest()) === false) {
$this->persistenceManager->persistAll();
}

Expand Down Expand Up @@ -373,7 +374,7 @@ public function updateAndRenderAction(Node $node, $fusionPath)
*/
public function deleteAction(Node $node)
{
if ($this->request->getHttpRequest()->isMethodSafe() === false) {
if (SecurityHelper::hasSafeMethod($this->request->getHttpRequest()) === false) {
$this->persistenceManager->persistAll();
}

Expand Down
113 changes: 113 additions & 0 deletions Neos.Neos/Documentation/Appendixes/ChangeLogs/533.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
`5.3.3 (2021-05-02) <https://github.com/neos/neos-development-collection/releases/tag/5.3.3>`_
==============================================================================================

Overview of merged pull requests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

`BUGFIX: getAssetProxy failed for local assets <https://github.com/neos/neos-development-collection/pull/2924>`_
----------------------------------------------------------------------------------------------------------------

With `836d739fa4f92b3c87c0fcaccd54f2909e188773 <https://github.com/neos/neos-development-collection/commit/836d739fa4f92b3c87c0fcaccd54f2909e188773>`_ a condition was added that prevented getting an AssetProxy for assets in the Neos AssetSource. But they all have one and therefore the query for an imported AssetProxy is not skipped for local assets.

**What I did**

Return AssetProxy for local assets.

**How I did it**

Check if the AssetSource is Neos itself.

**How to verify it**

Added functional test

* Packages: ``Media``

`BUGFIX: Use "stable" identifier when auto-creating child nodes <https://github.com/neos/neos-development-collection/pull/3336>`_
---------------------------------------------------------------------------------------------------------------------------------

Since ``node:repair`` uses the ``buildAutoCreatedChildNodeIdentifier``, it would
best to ensure the ``identifier`` is already correct when auto-creating child nodes.

Otherwise the identifier will be changed to a so called "stable"
identifier during a ``node:repair`` run which can lead to unwanted
behaviour in certain applications.

* Packages: ``Browser`` ``ContentRepository``

`TASK: Relax version constraint and allow Neos.Fusion.Form 2.0 <https://github.com/neos/neos-development-collection/pull/3324>`_
--------------------------------------------------------------------------------------------------------------------------------

Starting with Neos 5.2 the Neos Package required Neos.Fusion.Form `^1.0` instead of `*` which will not allow to use version 2.0+ of said package.

This change adjusts the constraint to `^1.0 || ^2.0` to allow projects to benefit from the Fusion.Form Runtime.

~~Hint: When upmerged to master constraint should be adjusted to `^2.0`. If this is forgotten i will take care in a second pr.~~

Relates: https://github.com/neos/fusion-form/issues/42

* Packages: ``Neos``

`BUGFIX: Open delete dialog on edit user view <https://github.com/neos/neos-development-collection/pull/3316>`_
---------------------------------------------------------------------------------------------------------------

On the edit view of the user management module it was not possible to delete the user caused by the missing confirmation dialog. This has not been open caused by a wrong if condition.

* Fixes: `#3310 <https://github.com/neos/neos-development-collection/issues/3310>`_
* Packages: ``Neos``

`TASK: Mark migrations as applied after behat setup <https://github.com/neos/neos-development-collection/pull/3314>`_
---------------------------------------------------------------------------------------------------------------------

This should work around an edge-case regression in doctrine/migrations 3.1.1 - see https://github.com/neos/neos-development-collection/pull/3311#issuecomment-803560353

* Packages: ``github`` ``Neos``

`BUGFIX: Re-Enable formerly unsupported editors for NodeCreationDialog <https://github.com/neos/neos-development-collection/pull/3270>`_
----------------------------------------------------------------------------------------------------------------------------------------

Hi there,

this PR accompanies https://github.com/neos/neos-ui/pull/2870 and re-enables editor functionalities that were disabled in https://github.com/neos/neos-development-collection/commit/`029572e38c163a5475c0ed3a8a29a988a60e4f4c <https://github.com/neos/neos-development-collection/commit/029572e38c163a5475c0ed3a8a29a988a60e4f4c>`_#diff-`5dcd744af0bf44e044a96b272818323abc9ed49d <https://github.com/neos/neos-development-collection/commit/5dcd744af0bf44e044a96b272818323abc9ed49d>`_284f5e40ff33f62b440ff801R91 ff. due to a lack of support for secondary editor views in the NodeCreationDialog.

* Packages: ``Neos``

`BUGFIX: Adjust user menu dropdown width <https://github.com/neos/neos-development-collection/pull/3298>`_
----------------------------------------------------------------------------------------------------------

Limit the minimum width of the dropdown to the width of the trigger button
and make it possible to become wider and float from right side of the trigger button to the left.

* Fixes: `#3297 <https://github.com/neos/neos-development-collection/issues/3297>`_
* Packages: ``github`` ``Neos``

`BUGFIX: Adjust logout button style <https://github.com/neos/neos-development-collection/pull/3299>`_
-----------------------------------------------------------------------------------------------------

Remove border from logout button in the user menu ot the top nav.

* Fixes: `#3296 <https://github.com/neos/neos-development-collection/issues/3296>`_
* Packages: ``Neos``

`TASK: Add GH action for builds <https://github.com/neos/neos-development-collection/pull/3291>`_
-------------------------------------------------------------------------------------------------

See https://github.com/neos/flow-development-collection/pull/2390 and https://github.com/neos/flow-development-collection/pull/2273

Resolves neos/team#54

* Packages: ``Neos``

`BUGFIX: Fix cache identifier collision in \`Neos_Fusion_ObjectTree\` cache. <https://github.com/neos/neos-development-collection/pull/3289>`_
----------------------------------------------------------------------------------------------------------------------------------------------

The `Neos_Fusion_ObjectTree` cache is used to store parsed fusion ASTs, the identifier is calculated from the configured fusionPathPatterns. Previously the string `@package` was replaced at runtime and thus became not part of the cache identifier calculation. That way two packages using the same fusionPathPatterns would end up with the same cacheIdentifier.

This change extracts the replacement of the `@package` into a separate method that is called from the CachingAspect.
That way if the package key is used in the current path pattern it becomes part of the cache identifier.

* Resolves: `#3288 <https://github.com/neos/neos-development-collection/issues/3288>`_
* Packages: ``Fusion`` ``Neos``

`Detailed log <https://github.com/neos/neos-development-collection/compare/5.3.2...5.3.3>`_
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Loading

0 comments on commit 7af5303

Please sign in to comment.