Hi there,

There seems to be a problem in how the l10n_drupal module is working and whenever I want to add a release for a drupal project in 7.x-1.x-dev it gives the following error message and does not load the strings:

    Notice: Undefined index: upload handler in l10n_server_release_file_upload_submit() (line 469 of public_html/sites/all/modules/custom/l10n_server/l10n_server/l10n_server.module).
    Warning: call_user_func() expects parameter 1 to be a valid callback, no array or string given in l10n_server_release_file_upload_submit() (line 469 of public_html/sites/all/modules/custom/l10n_server/l10n_server/l10n_server.module).

I noticed that there is indeed no upload handler defined for l10n_drupal and this should probably be defined (or have a default?).

Any thoughts?

Comments

lucascaro’s picture

Here's a patch to get things started. It creates a test class for l10n_drupal and shows the failing case.
It needs to put the sample.tar.gz file in l10n_drupal/tests.

lucascaro’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, l10n_drupal-error_uploading_tar_gz-1653328-1.patch, failed testing.

lucascaro’s picture

just to clarify, the idea is that this patch intentionally fails since it's only to demostrate the error.
cheers.

lucascaro’s picture

Issue tags: +Localize D7 port

Adding tag since this is probably blocking #1424984 (correct me if I'm wrong)

SebCorbin’s picture

Issue tags: -Localize D7 port

Removing tag, but it is indeed required before any stable release.

For that we could take an example from l10n_gettext_upload_handler and delegate the string save handling to a function like l10n_drupal_save_string with appropriate parameters.