by junsky » Fri Oct 28, 2011 2:55 am
--Edit 25.09.2012 --
The current plugin has been attached in a post below.
-----
Hello everybody
I'm developping a Plugin for OJS (2.3.6) for my Master Thesis (TU Graz - Austria). It is a recommender system, one part of the recommendations is content based by computing the cosinus-distances between the abstract texts, the second part is done by tracing the user paths.
I used a Generic Plugin and started to build my plugin like the existing plugins in the generic folder.
Everything works fine on my tesing system (xampp, OJS (2.3.6) on windows) but on the live systems ( OJS (2.3.6), linux) there is some sort of strange behaviour.
If I activate my plugin, the download of pdf files is broken - the browser renders the content of the pdf-file directy instead of downloading it.
(The last line of the output displays an error:
Call to a member function getRouter() on a non-object in /home/zfhe/public_html/ojs-2.3.6/lib/pkp/classes/template/PKPTemplateManager.inc.php)
This happens even if I dont use any Hook.
The rest of the plugin works - the recommendations are displayed correctly under the article abstract, the hooks for downloading and viewing a file are called too (the user paths are written into the databse) only the download of a pdf file itself does not work anymore. (the viewing of a pdf file works)
I attached the plugin if someone wants to try it out (If the plugin is enabled the first time it fills its content-based database tables - depending on the amout of published articles this can take some time - 80 articles around 1min - 300articles ~8min)
I would be glad if you could take some time to try it out and see if the error occurs too in an other test system, or if someone has an idea where I made the mistake.
thank you
martin
--edit--
buggy plugin removed.
Last edited by
junsky on Tue Sep 25, 2012 5:23 am, edited 4 times in total.