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

Node names are case-insensitive but the move operation is not. #371

Closed
dantleech opened this issue Oct 24, 2013 · 9 comments
Closed

Node names are case-insensitive but the move operation is not. #371

dantleech opened this issue Oct 24, 2013 · 9 comments
Labels

Comments

@dantleech
Copy link
Contributor

When renaming a node in the Sonata Admin from "main" to "Main" I get:

 ItemExistsException: Cannot move '/cms/pages/main' to '/cms/pages/Main' because destination node already exists

I guess this is a PHCR-ODM issue.

@dbu
Copy link
Member

dbu commented Oct 27, 2013

unless you accidentally already have both, this would have to be in odm, phpcr itself should be case sensitive. unless one of the sql backends does the path uniqueness in the db and is doing that case insensitiv, which would be a bug afaik.

can you maybe start by adding a test to phpcr-api-tests so that we know whether there is an issue on that layer?

@dbu
Copy link
Member

dbu commented Dec 3, 2013

are you sure that this is not because you had duplicated documents? i would assume the paths to be case sensitive always.

@dbu
Copy link
Member

dbu commented Dec 28, 2013

@dantleech are you able to reproduce this? could it be a mysql only issue? i think mysql is by default case insensitive. jackrabbit and postgres should be case sensitive. maybe we should tell mysql to use a case sensitive collation in our schema, to behave like the rest.

@dantleech
Copy link
Contributor Author

Will put this on my todo

@dbu
Copy link
Member

dbu commented Feb 15, 2014

uh oh, setting mysql to a case sensitive collation in general would be a dangerous thing, as it would make everything case sensitive. if it is a mysql issue, then it belongs into jackalope-doctrine-dbal and we need something like http://stackoverflow.com/questions/3396253/altering-mysql-table-column-to-be-case-sensitive ALTER TABLE UserAccounts CHANGE Password Password varchar(50) NOT NULL COLLATE utf8_bin; - is utf8_bin commonly available or will that pose new installation problems?

@dbu
Copy link
Member

dbu commented Feb 28, 2014

@dantleech where you able to investigate on this?

@dantleech
Copy link
Contributor Author

Yeah it is a doctrine-dbal only issue:

PHPCR > session:node:move cms Cms
PHPCR > ls
+-------------+-----------------+--------+
| Node / Prop | Type            | Value  |
+-------------+-----------------+--------+
| /           | nt:unstructured |        |
|  -fooo      | STRING          | barrrr |
|  Cms/       | nt:unstructured |        |
+-------------+-----------------+--------+

2 node(s)
PHPCR > session:save
Cannot move '/cms' to '/Cms' because destination node already exists.

With jackrabbit it works fine.

@dantleech
Copy link
Contributor Author

On the otherhand this is not an ODM issue ..

@dbu
Copy link
Member

dbu commented Mar 1, 2014

@dbu dbu closed this as completed Mar 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants