[MAGNOLIA-618] Binary/image data not removed from repository ... Created: 11/Jan/06  Updated: 16/May/06  Resolved: 16/May/06

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 3.0 Beta 1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Andreas Assignee: Sameer Charles
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mac OS X 10.3.9
Java version "1.4.2_09"


Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

The following code does not work properly for me. Therefor I am wondering if some of you can reproduce the behavoir described
in the steps 1-5 below. Maybe it's a bug ...

<div id="teaser">
<cms:ifNotExisting contentNodeName="productTeaser">
<cms:editButton label="Add Product Image" paragraph="samplesTextImage" contentNodeName="productTeaser" />
</cms:ifNotExisting>
<cms:ifExisting contentNodeName="productTeaser">
<cms:editBar deleteLabel="Delete Teaser" contentNodeName="productTeaser" paragraph="samplesTextImage" />
<c:set var="imageurl"><cms:out contentNodeName="productTeaser" nodeDataName="image" /></c:set>
<c:set var="alt"><cms:out nodeDataName="imageAlt" contentNodeName="productTeaser" /></c:set>
<c:if test="${alt == ''}">
<img src="${pageContext.request.contextPath}${imageurl}" alt="${imageurl}" />
</c:if>
<c:if test="${alt != ''}">
<img src="${pageContext.request.contextPath}${imageurl}" alt="${alt}" />
</c:if>
</cms:ifExisting>
</div>

1. Hitting the button "Add Product Image" produces the following log entry:
"13:22:11,003 WARN [Store] Looking for a dialog using the paragraph name
instead of the dialog name.
Dialog path changed to samples/mainColumn/textImage. Please fix me!"

2. Adding img to the content: no problem.
A new entry in repositories/website/workspaces/default/blobs get created

3. Deleting the image "Delete Teaser"-button:
Hitting the "Delete Teaser"-button will remove the img and display the
"Add Product Image"-button again.
But the blob still exists in the repository! Shouldn't it get removed as well?

4. Repeat step 2.

5. Deleting the image "Edit"-button:
Hitting the "Edit"-button will produce the same log entry as for step 1.
Hitting the Image tag and hitting the "Remove file"-button and saving afterwards
does not give me the same result step 3.
<cms:ifExisting contentNodeName="productTeaser"> gets evaluated as true and therefor
<cms:editBar deleteLabel="Delete Teaser" ...
still gets displayed on the page. So there is something wrong her.
The previous "partial" deleted image will obviously produce silly code for the public page
<div id="teaser"><img alt="" src="/magnolia22"/></div> as the needed date got deleted bevor.
And again - the blob still exists in the repository!

This is for Version: 2.2-SNAPSHOT
Build: $Revision: 1404

Regards

  • Andreas


 Comments   
Comment by Sameer Charles [ 11/Jan/06 ]

Not sure if its a problem in persistence manager impl, could you please check save control to make sure there is nothing wrong there. and also the source for this warning
"...using the paragraph nameĀ instead of the dialog name.....Please fix me!"

Comment by Sameer Charles [ 11/Jan/06 ]

Ok, I had a quick look at berkeley db persistence manager and its a bug there. blobs are maintained using a FileSystem implementation and remove call for binary is simply missing
for future versions of magnolia we will be using Derby embedded db, for me it wont make sence to spend time on berkeley impl since jackrabbit also moved to derby as a default implementation.

Generated at Mon Feb 12 03:19:13 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.