-
Notifications
You must be signed in to change notification settings - Fork 27
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
setMixins fails with referenced nodes #137
Comments
that looks wrong, the mixinTypes should be your new mixin, not an empty list. do you get another mixin change for your node that sets it to sulu:page? i'd look at the transport part where it builds those instructions to see when it builds the mixin changes and try to figure out why it does not directly put the new mixin into that instrucation. |
These are the two changes I get. I have checked out the |
dbal basically does not check such things, its a lot more sloppy. its possible that we record the remove and add as separate operations. the tricky bit is probably when stuff moves around in between and whatnot. in this case at least it would be possible to aggregate the two things into one instruction. not sure if thats possible in general however, or if it could lead to new issues. can you check if it could be possible to aggregate multivalue property changes into one change? is there any risk of messing up, could move operations come in between, or other things that set properties? |
I'll try to have a look next week. |
Ok, I have tried a bit, and managed it to get jackalope-jackrabbit sent the following body in the request (nothing I could commit, probably breaks a 100 other cases):
So it only sets the mixin types directly, but it still throws the same error:
So it looks to me like this is an issue in jackrabbit, right? |
Although in this example the node already has the type |
have you been able to reproduce this with the java jackrabbit remoting? or does that send the information differently? |
The following behavior occured to me when testing this using There is a node with the If I execute
If I executed |
@danrot did you find a solution for this? do we have a problem with the order of operations for this one? looks like we send operations in the wrong order. does it work if you save the session between the two operations? |
I didn't find any time to dig into this deeper...But as written above, it doesn't only seem to be about the wrong order, even if I fix the command sent via the API to jackrabbit it fails. Haven't tested saving the session between the |
I have a node type called
sulu:page
, which inherits from themix:referenceable
node type. I have a node which has themix:referencebale
node type and is already referenced by some other nodes.Now I would like to change the node to only have the
sulu:page
mixins and not themix:referenceable
mixin. So I call$node->setMixins(['sulu:page'])
, but when saving the data in the session to jackrabbit I get an error message like this:I have checked the curl request which is being sent, and there are two relevant parts, which I'll show in the following snippet:
Some more data, and quite at the bottom I see a line like this:
It looks to me like it is resetting the mixinTypes before setting the new value, which causes some references to break.
Is there any reason this is built like that? Can we fix that? If I get a hint I would create a PR.
The text was updated successfully, but these errors were encountered: