#silverstripe IRC Log

IRC log for 23 March 2017

All timestamps are in UTC.

1: [06:15:19] * ss-log has joined #silverstripe
2: [06:21:36] * Shrike_Finland has joined #silverstripe
3: [06:34:08] * Shrike_Finland quit (Quit: Leaving.)
4: [07:02:05] * jbrungar quit (Ping timeout: 240 seconds)
5: [07:07:00] * jbrungar has joined #silverstripe
6: [09:05:57] * kinglozzer has joined #silverstripe
7: [09:17:19] * r5v3rb has joined #silverstripe
8: [09:17:39] <r5v3rb> not long before this channel is dead then… less and less each time I log in
9: [09:17:45] <r5v3rb> people that is
10: [09:22:09] <kinglozzer> rip :'(
11: [09:23:26] <Zauberfisch> indeed
12: [09:23:29] <Zauberfisch> bloody slack D:
13: [09:31:45] * agent44 has joined #silverstripe
14: [09:45:23] <r5v3rb> slaccccccccck, pinging all day and night - wife hates it already!
15: [10:05:04] <Zauberfisch> haha
16: [10:07:36] <r5v3rb> Zauberfisch: it’s on my phone and every few so often in the evening a conversation gets heated and pings all over the place :)
17: [10:07:51] <r5v3rb> every so often *** even
18: [10:11:37] * DarjusIT has joined #silverstripe
19: [11:56:34] * filisko has joined #silverstripe
20: [13:27:08] * Shrike_Finland has joined #silverstripe
21: [14:20:24] * Teddy has joined #silverstripe
22: [14:21:39] * UndefinedOffset has joined #silverstripe
23: [14:21:41] * Shrike_Finland quit (Quit: Leaving.)
24: [14:21:47] <Teddy> hey guys, i want to manage event under a event listing page using grifield on that event listing, but whenever i create a new even, it sets the parent is as root. Any idea how to make the event set it's parent id depending on the event listing page using the gridfield ?
25: [14:24:32] <Teddy> i have defined a has many from event listng page and has one from event to event listing
26: [14:25:18] <Teddy> but unline data objest, using a gridfield to crate them won't set the event listing as it's id page, unlike when you right click on that page type and select to ceate an event
27: [14:26:24] <Teddy> something like this would only set it's parent as the first instance of that page type, which in case they are more, is not that great of a soluting $this->ParentID = BlogListing::get()->First()->ID;
28: [14:33:41] <kinglozzer> Teddy: You could manually edit the ParentID field from the GridField side... 1 sec
29: [14:35:36] <kinglozzer> https://gist.github.com/kinglozzer/be191c6e7adec3741c43cf7fc7f7de83 like that
30: [14:35:49] <kinglozzer> I haven't tested it though :P
31: [14:36:50] <Teddy> kinglozzer, interesting :D thanks i'll see if i can get that to work
32: [14:39:01] * Eliseth has joined #silverstripe
33: [14:39:30] <Zauberfisch> Teddy: I am confused
34: [14:39:38] <Zauberfisch> gridfield normaly does that automatically for you
35: [14:39:53] <Zauberfisch> you are kind of doing something wrong when it doesn't assign has_many realtions for you
36: [14:40:21] <Teddy> Zauberfisch, i think so too, i should also mention that i'm using subsites module as well
37: [14:40:31] <Teddy> Zauberfisch, and it might mess with that in some way :/
38: [14:40:32] * Eliseth quit (Client Quit)
39: [14:40:36] <Zauberfisch> hmm
40: [14:40:38] <kinglozzer> Are you talking about setting a relation though, or just the ParentID field?
41: [14:40:40] <Zauberfisch> I don't think so
42: [14:41:13] <Zauberfisch> Teddy: are you passing the right DataList to the GridField?
43: [14:42:24] <kinglozzer> Tbh Teddy, it sounds more like you should be using the "lumberjack" module
44: [14:42:29] * Shrike_Finland has joined #silverstripe
45: [14:42:49] <Zauberfisch> I actually assumed that Event is a DataObject
46: [14:43:05] <Zauberfisch> if Event is a SiteTree Object, then you should indeed consider using the lumberjack module
47: [14:43:10] <kinglozzer> https://github.com/silverstripe/silverstripe-lumberjack Teddy
48: [14:43:32] <kinglozzer> Then you don't need the has_many/has_one, you can just use <% loop $Children %> for example
49: [14:44:20] * Teddy_ has joined #silverstripe
50: [14:45:16] <Teddy_> kinglozzer, just setting the relationship between event listing and event article, so that when i create a new page using the gridfield inside the event listing it will set it's parent as that event listing page
51: [14:45:22] * Teddy quit (Ping timeout: 264 seconds)
52: [14:45:33] * Teddy_ quit (Client Quit)
53: [14:45:45] * Teddy_ has joined #silverstripe
54: [14:46:13] <kinglozzer> Teddy_: If you've got pages in a GridField, you almost certainly should be using lumberjack
55: [14:47:27] * Teddy__ has joined #silverstripe
56: [14:47:55] <Teddy__> kinglozzer, didn't know about this, looks interesting
57: [14:48:32] * DimiStripe quit (Quit: DimiStripe)
58: [14:49:04] <kinglozzer> Teddy__: It creates the GridField, and also hides them from the tree - so you won't end up with hundreds of events clogging up the tree view
59: [14:50:46] * Teddy_ quit (Ping timeout: 264 seconds)
60: [14:51:19] <Teddy__> kinglozzer, seems not too popular
61: [14:51:30] <Teddy__> kinglozzer, but stable
62: [14:51:39] <kinglozzer> ?
63: [14:51:42] <kinglozzer> It's very popular :P
64: [14:51:45] <kinglozzer> It's used by the blog module
65: [14:52:22] <Teddy__> kinglozzer, sorry meant by git stars :D you know compared to the likes of gridfield extensions etc
66: [14:54:17] <kinglozzer> Heh, I imagine it probably has almost as many installs
67: [14:57:09] <Zauberfisch> Teddy__: lumberjack is pretty good
68: [14:57:51] <Teddy__> Zauberfisch, on it right now :D it's pretty handy
69: [15:16:16] * tryingtogetthis has joined #silverstripe
70: [15:16:17] <ss-helper> tryingtogetthis: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
71: [15:17:08] <tryingtogetthis> I've got a really interesting quandary if anyone is available to help.
72: [15:18:12] <Zauberfisch> you'll find out once you asked your question
73: [15:18:41] <tryingtogetthis> I am trying to display DataObjects across 2 sites, both using SilverStripe. I have got data showing, but it's raw from the database. So I cannot format the date, and links are broken. Is there a way to pull the DataObjects instead of the sql data?
74: [15:19:05] <kinglozzer> Depends on how you're fetching it really
75: [15:19:18] <kinglozzer> If you're using raw MySQL queries it's going to be trickier than if you're using SQLQuery
76: [15:19:26] <Zauberfisch> yep
77: [15:19:37] <kinglozzer> If you're using SQLQuery, someone's already got your back: https://github.com/burnbright/silverstripe-sqlquerylist
78: [15:19:40] <Zauberfisch> but really, if it's 2 silverstripe sites, I would consider building a small API
79: [15:20:03] <tryingtogetthis> currently, I have a 2nd global dbconfig
80: [15:20:03] <Zauberfisch> a simple json endpoint that spits out the data you need
81: [15:22:39] <tryingtogetthis> That sqlquerylist maybe JUST what I needed
82: [15:23:06] <tryingtogetthis> I am hosting 2 sites, on 2 servers (it's complicated and dumb, but out of my control)
83: [15:23:33] <tryingtogetthis> I would like to have our companies news articles displayed on both sites, but preferably managed only through 1.
84: [15:29:46] * Teddy__ quit (Ping timeout: 264 seconds)
85: [17:16:01] * DarjusIT quit (Quit: Leaving)
86: [17:19:58] <tryingtogetthis> Is there a reason that I cannot use variables like $Date.Month with data that I am pulling from an external DB?
87: [17:24:57] * Shrike_Finland quit (Quit: Leaving.)
88: [17:29:36] <kinglozzer> tryingtogetthis: You need to cast them to DBField instances most likely, before passing them to the template layer
89: [17:29:53] <kinglozzer> e.g. DBField::create_field('Date', '2017-01-01 00:00:00')
90: [17:29:58] * kinglozzer quit ()
91: [17:38:25] <tryingtogetthis> hmmm, I have to figure this out. I've never dont this.
92: [17:39:43] <tryingtogetthis> Done*
93: [17:44:10] <Zauberfisch> I would really recommend building a small api
94: [17:44:18] <Zauberfisch> just a simple controller that echos some json
95: [17:44:48] <Zauberfisch> and on the other side just parse the json again and build yourself an ArrayData object
96: [17:46:51] <tryingtogetthis> I have absolutely no knowledge of how to do that.
97: [17:46:59] <tryingtogetthis> I am an amatuer at best.
98: [17:47:14] <tryingtogetthis> I would be more than happy to learn if you can point me in the direction of where to start reading up on this though.
99: [18:02:06] * agent44 quit (Quit: zzz)
100: [18:52:21] * DimiStripe has joined #silverstripe
101: [19:01:59] * Shrike_Finland has joined #silverstripe
102: [19:50:44] * gelignite has joined #silverstripe
103: [19:53:19] <Zauberfisch> tryingtogetthis: you do have basic php skills?
104: [19:53:37] <tryingtogetthis> Yes, for sure.
105: [19:55:37] <Zauberfisch> what I would do:
106: [19:56:03] <Zauberfisch> if it's really just the news, then I would create a controller, have it output the news as json
107: [19:56:37] <Zauberfisch> and on the other silverstripe site just make a http query to the url of that controller and json_decode() that date
108: [19:57:13] <tryingtogetthis> It's slightly more complicated than "just news". Some have attachments, there are images associated, dates, links, etc.
109: [19:57:47] <Zauberfisch> shortly afk
110: [19:57:52] <Zauberfisch> poke me in 20 minutes
111: [19:58:10] <tryingtogetthis> ok, will do.
112: [19:58:10] <Zauberfisch> but I would still do it via api
113: [19:58:32] <Zauberfisch> accessing another websites database doesn't feel right
114: [19:59:11] <tryingtogetthis> Yeah, they are both under the same ownership, just one is onsite, and one is offsite.
115: [20:08:53] * UndefinedOffset quit (Quit: Leaving.)
116: [20:24:58] * Shrike_Finland quit (Quit: Leaving.)
117: [20:34:03] * Nightjar has joined #silverstripe
118: [21:02:11] * r5v3rb quit (Quit: r5v3rb)
119: [21:22:18] * Firesphere quit (Changing host)
120: [21:22:18] * Firesphere has joined #silverstripe
121: [21:23:50] * Isaac_ has joined #silverstripe
122: [21:45:17] <Nightjar> It's very quiet in here :/
123: [22:26:54] * Isaac_ quit (Ping timeout: 260 seconds)
124: [22:28:45] <cloph> better than lots of noise I'd say
125: [22:31:07] <Nightjar> eh
126: [22:54:17] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
127: [22:57:27] * micmania1 has joined #silverstripe
128: [22:57:55] <micmania1> Anybody got a solution for too many questions in userforms? Its causing CMS load issues (too slow)
129: [22:58:51] <micmania1> There's about 80 questions but each one is a field group with about 3 or 4 questions so actually around 300+ items in the form builder page
130: [23:00:01] * ss-helper quit (Remote host closed the connection)
131: [23:00:18] * ss-helper has joined #silverstripe
132: [23:21:12] * Audlex- quit (Ping timeout: 240 seconds)
133: [23:28:26] * micmania1 has left #silverstripe
134: [23:28:53] * micmania2 has joined #silverstripe
135: [23:35:53] <Nightjar> ss23, wakeup, wakeup! We need you!
136: [23:35:58] <Nightjar> We have a lock!
137: [23:42:11] <Nightjar> and no key!
138: [23:46:06] <Nightjar> micmania2, could you sequentially load on demand?
139: [23:46:16] <Nightjar> like, get a list of all the things
140: [23:46:32] <Nightjar> then only load details when needed (on click to edit that field, or whatnot)?

These logs were automatically created by ss-log on irc.freenode.net.