Page MenuHomeIn-Portal Phabricator

INP-1930 - Add Command-Line Template Compilation Support
AcceptedPublic

Authored by alex on Tue, Nov 25, 5:37 AM.

Details

Reviewers
erik
Test Plan

Preparations

  1. connect to the server/vm via SSH
  2. go to the project root folder
  3. go to the tools folder
  4. run the sudo ./fix_perms.sh command
  5. go to the project root folder
  6. go to the system/cache folder
  7. run the sudo rm -Rf core modules themes command

Part 1 (No Command-Line Compilation)

  1. perform the clean install
  2. login to the Admin Console
  3. go to the ConfigurationWebsiteAdvanced section
  4. scroll to the System Settings subsection
  5. confirm, that:
    • the Compiled Template Permission Mode system setting is present
    • it has a hint
    • it has 3 options in the dropdown
    • the No Command-Line Compilation option is selected
  6. go to the ToolsSystem Tools section
  7. use the Clear Templates Cache functionality
  8. connect to the server/vm via SSH
  9. go to the project root folder
  10. confirm, that system/cache/core/admin_templates/incs folder:
    • is present
    • has drwxr-xr-x permissions
  11. confirm, that system/cache/core/admin_templates/incs/form_blocks.php file:
    • is present
    • has -rw-r--r-- permissions

Part 2 (Command-Line Compilation with Server Configuration)

  1. login to the Admin Console
  2. go to the ConfigurationWebsiteAdvanced section
  3. scroll to the System Settings subsection
  4. change the value of the Compiled Template Permission Mode system setting to the Command-Line Compilation with Server Configuration and save changes
  5. connect to the server/vm via SSH
  6. go to the project root folder
  7. confirm, that system/cache/core/admin_templates/incs folder:
    • is present
    • has drwxrwxr-x permissions
  8. confirm, that system/cache/core/admin_templates/incs/form_blocks.php file:
    • is present
    • has -rw-rw-r-- permissions

Part 3 (Command-Line Compilation without Server Configuration (Security Risk) )

  1. login to the Admin Console
  2. go to the ConfigurationWebsiteAdvanced section
  3. scroll to the System Settings subsection
  4. change the value of the Compiled Template Permission Mode system setting to the Command-Line Compilation without Server Configuration (Security Risk) and save changes
  5. connect to the server/vm via SSH
  6. go to the project root folder
  7. confirm, that system/cache/core/admin_templates/incs folder:
    • is present
    • has drwxr-xrwx permissions
  8. confirm, that system/cache/core/admin_templates/incs/form_blocks.php file:
    • is present
    • has -rw-r--rw- permissions

Part 4 - upgrade

  1. repeat Part 1, Part 2 and Part 3, but doing an upgrade instead of clean install
  2. confirm, that Compiled Template Permission Mode system setting is positioned the same as during clean install

Diff Detail

Repository
rINP In-Portal
Branch
branches/5.2.x
Lint
Lint ErrorsExcuse: Unrelated.
SeverityLocationCodeMessage
Errorcore/kernel/nparser/template_cache.php:71PHPCS.E.CodingStandard.Commenting.FunctionComment.MissingCodingStandard.Commenting.FunctionComment.Missing
Errorcore/kernel/nparser/template_cache.php:93PHPCS.E.CodingStandard.WhiteSpace.ControlStructureSpacing.SpaceBeforeCloseBraceCodingStandard.WhiteSpace.ControlStructureSpacing.SpaceBeforeCloseBrace
Errorcore/kernel/nparser/template_cache.php:93PHPCS.E.CodingStandard.WhiteSpace.ControlStructureSpacing.SpacingAfterOpenBraceCodingStandard.WhiteSpace.ControlStructureSpacing.SpacingAfterOpenBrace
Unit
No Unit Test Coverage
Build Status
Buildable 11162
Build 3862: arc lint + arc unit

Event Timeline

alex created this revision.Tue, Nov 25, 5:37 AM
alex requested review of this revision.Tue, Nov 25, 5:37 AM
alex edited the test plan for this revision. (Show Details)Tue, Nov 25, 5:40 AM
erik requested changes to this revision.Tue, Nov 25, 10:19 AM

failed parts 1.10, 1.11. (in both clean install and upgrade cases)

after "use the Clear Templates Cache functionality"
system/cache/core/admin_templates folder is present and has drwxr-xr-x permissions, but system/cache/core/admin_templates/config folder is not present, and system/cache/core/admin_templates/config/config_universal.php file is not present.

under system/cache/core/admin_templates folder are present only incs folder and and tools folder

after "Compiled Template Permission Mode" is changed, system/cache/core/admin_templates/tools folder disappears and system/cache/core/admin_templates/config folder is created, so all other test plan checks are passed.

This revision now requires changes to proceed.Tue, Nov 25, 10:19 AM
alex requested review of this revision.Tue, Nov 25, 10:52 AM
alex edited the test plan for this revision. (Show Details)
In D546#11169, @erik wrote:

failed parts 1.10, 1.11. (in both clean install and upgrade cases)

after "use the Clear Templates Cache functionality"
system/cache/core/admin_templates folder is present and has drwxr-xr-x permissions, but system/cache/core/admin_templates/config folder is not present, and system/cache/core/admin_templates/config/config_universal.php file is not present.

under system/cache/core/admin_templates folder are present only incs folder and and tools folder

after "Compiled Template Permission Mode" is changed, system/cache/core/admin_templates/tools folder disappears and system/cache/core/admin_templates/config folder is created, so all other test plan checks are passed.

I've updated the test plan to use folder/file that should be present at all times. Please retest.

erik accepted this revision.Tue, Nov 25, 11:26 AM
This revision is now accepted and ready to land.Tue, Nov 25, 11:26 AM