Skip to content

Update script (phpmyfaq 3.x to 4.x) not working properly for language pt_br (probably fr_ca too) #3400

@brunofs-br

Description

@brunofs-br

Describe the bug
Updating from phpmyfaq 3.x to 4.x is not working properly for language Brazilian Portuguese (probably french too).

I guess the locale code was corrected from "pt-br" (on phpmyfaq 3.x) to "pt_br" (phpmyfaq 4.x) and this breaks phpmyfaq logic.
I corrected mannualy on database and it seems to work (with minor tests).

On translation folder, I realized that french had the same pattern alteration: phpmyfaq3/lang/language_fr-ca.php to phpmyfaq4/translations/language_fr_ca.php

Suggestion: Update database on upgrade script.

My manual ajustments:

UPDATE faqattachment SET record_lang='pt_br' WHERE record_lang='pt-br'
UPDATE faqcaptcha SET language='pt_br' WHERE language='pt-br'
UPDATE faqcategories SET lang='pt_br' WHERE lang='pt-br'
UPDATE faqdata SET lang="pt_br" WHERE lang='pt-br'
UPDATE faqcategoryrelations SET category_lang='pt_br' WHERE category_lang='pt-br'
UPDATE faqcategoryrelations SET record_lang='pt_br' WHERE record_lang='pt-br'
UPDATE faqchanges SET lang="pt_br" WHERE lang='pt-br'
UPDATE faqdata_revisions SET lang="pt_br" WHERE lang='pt-br'
UPDATE faqglossary SET lang="pt_br" WHERE lang='pt-br'
UPDATE faqnews SET lang="pt_br" WHERE lang='pt-br'
UPDATE faqquestions SET lang="pt_br" WHERE lang='pt-br'
UPDATE faqsearches SET lang="pt_br" WHERE lang='pt-br'
UPDATE faqvisits SET lang="pt_br" WHERE lang='pt-br'
UPDATE faqconfig SET config_value="language_pt_br.php" WHERE lang='language_pt-br.php'

Related events

  • How to handle multisites databases ?
  • Important: I updated to version 4.1.0-alpha and the translation file name pattern returned to older way: "language_pt-br.php" instead of "language_pt_br.php" . (The update created a new file with the old pattern name). Updating database back to 'pt-br' solved the problem. So if adjusting this issue, keep in mind that versions 4.0.x and 4.1.x has diffent translation file names (and maybe must be the same).

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions