Details
-
Bug
-
Resolution: Duplicate
-
Critical
-
1.6.1
-
eZ Enterprise 1.6.1
Description
eZ Studio's ReverseMatcher on version 1.6.1 isn't working correctly on matching siteaccesses.
Consider this configuration:
siteaccess: list: - portal_english - portal_french - site groups: site_group: - portal_french - site - portal_english default_siteaccess: portal_french match: # URIElement: 1 //This line has been intentionally commented Compound\LogicalAnd: portal_english: matchers: Map\URI: en: true Map\Host: ezenterprise161-studio-clean.local: true match: portal_french french: matchers: Map\URI: french: true fr: true Map\Host: ezenterprise161-studio-clean.local: true match: portal_french Map\Host: ezenterprise161-studio-clean.local: portal_english (...)
I added a debug on vendor/ezsystems/studio-ui-bundle/SiteAccess/ReverseMatcher.php, line 64:
64 $matcher = $this->getMatcher($siteAccessName); dump($siteAccessName); dump($matcher); die(); 65 $request = $matcher->getRequest();
Accessing from http://ezenterprise161-studio-clean.local/ez the result will be:
ReverseMatcher.php on line 64:
"portal_english"ReverseMatcher.php on line 64:
null
My Map\Host for ezenterprise161-studio-clean.local: portal_english was completely ignored, even accessing from the correct host, and portal_english was being considered.
Stack trace:
[1] Symfony\Component\Debug\Exception\FatalErrorException: Error: Call to a member function getRequest() on a non-object
at n/a
in /var/www/html/ezenterprise161_studio_clean/vendor/ezsystems/studio-ui-bundle/SiteAccess/ReverseMatcher.php line 65