Log message #4032477

# At Username Text
# May 25th 2017, 20:28 jeremyharris also remove result_id, that should be automatically set on save
# May 25th 2017, 20:28 meder_ ok
# May 25th 2017, 20:28 jeremyharris for one
# May 25th 2017, 20:28 jeremyharris remove the id
# May 25th 2017, 20:27 meder_ sorry
# May 25th 2017, 20:27 meder_ lot of file upload stuff there, but i think the issue is the id is blank as you said
# May 25th 2017, 20:27 jeremyharris yeah I’m just getting confused by the differences
# May 25th 2017, 20:27 meder_ i know it's recommended to paste the real code but honestly there was a crap ton of stuff i had to chop off.
# May 25th 2017, 20:27 meder_ yes
# May 25th 2017, 20:27 jeremyharris meder_ your Attachments table is in a plugin called Results, right?
# May 25th 2017, 20:27 inoas but we cannot allow the "design agencies" that work with us to get access to the source code in any way... and we need revisions and translation, so we do it through the database
# May 25th 2017, 20:26 inoas do you actually use TwigView to write twig template files instead of php ones within projects? cause it looked to me like that was its golden use case
# May 25th 2017, 20:25 jeremyharris meder_ $attachments contains keys that your gist doesn’t even set
# May 25th 2017, 20:25 inoas plugin_type_uuid_revision-uuid.twig
# May 25th 2017, 20:25 inoas cause my twig files come from the database and look like FlexiCms_document_76ad7ef8_863b_456b_9490_c63d6ce0657a_76ad7ef8_863b_456b_9490_c63d6ce0657a.twig
# May 25th 2017, 20:25 meder_ hm the id is blank yeah
# May 25th 2017, 20:25 inoas I am not sure... I really would want to have twig template loading... like loading from a base template - but that won't be so easy
# May 25th 2017, 20:24 WyriHaximus Yeah TwigView is designed to cover a lot more cases :)
# May 25th 2017, 20:24 meder_ https://gist.github.com/anonymous/70f9f90f2830ecf9614cc4f2a3cf6f28 jeremyharris
# May 25th 2017, 20:23 inoas I am just reusing the idea how to get helpers loaded <3 and the extensions :)
# May 25th 2017, 20:23 inoas TwigView does a lot more
# May 25th 2017, 20:23 inoas so I do not need to catch all kind of cases
# May 25th 2017, 20:23 inoas well at least my stuff is tightly integrated
# May 25th 2017, 20:22 WyriHaximus Aye, and if it doesn't, adept and release a new (major) verison
# May 25th 2017, 20:21 inoas go the long run ;p?
# May 25th 2017, 20:21 WyriHaximus inoas: awesome sounds great :D, only one way to find out how it works out in the long run ;)
# May 25th 2017, 20:20 jeremyharris meder_ I think you are misusing $id there, as it is setting the id of the attachment. you should leave it empty so it is automatically associated with Results
# May 25th 2017, 20:19 meder_ ok sec
# May 25th 2017, 20:19 inoas but I am still unsure if the way I do things is good in the long run
# May 25th 2017, 20:19 jeremyharris yes
# May 25th 2017, 20:19 meder_ jeremyharris: $attachments is line 20, its not an entity its just a raw php array with the ids/fields
# May 25th 2017, 20:19 inoas like say {{ Html.css('/assets/vendor/node_modules/marx-css/css/marx.min.css')|raw }}
# May 25th 2017, 20:19 inoas and I could reuse all the nice extensions you build :)
# May 25th 2017, 20:18 jeremyharris meder_ can you please gist $attachments at that point, as well as $patchedEntity
# May 25th 2017, 20:18 inoas so all that's nice...
# May 25th 2017, 20:18 inoas and the twig templates that reside in my database are already written as twig files, then again cached by twig loader
# May 25th 2017, 20:18 meder_ eg $entity['attachments'] = array_merge ( $entity['attachments'], $attachments );
# May 25th 2017, 20:18 meder_ do I just need to "patch" $entity['attachments'] with line 25?
# May 25th 2017, 20:18 inoas WyriHaximus: I can already use helpers, and extensions that you supply
# May 25th 2017, 20:18 jeremyharris so that’s why using ‘associated’ showed no difference
# May 25th 2017, 20:18 meder_ ok