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

All configured repositories use the same connection

    XMLWordPrintable

Details

    Description

      When a user defines multiple repositories using different connections, only the default one is used.

      Steps to reproduce:
      1. Create a clean installation of eZ Platform.
      2. Configure two repositories like described in the documentation:
      https://doc.ezplatform.com/en/latest/guide/config_repository/#repository-connection. For each repository configure its own connection (both pointing to separate clean databases).
      3. Create separate cache pools for each repository. You can double configuration placed in cache.tagaware.filesystem.yml and add it under another key, e.g. cache.tagaware.filesystem.second. Make sure that tags.namespace key is different for each service.
      4. Configure two front SiteAccesses and two admin SiteAccesses like presented below:

      site:
           repository: repo1
           cache_service_name: 'cache.tagaware.filesystem'
      site2:
           repository: repo2
           cache_service_name: 'cache.tagaware.filesystem.second'
      admin:
           repository: repo1
           cache_service_name: 'cache.tagaware.filesystem'
      admin2:
           repository: repo2
           cache_service_name: 'cache.tagaware.filesystem.second'
      

      5. Clear Symfony cache and prune cache pools:

      php bin/console c:c
      php bin/console cache:pool:prune
      

      6. Log in as an administrator to /admin SiteAccess and add new content. Note that it is saved in the proper database.
      7. Log in as an administrator to /admin2 SiteAccess and add new content.

      Result:
      The content added via the secondary admin panel is stored in the first database instead of second. Also, you can see that profiler shows both connections used in the secondary admin panel where there should be only secondary connection present.

      Attachments

        Activity

          People

            Unassigned Unassigned
            konrad.oboza@ibexa.co Konrad Oboza
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: