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.

Bug 6225 - PHP Fatal error when attempting to install locale
PHP Fatal error when attempting to install locale
Product: OHS
Classification: Unclassified
Component: General
All All
: P3 normal
Assigned To: Alec Smecher
Depends on:
  Show dependency treegraph
Reported: 2010-11-19 10:50 PST by James MacGregor
Modified: 2010-11-19 14:42 PST (History)
1 user (show)

See Also:
Version Reported In: 2.3.1
Also Affects:

Patch against Harvester 2.3.1 (35.78 KB, patch)
2010-11-19 13:29 PST, Alec Smecher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James MacGregor 2010-11-19 10:50:00 PST
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.
Comment 1 Alec Smecher 2010-11-19 13:29:34 PST
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.
Comment 2 Alec Smecher 2010-11-19 13:30:03 PST
(NOT COMMITTED until we get feedback -- leaving open until then.)
Comment 3 Alec Smecher 2010-11-19 14:42:07 PST
(Never mind comment #2 -- committed to git. Waiting for feedback anyway.)