akeneo / magento2-connector-community

Akeneo Connector for Magento 2
Open Software License 3.0
81 stars 88 forks source link

hotfix/AKCOMAG2001-224 into develop #581

Closed Dnd-Juanito closed 1 year ago

PieterCappelle commented 2 years ago

Please merge this, this is a critical one. Because all installations with table prefixes are broken right now. Thanks in advance!

PieterCappelle commented 2 years ago

@Dnd-Juanito You forgot one small change. When you go to Stores > Configuration > Akeneo Connector you can press "Export PDF" at the top to export the configuration. When you click this one:

Exception #0 (Magento\Framework\DB\Adapter\TableNotFoundException): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'database.core_config_data' doesn't exist, query was: SELECT ccd.* FROM core_config_data AS ccd WHERE (path like '%akeneo_connector%') ORDER BYpathASC

    /**
     * Description getAllAkeneoConfigs function
     *
     * @return mixed[]
     */
    protected function getAllAkeneoConfigs()
    {
        /** @var AdapterInterface $connection */
        $connection = $this->resourceConnection->getConnection();
        /** @var Select $select */
        $select = $connection->select()->from(
            [
                'ccd' => 'core_config_data',
            ]
        )->where('path like ?', '%akeneo_connector%')->order('path ASC');

        return $connection->fetchAll($select);
    }