Comments (10)
what is the purpose of those mixins? as long as they don't add any fields to the node, we do not need them.
from media-bundle.
then we can have an image and file with node type "nt:file". The mixins define the extra fields and make a document pass the validation
from media-bundle.
Also the Symfony\Cmf\Bundle\MediaBundle\Doctrine\Phpcr\Directory
can have the node type "nt:folder" then. Just found while testing elFinder that when moving a File (without "nt:file") as child of the Directory, with "nt:folder", results in the error
Can't add the child node "test-banner-550x109.png" for node type "nt:unstructured" because there
is no definition for a child with that name.
from media-bundle.
yeah, nt:folder can only have nt:hierarchyNode as children.
from media-bundle.
@rmsint i think you missed my reply on irc for the metadata field: if its a phpcr-odm hashmap, it will actually be two properties, the second phpcr property for the keys. it should show in the phpcr dump of the properties when you store something in the metadata.
from media-bundle.
@dbu thx, I indeed missed it
Another question: for the cmf:file and cmf:image mixing the "cmf" namespace needs to be registered. Do we need to do this in the CoreBundle?
When running the tests with the mixins defined the error is:
PHPCR\ValueFormatException: Invalid PHPCR NAME at '/test/media/file-1.txt/jcr:mixinTypes': The namespace prefix cmf does not exist.
from media-bundle.
are you using a .cnd file? then you need to explain the namespace first thing. look at the code in RegisterSystemNodeTypesCommand of phpcr-odm for an example. if you have that part and it does not work, try with jackrabbit to see if you found a jackalope-doctrine-dbal bug...
the namespace may be declared in as many places as you want, as long as the same prefix always points to the same uri. i think one namespace for all of the cmf should be enough, we can coordinate to avoid collisions. the DI xml namespaces are http://cmf.symfony.com/schema/dic/core etc. for phpcr we could do http://cmf.symfony.com/phpcr/1.0 to follow the jcr model of http://www.jcp.org/nt/1.0 and so on.
from media-bundle.
Nope, the CND is registered in the repository initializer that is configured in persistance-phpcr.xml
. Added the namespace and the tests pass now! I will add a PR soon, currently the code is in the cmf_file
branch.
from media-bundle.
ok, i'll look at the PR then once you do it. create a WIP PR as soon as
possible, if it has WIP in the name we won't merge until you say its
ready. easier to give feedback.
from media-bundle.
see #63
from media-bundle.
Related Issues (20)
- use MediaBundle twig functions HOT 1
- Changing Media entity twice in same request is trying to delete directory HOT 5
- Can we use S3DataStore with Jackrabbit implementation for media bundle? HOT 1
- FileController can't handle file name with Chinese character HOT 3
- Symfony 3.x compatibility HOT 2
- Could not load type "cmf_media_image" HOT 2
- unimplemented getParent method HOT 1
- the future of this bundle
- Add new File structure HOT 1
- Hierarchy vs. Hierarchy HOT 1
- Configuration Issue: "There is no extension able to load the configuration for cmf_media" HOT 4
- Integration with Entities: Project Example
- PHP Fatal error Symfony\Cmf\Bundle\MediaBundle\Doctrine\Phpcr\Directory HOT 1
- Unknown "cmf_media_display_url" function. HOT 2
- ChildrenCollection of medea files fails HOT 1
- Fix SonataMedia integration
- Do not use deprecated method HOT 1
- Automaticially add parent document for collection fresh collection items
- Symfony\Cmf\Bundle\MediaBundle\Adapter\ElFinder\PhpcrDriver::$options must be protected or weaker HOT 4
- Attempted to load class "ElFinderVolumeDriver" from namespace "FM\ElFinderPHP\Driver" HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from media-bundle.