Part 0 - Prepare In-Portal 5.2.2-B2
- in the phpMyAdmin:
- prepare an empty database (create empty OR clear existing) to be used during the install
- in the Terminal (SSH connection to Web Server)
- go to the DocumentRoot folder of the Web Server
- run the svn co svn://user@in-portal.org/in-portal/releases/5.2.2-B2 in-portal.522b2 command (replace user with your In-Portal SVN Server username) to perform an SVN Checkout
- switch to the just created in-portal.522b2 folder
- run the php tools/configure_profile.php in-portal.full command to update svn:externals property
- run the svn update command to checkout missing modules/themes
- (in IDE) change value of the "name" key in the "/composer.json" file from "In-Portal" to "intechnic/in-portal"
- run the composer update command to create a vendor folder
- run the tools/fix_perms.sh command to fix permissions of the system folder
- run the cp tools/debug_sample.php system/debug.php to create a debug file
- in IDE (for In-Portal 5.2.2-B2 installation):
- open /system/debug.php file for editing
- update $dbg_options['DBG_IP'] key as needed (add your IP address for Debug Mode to be enabled)
- uncomment the DBG_CURL constant definition
- save changes
- copy /index.php file into /curl_test.php file
- open /curl_test.php file for editing
- replace $application->Run(); line with $application->recallObject('CurlHelper')->Send('https://www.google.com'); code
- save changes
- in the Web Browser:
- go the URL, that matches SVN checkout folder
- click on the link that recommends to perform installation
- perform In-Portal installation:
- with all the modules
- with advanced theme set as primary
- with System Log enabled
- open the curl_test.php file
- (in the phpMyAdmin) confirm, that the CurlLog table isn't empty (record is present about cURL request)
- login to the Admin Console
- go to the Logs & Reports → System Log section
- confirm, that grid isn't empty (the record is present about "InstallFinished" system setting)
- go to the E-commerce → Sales Report section
- run any report
- (in phpMyAdmin) confirm, that 522b2_ses_NNN_SaleReport table was created (522b2_ is table prefix; NNN is session key)
- go to the Configuration → Website → Advanced section
- enable the Track database changes to change log and save changes
- re-logout to the Admin Console
- go to the Logs & Reports → Session Log section
- confirm, that grid isn't empty (record about current session is present)
- open editing of any record, that will cause temp table to be created, but don't close the editing popup/modal window
- (in the phpMyAdmin) confirm, that temporary tables were created for unit, that is edited
- remember your SID from adm_sid cookie
- in the Web Browser
- go to the Front-End
- perform any search requery
- in phpMyAdmin
- confirm, that 522b2_ses_NNN_522b2_Search table was created (522b2_ is table prefix; NNN is session key)
- remember how temporary tables/sales report tables/search tables are named (SID in the table name)
- remember SID usage in the UserSessions, UserSessionData, UserSessionLogs, CurlLog, SystemLog tables
- backup the database in case if something wents wrong with an upcoming upgrade and it needs to be repeated
Part 1 - Testing Upgrade (for In-Portal 5.2.x installation)
- in IDE:
- apply patches from the D477 and D476
- backup /system/config.php and /system/debug.php files
- replace /system/config.php and /system/debug.php files with their counterparts from the In-Portal 5.2.2-B2 installation
- open /system/config.php file for editing
- change $_CONFIG['Misc']['WebsitePath'] to represent In-Portal 5.2.x installation path
- save changes
- in Web Browser
- open the /core/install.php URL
- (in phpMyAdmin) remember row count of the UserSessionLogs table
- proceed with the upgrade
- (in phpMyAdmin) confirm, that no new rows were created in the UserSessionLogs table during the upgrade
- login to the Admin Console
- change adm_sid and adm_sid_live cookie value into previously (before upgrade) recorded (see prev. test part)
- reload the page (frameset)
- confirm, that you're still logged in
- in phpMyAdmin:
- confirm, that temporary tables/sales report tables/search tables are property renamed (SID is replaced with Session ID)
- confirm, that SID usage in the UserSessions, UserSessionData, UserSessionLogs, CurlLog, SystemLog tables was replaced with it's hash
Part 2 - Temp tables
$live_table = TABLE_PREFIX . 'Categories'; $temp_table = $application->GetTempName($live_table); $is_temp_table_true = $application->IsTempTable($temp_table); $is_temp_table_false = $application->IsTempTable($live_table); $live_table_rebuilt1 = $application->GetLiveName($temp_table); $live_table_rebuilt2 = $application->GetLiveName($live_table); echo 'LT: ' . $live_table . '<br/>' . PHP_EOL; echo 'TT: ' . $temp_table . '<br/>' . PHP_EOL; echo 'TTT: ' . ($is_temp_table_true ? 'OK' : 'FAILED') . '<br/>' . PHP_EOL; echo 'TTF: ' . (!$is_temp_table_false ? 'OK' : 'FAILED') . '<br/>' . PHP_EOL; echo 'LTR1: ' . ($live_table_rebuilt1 === $live_table ? 'OK' : 'FAILED') . '<br/>' . PHP_EOL; echo 'LTR2: ' . ($live_table_rebuilt2 === $live_table ? 'OK' : 'FAILED') . '<br/>' . PHP_EOL;
- in Web Browser
- perform the clean install
- login to the Admin Console
- go to Configuration → Advanced section
- change value of the Editing Window Style system setting to the Popup Window
- save changes
- reload the whole frameset
- in IDE:
- copy/paste /admin/index.php file into /admin/temp_test.php file
- replace $application->Run(); line with the above shown code fragment
- save changes
- in Web Browser
- open /admin/temp_test.php file
- confirm, that:
- first test shows valid LIVE table name
- second test shows valid TEMP table name
- other 4 tests show OK
- (in phpMyAdmin) confirm, that no temporary tables for given admin session are present
- press Add toolbar button to open 1st new record creation popup
- return back to the main window
- press Add toolbar button to open 2nd new record creation popup
- (in phpMyAdmin) confirm, that:
- 2 sets of temporary tables for these actions were created
- they have session_id instead of session_key in their names
- close one of the editing windows using an X icon in top right corner of the window
- wait 2 seconds
- (in phpMyAdmin) confirm, that 1 set of temporary tables for the closed window was removed
Part 3 - Debugger
- in Web Browser:
- go to the Admin Console
- open any grid to trigger debug report file generation (but don't open debugger report)
- in IDE:
- open the /system/.restricted folder
- confirm, that some debugger report files are in the new format (debug_@SID_HASH@.txt) instead of (debug_@SID@.txt)
- create an empty /system/.restricted/debug_@fake_sid@.txt file
- (in CLI) run the php tools/run_event.php adm:OnOptimizePerformance b674006f3edb1d9cd4d838c150b0567d command
- confirm, that:
- /system/.restricted/debug_@fake_sid@.txt file was removed
- /system/.restricted/debug_@*@.txt files belonging to non-existing/expired sessions were removed
Part 4 - cURL
- in IDE:
- open /system/debug.php file for editing
- uncomment the DBG_CURL constant definition
- save changes
- copy /index.php file into /curl_test.php file
- open /curl_test.php file for editing
- replace $application->Run(); line with $application->recallObject('CurlHelper')->Send('https://www.google.com'); code
- save changes
- in Web Browser
- open the /curl_test.php file
- (in the phpMyAdmin) confirm, that:
- the CurlLog table isn't empty
- the CurlLog.SessionKey column contains SID hash (as see in the UserSessions.SessionKey column)
Part 5 - Sub-item grid filters in temp table
- in the Web Browser
- go to Admin Console
- go to Website & Content → Polls section
- press the Add toolbar button
- fill-in required fields on the General tab (in popup, that opens)
- go to the Answers tab
- add one answer
- try searching in the Answer column (no column title) for something, that is present in the answer
- confirm, that that something is found
- try searching in the Answer column (no column title) for something, that isn't present in the answer
- confirm, that that nothing is found
Part 6 - System Log
- in the Web Browser
- go to Admin Console
- go to Website & Content → Polls section
- press the Add toolbar button
- press Save toolbar button without filling-in the required fields
- confirm, that you see a validation error
- press the Cancel toolbar button
- go to Logs & Reports → System Log section
- open system log record, that was created after the validation error
- confirm, that Session Key shows SID hash (as see in the UserSessions.SessionKey column)
Part 7 - Sales Report
- in the Web Browser
- go to E-commerce → Sales Report section
- run the report with any valid values
- confirm, that you're seeing a grid
- (in phpMyAdmin) confirm, that 522b2_ses_1_SaleReport table was created (522b2_ is table prefix; 1 is session id)
Part 8 - Front-End search
- in the Web Browser
- go to Front-End
- try searching for anything
- (in phpMyAdmin) confirm, that 522b2_ses_1_522b2_Search table was created (522b2_ is table prefix; 1 is session id)
Part 9 - Session Logs
- in the Web Browser
- go to Admin Console
- go to the Configuration → Website → Advanced section
- enable the Track database changes to change log and save changes
- re-logout to the Admin Console
- go to the Logs & Reports → Session Log section
- confirm, that grid isn't empty
- confirm, that Session Key column is visible
- (phpMyAdmin) confirm, that record created in the UserSessionLogs table has SessionId and SessionKey column values, that match with an existing session from the UserSessions table
Part 10 - Session itself
echo 'T1: ' . ($application->Session->GetField('NonExistingField') === false ? 'OK' : 'ERROR') . '<br/>' . PHP_EOL; echo 'T2: ' . ($application->Session->GetField('TimeZone') === '' ? 'OK' : 'ERROR') . '<br/>' . PHP_EOL; $application->Session->SetField('TimeZone', 'Europe/London'); echo 'T3: ' . ($application->Session->GetField('TimeZone') === 'Europe/London' ? 'OK' : 'ERROR') . '<br/>' . PHP_EOL; $application->Session->SetField('TimeZone', null); echo 'T4: ' . ($application->Session->GetField('TimeZone') === null ? 'OK' : 'ERROR') . '<br/>' . PHP_EOL;
- in the Web Browser
- go to Admin Console
- (in IDE) delete all the debugger report files from the /system/.restricted folder
- click on any page
- (in IDE) confirm, that debugger report file was created
- (in phpMyAdmin) confirm, that records in UserSessions and UserSessionData tables for current session are present
- perform logout
- (in IDE) confirm, that debugger report for the just logged out session was deleted
- (in phpMyAdmin) confirm, that records in UserSessions and UserSessionData tables for just logged out session were deleted
- perform logout
- (in IDE) replace $application->Run(); line in /admin/index.php file with $application->GetSID(Session::PURPOSE_REFERENCE); and save changes
- reload the page
- confirm, that an exception is thrown (in Debugger Report) about non-existing session and it shows it's session key
- (in IDE) rollback changes to the /admin/index.php file and save changes
- login to the Admin Console
- in IDE:
- copy/paste /admin/index.php file into /admin/session_test.php file
- replace $application->Run(); line with the above shown code fragment
- save changes
- in Web Browser
- open /admin/session_test.php file
- confirm, that: all 4 tests show OK
Part 11 - parallel editing
- in the Web Browser
- go to Admin Console
- go to Website & Content → Structure & Data → Directory section
- click on the Links tab
- create one record in that grid
- open that record for editing
- return back to main window
- open that record for editing again
- confirm, that you're seeing an alert indicating, that this record is already being edited
Part 12 - session logout on user disapproval
- in the Web Browser
- go to Admin Console (tab 1)
- go to User Management → Users section
- create a user
- go to Front-End (tab 2)
- login using that user
- go to Admin Console (tab 1)
- deactivate just created user using Disable button from the grid
- go to Front-End (tab 2)
- reload the page
- confirm, that you're no longer logged-in on the Front-End