{"action":"created","issue":{"url":"https://api.github.com/repos/textpattern/textpattern/issues/771","repository_url":"https://api.github.com/repos/textpattern/textpattern","labels_url":"https://api.github.com/repos/textpattern/textpattern/issues/771/labels{/name}","comments_url":"https://api.github.com/repos/textpattern/textpattern/issues/771/comments","events_url":"https://api.github.com/repos/textpattern/textpattern/issues/771/events","html_url":"https://github.com/textpattern/textpattern/issues/771","id":178640263,"number":771,"title":"txp:if_article_image Returns True on Category Page/View","user":{"login":"craigerskine","id":56437,"avatar_url":"https://avatars.githubusercontent.com/u/56437?v=3","gravatar_id":"","url":"https://api.github.com/users/craigerskine","html_url":"https://github.com/craigerskine","followers_url":"https://api.github.com/users/craigerskine/followers","following_url":"https://api.github.com/users/craigerskine/following{/other_user}","gists_url":"https://api.github.com/users/craigerskine/gists{/gist_id}","starred_url":"https://api.github.com/users/craigerskine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigerskine/subscriptions","organizations_url":"https://api.github.com/users/craigerskine/orgs","repos_url":"https://api.github.com/users/craigerskine/repos","events_url":"https://api.github.com/users/craigerskine/events{/privacy}","received_events_url":"https://api.github.com/users/craigerskine/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-22T15:21:52Z","updated_at":"2016-09-22T19:48:22Z","closed_at":null,"body":"On pre 4.6.0 sites <txp:if_article_image> only returned true on a page/view where there was an article image present... so individual_article pages... which makes sense.\r\n\r\n4.6.0 now returns every article image when in a category view... which IMO it should not.\r\n\r\nI have a site where a mast background image shows on individual article pages but on category pages it shows a default image. I used to just do this via a simple form call once in my page:\r\n\r\n    <txp:if_article_image>\r\n      <txp:variable name=\"mast-img\">/i/f1200x460/images/\r\n        <txp:images>\r\n          <txp:image_info type=\"id\" />\r\n          <txp:image_info type=\"ext\" />\r\n        </txp:images>\r\n      </txp:variable>\r\n      <txp:else />\r\n      <txp:variable name=\"mast-img\">/i/f1200x460/img/placeholder.jpg</txp:variable>\r\n    </txp:if_article_image>\r\n  <txp:variable name=\"mast-img\" />\r\n\r\nNow I have to do this or rewrite my entire page logic:\r\n\r\n    <txp:if_individual_article>\r\n      <txp:if_article_image>\r\n        <txp:variable name=\"mast-img\">/i/f1200x460/images/\r\n          <txp:images>\r\n            <txp:image_info type=\"id\" />\r\n            <txp:image_info type=\"ext\" />\r\n          </txp:images>\r\n        </txp:variable>\r\n        <txp:else />\r\n        <txp:variable name=\"mast-img\">/i/f1200x460/img/placeholder.jpg</txp:variable>\r\n      </txp:if_article_image>\r\n      <txp:else />\r\n      <txp:variable name=\"mast-img\">/i/f1200x460/img/placeholder.jpg</txp:variable>\r\n    </txp:if_individual_article>\r\n    <txp:variable name=\"mast-img\" />\r\n\r\nIs the new functionality of if_article_image tag a feature or a bug? I do not see anything in the 4.6.0 release notes talking about changes to the functionality of if_article_image. Or maybe now category views have changed? Or is there something else going on?"},"comment":{"url":"https://api.github.com/repos/textpattern/textpattern/issues/comments/249008741","html_url":"https://github.com/textpattern/textpattern/issues/771#issuecomment-249008741","issue_url":"https://api.github.com/repos/textpattern/textpattern/issues/771","id":249008741,"user":{"login":"bloatware","id":11578435,"avatar_url":"https://avatars.githubusercontent.com/u/11578435?v=3","gravatar_id":"","url":"https://api.github.com/users/bloatware","html_url":"https://github.com/bloatware","followers_url":"https://api.github.com/users/bloatware/followers","following_url":"https://api.github.com/users/bloatware/following{/other_user}","gists_url":"https://api.github.com/users/bloatware/gists{/gist_id}","starred_url":"https://api.github.com/users/bloatware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bloatware/subscriptions","organizations_url":"https://api.github.com/users/bloatware/orgs","repos_url":"https://api.github.com/users/bloatware/repos","events_url":"https://api.github.com/users/bloatware/events{/privacy}","received_events_url":"https://api.github.com/users/bloatware/received_events","type":"User","site_admin":false},"created_at":"2016-09-22T19:48:22Z","updated_at":"2016-09-22T19:48:22Z","body":"Thank you for the report. Sorry, my bad, it's a bug that will be patched in 4.6.1. As temporary fix you can edit `textpattern/publish/taghandlers.php` file, replacing\r\n```\r\n    return parse($thing, $thisarticle['article_image']);\r\n```\r\nwith\r\n```\r\n    return parse($thing, !empty($thisarticle['article_image']));\r\n```\r\non line 3137."}}
{"actor":{"display_login":"bloatware"}}