pixelant / pxa_product_manager

Product Manager. Allow to create and list products on a site. Create dynamical attributes for products. Filter by categories and attributes
11 stars 13 forks source link

Call to undefined method Doctrine\DBAL\Driver\Mysqli\MysqliStatement::fetchAllAssociative() #359

Closed MariaSaarland closed 2 years ago

MariaSaarland commented 2 years ago

After installing the pxa_product_manager, the following error message appears: [code] (1/1) Error Call to undefined method Doctrine\DBAL\Driver\Mysqli\MysqliStatement::fetchAllAssociative() [/code] [code]in /homepages/..../typo3conf/ext/pxa_product_manager/Classes/Utility/AttributeUtility.php line 118

    $row = $queryBuilder
        ->select(...GeneralUtility::trimExplode(',', $selectFields, true))
        ->from(AttributeRepository::TABLE_NAME)
        ->execute()
        ->fetchAllAssociative();

    if (is_array($row)) {
        return $row;
    }

[/code]

Typo3 10.4.12 I would be very happy to receive a feedback.

MattiasNilsson commented 2 years ago

@MariaSaarland thanks for reporting the issue! We will take a look into the issue!

mabolek commented 2 years ago

@MariaSaarland Have you tried upgrading Doctrine DBAL? If any, what error messages are you seeing? Are you running TYPO3 in Composer mode?

Technical background info:

This issue is related to the installed Doctrine DBAL version being <2.13.

As far as I know 2.13 is the version installed in Composer-based TYPO3 v10.4 instances (I haven't found any other setups or Composer requirements that would lead to anything else). TYPO3 v10.4 accepts ~2.10.0 || ~2.11.2 || ~2.13.1 and Doctrine DBAL 2.10 is used with the TYPO3 tarballs/non-composer installs.

Suggested fix

The Product Manager extension won't work well in non-Composer mode, so my suggestion would be to add "doctrine/dbal": "~2.13.1" as a hard requirement in the extension so the code can be future-compatible.

MattiasNilsson commented 2 years ago

@MariaSaarland We have a new release now which addresses this issue: https://github.com/pixelant/pxa_product_manager/releases/tag/v10.0.6