Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/8.3' into 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed Oct 10, 2024
2 parents ef53627 + 5446397 commit 92ce028
Show file tree
Hide file tree
Showing 6 changed files with 219 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"lint:phpstan": "../../bin/phpstan analyse",
"lint": [
"@lint:phpstan"
]
],
"test:behat-cli": "../../bin/behat -f progress --strict --no-interaction",
"build:composer-json": "php ../../Build/BuildEssentials/ComposerManifestMerger.php"
},
"replace": {
},
Expand Down
5 changes: 5 additions & 0 deletions Neos.Neos/Classes/Domain/Service/UserService.php
Original file line number Diff line number Diff line change
Expand Up @@ -902,8 +902,13 @@ protected function deletePersonalWorkspace($accountIdentifier)
{
$userWorkspace = $this->workspaceRepository->findByIdentifier(UserUtility::getPersonalWorkspaceNameForUsername($accountIdentifier));
if ($userWorkspace instanceof Workspace) {
$rootNode = $userWorkspace->getRootNodeData();
$this->publishingService->discardAllNodes($userWorkspace);
$this->workspaceRepository->remove($userWorkspace);

// Persist removal of workspace so we can remove the root node without a foreign key constraint violation
$this->persistenceManager->persistAll();
$rootNode->remove();
}
}

Expand Down
94 changes: 94 additions & 0 deletions Neos.Neos/Documentation/Appendixes/ChangeLogs/8317.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
`8.3.17 (2024-09-17) <https://github.com/neos/neos-development-collection/releases/tag/8.3.17>`_
================================================================================================

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

`BUGFIX: Fix autoselection of ancestor nodes in Workspace module <https://github.com/neos/neos-development-collection/pull/5232>`_
----------------------------------------------------------------------------------------------------------------------------------

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

* Packages: ``Neos``

`BUGFIX: Remove rootnode when user workspace is deleted <https://github.com/neos/neos-development-collection/pull/5207>`_
-------------------------------------------------------------------------------------------------------------------------

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

**Review instructions**

Previously all root nodes of workspaces that belonged to removed users stayed in the database.
With this change, the root nodes are removed as well.

1. Create a user
2. Delete the new user
3. No root node should remain of the personal workspace of the removed user

* Packages: ``Neos``

`BUGFIX: Translate FlashMessage if asset is still in use in media browser inspector <https://github.com/neos/neos-development-collection/pull/5133>`_
------------------------------------------------------------------------------------------------------------------------------------------------------

Bugfix for `#5085 <https://github.com/neos/neos-development-collection/issues/5085>`_no error if asset still in use and show flashmessage solution set class neos-notification-container as id

In media browser inspector if assets are deleted wich are still used no FlashMessage was showed and on second delete an error pages was showed.

Solution:
In Neos.Media:Browser/Resources/Private/Layouts/Default.html change class neos-notification-container to id neos-notification-container, because Notification.js / Toast is searching for id neos-notification-container to insert FlashMessages.

` <div class="neos-media-content{f:if(condition: '{tags -> f:count()} > 25', then: ' neos-media-aside-condensed')}">
<div class="neos-media-assets">
<div **id="neos-notification-container"**>
<f:render partial="FlashMessages"/>
</div>
<f:render section="Content"/>
</div>
<aside class="neos-media-aside">`

related: `#5085 <https://github.com/neos/neos-development-collection/issues/5085>`_


* Packages: ``Neos`` ``Media.Browser``

`BUGFIX: Sort roles for users by label instead of internal name in the UI <https://github.com/neos/neos-development-collection/pull/5203>`_
-------------------------------------------------------------------------------------------------------------------------------------------

**Review instructions**

Before:

!`CleanShot 2024-08-15 at 13 01 03@2x <https://github.com/user-attachments/assets/61fb4a4f-4a43-45e9-bc1f-7c5b417848e7>`_

After:

!`CleanShot 2024-08-15 at 13 00 37@2x <https://github.com/user-attachments/assets/91f4e486-6e0e-4f03-9f57-5058b06c3044>`_


* Packages: ``Neos``

`BUGFIX: Don’t copy removed nodes <https://github.com/neos/neos-development-collection/pull/5186>`_
-----------------------------------------------------------------------------------------------------

With this change, removed nodes are not copied anymore in the recursive copy actions.

Also the removed state is now kept when a node is similarisied to prevent unpublished removed nodes from popping up again inadvertendly.

* Resolves: `#5185 <https://github.com/neos/neos-development-collection/issues/5185>`_

* Packages: ``Neos`` ``ContentRepository``

`TASK: Update GitHub actions <https://github.com/neos/neos-development-collection/pull/5237>`_
----------------------------------------------------------------------------------------------

Fix warnings:

> The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/cache@v2, actions/upload-artifact@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/




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

