OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Translator Plugin

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

Moderators: jmacgreg, michael, asmecher

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

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 OMP Discussion subforum; if you have a development question, try the OMP Development subforum.

Translator Plugin

Postby thanasis » Mon Oct 22, 2012 2:50 am

Hi all!
I activated the Translator Plugin on the plugin menu,but when i press the translate button i get an error message
"omp has produced an error Message: WARNING: Division by zero In file: /var/www/omp/lib/pkp/classes/core/ArrayItemIterator.inc.php At line: 132 Stacktrace".
Any advice on what i should do?Do i have to debug the file specified by the error message?Are there any other solutions?

Thanks in advance,
Thanasis Kordas
University of Patras
thanasis
 
Posts: 21
Joined: Mon Oct 15, 2012 3:44 am

Re: Translator Plugin

Postby asmecher » Mon Oct 22, 2012 8:29 am

Hi Thanaskis,

Could you turn on the show_stacktrace option in config.inc.php and re-post the error along with the stack trace?

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

Re: Translator Plugin

Postby thanasis » Thu Nov 01, 2012 1:33 am

Hi all,
after turning show_stacktrace on i get the error messages as seen below.

omp has produced an error Message: WARNING: Division by zero In file: /var/www/omp-1.0b/lib/pkp/classes/core/ArrayItemIterator.inc.php At line: 132 Stacktrace: File: /var/www/omp-1.0b/lib/pkp/classes/core/ArrayItemIterator.inc.php line 132 Function: PKPApplication->errorHandler(2, "Division by zero", "/var/www/omp-1.0b/lib/pkp/classes/core/ArrayItemIterator.inc.php", 132, Array(0)) File: /var/www/omp-1.0b/lib/pkp/classes/template/PKPTemplateManager.inc.php line 665 Function: ArrayItemIterator->getPageCount() File: /var/www/omp-1.0b/cache/t_compile/%%84^842^842A33B1%%index.tpl.php line 65 Function: PKPTemplateManager->smartyPageInfo(Array(1), Object(TemplateManager)) File: /var/www/omp-1.0b/lib/pkp/lib/smarty/Smarty.class.php line 1263 Function: include("/var/www/omp-1.0b/cache/t_compile/%%84^842^842A33B1%%index.tpl.php") File: /var/www/omp-1.0b/lib/pkp/classes/template/PKPTemplateManager.inc.php line 293 Function: Smarty->fetch("file:/var/www/omp-1.0b/plugins/generic/translator/index.tpl", Null, Null, False) File: /var/www/omp-1.0b/lib/pkp/classes/template/PKPTemplateManager.inc.php line 305 Function: PKPTemplateManager->fetch("file:/var/www/omp-1.0b/plugins/generic/translator/index.tpl") File: /var/www/omp-1.0b/plugins/generic/translator/TranslatorHandler.inc.php line 55 Function: PKPTemplateManager->fetchJson("file:/var/www/omp-1.0b/plugins/generic/translator/index.tpl") File: (unknown) line (unknown) Function: TranslatorHandler->index(Array(0), Object(Request)) File: /var/www/omp-1.0b/lib/pkp/classes/core/PKPRouter.inc.php line 370 Function: call_user_func(Array(2), Array(0), Object(Request)) File: /var/www/omp-1.0b/lib/pkp/classes/core/PKPPageRouter.inc.php line 266 Function: PKPRouter->_authorizeInitializeAndCallRequest(Array(2), Object(Request), Array(0), False) File: /var/www/omp-1.0b/lib/pkp/classes/core/Dispatcher.inc.php line 133 Function: PKPPageRouter->route(Object(Request)) File: /var/www/omp-1.0b/lib/pkp/classes/core/PKPApplication.inc.php line 189 Function: Dispatcher->dispatch(Object(Request)) File: /var/www/omp-1.0b/index.php line 63 Function: PKPApplication->execute() Server info: OS: Linux PHP Version: 5.3.10-1ubuntu3.4 Apache Version: Apache/2.2.22 (Ubuntu) DB Driver: mysql DB server version: 5.5.24-0ubuntu0.12.04.1
0 - 0 of 1 Items
thanasis
 
Posts: 21
Joined: Mon Oct 15, 2012 3:44 am

Re: Translator Plugin

Postby asmecher » Thu Nov 01, 2012 8:28 am

Hi Thanasis,

Thanks for the details; could you try the solution suggested at http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=7995 and report whether it works for you?

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

Re: Translator Plugin

Postby thanasis » Fri Nov 02, 2012 1:04 am

Hi everyone!
Thanks Alec it worked indeed!.One more issue with the plugin that might be irrelevant,when i click on translate an then on edit or export,nothing happens.Any suggestions?

