Uploaded image for project: 'eZ Platform Enterprise Edition'
  1. eZ Platform Enterprise Edition
  2. EZEE-3489

Some Commands are using invalid Doctrine connection

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • 3.3.2, 2.5.18, 3.2.6
    • 3.3.1
    • None

    Description

      Looks like some Commands are using the default Doctrine connection regardless of the specified SiteAccess (and the connection it should be using).

      Steps to reproduce:
      1. In config/packages/doctrine.yaml define a new database connection and break the default one:

      doctrine:
           dbal:
                default_connection: default
                connections:
                     default:
                          url: 'mysql://INVALID:INVALID@127.0.0.1/INVALID'
                     second_connection:
                          url: '%env(resolve:DATABASE_URL)%'
      

      2. In config/packages/ezplatform.yaml define a new repository:

           repositories:
                default:
                     storage: null
                     search:
                          engine: '%search_engine%'
                          connection: default
                new_repository:
                     storage:
                          engine: legacy
                          connection: second_connection
                          config: {  }
                     search:
                          connection: second_connection
      (...)
      

      3. And (in the same file) configure SiteAccess site and SiteAccess group admin_group to use it:

                site:
      (...)
                     repository: new_repository
                admin_group:
      (...)
                     repository: new_repository
      

      4. Run php bin/console ibexa:system-info:dump > output.txt

      Expected result:
      There are no warnings in the console. The output is saved to output.txt

      Actual result:
      The output is saved to output.txt. There are warnings in the console:

       [WARNING] Some commands could not be registered:
      
      
      In AbstractMySQLDriver.php line 112:
      
        An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for user 'INVALID'@'localhost' (using password: YES)
      
      
      In Exception.php line 18:
      
        SQLSTATE[HY000] [1045] Access denied for user 'INVALID'@'localhost' (using password: YES)
      
      
      In PDOConnection.php line 38:
      
        SQLSTATE[HY000] [1045] Access denied for user 'INVALID'@'localhost' (using password: YES)
      

      Some commands are using the default Doctrine connection, even they should be using the valid one.

      Attachments

        Activity

          People

            Unassigned Unassigned
            marek.nocon@ibexa.co Marek NocoĊ„
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: