Advertisement
argystam

18.Using_the_new_OneToMany_Collections

Aug 25th, 2017
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.20 KB | None | 0 0
  1. Cannot access private property AppBundle\Entity\GenusScientist::$id
  2. 500 Internal Server Error - FatalThrowableError
  3. Stack Trace
  4.  
  5. 1. in vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 731
  6. }
  7. $id = $this->identifier[0];
  8. $value = $this->reflFields[$id]->getValue($entity);
  9. if (null === $value) {
  10. return array();
  11. 2. at ReflectionProperty ->getValue (object(GenusScientist))
  12. in vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 731
  13. 3. at ClassMetadataInfo ->getIdentifierValues (object(GenusScientist))
  14. in vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/ChoiceList/IdReader.php at line 125
  15. 4. at IdReader ->getIdValue (object(GenusScientist))
  16. 5. at call_user_func (array(object(IdReader), 'getIdValue'), object(GenusScientist))
  17. in vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/ArrayChoiceList.php at line 158
  18. 6. at ArrayChoiceList ->getValuesForChoices (array(object(GenusScientist), object(GenusScientist), object(GenusScientist)))
  19. in vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/LazyChoiceList.php at line 198 +
  20. 7. at LazyChoiceList ->getValuesForChoices (array(object(GenusScientist), object(GenusScientist), object(GenusScientist)))
  21. in vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php at line 52 +
  22. 8. at ChoicesToValuesTransformer ->transform (array(object(GenusScientist), object(GenusScientist), object(GenusScientist)))
  23. in vendor/symfony/symfony/src/Symfony/Component/Form/Form.php at line 1092 +
  24. 9. at Form ->normToView (array(object(GenusScientist), object(GenusScientist), object(GenusScientist)))
  25. in vendor/symfony/symfony/src/Symfony/Component/Form/Form.php at line 352 +
  26. 10. at Form ->setData (object(PersistentCollection))
  27. in vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataMapper/PropertyPathMapper.php at line 57 +
  28. 11. at PropertyPathMapper ->mapDataToForms (object(Genus), object(RecursiveIteratorIterator))
  29. in vendor/symfony/symfony/src/Symfony/Component/Form/Form.php at line 385 +
  30. 12. at Form ->setData (object(Genus))
  31. in vendor/symfony/symfony/src/Symfony/Component/Form/Form.php at line 477 +
  32. 13. at Form ->initialize ()
  33. in vendor/symfony/symfony/src/Symfony/Component/Form/FormBuilder.php at line 226 +
  34. 14. at FormBuilder ->getForm ()
  35. in vendor/symfony/symfony/src/Symfony/Component/Form/FormFactory.php at line 39 +
  36. 15. at FormFactory ->create ('AppBundle\Form\GenusFormType', object(Genus), array())
  37. in vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php at line 309 +
  38. 16. at Controller ->createForm ('AppBundle\Form\GenusFormType', object(Genus))
  39. in src/AppBundle/Controller/Admin/GenusAdminController.php at line 66 +
  40. 17. at GenusAdminController ->editAction (object(Request), object(Genus))
  41. 18. at call_user_func_array (array(object(GenusAdminController), 'editAction'), array(object(Request), object(Genus)))
  42. in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php at line 153 +
  43. 19. at HttpKernel ->handleRaw (object(Request), '1')
  44. in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php at line 68 +
  45. 20. at HttpKernel ->handle (object(Request), '1', true)
  46. in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php at line 169 +
  47. 21. at Kernel ->handle (object(Request))
  48. in web/app_dev.php at line 30 +
  49. 22. at require ('/home/argystam/projects_linux/aqua_note/web/app_dev.php')
  50. in vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/router_dev.php at line 40 +
  51.  
  52. Logs -
  53. 1 error
  54.  
  55. INFO - Matched route "{route}".
  56. DEBUG - Read existing security token from the session.
  57. DEBUG - SELECT t0.id AS id_1, t0.email AS email_2, t0.password AS password_3, t0.roles AS roles_4, t0.is_scientist AS is_scientist_5, t0.first_name AS first_name_6, t0.last_name AS last_name_7, t0.avatar_uri AS avatar_uri_8, t0.university_name AS university_name_9 FROM user t0 WHERE t0.id = ?
  58. DEBUG - User was reloaded from a user provider.
  59. DEBUG - Checking for guard authentication credentials.
  60. DEBUG - Calling getCredentials() on guard configurator.
  61. DEBUG - Notified event "{event}" to listener "{listener}".
  62. DEBUG - Notified event "{event}" to listener "{listener}".
  63. DEBUG - Notified event "{event}" to listener "{listener}".
  64. DEBUG - Notified event "{event}" to listener "{listener}".
  65. DEBUG - Notified event "{event}" to listener "{listener}".
  66. DEBUG - Notified event "{event}" to listener "{listener}".
  67. DEBUG - Notified event "{event}" to listener "{listener}".
  68. DEBUG - Notified event "{event}" to listener "{listener}".
  69. DEBUG - SELECT t0.id AS id_1, t0.name AS name_2, t0.species_count AS species_count_3, t0.fun_fact AS fun_fact_4, t0.is_published AS is_published_5, t0.first_discovered_at AS first_discovered_at_6, t0.slug AS slug_7, t0.sub_family_id AS sub_family_id_8 FROM genus t0 WHERE t0.id = ?
  70. DEBUG - Notified event "{event}" to listener "{listener}".
  71. DEBUG - Notified event "{event}" to listener "{listener}".
  72. DEBUG - Notified event "{event}" to listener "{listener}".
  73. DEBUG - Notified event "{event}" to listener "{listener}".
  74. DEBUG - Notified event "{event}" to listener "{listener}".
  75. DEBUG - Notified event "{event}" to listener "{listener}".
  76. DEBUG - Notified event "{event}" to listener "{listener}".
  77. DEBUG - SELECT u0_.id AS id_0, u0_.email AS email_1, u0_.password AS password_2, u0_.roles AS roles_3, u0_.is_scientist AS is_scientist_4, u0_.first_name AS first_name_5, u0_.last_name AS last_name_6, u0_.avatar_uri AS avatar_uri_7, u0_.university_name AS university_name_8 FROM user u0_ WHERE u0_.is_scientist = ?
  78. DEBUG - SELECT t0.id AS id_1, t0.name AS name_2 FROM sub_family t0 WHERE t0.id = ?
  79. DEBUG - SELECT t0.id AS id_1, t0.years_studied AS years_studied_2, t0.genus_id AS genus_id_3, t0.user_id AS user_id_4 FROM genus_scientist t0 WHERE t0.genus_id = ?
  80. CRITICAL - Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: "Cannot access private property AppBundle\Entity\GenusScientist::$id" at /home/argystam/projects_linux/aqua_note/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php line 731
  81. DEBUG - Notified event "{event}" to listener "{listener}".
  82. DEBUG - Notified event "{event}" to listener "{listener}".
  83. DEBUG - Notified event "{event}" to listener "{listener}".
  84. DEBUG - Notified event "{event}" to listener "{listener}".
  85. DEBUG - Notified event "{event}" to listener "{listener}".
  86. DEBUG - Notified event "{event}" to listener "{listener}".
  87. DEBUG - Notified event "{event}" to listener "{listener}".
  88. DEBUG - Notified event "{event}" to listener "{listener}".
  89. DEBUG - Notified event "{event}" to listener "{listener}".
  90. DEBUG - Notified event "{event}" to listener "{listener}".
  91. DEBUG - Notified event "{event}" to listener "{listener}".
  92. DEBUG - Notified event "{event}" to listener "{listener}".
  93. DEBUG - Notified event "{event}" to listener "{listener}".
  94. DEBUG - Notified event "{event}" to listener "{listener}".
  95. DEBUG - Notified event "{event}" to listener "{listener}".
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102. Stack Trace (Plain Text) -
  103.  
  104. [1] Symfony\Component\Debug\Exception\FatalThrowableError: Cannot access private property AppBundle\Entity\GenusScientist::$id
  105. at n/a
  106. in /home/argystam/projects_linux/aqua_note/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php line 731
  107.  
  108. at ReflectionProperty->getValue(object(GenusScientist))
  109. in /home/argystam/projects_linux/aqua_note/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php line 731
  110.  
  111. at Doctrine\ORM\Mapping\ClassMetadataInfo->getIdentifierValues(object(GenusScientist))
  112. in /home/argystam/projects_linux/aqua_note/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/ChoiceList/IdReader.php line 125
  113.  
  114. at Symfony\Bridge\Doctrine\Form\ChoiceList\IdReader->getIdValue(object(GenusScientist))
  115. in line
  116.  
  117. at call_user_func(array(object(IdReader), 'getIdValue'), object(GenusScientist))
  118. in /home/argystam/projects_linux/aqua_note/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/ArrayChoiceList.php line 158
  119.  
  120. at Symfony\Component\Form\ChoiceList\ArrayChoiceList->getValuesForChoices(array(object(GenusScientist), object(GenusScientist), object(GenusScientist)))
  121. in /home/argystam/projects_linux/aqua_note/vendor/symfony/symfony/src/Symfony/Component/Form/ChoiceList/LazyChoiceList.php line 198
  122.  
  123. at Symfony\Component\Form\ChoiceList\LazyChoiceList->getValuesForChoices(array(object(GenusScientist), object(GenusScientist), object(GenusScientist)))
  124. in /home/argystam/projects_linux/aqua_note/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php line 52
  125.  
  126. at Symfony\Component\Form\Extension\Core\DataTransformer\ChoicesToValuesTransformer->transform(array(object(GenusScientist), object(GenusScientist), object(GenusScientist)))
  127. in /home/argystam/projects_linux/aqua_note/vendor/symfony/symfony/src/Symfony/Component/Form/Form.php line 1092
  128.  
  129. at Symfony\Component\Form\Form->normToView(array(object(GenusScientist), object(GenusScientist), object(GenusScientist)))
  130. in /home/argystam/projects_linux/aqua_note/vendor/symfony/symfony/src/Symfony/Component/Form/Form.php line 352
  131.  
  132. at Symfony\Component\Form\Form->setData(object(PersistentCollection))
  133. in /home/argystam/projects_linux/aqua_note/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataMapper/PropertyPathMapper.php line 57
  134.  
  135. at Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper->mapDataToForms(object(Genus), object(RecursiveIteratorIterator))
  136. in /home/argystam/projects_linux/aqua_note/vendor/symfony/symfony/src/Symfony/Component/Form/Form.php line 385
  137.  
  138. at Symfony\Component\Form\Form->setData(object(Genus))
  139. in /home/argystam/projects_linux/aqua_note/vendor/symfony/symfony/src/Symfony/Component/Form/Form.php line 477
  140.  
  141. at Symfony\Component\Form\Form->initialize()
  142. in /home/argystam/projects_linux/aqua_note/vendor/symfony/symfony/src/Symfony/Component/Form/FormBuilder.php line 226
  143.  
  144. at Symfony\Component\Form\FormBuilder->getForm()
  145. in /home/argystam/projects_linux/aqua_note/vendor/symfony/symfony/src/Symfony/Component/Form/FormFactory.php line 39
  146.  
  147. at Symfony\Component\Form\FormFactory->create('AppBundle\Form\GenusFormType', object(Genus), array())
  148. in /home/argystam/projects_linux/aqua_note/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php line 309
  149.  
  150. at Symfony\Bundle\FrameworkBundle\Controller\Controller->createForm('AppBundle\Form\GenusFormType', object(Genus))
  151. in /home/argystam/projects_linux/aqua_note/src/AppBundle/Controller/Admin/GenusAdminController.php line 66
  152.  
  153. at AppBundle\Controller\Admin\GenusAdminController->editAction(object(Request), object(Genus))
  154. in line
  155.  
  156. at call_user_func_array(array(object(GenusAdminController), 'editAction'), array(object(Request), object(Genus)))
  157. in /home/argystam/projects_linux/aqua_note/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php line 153
  158.  
  159. at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), '1')
  160. in /home/argystam/projects_linux/aqua_note/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php line 68
  161.  
  162. at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), '1', true)
  163. in /home/argystam/projects_linux/aqua_note/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php line 169
  164.  
  165. at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
  166. in /home/argystam/projects_linux/aqua_note/web/app_dev.php line 30
  167.  
  168. at require('/home/argystam/projects_linux/aqua_note/web/app_dev.php')
  169. in /home/argystam/projects_linux/aqua_note/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/router_dev.php line 40
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement