Project

General

Profile

Bug #91285

Updated by Steffen Hastädt over 4 years ago

If a multi-domain installation has the same page mounted to different domains, only one page will be able to display the mounted page tree. 

 I have the following setup (Page UID - type - slug): 
 <pre> 
 Root 
     [11] - Domain.at - "/" 
             [12] - MP - "/glass" 
     [31] - Domain.hr - "/" 
             [32] - MP - "/glass" 
     [16] - Domain.cz - "/" 
             [17] - MP - "/glass" 
     [36] - Domain.it - "/" 
             [37] - MP - "/glass" 
     [21] - Domain.sk - "/" 
             [22] - MP - "/glass" 
     [6] - Domain.ch - "/" 
             [7] - Page - "/glass" 
                     [814] - MP - "/glass/properties" 
     [26] - Domain.ua - "/" 
             [27] - MP - "/glass" 
     [1] - Domain.ch - "/" 
             [2] - Page - "/glass" 
                     [242] - Page - "/glass/properties" 

 </pre> 



 * Domain.com has the page tree without MountPoints 
 * Domain.ch has the page mounted with "show page of mounted page" 
 * The rest of the domains has the Mount Point one level up and mounts the whole page tree under "glass" 

 I always call the same URL. on each Domain "/en/glass/properties" 

 https://www.domain.at/en/glass/properties - OK 
 https://www.domain.hr/en/glass/properties - “ID was outside the domain” 
 https://www.domain.cz/en/glass/properties - “ID was outside the domain” 
 https://www.domain.it/en/glass/properties - “ID was outside the domain” 
 https://www.domain.sk/en/glass/properties - “ID was outside the domain” 
 https://www.domain.ch/en/glass/properties - “ID was outside the domain” 
 https://www.domain.ua/en/glass/properties - OK 
 https://www.domain.com/en/glass/properties - OK 

 The result of getPagesFromDatabaseForCandidates looks always the but with the correct root page UID. 

 Result for AT: 
 <pre> 
     [0] => Array 
         ( 
             [uid] => 2 
             [pid] => 1 
             ... 
             [doktype] => 1 
             ... 
             [mount_pid] => 0 
             [mount_pid_ol] => 0 
             ... 
             [slug] => /glass 
             ... 
             [MPvar] => 2-12 
         ) 

     [1] => Array 
         ( 
             [uid] => 242 
             [l10n_parent] => 0 
             [pid] => 2 
             [slug] => /glass/properties 
             [mount_pid] => 0 
             [mount_pid_ol] => 0 
             [t3ver_state] => 0 
             [doktype] => 1 
             [MPvar] => 2-12 
         ) 

     [2] => Array 
         ( 
             [uid] => 11 
             [l10n_parent] => 0 
             [pid] => 0 
             [slug] => / 
             [mount_pid] => 0 
             [mount_pid_ol] => 0 
             [t3ver_state] => 0 
             [doktype] => 1 
         ) 
 </pre> 


 Exact same result for HR, CZ, IT, SK. Only the UID of the root page is different: 

 <pre> 
     [0] => Array 
         ( 
             [uid] => 2 
             [pid] => 1 
             ... 
             [doktype] => 1 
             ... 
             [mount_pid] => 0 
             [mount_pid_ol] => 0 
             ... 
             [slug] => /glass 
             ... 
             [MPvar] => 2-12 
         ) 

     [1] => Array 
         ( 
             [uid] => 242 
             [l10n_parent] => 0 
             [pid] => 2 
             [slug] => /glass/properties 
             [mount_pid] => 0 
             [mount_pid_ol] => 0 
             [t3ver_state] => 0 
             [doktype] => 1 
             [MPvar] => 2-12 
         ) 

     [2] => Array 
         ( 
             [uid] => 31 
             [l10n_parent] => 0 
             [pid] => 0 
             [slug] => / 
             [mount_pid] => 0 
             [mount_pid_ol] => 0 
             [t3ver_state] => 0 
             [doktype] => 1 
         ) 
 </pre> 

 Since the first mount point fills up the MPvar and the MountPage record in the array during the first run, all the other pages are skipped in line 441++ 
 <pre><code class="php"> 
                 if ($mountedPage && PageRepository::DOKTYPE_MOUNTPOINT === (int)$row['doktype'] && $row['mount_pid_ol']) { 
                     // If the mounted page was already added from above, this should not be added again (to include 
                     // the mount point parameter). 
                     if (in_array((int)$mountedPage['uid'], $excludeUids, true)) { 
                         continue; 
                     } 

 </code></pre> 

 And I think this is causing the "ID was outside the domain" error. 

 As addition the result of the Domain.com main page: 
 <pre> 
     [0] => Array 
         ( 
             [uid] => 242 
             [l10n_parent] => 0 
             [pid] => 2 
             [slug] => /glass/properties 
             [mount_pid] => 0 
             [mount_pid_ol] => 0 
             [t3ver_state] => 0 
             [doktype] => 1 
         ) 

     [1] => Array 
         ( 
             [uid] => 2 
             [l10n_parent] => 0 
             [pid] => 1 
             [slug] => /glass 
             [mount_pid] => 0 
             [mount_pid_ol] => 0 
             [t3ver_state] => 0 
             [doktype] => 1 
         ) 

     [2] => Array 
         ( 
             [uid] => 1 
             [l10n_parent] => 0 
             [pid] => 0 
             [slug] => / 
             [mount_pid] => 0 
             [mount_pid_ol] => 0 
             [t3ver_state] => 0 
             [doktype] => 1 
         ) 

 </pre> 

 And the result of the site with the mounted page: 
 <pre> 
     [0] => Array 
         ( 
             [uid] => 7 
             [l10n_parent] => 0 
             [pid] => 6 
             [slug] => /glass 
             [mount_pid] => 0 
             [mount_pid_ol] => 0 
             [t3ver_state] => 0 
             [doktype] => 1 
         ) 

     [1] => Array 
         ( 
             [uid] => 2 
             [pid] => 1 
             ... 
             [title] => Glass 
             [doktype] => 1 
             ... 
             [mount_pid] => 0 
             [mount_pid_ol] => 0 
             ... 
             [slug] => /glass 
             ... 
             [MPvar] => 2-12 
         ) 

     [2] => Array 
         ( 
             [uid] => 242 
             [l10n_parent] => 0 
             [pid] => 2 
             [slug] => /glass/properties 
             [mount_pid] => 0 
             [mount_pid_ol] => 0 
             [t3ver_state] => 0 
             [doktype] => 1 
             [MPvar] => 2-12 
         ) 

     [3] => Array 
         ( 
             [uid] => 6 
             [l10n_parent] => 0 
             [pid] => 42 
             [slug] => / 
             [mount_pid] => 0 
             [mount_pid_ol] => 0 
             [t3ver_state] => 0 
             [doktype] => 1 
         ) 
 </pre> 

Back