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

ChildrenCollection of medea files fails #169

Open
ElectricMaxxx opened this issue Jul 4, 2017 · 1 comment
Open

ChildrenCollection of medea files fails #169

ElectricMaxxx opened this issue Jul 4, 2017 · 1 comment
Milestone

Comments

@ElectricMaxxx
Copy link
Member

Adding a collection of media files (images or files) to a node/document is quite easy. The persistence works, but trying to visualize them in a collection form type with the ImageType or FileType as entity fails, as the collection is created with the nodes names as keys. Those keys, which are file names in case of medea files, fail on form name validation. with an exception like:

 Symfony\Component\Form\Exception\InvalidArgumentException: The name "IMG_4721.JPG" contains illegal characters. Names should start with a letter, digit or underscore and only contain letters, digits, numbers, underscores ("_"), hyphens ("-") and colons (":").
    at n/a
        in /var/www/prberghoff/New/vendor/symfony/symfony/src/Symfony/Component/Form/FormConfigBuilder.php line 865

    at Symfony\Component\Form\FormConfigBuilder::validateName('IMG_4721.JPG')
        in /var/www/prberghoff/New/vendor/symfony/symfony/src/Symfony/Component/Form/FormConfigBuilder.php line 193

But it would be nice to edit and persist files in a arbitrary collection without enclosing them into a document with nice names.

@ElectricMaxxx ElectricMaxxx added this to the 2.0 milestone Jul 4, 2017
@ElectricMaxxx
Copy link
Member Author

From my POV the collection for the form is created in here: ../Doctrine/ODM/PHPCR/ChildrenCollection.php:98
Maybe we should provide an extra media children collection with basenames only, but i have no clue what happens when trying to persisten them afterwards. Or we shall use an extra media collection transformer to replace the collection before that.

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

1 participant