How to fill a file field with a new media:document?
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3450731. --> Reported by: [bogdog400](https://www.drupal.org/user/178047) >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>My goal is to create a new content node (X) for each new media document (Y) that is created. </p> <p>I've successfully added four actions to the event that's triggered when (Y) is uploaded. </p> <p>(1) Create new content of type Doc (this will be X above)<br> (2) Fill text field of (X) with token: media:name<br> (3) Fill Media Document field of Doc with (Y)<br> (4) Publish (X). </p> <p>Of these four actions, three work fine: 1,2 and 4. </p> <p>But I've tried these tokens to fill in the media document field of (X) with (Y):<br> [media:original]<br> [media:field_media_document]</p> <p>I don't get an error in the logs. I just get the created published content with the text field filled with the correct file name. But the media document field is empty. </p> <p>Any suggestions? </p> <p>Sorry to bother you. This is quite a nice module. </p> <p>TIA. </p>
issue