Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language manifest is duplicated and overwritten on each new language install #2400

Closed
horus68 opened this issue Oct 10, 2016 · 3 comments
Closed
Assignees
Labels
Area: Language Issues & PRs that are confirmed as issues with language & translation within the core
Milestone

Comments

@horus68
Copy link
Contributor

horus68 commented Oct 10, 2016

Issue

Language manifest is duplicated and overwritten on each new language install
Each zip language pack has a "manifest.php" in its root.
When you install a language pack it will store a manifest file in two locations:
1- \upload\upgrades\langpack
Here the manifest.php file name will be changed to the language name tag as in "es-MX-manifest.php" along with the file es-MX.zip (its just an example, it goes for any other language).
This works fine!

2- But the manifest file is also written into instance root, now as "manifest.php". Add this will cause a problem: When you install a second language pack for a different language it writes to \upload\upgrades\langpack but it also write a new "manifest.php" into instance root, so there is a race to be the latest to install!

Expected Behavior

\upload\upgrades\langpack
should be the only place to install language manifest files!

Actual Behavior

The language pack contains a "manifest.php" that is created in the suitecrm instance root and overwritten by each new language pack.

Possible Fix

Change the way language packs are installed.
Along the way also solve the issue when installing an updated language pack before uninstalling the older one #2295

Steps to Reproduce

1- Download a language pack from https://crowdin.com/project/suitecrmtranslations and install!
2- Look into instance root for "manifest.php" and note the language code.
3- Then install a different language pack for any other language
4- Look again into instance root for "manifest.php", it is a new file for the new language code

Context

This is the actual manifest file for master language.


<?PHP
/******************************************
 * SuiteCRM Translations
 * @URL: https://crowdin.com/project/suitecrmtrans
 * @author SuiteCRM Community via Crowdin
 ******************************************/
$manifest = array( 
    'name' => 'English (United Kingdom)',
    'description' => 'Translation: www.crowdin.com/project/suitecrmtranslations',
    'type' => 'langpack',
    'is_uninstallable' => 'Yes',
    'acceptable_sugar_versions' =>
          array (),
    'acceptable_sugar_flavors' =>
          array('CE'),
    'author' => 'SuiteCRM Community',
    'version' => '7.7.5.2',
    'published_date' => '2016-10-06',
      );
$installdefs = array(
    'id'=> 'en_US',
    'image_dir'=>'<basepath>/images',
    'copy' => array(
    array('from'=> '<basepath>/include','to'=>'include'),
    array('from'=> '<basepath>/modules','to'=>'modules'),
    array('from'=> '<basepath>/install','to'=>'install'),
   )
 );
?>

Note that each language pack manifest has some lines localized, as in the above example for es_MX this lines will the different:


    'name' => 'Spanish (Mexico)',
    'id'=> 'es_MX',

Your Environment

  • SuiteCRM Version used: Latest version
@ijdavie ijdavie added Type:Bug Bugs within the core SuiteCRM codebase Priority:Moderate Issues & PRs that are minor; broken styling, cosmetic, warnings - there are practical workarounds labels Oct 11, 2016
@pgorod
Copy link
Contributor

pgorod commented Oct 11, 2016

