{"action":"created","issue":{"url":"https://api.github.com/repos/4teamwork/ftw.file/issues/41","labels_url":"https://api.github.com/repos/4teamwork/ftw.file/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/4teamwork/ftw.file/issues/41/comments","events_url":"https://api.github.com/repos/4teamwork/ftw.file/issues/41/events","html_url":"https://github.com/4teamwork/ftw.file/pull/41","id":73238694,"number":41,"title":"Use ftw.file images in TinyMCE","user":{"login":"shylux","id":1375745,"avatar_url":"https://avatars.githubusercontent.com/u/1375745?v=3","gravatar_id":"","url":"https://api.github.com/users/shylux","html_url":"https://github.com/shylux","followers_url":"https://api.github.com/users/shylux/followers","following_url":"https://api.github.com/users/shylux/following{/other_user}","gists_url":"https://api.github.com/users/shylux/gists{/gist_id}","starred_url":"https://api.github.com/users/shylux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shylux/subscriptions","organizations_url":"https://api.github.com/users/shylux/orgs","repos_url":"https://api.github.com/users/shylux/repos","events_url":"https://api.github.com/users/shylux/events{/privacy}","received_events_url":"https://api.github.com/users/shylux/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"shylux","id":1375745,"avatar_url":"https://avatars.githubusercontent.com/u/1375745?v=3","gravatar_id":"","url":"https://api.github.com/users/shylux","html_url":"https://github.com/shylux","followers_url":"https://api.github.com/users/shylux/followers","following_url":"https://api.github.com/users/shylux/following{/other_user}","gists_url":"https://api.github.com/users/shylux/gists{/gist_id}","starred_url":"https://api.github.com/users/shylux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shylux/subscriptions","organizations_url":"https://api.github.com/users/shylux/orgs","repos_url":"https://api.github.com/users/shylux/repos","events_url":"https://api.github.com/users/shylux/events{/privacy}","received_events_url":"https://api.github.com/users/shylux/received_events","type":"User","site_admin":false},"milestone":null,"comments":20,"created_at":"2015-05-05T07:42:45Z","updated_at":"2015-07-14T11:42:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/4teamwork/ftw.file/pulls/41","html_url":"https://github.com/4teamwork/ftw.file/pull/41","diff_url":"https://github.com/4teamwork/ftw.file/pull/41.diff","patch_url":"https://github.com/4teamwork/ftw.file/pull/41.patch"},"body":"`ftw.file` supports images and we want to use this feature to eliminate the `Image` type. This PR aims to integrate `ftw.file` with TinyMCE.\r\n\r\nFirst the link of the image didn't work. `Image` used the default view to return the img data. This has been changed to `/@@images/image` with a custom `JSONDetails`.\r\n\r\nSince we can now upload `ftw.file` it is also possible to upload non-images. We can't prevent that atm. My first try will be to filter out all non-images. This is not a trivial task since TinyMCE generates a json directly. I will have to modify it afterwards.\r\n\r\n# Issues\r\n - Can't upload an image while creating the container (e.g. Traktandum). It works if i save the container first and then edit it to add an image.\r\n - **General:** The default view of a plone `Image` is the image itself (mimetype `image/*`. And alot of packages use that to render a picture.  \r\n`MeetingItem` also seems to edit the html generated by TinyMCE. It deletes the `@@images/image` extension i add. Not quite sure why.. Maybe some safe html stuff? "},"comment":{"url":"https://api.github.com/repos/4teamwork/ftw.file/issues/comments/121212159","html_url":"https://github.com/4teamwork/ftw.file/pull/41#issuecomment-121212159","issue_url":"https://api.github.com/repos/4teamwork/ftw.file/issues/41","id":121212159,"user":{"login":"Tschanzt","id":358342,"avatar_url":"https://avatars.githubusercontent.com/u/358342?v=3","gravatar_id":"","url":"https://api.github.com/users/Tschanzt","html_url":"https://github.com/Tschanzt","followers_url":"https://api.github.com/users/Tschanzt/followers","following_url":"https://api.github.com/users/Tschanzt/following{/other_user}","gists_url":"https://api.github.com/users/Tschanzt/gists{/gist_id}","starred_url":"https://api.github.com/users/Tschanzt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tschanzt/subscriptions","organizations_url":"https://api.github.com/users/Tschanzt/orgs","repos_url":"https://api.github.com/users/Tschanzt/repos","events_url":"https://api.github.com/users/Tschanzt/events{/privacy}","received_events_url":"https://api.github.com/users/Tschanzt/received_events","type":"User","site_admin":false},"created_at":"2015-07-14T11:42:22Z","updated_at":"2015-07-14T11:42:22Z","body":"@shylux With default plone and your branch I get an error when viewing the inline image.\r\nModule ZPublisher.Publish, line 138, in publish\r\nModule ZPublisher.mapply, line 77, in mapply\r\nModule ZPublisher.Publish, line 48, in call_object\r\nModule Shared.DC.Scripts.Bindings, line 322, in __call__\r\nModule Shared.DC.Scripts.Bindings, line 359, in _bindAndExec\r\nModule Products.CMFCore.FSPageTemplate, line 237, in _exec\r\nModule Products.CMFCore.FSPageTemplate, line 177, in pt_render\r\nModule Products.PageTemplates.PageTemplate, line 79, in pt_render\r\nModule zope.pagetemplate.pagetemplate, line 132, in pt_render\r\nModule zope.pagetemplate.pagetemplate, line 240, in __call__\r\nModule zope.tal.talinterpreter, line 271, in __call__\r\nModule zope.tal.talinterpreter, line 343, in interpret\r\nModule zope.tal.talinterpreter, line 888, in do_useMacro\r\nModule zope.tal.talinterpreter, line 343, in interpret\r\nModule zope.tal.talinterpreter, line 533, in do_optTag_tal\r\nModule zope.tal.talinterpreter, line 518, in do_optTag\r\nModule zope.tal.talinterpreter, line 513, in no_tag\r\nModule zope.tal.talinterpreter, line 343, in interpret\r\nModule zope.tal.talinterpreter, line 954, in do_defineSlot\r\nModule zope.tal.talinterpreter, line 343, in interpret\r\nModule zope.tal.talinterpreter, line 533, in do_optTag_tal\r\nModule zope.tal.talinterpreter, line 518, in do_optTag\r\nModule zope.tal.talinterpreter, line 513, in no_tag\r\nModule zope.tal.talinterpreter, line 343, in interpret\r\nModule zope.tal.talinterpreter, line 858, in do_defineMacro\r\nModule zope.tal.talinterpreter, line 343, in interpret\r\nModule zope.tal.talinterpreter, line 954, in do_defineSlot\r\nModule zope.tal.talinterpreter, line 343, in interpret\r\nModule zope.tal.talinterpreter, line 533, in do_optTag_tal\r\nModule zope.tal.talinterpreter, line 518, in do_optTag\r\nModule zope.tal.talinterpreter, line 513, in no_tag\r\nModule zope.tal.talinterpreter, line 343, in interpret\r\nModule zope.tal.talinterpreter, line 954, in do_defineSlot\r\nModule zope.tal.talinterpreter, line 343, in interpret\r\nModule zope.tal.talinterpreter, line 533, in do_optTag_tal\r\nModule zope.tal.talinterpreter, line 518, in do_optTag\r\nModule zope.tal.talinterpreter, line 513, in no_tag\r\nModule zope.tal.talinterpreter, line 343, in interpret\r\nModule zope.tal.talinterpreter, line 946, in do_defineSlot\r\nModule zope.tal.talinterpreter, line 343, in interpret\r\nModule zope.tal.talinterpreter, line 533, in do_optTag_tal\r\nModule zope.tal.talinterpreter, line 518, in do_optTag\r\nModule zope.tal.talinterpreter, line 513, in no_tag\r\nModule zope.tal.talinterpreter, line 343, in interpret\r\nModule zope.tal.talinterpreter, line 858, in do_defineMacro\r\nModule zope.tal.talinterpreter, line 343, in interpret\r\nModule zope.tal.talinterpreter, line 533, in do_optTag_tal\r\nModule zope.tal.talinterpreter, line 518, in do_optTag\r\nModule zope.tal.talinterpreter, line 513, in no_tag\r\nModule zope.tal.talinterpreter, line 343, in interpret\r\nModule zope.tal.talinterpreter, line 888, in do_useMacro\r\nModule zope.tal.talinterpreter, line 343, in interpret\r\nModule zope.tal.talinterpreter, line 533, in do_optTag_tal\r\nModule zope.tal.talinterpreter, line 518, in do_optTag\r\nModule zope.tal.talinterpreter, line 513, in no_tag\r\nModule zope.tal.talinterpreter, line 343, in interpret\r\nModule zope.tal.talinterpreter, line 858, in do_defineMacro\r\nModule zope.tal.talinterpreter, line 343, in interpret\r\nModule zope.tal.talinterpreter, line 954, in do_defineSlot\r\nModule zope.tal.talinterpreter, line 343, in interpret\r\nModule zope.tal.talinterpreter, line 852, in do_condition\r\nModule zope.tal.talinterpreter, line 343, in interpret\r\nModule zope.tal.talinterpreter, line 531, in do_optTag_tal\r\nModule zope.tal.talinterpreter, line 513, in no_tag\r\nModule zope.tal.talinterpreter, line 343, in interpret\r\nModule zope.tal.talinterpreter, line 742, in do_insertStructure_tal\r\nModule Products.PageTemplates.Expressions, line 218, in evaluateStructure\r\nModule zope.tales.tales, line 696, in evaluate\r\nURL: file:/Users/tschanzt/projects/ftw.file/eggs/Products.Archetypes-1.9.10-py2.7.egg/Products/Archetypes/skins/archetypes/widgets/rich.pt\r\nLine 21, Column 12\r\nExpression: <PathExpr standard:u'accessor'>\r\nNames:\r\n{'container': <PloneSite at /platform>,\r\n 'context': <ATDocument at /platform/ae-ordner/aslfsdklk>,\r\n 'default': <object object at 0x103387bf0>,\r\n 'here': <ATDocument at /platform/ae-ordner/aslfsdklk>,\r\n 'loop': {},\r\n 'nothing': None,\r\n 'options': {'args': ()},\r\n 'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x10b62dd08>,\r\n 'request': <HTTPRequest, URL=http://localhost:8080/platform/ae-ordner/aslfsdklk/document_view>,\r\n 'root': <Application at >,\r\n 'template': <FSPageTemplate at /platform/document_view used for /platform/ae-ordner/aslfsdklk>,\r\n 'traverse_subpath': [],\r\n 'user': <PropertiedUser 'admin'>}\r\nModule zope.tales.expressions, line 217, in __call__\r\nModule Products.PageTemplates.Expressions, line 155, in _eval\r\nModule Products.PageTemplates.Expressions, line 117, in render\r\nModule Products.Archetypes.ClassGen, line 56, in generatedAccessor\r\nModule wicked.fieldevent, line 29, in render\r\nModule zope.event, line 31, in notify\r\nModule zope.component.event, line 24, in dispatch\r\nModule zope.component._api, line 136, in subscribers\r\nModule zope.component.registry, line 321, in subscribers\r\nModule zope.interface.adapter, line 585, in subscribers\r\nModule wicked.fieldevent, line 16, in notifyFieldEvent\r\nModule zope.component._api, line 107, in getMultiAdapter\r\nModule zope.component._api, line 120, in queryMultiAdapter\r\nModule zope.component.registry, line 238, in queryMultiAdapter\r\nModule zope.interface.adapter, line 532, in queryMultiAdapter\r\nModule wicked.fieldevent.meta, line 78, in field_value\r\nModule Products.Archetypes.Field, line 1505, in get\r\nModule Products.Archetypes.BaseUnit, line 103, in transform\r\nModule Products.PortalTransforms.TransformEngine, line 173, in convertTo\r\nModule Products.PortalTransforms.chain, line 54, in convert\r\nModule Products.PortalTransforms.Transform, line 198, in convert\r\nModule plone.outputfilters.transforms.html_to_plone_outputfilters_html, line 47, in convert\r\nModule plone.outputfilters, line 6, in apply_filters\r\nModule plone.outputfilters.filters.resolveuid_and_caption, line 120, in __call__\r\nModule sgmllib, line 104, in feed\r\nModule sgmllib, line 138, in goahead\r\nModule sgmllib, line 296, in parse_starttag\r\nModule sgmllib, line 338, in finish_starttag\r\nModule plone.outputfilters.filters.resolveuid_and_caption, line 351, in unknown_starttag\r\nModule ftw.file.custom_outputfilter, line 9, in resolve_image\r\nAttributeError: 'NoneType' object has no attribute 'absolute_url'\r\n\r\nCan you reproduce this?\r\n/cc @jone "}}