Tinymce upload file to containers other than ['Folder', 'Large Plone Folder', 'Plone Site'] impossible

Steps to reproduce:

  • Create a new folderish Dexterity portal type (or copy/paste "Folder" type), let say "My Folder" type
  • Add a content of that type, let say /Plone/test-folder
  • Create a Page/News; use the tinymce toolbar button to create a link and select the tab to upload a file.
  • want to upload the file into the /Plone/my-folder: you'll find that my-folder is not selectable in the "upload to..." widget (it is greyed out) although it is "explorable" as container (blue arrow on the right).


Some weirdness: if you create a page in test-folder, and get to the "upload to..." widget, you'll find that test-folder is corectly set as default upload path (and it works if you leave it there), but if you deselect it, you'll not be able to reselect it again (you have to reload the edit form).


Tried to add My folder type to Products.CMFPlone.interfaces.controlpanel.ITinyMCESchema.plone.contains_objects registry key without any luck.



The same in plone6.

This is because pat-upload has a default value for 'selectableTypes': 'Folder' ... would be nice if you file an issue on GitHub - plone/mockup: A collection of client side patterns for faster and easier web development to think about querying an implemented Interface like IPrincipiaFolderish instead of the portal_type for selecting target containers.

1 Like

It already find it is folderish it because it displays the arrow. Shouldn't everything be selectable?

here: mockup upload
the config for pat-upload is:
relatedItems object { attributes: ["UID", "Title", "Description", "getURL", "portal_type", "path", "ModificationDate"], batchSize: 20, basePath: "/", vocabularyUrl: null, width: 500, maximumSelectionSize: 1, placeholder: "Search for item on site..." } Related items pattern options. Will only be used if allowPathSelection is true.

but the selectableTypes is not documented here but here: mockup/src/pat/relateditems at master · plone/mockup · GitHub . Also we can read:
"Related items pattern options. Will only be used if allowPathSelection is true."
but in the pattern config allowPathSelection is undefined.

It is not clear to me what is the real meaning of selectableTypes.