Problem/Motivation
This module currently creates custom block type with the entity reference field on it. That entity reference field uses entity browser to attach images to that block. This is amazing as we demonstrate how custom blocks work and how entity browser can be used to improve media-related experience.
It would be nice if we would do something similar with a content type and a field on it.
Proposed resolution
- Create custom content type
- Add body and entity reference fields on it
- Configure entity reference field similar to what we currently have on custom block (references files, uses entity browser to upload/pick from library).
- Export all related configuration and put it in config/install folder in this module.
Comment | File | Size | Author |
---|---|---|---|
#8 | 2609542-8.patch | 5.87 KB | samuel.mortenson |
#8 | interdiff-2609542-6-8.txt | 3.38 KB | samuel.mortenson |
Comments
Comment #2
slashrsm CreditAttribution: slashrsm at MD Systems GmbH commentedComment #3
devlada CreditAttribution: devlada at MontenaSoft commentedAssigning issue to myself.
Comment #4
devlada CreditAttribution: devlada at MontenaSoft commentedPlease review.
Comment #5
devlada CreditAttribution: devlada at MontenaSoft commentedIt seems to me that the patch is not complete.
Comment #6
devlada CreditAttribution: devlada at MontenaSoft commentedCompleted and tested. Please review now.
Comment #7
devlada CreditAttribution: devlada at MontenaSoft commentedNote that we use custom body field (field_body) to avoid conflict with already existing body field. Also when try to install File Browser with Entity Browser example module, getting error message that fields or settings already exist, also on module uninstall seems as settings remains in the database and on reactivation getting an error too.
I'll describe step by step what happens in the morning. Perhaps these configurations should be separated as example module and generally we should take care of conflicts.
Comment #8
samuel.mortensonCommitted, thanks @devlada! I didn't see any errors, but one change I made before committing the patch was to remove field_body and replace it with a "body" field instance (not storage). The only conflict this could have is if a site had deleted every instance of the "body" field before enabling file_browser, which is really unlikely.
Comment #9
samuel.mortenson