Changes made to DropDown not saved

I’m adding new list items to a DropDown and they’re not being saved.

I can see the changes are made in /custom/include/language/en_GB.lang.php

I have added a list item (Parts Ordered) directly to /include/language/en_us.lang.php and that works.

I run the en_GB language pack and disable English (US).

Did you run a Quick Repair and Rebuild?

Also, especially if this is a new installation, make sure you have your ownerships/permissions set correctly, otherwise Studio (or Module Loader, or Dropdown Editor) can’t write the new information.

Yes, Quick Repair and Rebuild ran and ownerships/permissions set correctly.

Adding a new line item gets written to ./custom/include/language/en_GB.lang.php

I think that’s where it should be.

What do you mean it doesn’t get saved" then?

Can you post the exact contents of ./custom/include/language/en_GB.lang.php? it’s probably putting there all the values of that dropdown, not just the new one. So my tip would be to edit a bit the other (pre-existing) items to see if they affect the output on screen.

Maybe you’re just changing the wrong dropdown, and it’s going somewhere else in the UI, instead of where you looking for it…

EDIT: Another tip: if this involves Javascript, you need to run additional option in Admin / Repairs. There’s a JS languages repair there.

I agree, I also think that’s where it should be. It feels like it’s saving the changes to the right language file (en_GB) but using the wrong one (en_us) to read from?


$GLOBALS['app_list_strings']['invoice_status_dom']=array (
  'Paid' => 'Paid',
  'Unpaid' => 'Unpaid',
  'Cancelled' => 'Cancelled',
  '' => '',
  'parts_ordered' => 'Parts Ordered',
  'parts_collected' => 'Parts Collected',

Making any change to pre-existing items warns me the Key already exists in list.

From ./include/language/en_us.lang.php

I manually added the last line to test and troubleshoot.

$app_list_strings['invoice_status_dom']['Paid'] = 'Paid';
$app_list_strings['invoice_status_dom']['Unpaid'] = 'Unpaid';
$app_list_strings['invoice_status_dom']['Cancelled'] = 'Cancelled';
$app_list_strings['invoice_status_dom'][''] = '';
$app_list_strings['invoice_status_dom']['parts_ordered'] = 'Parts Ordered';

Where do you get that warning? On screen, in the logs,…?

Is that the exact text?

My suggestion to change the strings is meant for the right-hand side only: change the labels to see if it comes up on screen.

And check if you’re really using en_US or en_GB (enabled!)

I get the warning on screen, when I edit the label, in this case Unpaid to Not paid then try to Add it back in

If this is the right place to confirm enabled/disabled languages, then en_GB enabled and en_us disabled.

I meant change the file, not from the Editor.

It seems the process going from the Dropdown Editor to the PHP file is working ok

Out issue is between the file and the other place in the UI where you expect to see the string.

So if you edit /custom/include/language/en_GB.lang.php manually, changing one of the labels of the pre-existing items, do you see that item changed in the UI after a reload?

If yes, then you know you’re changing the correct dropdown,

If not, then you need to look for the correct one to change.

Don’t forget my advice above about the JS rebuilds.

Made a change to the file and ran the JS rebuild again


$GLOBALS['app_list_strings']['invoice_status_dom']=array (
  'Paid' => 'Paid0',
  'Unpaid' => 'Not paid',
  'Cancelled' => 'Cancelled',
  '' => '',
  'parts_ordered' => 'Parts Ordered',

Edits are not visible in the UI after a reload.

I know manually editing ./include/language/en_us.lang.php will work but why would that be the case if I’m using en_GB and disabling en_us?

That I don’t know.

Maybe try logging out and back in…

But if that doesn’t solve it, you need to dig in deeper into the code that selects the language file… wherever that is…

Thanks for your time and effort. I restarted from scratch, reinstalled and it’s working as we expect it to: writing to /custom/include/language/en_GB.lang.php and visible on the UI.

I’m following the same setup steps I have always followed so I have no idea what was causing it to mess up.

1 Like