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

Handling of subobject storage for new items #6

Open
gogobd opened this issue May 17, 2018 · 9 comments
Open

Handling of subobject storage for new items #6

gogobd opened this issue May 17, 2018 · 9 comments
Assignees

Comments

@gogobd
Copy link

gogobd commented May 17, 2018

Folderish types are designed to be able to contain content. However when you use collective.folderishtypes in Plone and you simply add a folderish item and edit it immediately you will see that all the assets you uploaded through the editor will be stored as siblings of the item you just created. This is due to the fact that the new item does not "exist" yet, that is, before it has been saved once.
That's somewhat surprising and unwanted in our usecase.

  • Maybe that issue could be resolved with event subscribers that help to "track" the uploaded items (annotation in the intermediate/temporary/not-persistent parent object?) in order to move them into the type after it has been saved.
  • Maybe the right way to fix this is to configure/modify TinyMCE (even if that implies a kind-of dependency)
  • Maybe a combination of both?
    It would be great to find a good solution for that.
@agitator
Copy link
Member

imho the most sane option would be to create the object first (via minimal addform) then make sure the context for uploading objects is within that object

@gogobd
Copy link
Author

gogobd commented May 17, 2018

That's feasible but my intention was to strive for a generic way of handling this issue that doesn't require modification of other code outside "collective.folderishtypes" to retain modularity.

@djay
Copy link
Member

djay commented May 22, 2018

isn't p.a.drafts supposed to solve this? https://github.com/plone/plone.app.drafts

@djay
Copy link
Member

djay commented May 22, 2018

@datakurre might be the best person to ask about p.a.drafts or other ways to solve this

@datakurre
Copy link

Drafts does not support that ootb. It could, but because of the added complexity community seems chosen path with minimal add form + edit form with real context.

@djay
Copy link
Member

djay commented May 22, 2018

so to your knowledge there is no solution to adding images inside a folderish types when adding a page? @datakurre (other than having a central media folder).
I thought at least castlecms solved this right @tkimnguyen ?
I thought i'd covered this in the roadblocks to going folderish way back in 2013 but can't see I had - https://docs.google.com/document/d/1jJ7765rW-CpdOhKR6o4hFaOzQk6xmuePFZd-zTzxwFE/edit#

@datakurre
Copy link

Early Mosaic had support for images as tiles (in persisten tile data) that worked already on add form.

When CastleCMS was developed, add form as special case everywhere in code scared them and CastleCMS choose to show minimal add form and then show Mosaic editor only on already created page.

@djay
Copy link
Member

djay commented May 22, 2018 via email

@gogobd
Copy link
Author

gogobd commented May 22, 2018

plone.app.drafts looks like a very good vector! Too bad it works on persisted objects only. I was talking with @jensens and maybe there's a clean way to implement a behavior as an addon that instantly saves a newly generated (folderish) type, then redirects to the edit form.
This could be a stand-alone drop-in add-on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants