Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-849

Using "Content Language Negotiation" along with Memcache cold start gives Fatal Error

    XMLWordPrintable

    Details

    • Type: Bug Report
    • Status: New
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.1.2
    • Fix Version/s: None
    • Component/s: Url Processing
    • Labels:
      None
    • Additional information:
      Hide

      Here are the places, when redirects happen:

      • Redirect on Session Expiration
      • Redirect on non-rewritten url
      • Redirect on language negotiation
      • Redirect on missing item’s view permission
      • Redirect on category import completion
      • Redirect on module install finished
      • Redirect on site domain mismatch
      • Redirect on category cache updated finish
      • Redirect on request event processed
      • Redirect on CSV import complete
      • Redirect on install complete
      • Redirect on login required template
      • Redirect on SSL mode mismatch
      • Redirect on email queue processing finished
      • Redirect on url ending mismatch
      • Redirect on template compilation finished
      Show
      Here are the places, when redirects happen: Redirect on Session Expiration Redirect on non-rewritten url Redirect on language negotiation Redirect on missing item’s view permission Redirect on category import completion Redirect on module install finished Redirect on site domain mismatch Redirect on category cache updated finish Redirect on request event processed Redirect on CSV import complete Redirect on install complete Redirect on login required template Redirect on SSL mode mismatch Redirect on email queue processing finished Redirect on url ending mismatch Redirect on template compilation finished
    • Change Log Message:
      Fixing fatal error on content language negotiation when memcached is used
    • Story Points:
      2
    • External issue ID:
      1048
    • Copy Issue Key:
    • Patch Instructions:

      Patches must be submitted through Phabricator.

      Description

      I have "Content Language Negotiation" and memory caching enabled. When I restarted Memcached server and then visited Front-end with empty url, e.g. http://www.site.com/ then redirect was made, since my "Accept-Language" header matched non-default language.

      Because I have no cache, then kApplication::RewriteListeners array was empty and attempt to build redirect link resulted in fatal error listed below:

      Notice: Undefined index: m in ...\core\kernel\application.php on line 1953

      Fatal error: Method name must be a string in .../core/kernel/application.php on line 1955

      I suggest following fixing approach:
      1. place return ; after each kApplication::Redirect method call
      2. when !$this->Application->InitDone and redirect attempt is made, then schedule redirect, but don't perform
      3. when init finishes and there is a scheduled redirect, then perform it

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                alex Alex
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated: