Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUGFIX: Dont crash in cli context #36

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mhsdesign
Copy link

The security Context cannot be initialized yet.
Please check if it can be initialized with
$securityContext->canBeInitialized() before trying to do so.

  Type: Neos\Flow\Security\Exception
  Code: 1358513802
  File: Data/Temporary/Development/Cache/Code/Flow_Object_Classes/Neos_Flow_Securit
        y_Context.php
  Line: 312

when having a command to modify the cr this error will be thrown at shutdown

Copy link
Owner

@Sebobo Sebobo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating the last changed date is still relevant for a workspace.

First to see in the workspace overview that a workspace was touched (even by a CLI command). As we don't have a user I would set the user then to null for now and adjust the UI to show that the "system" updated the workspace in that case.

Secondly to correctly calculate the "stale" status of a workspace which I use in the CDP project to check whether to flush caches etc.

@@ -78,7 +78,12 @@ public function nodeDiscarded(NodeInterface $node): void

public function shutdownObject(): void
{
$currentUser = $this->securityContext->getAccount()->getAccountIdentifier();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not skip the update of the workspace in general but instead skip updating the last editor and still update the last edited date time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants