Guite/MostGenerator — Issue #120: Issue with input handling on m:n-Relations
Author: rgasch
Created: 2011-10-27 17:20:08+00:00
State: open

As discussed on email (only issue #1 is relevant to this bug report):

wenn ich versuche (manuell) ein MediaFormat anzulegen, dann gebe ich
einen Namen ein und waehle 2 MediaGroups. Soweit, so gut.

Wenn ich das formular absende dann wird der Eintrag auch erstellt, aber

1) Die Tabelle medrep_mediagroup_mediaformat bleibt leer

Ich habe mal nachgeforscht und folgendes herausgefunden:

REQUEST/POST:
array
'module' => string 'mediarepository' (length=15)
'type' => string 'admin' (length=5)
'func' => string 'edit' (length=4)
'ot' => string 'mediaFormat' (length=11)
'name' => string 'Test' (length=4)
'medrepMediaGroup_GroupsSelector' => string '' (length=0)
'medrepMediaGroup_GroupsScope' => string '1' (length=1)
'medrepMediaGroup_GroupsItemList' => string '5,1' (length=3)
'medrepMediaGroup_GroupsMode' => string '0' (length=1)
'btnCreate_create' => string 'Create media format' (length=19)
'__FormSTATE' => string 'true' (length=4)
'csrftoken' => string
'NGVhOTg3MDU5ZWQ4MzcuNzEzNTY2NTk6OGI5M2YyZGZkZmVhYjBiZmI5NWY2NjVlMjhlYzM4ODE6MTMxOTczMjk5Nw=='
(length=92)
'__formid' => string 'f4ea987057549e' (length=14)
'FormEventTarget' => string '' (length=0)
'FormEventArgument' => string '' (length=0)

MediaFormat Object:
object(MediaRepository_Entity_MediaFormat)[243]
protected '_objectType' => string 'mediaFormat' (length=11)
protected '_idFields' =>
array
0 => string 'id' (length=2)
protected '_validator' =>
object(MediaRepository_Entity_Validator_MediaFormat)[244]
protected 'entity' =>
&object(MediaRepository_Entity_MediaFormat)[243]
protected 'name' => null
protected 'baseDir' => null
protected 'systemBaseDir' => null
protected 'libBaseDir' => null
protected 'modinfo' => null
protected 'domain' => null
protected 'serviceManager' => null
protected 'eventManager' => null
protected 'entityManager' => null
protected 'request' => null
protected 'reflection' => null
protected '_hasUniqueSlug' => boolean false
protected 'id' => int 0
protected 'name' => string 'Test' (length=4)
protected 'extensions' =>
array
empty
protected 'createdUserId' => null
protected 'updatedUserId' => null
protected 'createdDate' => null
protected 'updatedDate' => null
protected 'groups' =>
array
empty

Wie du siehst ist $mediaFormats->groups() leer.

Fragen:
1) Muss ich groups manuell in einem z.b. prePersistCallback() setzen?