I just tried deleting the manifest.php from the root. Then I logged out, logged back in, went into Module Loader. Everything appears to be working fine (although I didn't try to delete modules or upload new ones).

Is this just a matter of avoiding a useless file copy in the installation procedure? Or is the file there for any reason that we know of?

@Dillon-Brown Dillon-Brown added Area: Language Issues & PRs that are confirmed as issues with language & translation within the core and removed Type:Bug Bugs within the core SuiteCRM codebase Priority:Moderate Issues & PRs that are minor; broken styling, cosmetic, warnings - there are practical workarounds labels Sep 15, 2017
@Dillon-Brown Dillon-Brown self-assigned this Mar 9, 2018
Dillon-Brown added a commit to Dillon-Brown/SuiteCRM that referenced this issue Mar 9, 2018
@Dillon-Brown
Copy link
Contributor

@pgorod Doesn't look like it needs to be there. I've put up a fix that should disable this file from being copied.

Dillon-Brown added a commit to Dillon-Brown/SuiteCRM that referenced this issue Mar 9, 2018
Dillon-Brown added a commit to Dillon-Brown/SuiteCRM that referenced this issue Mar 9, 2018
@Dillon-Brown Dillon-Brown added the Status:Fix Proposed A issue that has a PR related to it that provides a possible resolution label Mar 9, 2018
@horus68
Copy link
Contributor Author

horus68 commented Jun 19, 2018

@Dillon-Brown merge ready?

samus-aran added a commit that referenced this issue Dec 17, 2018
Fixed #2400 - Language manifest is duplicated and overwritten on each…
@samus-aran samus-aran added Resolved: Next Release and removed Status:Fix Proposed A issue that has a PR related to it that provides a possible resolution labels Dec 17, 2018
Dillon-Brown added a commit to Dillon-Brown/SuiteCRM that referenced this issue Dec 17, 2018
@Dillon-Brown Dillon-Brown added this to the 7.10.12 milestone Dec 31, 2018
pgorod added a commit to pgorod/SuiteCRM that referenced this issue Jun 9, 2019
* Fixed salesagility#994 - Address Translation

* Fix For salesagility#1866 Display module by alphabetical order

* Update to remove duplicate string

* Replace removed EmailMarketing Key

* Fixed salesagility#2400 - Language manifest is duplicated and overwritten on each new language install

* Pass order_by to getBeans() params on getRelationshipResults()

* Add util function to load a class from /custom if it exists

* Check for custom MassUpdate file before loading the class

* Refactor

* Add path parameter default value

* Fix salesagility#5971 - Send email with Workflow using Meetings module breaks parent_id

* Fixed salesagility#5967 - AOR Reports - incorrect calculation for date quarter periods

* Improve where clause when removing securitygroups relationships.

* Fixed salesagility#6285 - LBL_DBCONFIG_B_MSG1_LABEL empty string

* php_zip_utils.php

* Add logging

* Bug fix create language cache in multilanguage system

* Mass update on user preferences doesn't save

Moved code from save.php to user.php and deleted save.php removed calls
to deleted file in controller.php

* Fix require for removed file

* replacing mbcryp_cbc with openssl_encrypt for SOAP key over LDAP

* Fixed salesagility#6414 - Bug in modules/Schedulers/_AddJobsHere.php

* Update cipher

* Pack buffer

* OPENSSL_NO_PADDING

* Update rebuild htaccess

* Fix handling of Account names and ids in Leads

* remove left-over debug line

* Fixed salesagility#6516 - (filler) elements in layouts are removed by gridlayout parser

* Fixed salesagility#2928 Fixed salesagility#341 - clear Zend OPcache when writing files

* Brackets set wrong

* Brackets et wrong

* Brackets wrong

* Brackets wrong

* Default navigation paradigm should be used

It is useless if it is not used, and then default defaults to group modules.

* Workflow Date - Remove incorrect branch when unserialize fails

* Time issue fixed in email template for datetime fields

* Change hard coded labels in Events invites

* PipelineBySalesStageDashlet not converting currency

* Fix for Edit View

* Panel tab fix

* Import mapping publish button

* markTestIncomplete: testderiveDBDateTimes

* markTestIncomplete

* fixing task 3624

* FIX salesagility#6568 - Adjust SUITECRM_PHP_REC_VERSION to 7.1.0

* Fix salesagility#6579 - Calendar daily repeat end by

- Fix: extra meeting created after end by date

* Remove die

* Better this way to avoid warnings

* Increment suitecrm_version.php

* Fixed salesagility#6570 -Case description not saving when AJAX is disabled

* Added tintMCE to description field in the Edit View

* cleaning

* Fixed salesagility#163 - Pagination bar in Emails

* work for all themes

* requested changes for Matt done

* Fix conflicts

* Update License

* Update License

* Fixed salesagility#5509 - [language] New label 'FOR_AMOUNT' in activity stream for opportunity

* Use LoggerManager class instead of accessing global

* modified require_once to relative dir and to the top of the file

* Try to resolve Travis Build for hotfix-7.8.x

* Fix conflicts

* Update License

* Update License

* Fixed salesagility#5509 - [language] New label 'FOR_AMOUNT' in activity stream for opportunity

* Fixed salesagility#163 - Pagination bar in Emails

* fixing travis

* apply only change to the head

* Generate chart colors based on labels

This way it is easier to identify the colour of the label you are looking for.
Superseeds salesagility#1536 and salesagility#6638

* escaping strings

* cs fix

* copy pr salesagility#6629 into hotfix

* Fixed installWizard styling - check writable module

* php cs fix

* fixing indentation

* code refact after salesagility#6647 merged

* Fixed salesagility#532 - Add the edit/remove button to Project Tasks subpanel

* Fixed salesagility#5968 - AOR Reports - incorrect start date calculated for LastQuarter period when in the 4th quarter

* Fix salesagility#4361 Parameter $imageJSONEncode should also be used if returning sprites.

Fix salesagility#4361
Parameter $imageJSONEncode should also be used if returning sprites.

* Style.css + JS

* Increment suitecrm_version

* Fixed salesagility#5414 - Password is not saving

* Fix user save

* Fix user save

* Fixed - salesagility#6766 - SMTP Port Issue (7.8.x)

* Fixed salesagility#6786 -  Edit item list replace spaces with html entity "%20"(7.8.25)

* Update SimpleList.js

* Fixed salesagility#6468 - Wrong WHERE composition upon NULL precondition in Company

* WIP: Fix regression breaking Accounts detail view

* Increment suitecrm_version

* Linter

* Fixed salesagility#675 - Suitecrm 7.3.2 Calendar entries are not displayed

* Fixed salesagility#6423 - after upgrading 7.8.13 to 7.8.22 getting Invalid File Reference from attachments in inbound

* Update .travis.yml

* Fixed salesagility#551 - add functionality to save new labels for relationships

* Fixed salesagility#6419 - Reserved mssql keyword in query, crash business hours module

* Remove debugger

* Fixed salesagility#5918 - Activity Stream elapsed time calculation

* Fix test

* Fixed salesagility#6936 - Global link Employees always reset list query

* Fixed salesagility#2117 - Redundant More Button in SuiteP

* Typo fix

* Increment suitecrm_version

* Fix for checkbox in PDF

* Cleaning

* Cleaning

* V2

* Clear

* Fix PDF templates

* Update templateParser.php

* Fixed salesagility#6971 - Function removed instead of being Deprecated

* Reformat

* Fixed salesagility#2531 - 7.10.4 - Report Writer - Boolean FIeld will not export to CSV

* Fixed salesagility#6185 - Top menu mouse out does not close sub

* FIX salesagility#7032 - Add setLevelMapping method

* Increase minimum recommended memory to 64Mb

* Update templateParser.php

* FIX salesagility#7051 - Fixing a limit of 2.147.483 seconds for autoRefresh

* Fixed salesagility#7067 - InLine Date Edit bug - Call to a member function format() on boolean

* Fixed salesagility#3592 - AOR Report- Date parameter doesn't work with any value of type 'Period'

* Fixed salesagility#4297 - Error in Listview : Pagination - Bulk Action disabled and wrong "Selected" count

* Fix: for merge request 25

* Increment suitecrm_version

* Fixed salesagility#48 - install.php issue

* Fixed salesagility#49 - popup_helper.js

* Rebuild JS

* Fixed salesagility#46 - reassignUserRecords

* Fix bug_7220

* Change default view on template to avoid date created/modified issues

* Fixed salesagility#5724 - Map Area - Import Option Fails : An Error has occurred

* salesagility#6126 fix(Workflow) - decode prev value before compare in workflow AnyChange condition

* Fixed salesagility#6037 - Reports: Fix adding relations from the first tree node

* Fixed salesagility#7162 - Popup select All records btn hidden in SuiteCRM 7.11.x

* Update composer.lock

* InboundEmail.php

* reassignUserRecords.php

* version 7.8.29

* Add return to function

Did not find at which point it was fixed for 7.10, but should be backportet to 7.8.x

https://github.com/salesagility/SuiteCRM/blob/1892b13ecfcd9a9e3cd575c8b4b3336188e86f28/include/SubPanel/SubPanelDefinitions.php#L432

* Fixed install syntax error

* Events fix

* Fixed salesagility#7133 - Changes in Studio do not make an override file.

* increment suitecrm_version

* Remove PHP 5.4

* Update travis.yml

* Use trusty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Language Issues & PRs that are confirmed as issues with language & translation within the core
Projects
None yet
Development

No branches or pull requests

6 participants