Thanasis Kordas
University of Patras
thanasis
 
Posts: 21
Joined: Mon Oct 15, 2012 3:44 am

Re: Translator Plugin

Postby asmecher » Fri Nov 02, 2012 8:30 am

Hi Thanasis,

When you say that nothing happens, do you mean that you are sent to a blank page, or something else? Does anything appear in your error log?
(Note that the translator plugin is generally used to maintain translations; creating them in the first place might be more comfortable if you use a good text editor to work with the XML directly.)

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

Re: Translator Plugin

Postby thanasis » Mon Nov 05, 2012 12:53 am

Hi,
I didn't described the problem well to be honest.When i click on either button i remain in the same page and nothing loads(or trying to do anything).I checked the error logs and found there were quite some errors.The first of them was:
omp has produced an error Message: WARNING: call_user_func() expects parameter 1 to be a valid callback, array must have exactly two members In file: /var/www/omp-1.0b/lib/pkp/classes/xml/XMLParser.inc.php At line: 135 Stacktrace: File: (unknown) line (unknown) Function: PKPApplication->errorHandler(2, "call_user_func() expects parameter 1 to be a valid callback, array must have exactly two members", "/var/www/omp-1.0b/lib/pkp/classes/xml/XMLParser.inc.php", 135, Array(6)) File: /var/www/omp-1.0b/lib/pkp/classes/xml/XMLParser.inc.php line 135 Function: call_user_func(Array(1), "open", Object(FileWrapper)) File: /var/www/omp-1.0b/plugins/generic/translator/TranslatorAction.inc.php line 100 Function: XMLParser->parse("locale/en_US/emailTemplates.xml", Array(1)) File: /var/www/omp-1.0b/plugins/generic/translator/TranslatorHandler.inc.php line 76 Function: TranslatorAction->getEmailTemplates("en_US") File: (unknown) line (unknown) Function: TranslatorHandler->edit(Array(1), Object(Request)) File: /var/www/omp-1.0b/lib/pkp/classes/core/PKPRouter.inc.php line 370 Function: call_user_func(Array(2), Array(1), Object(Request)) File: /var/www/omp-1.0b/lib/pkp/classes/core/PKPPageRouter.inc.php line 266 Function: PKPRouter->_authorizeInitializeAndCallRequest(Array(2), Object(Request), Array(1), False) File: /var/www/omp-1.0b/lib/pkp/classes/core/Dispatcher.inc.php line 133 Function: PKPPageRouter->route(Object(Request)) File: /var/www/omp-1.0b/lib/pkp/classes/core/PKPApplication.inc.php line 189 Function: Dispatcher->dispatch(Object(Request)) File: /var/www/omp-1.0b/index.php line 63 Function: PKPApplication->execute() Server info: OS: Linux PHP Version: 5.3.10-1ubuntu3.4 Apache Version: Apache/2.2.22 (Ubuntu) DB Driver: mysql DB server version: 5.5.24-0ubuntu0.12.04.1

I guess i will just try to translate first and then try to get the plugin to work,as you said it is mostly used to maintain translations.
Thanks again!

Thanasis Kordas
University of Patras
thanasis
 
Posts: 21
Joined: Mon Oct 15, 2012 3:44 am

Re: Translator Plugin

Postby asmecher » Tue Nov 06, 2012 12:38 pm

Hi Thanasis,

That warning is cosmetic; applying http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=8002 will get rid of it. The OMP port of the translation plugin has not been heavily used yet (and won't be until there are some translations to maintain), so it's not unlikely that there are some bugs there; I'll schedule some time to test it further before it's needed.

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

Re: Translator Plugin

Postby thanasis » Thu Nov 08, 2012 1:36 am

Hi Everyone!

Thanks again Alec!By applying the patch the error messages are gone and i can now use the plugin.

Regards,
Thanasis Kordas
University of Patras
thanasis
 
Posts: 21
Joined: Mon Oct 15, 2012 3:44 am

Re: Translator Plugin

Postby christopher » Thu Nov 08, 2012 8:04 pm

Hi thanasis,
i have read lots of advices...may i just ask?are those advices they gave you is effective enought?....thank you...
christopher
 
Posts: 1
Joined: Thu Nov 08, 2012 7:56 pm

Re: Translator Plugin

Postby thanasis » Mon Nov 12, 2012 1:25 am

Hi Christopher,

The latest advice (to apply the patch) by Alec was indeed very good.The error messages are gone and i can actually use the plugin now.
Do you still hacve trouble after applying the patch?

Regards,
Thanasis Kordas
University of Patras
thanasis
 
Posts: 21
Joined: Mon Oct 15, 2012 3:44 am


Return to OMP Technical Support

Who is online

Users browsing this forum: No registered users and 1 guest