Page MenuHomeIn-Portal Phabricator

INP-1563 - Make "kApplication::QuickRun" method reusable
ClosedPublic

Authored by alex on May 12 2016, 3:25 PM.

Details

Test Plan

Preparations

  1. in Admin Console
    1. go to Website & ContentStructure & DataProducts section
    2. on Sections tab add Sub Products category
    3. go to Website & ContentStructure & DataProductsSub Products section
    4. on Products tab add new product
  2. in IDE:
    1. open platform/designs/default_design.des template in advanced theme for editing
    2. right above <inp2:m_RenderElement name="content" default_element="cms_content"/> line add [<inp2:m_FormAction/>]<br/> line

Part 1

  • in Admin Console:
    1. go to ConfigurationWebsiteAdvanced section
    2. check "Enable SEO-friendly URLs mode (MOD-REWRITE)" checkbox and save changes
  • on Front-End:
    1. open url of non-existing page (e.g. /tra-la-la)
    2. confirm, that 404 page is shown and HTTP response code is also 404
    3. go to ProductsSub Products section in top menu
    4. confirm, that products created before are shown
    5. add (must be in mod-rewrite mode) ?page=10 to the url (list must not have 10th page)
    6. confirm, that 404 page is shown and HTTP response code is also 404

Part 2

  • in Admin Console:
    1. go to ConfigurationWebsiteAdvanced section
    2. uncheck "Enable SEO-friendly URLs mode (MOD-REWRITE)" checkbox and save changes
  • on Front-End:
    1. go to ProductsSub Products category using top menu
    2. click on the product name (a link) to open it's detail page
    3. note place above navigation bar, where added template line result is now showing
    4. confirm, that %3Ap-1---- part from URL is show above navigation bar (the 1 is ID of created product)
    5. in the URL replace ID of product with 9999 (non-existing product id)
    6. confirm, that %3Ap-9999---- part from URL isn't show above navigation bar (the 9999 is ID of non-existing product)
    7. use Back button of web browser to see correct product detail page again
    8. press Buy Now button to add product to cart
    9. confirm, that redirect to Shopping Cart page happened and %3Ap-1---- is present in the URL (the 1 is ID of added product)
    10. locate part in URL, that looks like %3Am141- (the 141 is ID of category)
    11. change 141 (or whatever number is shown in your case) to 0
    12. change shop_cart in the URL into shopcart
    13. confirm, that %3Ap-1---- part from URL isn't show above navigation bar (the 1 is ID of product from URL)

Part 3

  • in IDE:
    1. disable debug mode in /system/debug.php file
    2. in any kMainTagProcessor class add AlwaysNotFound tag, that would call $this->Application->UrlManager->show404();
    3. replace content of error_notfound template in theme with 404 page
    4. add /themes/advanced/test.tpl template with <inp2:m_include template="platform/designs/default_design.des" pass_params="1"/> content
    5. replace contents of /themes/advanced/platform/designs/default_design.des.tpl template with following:
<inp2:m_DefineElement name="elem_test">
	<inp2:m_AlwaysNotFound/>
</inp2:m_DefineElement>

<inp2:m_RenderElement name="elem_test" />
  • in Admin Console:
    1. go to ConfigurationWebsiteAdvanced section
    2. ensure, that Enable HTML GZIP compression checkbox is checked (save changes if needed)
    3. go to ConfigurationWebsiteThemes section
    4. press Rescan Themes button on toolbar
  • in Web Browser:
    1. go to http://www.website.tld/test.html page
    2. confirm, that Page Not Found page is displayed, but url stays the same

Diff Detail

Repository
rINP In-Portal
Branch
/in-portal/branches/5.2.x
Lint
Lint ErrorsExcuse: Will be fixing in 5.3.x.
SeverityLocationCodeMessage
Errorcore/kernel/application.php:1087PHPCS.E.CodingStandard.NamingConventions.ValidFunctionName.ScopeNotCamelCapsCodingStandard.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
Unit
No Unit Test Coverage
Build Status
Buildable 386
Build 386: arc lint + arc unit

Event Timeline

alex updated this revision to Diff 526.May 12 2016, 3:25 PM
alex retitled this revision from to INP-1563 - Make "kApplication::QuickRun" method reusable.
alex updated this object.
alex edited the test plan for this revision. (Show Details)
alex added 1 JIRA issue(s): INP-1563.
glebs accepted this revision.May 13 2016, 2:19 AM
glebs edited edge metadata.
This revision is now accepted and ready to land.May 13 2016, 2:19 AM
alex planned changes to this revision.May 16 2016, 8:25 AM

The passed request variable isn't reset, when showing Page Not Found page, which results in links using pass="all" using prefixes from url.

alex updated this revision to Diff 527.May 16 2016, 8:27 AM
alex edited edge metadata.

Fixed case, when passed request variable wasn't reset, when Page Not Found page was shown.

This revision is now accepted and ready to land.May 16 2016, 8:27 AM
alex requested a review of this revision.May 16 2016, 8:31 AM
alex edited the test plan for this revision. (Show Details)
alex edited the test plan for this revision. (Show Details)
alex edited edge metadata.

Please do a complete retest.

glebs accepted this revision.May 17 2016, 2:43 AM
glebs edited edge metadata.
This revision is now accepted and ready to land.May 17 2016, 2:43 AM
alex planned changes to this revision.Jun 9 2016, 11:45 AM

When output compression is enabled and debug mode is disabled there will content decoding error in Web Browser and no content will be shown.

alex edited the test plan for this revision. (Show Details)Jun 9 2016, 11:56 AM
alex edited edge metadata.
alex updated this revision to Diff 533.Jun 9 2016, 11:58 AM

Clear all output buffering levels before showing 404 page.

This revision is now accepted and ready to land.Jun 9 2016, 11:58 AM
alex requested a review of this revision.Jun 9 2016, 11:59 AM
alex edited edge metadata.
alex updated this revision to Diff 534.Jun 9 2016, 12:04 PM
alex edited edge metadata.

Restored files, that were removed in previous diff by accident.

alex added a comment.Jun 9 2016, 12:06 PM

@glebs , please retest all again. I've made some fixes and added Part 3 to the plan.

alex edited reviewers, added: erik; removed: glebs.Jun 20 2016, 5:03 AM
erik accepted this revision.Jun 30 2016, 4:57 AM
erik edited edge metadata.
This revision is now accepted and ready to land.Jun 30 2016, 4:58 AM
This revision was automatically updated to reflect the committed changes.