OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



XML Galley Plugin not working

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

XML Galley Plugin not working

Postby MMeijer » Wed Dec 11, 2013 5:00 am

Hi folks,
After upgrading from OJS 2.3.8 to 2.4.2, the XML Galley plugin doesn't perform its XSL translation job anymore.
It just renders the original (pubmed) xml content instead.

- I've tried the built-in NLM XLS stylesheet, as well as our own custom XSL, but that doesn't make any difference.
- I changed the galley label from 'html' to 'xhtml', 'XML', etc. => nope.
- I upgraded to OJS 2.4.3 => nope.
- I tried to downgrade the XML plugin back to 2.3.8 but there have been too much (database) changes since.

I noticed that when the XML plugin is enabled, the php_error.log gets a
NOTICE: Undefined index: remote_url (/export1/webroot/ojscom/docs/ojs2/classes/article/ArticleGalleyDAO.inc.php:284)
for each article/xml-galley on an issue index page. May be this is related to the problem.

Any suggestions welcome!

Regards,
Maarten
MMeijer
 
Posts: 36
Joined: Fri Nov 10, 2006 3:25 am
Location: Utrecht

Re: XML Galley Plugin not working

Postby lskibinski » Thu Dec 12, 2013 6:09 am

Hi there, I can't speak for your specific problem, but after much angst I got XML transformations happening in OJS 2.4.1. I do believe we sent the patches off to OJS but can't find anything to that effect ...

I can't give you access to our repository for the modified version of OJS we use because it contains all of our journal configuration (which I'm busy separating so I can release our changes as per the GPL), but I've attached the modified xmlGalley plugin we are using.

Some notes:
* It's a customized version of the 2.4.1 version and not the 2.4.2 you are using
* the xmlGalley plugin felt like it had been neglected for a long time when I found it.
* you will need to add a new entry to your config "xml_transformation_cache" under the "cache" heading. I have this set to true for production environments, false in testing/dev environments.
* you will need to point "nlm-xhtml.xsl" in the "transform/nlm/" dir of the plugin to your xsl stylesheet. And by 'point' I mean a symlink, which might be foreign to you if you don't run *nix. I'm not entirely sure what I've done here, but I seem to have it pointing to our customized xsl (not included). you could totally point it to the one that comes with ojs (which I've renamed "ojs-nlm-xhtml.xsl").
* the plugin also fixed another bug where view counts were not being counted because it would hit the xml galley detector first, get handled there and then skip being incremented because the plugin returned true or something to that effect.

Hope this is a little useful.

Now - I don't suppose you know anything about this bug (which is how I found yours ;-) ??
[12-Dec-2013 12:23:53 UTC] PHP Fatal error: main(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "ArticleXMLGalley" of the object you are trying to operate on
was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in /var/www/vhosts/foojournal/httpdocs/cache/t_compile/%%28^280^280EE005%%dublincore.tpl.php on line 67

Regards,

Luke Skibinski
Ubiquity Press
Attachments
xmlGalley.tar.gz
(70.1 KiB) Downloaded 15 times
lskibinski
 
Posts: 11
Joined: Mon Mar 11, 2013 10:15 am

Re: XML Galley Plugin not working

Postby MMeijer » Thu Dec 12, 2013 7:34 am

Hi Luke,
Thanks! I installed your version of xmlGalley into the 2.4.2 OJS installation, and it works right away.
I used the regular plugin's interface to point to our custom xsl-sheet - so it seems there is no need for a symbolic link or any other changes of the original transform/nlm directory.

About the bug at your side: did you start a new topic for that?
I could have a look, but you didn't provide the context about when this error occurs ...

Well, anyway, thanks again!
Regards,
Maarten
MMeijer
 
Posts: 36
Joined: Fri Nov 10, 2006 3:25 am
Location: Utrecht

Re: XML Galley Plugin not working

Postby lskibinski » Thu Dec 12, 2013 8:45 am

Glad it 'just worked' ;)

As for that other problem I already have a solution up and deployed:

in "classes/article/ArticleGalleyDAO.inc.php":

import('classes.article.ArticleGalley');
import('classes.article.ArticleHTMLGalley');

was replaced with:

import('classes.article.ArticleGalley');
import('plugins.generic.xmlGalley.ArticleXMLGalley');
import('classes.article.ArticleHTMLGalley');

Not sure how proper/idiomatic it is but the problem was something (dublincore.tpl.php) accessing the attributes of a deserialised instance of ArticleXMLGalley (I was testing caching) and that class definition had not been loaded. Now I import the class at the same time the regular ArticleGalley gets imported. I should probably check to see if the plugin is enabled/exists yadda yadda but this hack works well enough. How OJS handles the loading of plugin classes with caching turned on is something I don't have time to delve into right now.
lskibinski
 
Posts: 11
Joined: Mon Mar 11, 2013 10:15 am

Re: XML Galley Plugin not working

Postby asmecher » Thu Dec 12, 2013 8:48 am

Hi Luke/Maarten,

Glad to see you folks hacking on this. I don't remember a pull request coming in for this, but I may well have lost it -- my inbox is precarious at the moment. If you like, send us a pull request and I'll review the changes there; this would be a nice thing to include in future releases. I'll also take a look at that message you quote.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Re: XML Galley Plugin not working

Postby lskibinski » Thu Dec 12, 2013 9:00 am

> I'll also take a look at that message you quote.

Problem found, you might want to investigate a better solution.
lskibinski
 
Posts: 11
Joined: Mon Mar 11, 2013 10:15 am


Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 3 guests