PKP Bugzilla – Bug 6780
html galley views and xml galley plug-in
Last modified: 2013-04-28 22:16:25 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:
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...
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.
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...
(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
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.
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.
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.