Bug 6780

Summary: html galley views and xml galley plug-in
Product: OJS Reporter: Bozana Bokan <bozana.bokan>
Component: Plug-insAssignee: James MacGregor <jmacgreg>
Status: NEW ---    
Severity: normal CC: alec, armin.guenther, jmacgreg, pkp-support
Priority: P3    
Version: 2.4.x   
Hardware: All   
OS: All   
Version Reported In: Also Affects:

Description Bozana Bokan 2011-07-18 03:27:53 PDT
If the XML galley plug-in is enabled, the HTML galley views cannot be counted/updated/incremented.

The hook 'ArticleGalleyDAO::incrementGalleyViews' is called in the XML galley plug-in. Somehow, the function 'incrementXMLViews' in the class 'ArticleXMLGalleyDAO' always returns true, also if the 'galleyId' isn't in the table 'article_xml_galleys', i.e. also if it's an HTML and not XML galley.

Because XML galleys are also in the table 'article_galleys' and because the column 'views' is in the both tables, 'article_galleys' and 'article_xml_galleys', I suppose the views should be counted/updated/increased in both tables? Then, the code of the function 'incrementXMLViews' should maybe be like this:
$this->update(...
return false;


And something else:
The column 'label' is also in both tables, but the values are different: the label in the table 'article_galleys' is 'XML' (from the galley edit field) but in the table 'article_xml_galleys' it is 'XHTML'. Maybe it should be like this, I just wanted to be on the safe side...

Thanks!
Comment 1 Alec Smecher 2011-07-18 09:31:03 PDT
Bozana, are you folks using the XML plugin? It's known to be partially broken and does need some attention. I can point you to that part of the code if it's important.
Comment 2 Bozana Bokan 2011-07-19 01:20:08 PDT
No, actually we are not using the plugin at the moment. A jounal enabled it for some reason and noticed the views problem. They disabled it now. Maybe they are planing to use it -- I will ask...
Thanks!
Comment 3 Armin G√ľnther 2011-09-09 00:26:21 PDT
(In reply to comment #1)
> Bozana, are you folks using the XML plugin? It's known to be partially broken
> and does need some attention. I can point you to that part of the code if it's
> important.

Hm, interesting. We (ZPID, Trier) want to implement an XML => (HTML, PDF) workflow and started testing XML Galley recently. The first tests converting XML to HTML looked promising (in converting XML to PDF we did not succeed until now but just started testing). It's somewhat disappointing to learn that XML Galley is buggy.
Comment 4 Alec Smecher 2011-09-09 13:47:35 PDT
Armin, the current limitations of the plugin are described in plugins/generic/xmlGalley/ArticleXMLGalleyDAO.inc.php (look around line 180). The current code should work for a single derived galley (XHTML) but not multiple galleys (XHTML + PDF). This has been a known issue for some time, but we unfortunately haven't been able to prioritize it as it's not a widely used plugin. We would welcome any time you're able to put into it.
Comment 5 James MacGregor 2013-04-28 22:16:25 PDT
I've come across a few more reports of this being an issue. I can take a look and see if there's a quick fix.