-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
Hello. I get the following error to paginate:
I tried the two configuration:
paginator: spy_timeline.paginator.knp
paginator: ~
My config actually is:
#timeline
spy_timeline:
drivers:
orm:
object_manager: doctrine.orm.entity_manager
classes:
query_builder: ~ # Spy\TimelineBundle\Driver\ORM\QueryBuilder\QueryBuilder
timeline: ant\SocialBundle\Entity\Timeline
action: ant\SocialBundle\Entity\Action
component: ant\SocialBundle\Entity\Component
action_component: ant\SocialBundle\Entity\ActionComponent
filters:
duplicate_key:
priority: 10
data_hydrator:
priority: 20
filter_unresolved: true
locators:
- spy_timeline.filter.data_hydrator.locator.doctrine_orm
render:
path: 'SocialBundle:Timeline/verbs'
fallback: 'SocialBundle:Timeline:default.html.twig'
resources:
- 'sdfsBundle:Timeline:components.html.twig'
paginator: spy_timeline.paginator.knp
#Knp_paginator
knp_paginator:
page_range: 5
default_options:
page_name: page
sort_field_name: sort
sort_direction_name: dirección
distinct: true
template:
pagination: sdfsBundle:Pagination:pagination.html.twig
sortable: KnpPaginatorBundle:Pagination:sortable_link.html.twig
My controller is:
/**
* @Template
*/
public function timelineAction()
{
$u = $this->get('security.context')->getToken()->getUser();
$actionManager = $this->get('spy_timeline.action_manager');
$timelineManager = $this->get('spy_timeline.timeline_manager');
$subject = $actionManager->findOrCreateComponent($u);
$timeline = $timelineManager->getTimeline($subject, array('page' => 1, 'max_per_page' => '10', 'paginate' => true));
return array('timeline' => $timeline);
}
And I get the following error:
An exception has been thrown during the rendering of a template ("An exception occurred while executing 'SELECT COUNT(*) AS dctrn_count FROM
(SELECT DISTINCT id3 FROM (SELECT s0_.context AS context0, s0_.type AS type1, s0_.created_at AS created_at2, s0_.id AS id3, s1_.verb AS verb4, s1_.status_current AS status_current5, s1_.status_wanted AS status_wanted6, s1_.duplicate_key AS duplicate_key7, s1_.duplicate_priority AS duplicate_priority8, s1_.created_at AS created_at9, s1_.id AS id10, s2_.type AS type11, s2_.text AS text12, s2_.id AS id13, s3_.model AS model14, s3_.identifier AS identifier15, s3_.hash AS hash16, s3_.id AS id17, s0_.action_id AS action_id18, s0_.subject_id AS subject_id19, s2_.action_id AS action_id20, s2_.component_id AS component_id21
FROM spy_timeline s0_ INNER JOIN spy_timeline_action s1_ ON s0_.action_id = s1_.id
LEFT JOIN spy_timeline_action_component s2_ ON s1_.id = s2_.action_id
LEFT JOIN spy_timeline_component s3_ ON s2_.component_id = s3_.id
WHERE s0_.type = ? AND s0_.context = ? AND s0_.subject_id = ?
ORDER BY s0_.created_at DESC) dctrn_result) dctrn_table' with params {"1":"timeline","2":"ESTADO","3":{}}:
Catchable Fatal Error: Object of class ant\SocialBundle\Entity\Component could not be converted to string in /var/www/workspace/myproject/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php line 1211")
in /var/www/workspace/myproject/vendor/ping86/social-bundle/ant/SocialBundle/Resources/views/Muro/index.html.twig at line 25.
Metadata
Metadata
Assignees
Labels
No labels