{"action":"created","issue":{"url":"https://api.github.com/repos/plone/plone.app.contenttypes/issues/357","repository_url":"https://api.github.com/repos/plone/plone.app.contenttypes","labels_url":"https://api.github.com/repos/plone/plone.app.contenttypes/issues/357/labels{/name}","comments_url":"https://api.github.com/repos/plone/plone.app.contenttypes/issues/357/comments","events_url":"https://api.github.com/repos/plone/plone.app.contenttypes/issues/357/events","html_url":"https://github.com/plone/plone.app.contenttypes/issues/357","id":165163970,"number":357,"title":"raw vs. output value/mimetype mismatch in SearchableText indexer","user":{"login":"petri","id":64672,"avatar_url":"https://avatars.githubusercontent.com/u/64672?v=3","gravatar_id":"","url":"https://api.github.com/users/petri","html_url":"https://github.com/petri","followers_url":"https://api.github.com/users/petri/followers","following_url":"https://api.github.com/users/petri/following{/other_user}","gists_url":"https://api.github.com/users/petri/gists{/gist_id}","starred_url":"https://api.github.com/users/petri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petri/subscriptions","organizations_url":"https://api.github.com/users/petri/orgs","repos_url":"https://api.github.com/users/petri/repos","events_url":"https://api.github.com/users/petri/events{/privacy}","received_events_url":"https://api.github.com/users/petri/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/plone/plone.app.contenttypes/labels/01%20type:%20bug","name":"01 type: bug","color":"fa0000"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-12T19:47:49Z","updated_at":"2016-07-17T08:11:20Z","closed_at":null,"body":"The [SearchableText indexer](https://github.com/plone/plone.app.contenttypes/blob/1.1.x/plone/app/contenttypes/indexers.py#L44-L48) converts a plone.app.textfield RichTextValue to plaintext.\r\n\r\nNow, the plone.app.textfield rich text value has separate properties for getting both raw and output value, as well as their mime types ([see source](https://github.com/plone/plone.app.textfield/blob/master/plone/app/textfield/value.py#L78-L106)).\r\n\r\nHowever SearchableText seems confused: it passes the `.output` property together with the mime type of the original non-transformed `.raw` property, as parameters to the transform. In other words, the passed value and the (presumably) associated mime type do not match. This does not make sense to me.\r\n\r\nInstead, either the `.raw` value should be passed with its mime type (`mimeType`), or the `.output` value with its mime type (`.outputMimeType`). \r\n\r\nI assume the latter is what SearchableText means to do. So to fix the confusion, the mimetype kwarg passed to the transform tool should be textvalue.outputMimeType, not textvalue.mimeType.\r\n"},"comment":{"url":"https://api.github.com/repos/plone/plone.app.contenttypes/issues/comments/233170714","html_url":"https://github.com/plone/plone.app.contenttypes/issues/357#issuecomment-233170714","issue_url":"https://api.github.com/repos/plone/plone.app.contenttypes/issues/357","id":233170714,"user":{"login":"pbauer","id":453208,"avatar_url":"https://avatars.githubusercontent.com/u/453208?v=3","gravatar_id":"","url":"https://api.github.com/users/pbauer","html_url":"https://github.com/pbauer","followers_url":"https://api.github.com/users/pbauer/followers","following_url":"https://api.github.com/users/pbauer/following{/other_user}","gists_url":"https://api.github.com/users/pbauer/gists{/gist_id}","starred_url":"https://api.github.com/users/pbauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbauer/subscriptions","organizations_url":"https://api.github.com/users/pbauer/orgs","repos_url":"https://api.github.com/users/pbauer/repos","events_url":"https://api.github.com/users/pbauer/events{/privacy}","received_events_url":"https://api.github.com/users/pbauer/received_events","type":"User","site_admin":false},"created_at":"2016-07-17T08:11:20Z","updated_at":"2016-07-17T08:11:20Z","body":"I agree. @petri can you make a pull-request that fixes this for master and 1.1.x?"}}
{"actor":{"display_login":"pbauer"}}