Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-22426

DetectMobileDevice redirection fails for URI

    XMLWordPrintable

Details

    Description

      If you configure MobileSiteAccessURL to use a siteaccess passed trough URI, the redirection will fail and end up with "module not found" error.

      This bug seems to happen because

      // ezpublish_legacy/kernel/private/classes/ezpmobiledeviceregexpfilter.php
      // Line 121
              if ( !isset( $_COOKIE['eZMobileDeviceDetect'] )
                      && !in_array( $currentSiteAccess['name'], eZINI::instance()->variable( 'SiteAccessSettings', 'MobileSiteAccessList'  ) ) )
              {
                  $http->redirect( eZINI::instance()->variable( 'SiteAccessSettings', 'MobileSiteAccessURL' ) . eZSys::serverVariable(  'REQUEST_URI' ) 
      

      eZ Publish will append eZSys::serverVariable( 'REQUEST_URI' ) at the end of MobileSiteAccessURL ignoring if among the REQUEST_URI is the siteaccess.

      Steps to reproduce

      1. Configure site.ini.append.php of override with the following settings
        [SiteSettings]
        DefaultAccess=eng
        
      2. Configure site.ini.append.php of eng siteaccess with the following settings
        [SiteAccessSettings]
        DetectMobileDevice=enabled
        MobileSiteAccessURL=http://your-domain.com/iphone
        
      3. Open http://your-domain.com in your browser (from a mobile device) and confirm that you will end up in the correct mobile address: http://your-domain.com/iphone
      4. Now open your url with a siteaccess, in this case I'll use the default one eng: http://your-domain.com/eng
      5. If the bug is present, you will see the siteaccess uri part following the mobile siteaccess after the redirect: http://your-domain.com/iphone/eng.

      Attachments

        Activity

          People

            Unassigned Unassigned
            eduardo.fernandes-obsolete@ez.no Eduardo Fernandes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 2 hours, 30 minutes
                1d 2h 30m