Bug 118986 - Images are not unpublished
Images are not unpublished
Status: CLOSED NOTABUG
Product: Red Hat Enterprise CMS
Classification: Retired
Component: other (Show other bugs)
nightly
All Linux
medium Severity medium
: ---
: ---
Assigned To: Justin Ross
Jon Orris
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-03-23 11:50 EST by Jon Orris
Modified: 2007-04-18 13:04 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-03-24 01:26:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jon Orris 2004-03-23 11:50:47 EST
Description of problem:
@41648/postgres

Images are not unpublished when their associated item is.

To reproduce:
Create an article
Add an image
publish the article
Unpublish the article

Result:
Live version of image remains in cms_items, publish_to_fs_files, and
on the filesystem.

rickshaw=# select * from publish_to_fs_files;
 id | host_id |              item_type               | draft_id |
item_id |                  file_name
----+---------+--------------------------------------+----------+---------+----------------------------------------------
  2 |      15 | com.arsdigita.cms.Template           |      250 |    
254 | /content/MultiPartArticle-mparticle-item.jsp
 16 |      15 | com.arsdigita.cms.ReusableImageAsset |     3020 |   
3029 | /Winter.jpg_3029.jpg
 23 |      15 | com.arsdigita.cms.ReusableImageAsset |     4025 |   
5011 | /Winter.jpg_5011.jpg
 47 |      15 | com.arsdigita.cms.ReusableImageAsset |     4121 |   
3097 | /tux.gif_3097.jpg
 52 |      15 | com.arsdigita.cms.ReusableImageAsset |     7003 |   
6042 | /sunset.jpg_6042.jpg
(5 rows)


rickshaw=# select * from cms_items where version='live';
 item_id | parent_id |              name               | type_id |
version | language | section_id | ancestors | master_id
---------+-----------+---------------------------------+---------+---------+----------+------------+-----------+-----------
     255 |           | templates                       |         |
live    |          |            | 255/      |        65
     254 |       255 | MultiPartArticle-mparticle-item |      55 |
live    |          |         66 | 255/254/  |       250
    3029 |           | Winter.jpg                      |         |
live    |          |            | 3029/     |      3020
    5011 |           | Winter.jpg                      |         |
live    |          |            | 5011/     |      4025
    3097 |           | tux.gif                         |         |
live    |          |            | 3097/     |      4121
    6042 |           | sunset.jpg                      |         |
live    |          |            | 6042/     |      7003
(6 rows)
Comment 1 Justin Ross 2004-03-24 01:26:53 EST
I'm not sure this is a bug.  The item that won't go away is the
reusable image asset.  The ArticleImageAssociation that connects it to
the published article *does* get properly unpublished.  Since the
ReusableImageAsset may be in use by some other article, I *think* it's
correct behavior for it to stick around.  But then, this is what I
dimly recall from a long time ago.  I stand prepared for correction.

The image end of ArticleImageAssociation looks like this:

    composite ReusableImageAsset[0..1] imageAsset =
       join cms_article_image_map.image_id
         to cms_images.image_id;
                                                                     
                                
Unpublishing (through item.setLive(null)) .delete()s the live version
of the article.  Said delete will not (and should not) reach the
"imageAsset" above.  So this is looking correct to me thus far.

Note You need to log in before you can comment on or make changes to this bug.