-
Notifications
You must be signed in to change notification settings - Fork 41
duplicate add buttons in collections #27
Comments
@bergie maybe you can help us understand how RDFa thinks this should be? is it more "normal" to have a collection inside the entity it is related to or outside that entity? |
Inside is normal, and you shouldn't need to duplicate |
this is not a bug of create.js but really something we should fix in createphp i think. currently for the example i hand-tuned to debug the creation issue, i get two about and this leads to 2 add buttons (i removed the duplicated xmlns for readability):
|
I added a workaround for this now, so that the second about attribute is removed when the collection is rendered as part of an entity (we still need it for standalone rendering, though). But after talking to @bergie, it actually seems to be a VIE bug that causes this, so I'm closing the ticket for now |
P.S.: The issue about too many namespaces can be partly solved with the same technique, but for it to work fully, we would have to set the parent reference for collection children, which isn't possible with the interfaces the way they are now. Anyways, this should probably got into a separate ticket |
sure. i will try to have a look into this at some point. thanks. |
in the cmf, we get duplicate add buttons when rendering collections. i tracked this down to be because of having an about attribute in the collection container even if we are inside the entity. either we have to remove this line: https://github.com/flack/createphp/blob/master/src/Midgard/CreatePHP/Entity/Controller.php#L107 and document that if you want a collection you at least need to render the definition of the containing element - or we need to document that you must render the collection outside of the entity (which seems wrong to me). or we could have a parameter to the collection render telling wheter we are inside an entity or not. but this becomes complicated...
as a side note, i also notice we output way too many namespace declarations because the elements do not know if they are rendered inside the scope of another element or not, when rendering the elements separately.
The text was updated successfully, but these errors were encountered: