MantisBT - ATutor
View Issue Details
0004553ATutorExport Contentpublic2010-09-30 07:182010-12-20 10:18
harris 
harris 
normalminoralways
closedfixed 
 
2.0.2 
SVN
0004553: AccessForAll export error: Invalid argument supplied for foreach() in A4aExport.class.php line 108
To reproduce
Create content->attach image -> attach a4a -> save
edit content -> remove image -> save
edit content -> add another image with another file name -> save
A4a export -> fail

Tables don't get cleaned up when we remove content medias. AccessForAll tables still hold old entries and dumping out alternative files that are no longer there.

Suggested fix:
1. skip over files that are not there. but data will remained become zombies in table.
2. when content is save, check a4a files with the content media, if they no longer exist, delete all a4a entries.
No tags attached.
Issue History
2010-09-30 07:18harrisNew Issue
2010-09-30 07:18harrisAffects version => SVN
2010-09-30 14:37harrisStatusnew => resolved
2010-09-30 14:37harrisResolutionopen => fixed
2010-09-30 14:37harrisAssigned To => harris
2010-09-30 14:37harrisNote Added: 0004678
2010-10-01 07:15harrisStatusresolved => feedback
2010-10-01 07:15harrisResolutionfixed => reopened
2010-10-01 07:15harrisNote Added: 0004679
2010-10-01 10:26harrisNote Added: 0004680
2010-10-01 12:41cindyNote Added: 0004681
2010-10-04 10:03cindyNote Added: 0004686
2010-10-06 13:06harrisNote Added: 0004696
2010-12-17 13:35harrisStatusfeedback => resolved
2010-12-17 13:35harrisFixed in Version => 2.0.2
2010-12-17 13:35harrisResolutionreopened => fixed
2010-12-17 13:35harrisNote Added: 0004823
2010-12-20 10:18gregStatusresolved => closed

Notes
(0004678)
harris   
2010-09-30 14:37   
svn 10265

- added a deletePrimaryResource function in A4a.class.php. This function removes the given primary resource, and delete all its associated secondary resources
- changed alternative.inc.php. primary_resource table gets updated when the "Adapted Content" is pressed. Now added a codes to check and delete old primary resources.
(0004679)
harris   
2010-10-01 07:15   
that fix only applies when user click on the "adapted content". Problem remains if user edit content -> delete resource file -> save.
(0004680)
harris   
2010-10-01 10:26   
svn 10267
updated vitals, added convert_amp(input);
(0004681)
cindy   
2010-10-01 12:41   
SVN revision: 10274

1. fixed problem with "edit content -> delete resource file -> save"
2. always convert "&" to "&" when saving resources into a4a tables
3. when displaying alternatives, use converted content ("&" -> "&")

Affected:
include/lib/output.inc.php
mods/_core/editor/editor_tab_functions.inc.php
mods/_core/editor/editor_tabs/alternatives.inc.php
mods/_core/imsafa/classes/A4a.class.php
mods/_core/imsafa/html/resources_parser.inc.php
(0004686)
cindy   
2010-10-04 10:03   
SVN revision:10283

1. In output.inc.php, function provide_alternatives(), finds alternatives based on converted html for display, instead of the content with [media] embedded.
2. Removed mods/_core/imsafa/html/resources_parser.php, which is replaced by include/classes/ContentOutputParser.class.php

Modified scripts:
content.php
include/lib/output.inc.php
mods/_core/editor/editor_tab_functions.inc.php
mods/_core/editor/editor_tabs/alternatives.inc.php

Deleted:
mods/_core/imsafa/html/resources_parser.php
mods/_core/imsafa/html
(0004696)
harris   
2010-10-06 13:06   
svn 10304

- skip over primary resources if it doesn't have a type declared.
(0004823)
harris   
2010-12-17 13:35   
closing thread.