Details
-
Bug
-
Resolution: Unresolved
-
Medium
-
2.5.24
-
None
-
- Apache/2.4.38 (Debian) / Debian 10 (buster)
- 10.4.15-MariaDB / Ubuntu 20.04.1 LTS
-
eZ Platform Enterprise, eZ Platform
-
Yes
Description
Steps to reproduce:
Set a multisite with cluster configuration. apply the rewrite rule according to your server(Apache ou Nginx)
https://doc.ibexa.co/en/latest/guide/clustering/#nginx or https://doc.ibexa.co/en/latest/guide/clustering/#apache
You will notice that the images served are not siteaccess aware.
Expected result:
Images should e siteaccess aware when using cluster
Additional informations from PS below:
When using
- several repositories,
- the index.php to serve images (https://doc.ibexa.co/en/latest/guide/clustering/#web-server-rewrite-rules),
- and URIElement: 1 to specify the siteaccess, images are missing from some sites.
The URL of an images from a repository not corresponding to the default siteaccess should contain the siteaccess.
doctrine: dbal: connections: repo1: url: '%env(resolve:REPO1_DATABASE_URL)%' repo2: url: '%env(resolve:REPO2_DATABASE_URL)%' ezplatform: repositories: repo1: storage: connection: repo1 repo2: storage: connection: repo2 siteaccess: list: [site1, admin1, site2, admin2] groups: site_group: [site1, site2] repo1_group: [site1, admin1] repo2_group: [site2, admin2] admin_group: [admin1, admin2] default_siteaccess: site1 match: URIElement: 1 system: repo1_group: repository: repo1 var_dir: var/repo1 repo2_group: cache_service_name: cache.redis.repo2 repository: repo2 var_dir: var/repo2
In this example, images are missing from /admin2.
The preview of an Image content uses as img src something like http://example.com/var/repo2/storage/images/… which trigger an error “No route found for "GET /var/repo2/storage/images/…"”.
When adding manualy the current siteaccess to the request (or a siteaccess using this second repo), the image is correctly served: http://example.com/admin2/var/repo2/storage/images/…
Side notes:
- Images are correctly served on /admin1 because the default siteaccess site1 is used.
- Upper versions have presumably the same problem. The author of https://jsd.ez.no/browse/CS-8844 had the same issue using a 3.3.x.