Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I installed the 6.x-1.x-dev version with drush and enabled it.
After I installed any modules I gave the following error:
WD php: Notice: Undefined variable: status in l10n_update_source_history() (line 283 of [error]
/sites/all/modules/l10n_update/l10n_update.check.inc).
I didn't find any reference to $status variable in l10n_update.check.inc.
Comment | File | Size | Author |
---|---|---|---|
#4 | l10n_update-971462-undefined-status-4.patch | 830 bytes | Sutharsan |
#1 | l10n_update-971462-undefined-status-1.patch | 443 bytes | Sutharsan |
Comments
Comment #1
Sutharsan CreditAttribution: Sutharsan commentedObvious fault. Patch attached.
Comment #2
Sutharsan CreditAttribution: Sutharsan commentedL10n update has currently two options:
* Translation updates replace existing ones, new ones are added
* Edited translations are kept, only default ones (previously imported) are overwritten and new translations are added
The latter is default.
The 'edited translations' are translations which are locally modified after l10n update was installed. Core does not mark strings when the translation is locally edited. So there is now way to know what was or was not locally modified. This problem only occurs when L10n Update is installed on a site with existing and locally modified translations.
The solution I see, it to have a third option which only adds new translations and will not override any existing translation. This would be in line with Translation Import option "Existing strings are kept, only new strings are added"
Comment #3
Webappz CreditAttribution: Webappz commentedI tested the patch and it solved the problem.
Thanks for the patch.
Comment #4
Sutharsan CreditAttribution: Sutharsan commentedI reviewed the patch, but there is no reason
l10n_update_source_history()
should return any value. The$file
object is passed by reference (in PHP5 it is) and there is nothing else to return that makes sense. Attached patch is now committed.