- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2014 12:56 PM
Question for the community, to make sure it's not a known error or something. Also looking for brainstorming for workarounds.
When I created a simple CMS page to kick the tires, I created a dynamic block, and used the editor to attach a PNG and a JPG file in the block.
When I save and publish the CMS page, and then load it, the images will only display for me when I'm logged in as an admin user. Non-admin users just show me broken-image icons and alt-text in place of the attached file.
Any idea what might be happening here?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2014 08:20 AM
Yeah, checking the read ACL for sys_attachment shows a conditional script that I want to puzzle through at some point. But in the meantime, adding static content block to the exception list (next to the live-feed exception since they seem comparable to me) seemed wise:
// If the attachment is from live feed, or the static content block of CMS
// grant it the read access
if (current.table_name == 'live_profile')
return true;
if (current.table_name == 'content_block_static')
return true;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2014 07:37 AM
I have never used a attachment in a image tag , so I am not really sure ... Can you create a read acl on the attachment table and see if that solves the issue ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2014 08:20 AM
Yeah, checking the read ACL for sys_attachment shows a conditional script that I want to puzzle through at some point. But in the meantime, adding static content block to the exception list (next to the live-feed exception since they seem comparable to me) seemed wise:
// If the attachment is from live feed, or the static content block of CMS
// grant it the read access
if (current.table_name == 'live_profile')
return true;
if (current.table_name == 'content_block_static')
return true;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2014 08:18 AM
Hi Peter,
We have set an ACL on the sys_attachment table which does allow the users to access the images.
or
You can reload the image into Content Management > Images, this would then give the img tags like the ones used in lines 10-12 of your script.
Karl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2014 08:43 AM
Thanks Karl,
I suppose I wonder why they allow attachment as an option for uploading a new image for CMS, and what features it would support differently from adding the image to the image library. I don't see that documented in the wiki. Any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2014 08:54 AM
The only difference I can think of is the sys_attachment table can administered through System Properties > Security ( to restrict attachment types, size etc) but the same rules are not applied to the library images.
Karl