We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

Bug 8404 - XML Galleys broken in upgrade from OJS 2.3.6 to 2.4.2
XML Galleys broken in upgrade from OJS 2.3.6 to 2.4.2
Product: OJS
Classification: Unclassified
Component: Plug-ins
All All
: P3 major
Assigned To: PKP Support
Depends on:
  Show dependency treegraph
Reported: 2013-08-22 13:35 PDT by Charles Parker
Modified: 2014-01-22 08:15 PST (History)
1 user (show)

See Also:
Version Reported In:
Also Affects:


Note You need to log in before you can comment on or make changes to this bug.
Description Charles Parker 2013-08-22 13:35:21 PDT
The XMLGalleyPluginDAO produces incorrect filenames to XML files.

OJS 2.4.2 produces:

The previous OJS version produced:


Checking the database to be certain of the file_stage:
mysql> SELECT file_stage FROM article_files WHERE article_id=3;

Adding some debugging in function fileStageToPath($fileStage) led me to find:
echo $fileStage;

Since these don't match, the default case is triggered:

default: return 'submission/original';

It turns out that there is a line missing from the following file:


In function _returnXMLGalleyFromArticleGalley(&$galley):

After the following line (important):
Add this line:

Without it, the fileStage is always hard-coded to 'public', when it should actually be an integer (7, in this case) inherited from the parent object type. This, in turn, causes fileStageToPath($fileStage) to produce an incorrect file path.

I might further suggest that the default case in fileStageToPath($fileStage) should produce an error, rather than happily creating a non-existent path.
Comment 1 Alec Smecher 2014-01-22 08:13:45 PST
Committed. Thanks for tracking this down, Charles; this plugin is not often used and suffers less than ideal maintenance.
Comment 2 Alec Smecher 2014-01-22 08:15:03 PST
Set file stage when fetching XML galley