`Detailed log <https://github.com/neos/neos-development-collection/compare/8.3.16...8.3.17>`_
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<f:for each="{siteChanges}" as="site">
<f:for each="{site.documents}" key="dimension" as="dimensions">
<f:for each="{dimensions}" key="documentPath" as="document">
<tr class="neos-document" data-nodepath="{document.documentNode.path}" data-ismoved="{f:if(condition: document.isMoved, then: 'true', else: 'false')}" data-isnew="{f:if(condition: document.isNew, then: 'true', else: 'false')}">
<tr class="neos-document" data-nodepath="{document.documentNode.path}" data-identifier="{document.documentNode.identifier}" data-ismoved="{f:if(condition: document.isMoved, then: 'true', else: 'false')}" data-isnew="{f:if(condition: document.isNew, then: 'true', else: 'false')}">
<td class="check neos-priority1">
<label for="check-document-{document.documentNode.identifier}" class="neos-checkbox"><f:form.checkbox id="check-document-{document.documentNode.identifier}" class="neos-check-document" value="{document.documentNode.identifier}"/><span></span></label>
</td>
Expand Down Expand Up @@ -166,7 +166,8 @@
}
var movedOrNewParentDocuments = jQuery(this).closest('table').find('.neos-document[data-ismoved="true"], .neos-document[data-isnew="true"]').filter(nodePathStartsWith(currentNodePath));
jQuery(movedOrNewParentDocuments).each(function(index, movedParentDocument) {
jQuery('tr[data-nodepath^="' + jQuery(movedParentDocument).data('nodepath') + '"] td.check input').prop('checked', checked);
jQuery('td.check input', movedParentDocument).prop('checked', checked);
jQuery('tr.neos-change.document-' + jQuery(movedParentDocument).data('identifier') + ' td.check input').prop('checked', checked);
});
}

Expand Down
111 changes: 111 additions & 0 deletions Neos.Neos/Tests/Behavior/Features/Fusion/NodeUri.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
@fixtures
Feature: Tests for the "Neos.Neos:NodeUri" Fusion prototype

Background:
Given I have the site "a"
And I have the following NodeTypes configuration:
"""yaml
'unstructured': {}
'Neos.Neos:FallbackNode': {}
'Neos.Neos:Document': {}
'Neos.Neos:ContentCollection': {}
'Neos.Neos:Test.DocumentType':
superTypes:
'Neos.Neos:Document': true
"""
And I have the following nodes:
| Identifier | Path | Node Type | Properties |
| root | /sites | unstructured | |
| a | /sites/a | Neos.Neos:Test.DocumentType | {"uriPathSegment": "a", "title": "Node a"} |
| a1 | /sites/a/a1 | Neos.Neos:Test.DocumentType | {"uriPathSegment": "a1", "title": "Node a1"} |
And the Fusion context request URI is "http://localhost"

Scenario: Node uris
And the Fusion context node is "a1"
When I execute the following Fusion code:
"""fusion
include: resource://Neos.Fusion/Private/Fusion/Root.fusion
include: resource://Neos.Neos/Private/Fusion/Root.fusion
test = Neos.Fusion:DataStructure {
@process.toString = ${Array.join(Array.map(value, (v, k) => k + ': ' + v), String.chr(10))}
uri = Neos.Neos:NodeUri {
node = ${node}
}
link = Neos.Neos:NodeLink {
node = ${node}
}
uriWithSection = Neos.Neos:NodeUri {
node = ${node}
section = 'foo'
}
uriWithAppendExceedingArguments = Neos.Neos:NodeUri {
node = ${node}
arguments = ${{q: 'abc'}}
}
absoluteUri = Neos.Neos:NodeUri {
node = ${node}
absolute = true
}
mixed = Neos.Neos:NodeUri {
node = ${node}
section = 'foo'
arguments = ${{q: 'abc'}}
absolute = true
}
}
"""
Then I expect the following Fusion rendering result:
"""
uri: /en/a1
link: <a href="/en/a1">Neos.Neos:Test.DocumentType (a1)</a>
uriWithSection: /en/a1#foo
uriWithAppendExceedingArguments: /en/a1?q=abc
absoluteUri: http://localhost/en/a1
mixed: http://localhost/en/a1?q=abc#foo
"""

Scenario: Node as string node path syntax
And the Fusion context node is "a"
When I execute the following Fusion code:
"""fusion
include: resource://Neos.Fusion/Private/Fusion/Root.fusion
include: resource://Neos.Neos/Private/Fusion/Root.fusion
test = Neos.Fusion:DataStructure {
@process.toString = ${Array.join(Array.map(value, (v, k) => k + ': ' + v), String.chr(10))}
sitesRootPath = Neos.Neos:NodeUri {
node = '/sites/a/a1'
}
siteRelativePath = Neos.Neos:NodeUri {
node = '~/a1'
}
site = Neos.Neos:NodeUri {
node = '~'
}
relativePath = Neos.Neos:NodeUri {
node = 'a1'
}
dotRelativePath = Neos.Neos:NodeUri {
node = './a1'
}
dotTraversalRelativePath = Neos.Neos:NodeUri {
@context.childNode = ${q(node).find('#a1').get(0)}
node = '..'
baseNodeName = 'childNode'
}
contextPath = Neos.Neos:NodeUri {
node = '/sites/a/a1@live'
}
}
"""
Then I expect the following Fusion rendering result:
"""
sitesRootPath: /en/a1
siteRelativePath: /en/a1
site: /
relativePath: /en/a1
dotRelativePath: /en/a1
dotTraversalRelativePath: /
contextPath: /en/a1
"""
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
"lint:phpstan": "../../bin/phpstan analyse",
"lint": [
"@lint:phpstan"
]
],
"test:behat-cli": "../../bin/behat -f progress --strict --no-interaction",
"build:composer-json": "php ../../Build/BuildEssentials/ComposerManifestMerger.php"
},
"replace": {
"typo3/typo3cr": "self.version",
Expand Down

0 comments on commit 92ce028

Please sign in to comment.