sonata-project/SonataTimelineBundle

Problem with request SQL to see the timeline in dashboard sonata block

Closed this issue · 2 comments

Environment

Sonata timeline 3.1

sonata-project/admin-bundle 3.10.3 The missing Symfony Admin Generator
sonata-project/block-bundle 3.2.0 Symfony SonataBlockBundle
sonata-project/cache 1.0.7 Cache library
sonata-project/core-bundle 3.1.2 Symfony SonataCoreBundle
sonata-project/datagrid-bundle 2.2 Symfony SonataDatagridBundle
sonata-project/doctrine-extensions 1.0.2 Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 3.1.2 Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/easy-extends-bundle 2.1.10 Symfony SonataEasyExtendsBundle
sonata-project/exporter 1.7.0 Lightweight Exporter library
sonata-project/google-authenticator 1.0.2 Library to integrate Google Authenticator into a PHP project
sonata-project/user-bundle 3.2.0 Symfony SonataUserBundle

PHP 7.0

ERRO SQL when rendering the dashboard

Hello I have this message during the rendering of my dashbord ins sonata admin

An exception has been thrown during the rendering of a template ("An exception occurred while executing 'SELECT DISTINCT id_3 FROM (SELECT t0_.context AS context_0, t0_.type AS type_1, t0_.created_at AS created_at_2, t0_.id AS id_3, t1_.verb AS verb_4, t1_.status_current AS status_current_5, t1_.status_wanted AS status_wanted_6, t1_.duplicate_key AS duplicate_key_7, t1_.duplicate_priority AS duplicate_priority_8, t1_.created_at AS created_at_9, t1_.id AS id_10, t2_.type AS type_11, t2_.text AS text_12, t2_.id AS id_13, t3_.model AS model_14, t3_.identifier AS identifier_15, t3_.hash AS hash_16, t3_.id AS id_17 FROM timeline__timeline t0_ INNER JOIN timeline__action t1_ ON t0_.action_id = t1_.id LEFT JOIN timeline__action_component t2_ ON t1_.id = t2_.action_id LEFT JOIN timeline__component t3_ ON t2_.component_id = t3_.id WHERE t0_.type = ? AND t0_.context = ? AND t0_.subject_id = ?) dctrn_result ORDER BY created_at_2 DESC LIMIT 25 OFFSET 0' with params ["timeline", "SONATA_ADMIN", 1]:

SQLSTATE[HY000]: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list, references column 'dctrn_result.created_at_2' which is not in SELECT list; this is incompatible with DISTINCT").

Could you help me, my configuration of sonata Timeline it's exactly the on in the doc

I want to see the timeLine

Thx
Paolo

Hi, did you find a solution, I am having exactly the same problem.

This is a doctrine bug in the stephpy/timeline-bundle:
stephpy/timeline-bundle#187