Page MenuHomeIn-Portal Phabricator

INP-1504 - Correctly use "index_type" option from multilingual field declaration
ClosedPublic

Authored by alex on Oct 8 2015, 2:14 AM.

Details

Test Plan

Part 1

  • in any unit config, that has associated database table add following to the Fields array:
'TranslateFrom' => Array (
  'type' => 'int',
  'formatter' => 'kMultiLanguage', 'db_type' => 'int', 'index_type' => 'int',
  'not_null' => 1, 'default' => 0
),
  • make sure Debug mode is enabled and DBG_REDIRECT option is turned on
  • press Rebuild button in Rebuild Multilingual Fields sub-section in ToolsSystem Tools section
  • confirm, that Undefined index ... notice from multilanguage_helper.php isn't happening
  • confirm, that ADD INDEX(TranslateFrom) was used in ALTER statement in Debugger Report

Part 2

  • in any unit config, that has associated database table add following to the Fields array:
'TranslateFrom' => Array (
  'type' => 'string',
  'formatter' => 'kMultiLanguage', 'db_type' => 'varchar(255)', 'index_type' => 'string',
  'not_null' => 1, 'default' => ''
),
  • make sure Debug mode is enabled and DBG_REDIRECT option is turned on
  • press Rebuild button in Rebuild Multilingual Fields sub-section in ToolsSystem Tools section
  • confirm, that Undefined index ... notice from multilanguage_helper.php isn't happening
  • confirm, that ADD INDEX(TranslateFrom (5)) was used in ALTER statement in Debugger Report

Part 3

  • in any unit config, that has associated database table add following to the Fields array:
'TranslateFrom' => Array (
  'type' => 'string',
  'formatter' => 'kMultiLanguage', 'db_type' => 'varchar(255)',
  'not_null' => 1, 'default' => ''
),
  • make sure Debug mode is enabled and DBG_REDIRECT option is turned on
  • press Rebuild button in Rebuild Multilingual Fields sub-section in ToolsSystem Tools section
  • confirm, that Undefined index ... notice from multilanguage_helper.php isn't happening
  • confirm, that ADD INDEX(TranslateFrom (5)) was used in ALTER statement in Debugger Report

Diff Detail

Repository
rINP In-Portal
Branch
/in-portal/branches/5.2.x
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 212
Build 212: arc lint + arc unit

Event Timeline

alex updated this revision to Diff 370.Oct 8 2015, 2:14 AM
alex retitled this revision from to INP-1504 - Correctly use "index_type" option from multilingual field declaration.
alex updated this object.
alex edited the test plan for this revision. (Show Details)
alex added 1 JIRA issue(s): INP-1504.
glebs accepted this revision.Oct 15 2015, 2:01 AM
glebs edited edge metadata.
This revision is now accepted and ready to land.Oct 15 2015, 2:01 AM
This revision was automatically updated to reflect the committed changes.