Skip to main content
11 events
when toggle format what by license comment
Mar 3, 2014 at 19:28 vote accept Dave Bruns
Mar 3, 2014 at 19:28 answer added Dave Bruns timeline score: 1
Mar 3, 2014 at 16:14 comment added Dave Bruns @arjan - yes, in the end, I abandoned field collections and created a custom compound field that is attached to the 'course' content type. This pretty much eliminated the performance problems. And because the field is unlimited multivalue, the delta works a sorting mechanism for the lessons in views, etc. I also added some code to add more than one item at a time as seen here: drupal.stackexchange.com/questions/52051/…
Mar 3, 2014 at 15:58 comment added arjan @DaveBruns: did you figure out an alternative solution? Interesting issue.
Jan 8, 2014 at 20:06 comment added Dave Bruns That's the way it is configured now on a production site. However, there is a new requirement to allow lessons to be re-used across multiple courses. Therefore, each course needs custom sections and its own sort order for lessons that belong to it. Any suggestions for how to approach?
Jan 8, 2014 at 20:02 comment added Bojan Zivanovic You are using the wrong tool for the job. Lessons should have a reference to courses, not the other way around. Use a custom entity type and kill field_collection.
Jan 8, 2014 at 17:47 comment added Clive Yeah it can be a bit daunting, the field example module in Examples will be very useful if you decide to go down that route
Jan 8, 2014 at 17:37 comment added Dave Bruns Thanks for the input. It's kind of a daunting amount of code at first glance, but I guess it breaks down into smaller pieces that aren't too bad. I'll try to find time to give it a shot.
Jan 8, 2014 at 16:33 comment added Clive As an alternative to field collections, would creating a compound field in code likely improve performance significantly? Always depends on how much data you have, but yes, almost certainly. If you have a field collection with 5 fields, that's at least 5 db queries (or joins, if you're lucky) to get the data. With a compound field that would be reduced to a single query
Jan 8, 2014 at 16:32 history edited Dave Bruns CC BY-SA 3.0
Added a screenshot for reference
Jan 8, 2014 at 16:24 history asked Dave Bruns CC BY-SA 3.0