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

better error messages when a property namespace isn't registered #37

Open
lsmith77 opened this issue Nov 15, 2011 · 1 comment
Open

Comments

@lsmith77
Copy link
Member

jackalope itself should check for valid namespace prefixes.

jackalope-doctrine-dbal fails during save with

Notice: Undefined index: phpcr_locale in .../jackalope-doctrine-dbal/src/Jackalope/Transport/DoctrineDBAL/Client.php line 440

jackalope-jackrabbit fails on save too, while talking to the backend

Sending this message without having "phpcr" registered as a namespace:
string(625) "<sv:node xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" sv:name="user"><sv:property sv:name="jcr:primaryType" sv:type="Name">sv:valuent:unstructured/sv:value/sv:property<sv:property sv:name="username" sv:type="String">sv:value/sv:value/sv:property<sv:property sv:name="numbers" sv:type="Long">sv:value3/sv:valuesv:value1/sv:valuesv:value2/sv:value/sv:property<sv:property sv:name="phpcr:class" sv:type="String">sv:value/sv:value/sv:property/sv:node"

Leads to this is the response:
string(317) "<D:error xmlns:D="DAV:"><dcr:exception xmlns:dcr="http://www.day.com/jcr/webdav/1.0">dcr:classjavax.jcr.InvalidSerializedDataException/dcr:classdcr:messageillegal property name: {http://www.jcp.org/jcr/sv/1.0}property/dcr:message/dcr:exception/D:error"

And finally this exception:
PHPCR\InvalidSerializedDataException: HTTP 400: illegal property name: {http://www.jcp.org/jcr/sv/1.0}property

@dbu
Copy link
Member

dbu commented Nov 15, 2011

looks like we have to check the namespaces on client side, i guess jackrabbit does on client side too and the server does not expect this error just says f... you when we use an unregistered namespace. would be good anyways if the transport does not have to validate namespaces.

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

No branches or pull requests

2 participants