Unexpected output: Affected paths: relative - resubmit patch.
⚙ D292 INP-1686 - Don't include timestamp in compiled Admin Skin file
Page MenuHomeIn-Portal Phabricator

INP-1686 - Don't include timestamp in compiled Admin Skin file
ClosedPublic

Authored by alex on Mar 19 2017, 5:53 AM.

Details

Test Plan

Preparations (VM/IDE)

  1. confirm, that /system/user_files/admin-default-XXX.css file is present (the XXX can be any number)
  2. backup that file outside of /system/user_files/ folder

Part 1 (compilation when missing)

  1. confirm, that /system/user_files/admin-default.css file is absent (only, when accessing Admin Console for 1st time after patch is applied)
  2. open Admin Console login screen
  3. confirm, that /system/user_files/admin-default.css file was created and remember it's modification time
  4. confirm, that you see website logo on login screen (above login form)
  5. delete /system/user_files/admin-default.css file
  6. open Admin Console login screen
  7. confirm, that /system/user_files/admin-default.css file was created and it's modification time is newer then one remembered above
  8. confirm, that contents of /system/user_files/admin-default.css is identical to /system/user_files/admin-default-XXX.css from backup

Part 2 (delete compiled upon reset)

  1. login to Admin Console
  2. confirm, that it looks as usual (you can compare visual look with same website before patch is applied)
  3. go to ToolsSystem Tools section
  4. press Reset button in Reset Configs Files Cache and Parsed System Data block
  5. confirm, that modification time of /system/user_files/admin-default.css file have increased

Part 3

  1. open /incs/header.tpl Admin Console template for editing
  2. add <inp2:adm_AdminSkin/> above <inp2:adm_AdminSkin file_only="1" result_to_var="skin_css"/> and save changes
  3. reload the page (in browser)
  4. do View Source on the frame or just inspect page
  5. confirm, that similar line is present <link rel="stylesheet" rev="stylesheet" href="http://www.website.tld/system/user_files/admin-default.css?ts=2017-03-19_12:34:22" type="text/css" media="screen"/>, where:
    • www.website.tld is replaced with your domain/path
    • 2017-03-19_12:34:22 is replaced with formatted modification date of admin-default.css file
  6. confirm, that URL to admin-default.css file in above link is working

Diff Detail

Repository
rINP In-Portal
Branch
/in-portal/branches/5.2.x
Lint
Lint ErrorsExcuse: Not fixing to avoid merging conflicts on 5.3.x merge.
SeverityLocationCodeMessage
Errorcore/units/helpers/skin_helper.php:27PHPCS.E.CodingStandard.NamingConventions.ValidFunctionName.ScopeNotCamelCapsCodingStandard.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
Errorcore/units/helpers/skin_helper.php:121PHPCS.E.CodingStandard.NamingConventions.ValidFunctionName.PublicUnderscoreCodingStandard.NamingConventions.ValidFunctionName.PublicUnderscore
Errorcore/units/helpers/skin_helper.php:202PHPCS.E.CodingStandard.Classes.ClassDeclaration.SpaceBeforeCloseBraceCodingStandard.Classes.ClassDeclaration.SpaceBeforeCloseBrace
Unit
No Unit Test Coverage
Build Status
Buildable 695
Build 695: arc lint + arc unit

Event Timeline

alex updated this revision to Diff 716.Mar 19 2017, 5:53 AM
alex retitled this revision from to INP-1686 - Don't include timestamp in compiled Admin Skin file.
alex updated this object.
alex edited the test plan for this revision. (Show Details)
alex added 1 JIRA issue(s): INP-1686.
erik accepted this revision.Apr 4 2017, 6:01 AM
erik edited edge metadata.
This revision is now accepted and ready to land.Apr 4 2017, 6:01 AM
This revision was automatically updated to reflect the committed changes.