Hi,

I get the following:
Fatal error: Call to undefined function stringoverrides_admin_export_submit() in /home/.../public_html/includes/form.inc on line 1409

I use Drupal 7.4 on a multilingual site. Also, Internationalization is installed.

Thanks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

codesmith’s picture

Any word on this? Just not done yet?

RobLoach’s picture

Version: 7.x-1.8 » 7.x-1.x-dev
Status: Active » Needs work

Looks like exporting is broken.

sphism’s picture

Status: Needs work » Needs review

Hello,

2 functions have had their names changed, but this change was not made to the callbacks for them.

Very simple fix:

Open stringoverrides_migrate.admin.inc

search:
stringoverrides_admin_export_submit
and replace with:
stringoverrides_migrate_admin_export_submit

AND then
search:
stringoverrides_admin_export_text
and replace with:
stringoverrides_migrate_admin_export_text

Michael-IDA’s picture

Status: Needs review » Needs work

# 3 Doesn't work with 7.x-1.8.

Uninstalled String Overrides Migrate, double cache flush, search and replace(copy&paste), re-enable, and still get the error:

Fatal error: Call to undefined function stringoverrides_admin_export_submit() in .../includes/form.inc on line 1430

Have too many overrides input to test uninstalling "String Overrides" as well.

Best,
Sam

.../sites/all/modules/stringoverrides
$ grep -ir "admin_export" .
./stringoverrides_migrate.module:    'page arguments' => array('stringoverrides_migrate_admin_export'),
./stringoverrides_migrate.admin.inc:function stringoverrides_migrate_admin_export() {
./stringoverrides_migrate.admin.inc:  $form['#submit'][] = 'stringoverrides_migrate_admin_export_submit';
./stringoverrides_migrate.admin.inc: * Submit-handler for stringoverrides_admin_export.
./stringoverrides_migrate.admin.inc:function stringoverrides_migrate_admin_export_submit($form, &$form_state) {
./stringoverrides_migrate.admin.inc:  $export = stringoverrides_migrate_admin_export_text($lang);
./stringoverrides_migrate.admin.inc:function stringoverrides_migrate_admin_export_text($lang = 'en') {


kolen’s picture

Status: Needs work » Patch (to be ported)
FileSize
1.71 KB

Fixed function name references of functions that was renamed.
Also, seems that now locale.inc is not included by drupal core always, only if "locale" builtin module is turned on. So export not worked if locale module is not enabled.

To not adding dependency to locale module, added require_once of just include file of it containing _locale_export_po_generate, so now export works even if locale module is not turned on. (Whole locale module, and fact that it is installed is actually not needed by export, only _locale_export_po_generate function).

kolen’s picture

Fixed file names in patch (as in module repository, not my repository with drupal install)

Michael-IDA’s picture

not adding dependency to locale module

Hi kolen,

Probably won't happen, but if locale gets removed from core, not creating the dependency will crash and burn. Obviously it would be best if there were the availability of some sort of "if module exists on server" dependency criteria in the .info, but I don't think there is?

This isn't my module, but I'd make the suggestion to use a full dependency.

Best,
Sam

mariacha1’s picture

Status: Patch (to be ported) » Needs review
FileSize
1.28 KB

With as many references as there are to functions within the locale module, I don't think it's practical to not make it a full dependency. I'm adding a patch that basically does that and alters the submitted patch above to work with the latest dev version (7.x-1.8+4-dev).

Vic_’s picture

+1

aburrows’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

Tested on 7.x-1.8 and works. RTBC+

nagy.balint’s picture

Patch works for me as well.

Please commit.

nicolaj.knudsen@gmail.com’s picture

I'm bumping this as the issue seems to be solved. It would be nice to have the export feature working.

Edit: Since the documentation is sparse, and google leads to this page, here is a workaround for exporting string overrides with Strongarm and Features.

With both modules enabled, create a feature and select the custom locale variables you need under 'strongarm', i.e. locale_custom_strings_%langcode% and locale_custom_disabled_strings_%langcode%.
In a standard english installation there will be only two of them, both with %langcode% = 'en'.

When you enable the feature on your other site, remember to clear the cache before visiting the string overrides page, otherwise the variable will revert to the old value.

RobLoach’s picture

@Nicolaj Thanks for testing. The patch is still good to be committed? Just re-confirming.

a8w4’s picture

Hi guys, I stumbled into this problem today - now we're having 2018 an the non functioning export was still not fixed.
Patch #8 seems perfectly fine for me - I wonder why it isn't used for a new release...

  • RobLoach committed 04ac2ddb on 7.x-1.x
    Issue #1210180 by kolen, mariacha1: Can't export
    
RobLoach’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.