phpsymfonycomposer-phpsyliuspagerfanta

Undefined method Jackalope\Query\QueryResult::count() when accessing Sylius's 'Blocks' or 'Pages' section on backend


When I click on the 'Blocks' or 'Pages' section in the sidebar in Sylius's admin backend, I get the following error:

FatalErrorException: Error: Call to undefined method Jackalope\Query\QueryResult::count() in /Users/sabrinaliao/Sites/Symfony2/Development/SmartSpine/vendor/pagerfanta/pagerfanta/src/Pagerfanta/Adapter/DoctrineODMPhpcrAdapter.php line 51

I made sure my composer.json matched Sylius's (link). The only difference is that I also added requirements for a few sensio bundles I needed (namely the framework-extra-bundle and the generator-bundle). I looked at the most recent files for jackalope's QueryResult and Pagerfanta's DoctrineODMPhpcrAdapter to ensure that my files were up-to-date. Just to be sure, I manually removed all files in my vendor directory and reran composer.phar update. The error persisted. I looked at Sylius-Standard's composer.json and tried changing my jackalope version to the one shown there, but that just gave me the error about requesting an uninstallable set of packages. I don't know if this is a Sylius problem or a Jackalope problem or a Pagerfanta problem. Would anyone be able to help?


Solution

  • This is a problem with Pagerfanta's DoctrineODMPhpcrAdapter.php. The discussion is going on here: https://github.com/whiteoctober/Pagerfanta/pull/134/files#diff-2