Deleting Media items from inside the layout timeline editor does not work

Bug #335400 reported by Alex Harrington on 2009-02-27
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Dan Garner

Bug Description

Deleting Media items from inside the layout timeline editor does not work. Unassigning fine.

Steps to reproduce.

* Create new layout.
* Add Region
* Double-click new region
* Add Image (upload a new file)
* Back on the timeline view, click "Delete"
* Choose "Delete this media" from the options
* Click "Yes".

Error message displayed "Database error deleting this media record".

From the log:
<errormsg>The query [DELETE FROM media WHERE mediaid = 6 ] failed to execute<br />MySQL error: Cannot delete or update a parent row: a foreign key constraint fails (`xibo_1/lklayoutmedia`, CONSTRAINT `lklayoutmedia_ibfk_1` FOREIGN KEY (`mediaID`) REFERENCES `media` (`mediaID`))</errormsg>
<errortype>User Notice</errortype>

If I choose "Unassign from this region only" -> Yes, then visit the library and delete the item there, it works fine.

Related branches

Changed in xibo:
importance: Undecided → Low
Dan Garner (dangarner) wrote :

OK - I can recreate this.

Seems to be ignoring / missing a call to unassign the media before deleting. I will check this out.

Dan Garner (dangarner) wrote :

Will fix for RC2

Changed in xibo:
assignee: nobody → dangarner
milestone: none → 1.0.0-rc2
status: New → Confirmed
Dan Garner (dangarner) on 2009-02-27
Changed in xibo:
status: Confirmed → Fix Committed
Changed in xibo:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers