-
Notifications
You must be signed in to change notification settings - Fork 61
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
refresh should not trigger a reload #321
Comments
Any idea how to fix it? /** @var $node Node */
foreach ($this->objectsByPath['Node'] as $node) {
if (! $keepChanges || ! ($node->isDeleted() || $node->isNew())) {
// if we keep changes, do not restore a deleted item
$this->objectsByUuid[$node->getIdentifier()] = $node->getPath();
$node->setDirty($keepChanges);
}
}
|
we should probably catch the exception at that point and rewrite history to match (e.g. set the node as deleted resp. make it a new addition if $keepChanges) but also, we should not do any of this with a node that is not yet initialized or that is already dirty. being dirty with the same $keepChanges flag that we have. afaik the jackalope node has a (non phpcr-api) method to check if its dirty |
It seems that $this->objectsByPath is modified during the foreach statement. A workaround could be to make sure that the current array element is still in $this->objectsByPath.
|
reported in doctrine/DoctrinePHPCRBundle#265 we can get an exception during the clear. instead, clear should not trigger any state checks. (it should also not give you children that are gone, not sure if it does or not)
The text was updated successfully, but these errors were encountered: