View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0001466 | v3.2 Release | System Admin | public | 2014-02-28 03:55 | 2014-07-16 21:27 | ||||
Reporter | christian | ||||||||
Assigned To | caseydk | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Product Version | |||||||||
Target Version | 3.2 | Fixed in Version | 3.2 | ||||||
Summary | 0001466: Saving edits/additions on the translation management page result in loss of all information for that module/locale | ||||||||
Description | Attempts to add strings through the translation management functionality of the system administration module lead to loss of information - the corresponding files in /locales/[lang] are empty after the user presses the save button. | ||||||||
Steps To Reproduce | Open System Admin -> Translation Management, choose a module with existing keys, and click on the 'Save' button. This will refresh the page with all localisation information for that module/language lost. | ||||||||
Additional Information | The problem would seem to arise from the use of w2PgetParams() for extracting the array of abbreviations and strings from the post data: translate_save.php uses $trans = w2PgetParam($_POST, 'trans', array()); to extract information about the keys/values from the post data. However, w2PgetParams in its present incarnation is not capable of dealing with arrays in the post data. This is because this function includes a line that tries to run strip_tags() over the post data associated with a particular key, which in the case that the post data is anything other than a string will fail. This is evident by the following entries in the server's error log: strip_tags() expects parameter 1 to be string, array given in ... includes/main_functions.php Invalid argument supplied for foreach() in ...modules/system/translate_save.php | ||||||||
Tags | No tags attached. | ||||||||
Attached Files |
|
![]() |
|
caseydk (administrator) 2014-03-01 18:51 Last edited: 2014-03-01 18:52 |
This has been resolved in v3.2 development. Here's the relevant patch: https://github.com/web2project/web2project/commit/3edb12fcff4bb9e10281ae65bd33d206f1f0e81a |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2014-02-28 03:55 | christian | New Issue | |
2014-03-01 18:51 | caseydk | Project | v3.1 Release => v3.2 Release |
2014-03-01 18:51 | caseydk | Note Added: 0003248 | |
2014-03-01 18:51 | caseydk | Status | new => resolved |
2014-03-01 18:51 | caseydk | Resolution | open => fixed |
2014-03-01 18:51 | caseydk | Assigned To | => caseydk |
2014-03-01 18:52 | caseydk | Note Edited: 0003248 | View Revisions |
2014-03-13 22:18 | caseydk | Target Version | => 3.2 |
2014-07-16 21:26 | caseydk | Fixed in Version | => 3.2 |
2014-07-16 21:27 | caseydk | Status | resolved => closed |