PKP Bugzilla – Bug 6225
PHP Fatal error when attempting to install locale
Last modified: 2010-11-19 14:42:07 PST
We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.
Nicolas is translating the Harvester into fr_FR (see http://pkp.sfu.ca/support/forum/viewtopic.php?f=4&t=6836&p=26526#p26526). After I add the files to the system and attempt to install the locale from the Site Admin -> Languages page, I get the following PHP error (and the locale is not installed):
PHP Fatal error: Call to undefined method EmailTemplateDAO::installEmailTemplateData() in /Users/jmacgreg/git/harvester/lib/pkp/classes/i18n/PKPLocale.inc.php on line 297, referer: http://git/harvester/index.php/admin/languages
At first I thought that converting the email_templates_data.xml file into an emailTemplates.xml file using the xslt script Alec provided a while ago might solve the issue, but it doesn't. (The en_US locale hasn't moved to an emailTemplates.xml file either.) I can't seem to find anything on the forum in Bugzilla related to this; I suspect it's just that the Harvester isn't as up-to-date as the other apps.
Created attachment 3344 [details]
Patch against Harvester 2.3.1
Please try the attached patch against OHS 2.3.1. It may be necessary to reload the languages on the administrator's languages page.
Note that this changes the way email templates are stored; you'll need to convert dbscripts/xml/data/locale/fr_FR/email_templates_data.xml to a new format and store the result in locale/fr_CA/emailTemplates.xml -- you can generate the new format by passing the old file through the XSL file at http://pkp.sfu.ca/bugzilla/attachment.cgi?id=2200 (see bug #4153).
This is new code, and only briefly tested, so please report your results back and I can help debug further if needed.
(NOT COMMITTED until we get feedback -- leaving open until then.)
(Never mind comment #2 -- committed to git. Waiting for feedback anyway.)