#silverstripe IRC Log

IRC log for 25 January 2017

All timestamps are in UTC.

1: [00:04:50] * janneklouman-- has joined #silverstripe
2: [00:13:03] * BackEndCoder quit (Excess Flood)
3: [00:15:27] * BackEndCoder has joined #silverstripe
4: [00:20:05] * janneklouman-- quit (Ping timeout: 256 seconds)
5: [00:57:34] * DarjusIT quit (Read error: Connection reset by peer)
6: [01:24:26] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
7: [01:32:24] * micmania1 quit (Quit: micmania1)
8: [01:32:47] * micmania1 has joined #silverstripe
9: [01:52:45] <zippy> MAMP Pro 4 sure is a bit buggy
10: [01:59:17] * UncleCheese has joined #silverstripe
11: [02:30:05] <ss-helper> Error installing new subdomain website on Silverstripe - http://stackoverflow.com/questions/41842388/error-installing-new-subdomain-website-on-silverstripe
12: [02:53:17] * muskie9 has joined #silverstripe
13: [03:01:00] * muskie9 quit (Read error: Connection reset by peer)
14: [03:02:07] * muskie9 has joined #silverstripe
15: [03:02:44] * muskie9 quit (Client Quit)
16: [03:15:06] <ss-helper> SilverStripe / Entwine hooking action to save-button - http://stackoverflow.com/questions/41456016/silverstripe-entwine-hooking-action-to-save-button
17: [03:16:35] * zippy quit (Quit: Textual IRC Client: www.textualapp.com)
18: [03:53:03] * spronk has joined #silverstripe
19: [04:05:55] * Tron_ quit (Ping timeout: 260 seconds)
20: [04:39:29] * janneklouman-- has joined #silverstripe
21: [04:41:10] * micmania1 quit (Quit: micmania1)
22: [04:44:10] * janneklouman-- quit (Ping timeout: 240 seconds)
23: [05:13:03] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
24: [05:29:52] * Pyromanik has joined #silverstripe
25: [05:57:44] * spronk quit (Quit: I may need a longer sleep timer...)
26: [06:00:31] * Pyromanik quit (Quit: Leaving)
27: [06:00:41] * DanaeNZ quit (Remote host closed the connection)
28: [06:01:19] * DanaeNZ has joined #silverstripe
29: [06:05:35] * DanaeNZ quit (Ping timeout: 240 seconds)
30: [06:40:02] * UncleCheese has joined #silverstripe
31: [07:05:57] * wmk has joined #silverstripe
32: [07:14:55] * wmk_ has joined #silverstripe
33: [07:15:05] * wmk quit (Ping timeout: 240 seconds)
34: [07:40:31] * wmk_ is now known as wmk
35: [07:47:54] * Eliseth has joined #silverstripe
36: [08:57:14] * kinglozzer has joined #silverstripe
37: [09:00:36] * BackEndCoder quit (Excess Flood)
38: [09:01:30] * BackEndCoder has joined #silverstripe
39: [09:13:20] * janneklouman-- has joined #silverstripe
40: [09:18:58] * NETim_ quit (Ping timeout: 264 seconds)
41: [09:20:03] * NETim_ has joined #silverstripe
42: [09:37:28] * agent44 has joined #silverstripe
43: [10:02:46] * DanaeNZ has joined #silverstripe
44: [10:07:02] * DanaeNZ quit (Ping timeout: 255 seconds)
45: [10:09:45] * agent44 quit (Quit: zzz)
46: [10:10:33] * agent44 has joined #silverstripe
47: [10:12:37] * samsamek has joined #silverstripe
48: [10:50:17] * BackEndCoder quit (Excess Flood)
49: [10:51:01] * BackEndCoder has joined #silverstripe
50: [10:58:03] * slievr1 has joined #silverstripe
51: [10:59:11] * slievr quit (Ping timeout: 258 seconds)
52: [11:20:58] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
53: [11:52:40] * filisko has joined #silverstripe
54: [11:53:04] * samsamek quit (Quit: samsamek)
55: [12:02:29] * filisko quit (Ping timeout: 240 seconds)
56: [12:15:31] * filisko has joined #silverstripe
57: [12:26:10] * NETim_ quit (Ping timeout: 264 seconds)
58: [13:00:23] * DanaeNZ has joined #silverstripe
59: [13:31:46] * UndefinedOffset has joined #silverstripe
60: [14:23:06] * NETim_ has joined #silverstripe
61: [14:35:18] * agent44 quit (Quit: zzz)
62: [14:36:45] * agent44 has joined #silverstripe
63: [14:41:04] * agent44 quit (Ping timeout: 255 seconds)
64: [14:47:30] * agent44 has joined #silverstripe
65: [14:48:47] * UndefinedOffset quit (Quit: Leaving.)
66: [14:51:53] * UndefinedOffset has joined #silverstripe
67: [15:00:19] <ss-helper> Error installing another PHP app in subfolder of SilverStripe - http://stackoverflow.com/questions/41842388/error-installing-another-php-app-in-subfolder-of-silverstripe
68: [15:06:02] * agent44 quit (Ping timeout: 259 seconds)
69: [15:09:32] * agent44 has joined #silverstripe
70: [15:25:47] * agent44 has left #silverstripe
71: [15:34:35] * DanaeNZ quit (Ping timeout: 240 seconds)
72: [15:38:55] * filisko quit (Ping timeout: 255 seconds)
73: [15:45:23] * NETim_ quit (Ping timeout: 252 seconds)
74: [15:46:27] * NETim_ has joined #silverstripe
75: [15:52:07] * filisko has joined #silverstripe
76: [15:54:08] * agent44 has joined #silverstripe
77: [16:14:22] * samsamek has joined #silverstripe
78: [16:15:05] <samsamek> So guys, suppose you have 3 DataExtensions for Page. How do you know which one is “read” first?
79: [16:15:12] <samsamek> executed*
80: [16:27:21] <kinglozzer> last in, first out samsamek
81: [16:27:26] * gelignite has joined #silverstripe
82: [16:27:37] <samsamek> Not sure if sarcasm or..
83: [16:27:39] <samsamek> :p
84: [16:28:02] <kinglozzer> Nope samsamek :P
85: [16:28:04] <kinglozzer> https://gist.github.com/kinglozzer/b81ca4eb04ea42b56e78
86: [16:28:06] <kinglozzer> Does that help?
87: [16:28:06] <samsamek> oh as in last cached?
88: [16:29:05] <samsamek> I see!
89: [16:29:08] <kinglozzer> If you don't explicitly order them, I assume that it'll just be alphabetical order for whatever yml file it hits first
90: [16:30:03] <samsamek> okay that makes sense
91: [16:30:37] * Eliseth quit (Quit: Textual IRC Client: www.textualapp.com)
92: [16:32:32] <samsamek> I’m trying to create a method ‘getNames’ (for Page) that is “expandable” like getCMSFields. On the first call, the method return an array with ‘Sam’. Then, in a different module folder, in another Page_Extension, the method calls parent::getNames (returning an array holding ‘Sam’, pushes another name into the array, and returns it.
93: [16:34:03] <samsamek> The chain can go on and on, but it’s important that the Page_Extension holding the initial method where the array is created, is executed first, right?
94: [16:34:19] <samsamek> hope that’s not confusing :)
95: [16:34:23] <kinglozzer> samsamek: I wouldn't structure it like that personally
96: [16:34:30] <samsamek> no?
97: [16:34:34] <kinglozzer> Unless...
98: [16:34:41] <kinglozzer> I'm a bit confused, yeah :P
99: [16:34:53] <kinglozzer> So you need extensions of extensions?
100: [16:34:57] <samsamek> hehe okay I’ll explain using real object names
101: [16:35:35] <samsamek> basically I have a tab for Page named “Header”. User can choose between: [still image, slider, map]
102: [16:35:53] <samsamek> so there’s a dropdownfield, that holds an array with all the possible types
103: [16:36:32] <samsamek> I want the list of types to be expandable. So later, I could add a module that adds a new item type to that list, let’s say Video
104: [16:36:57] <samsamek> I need to push ‘Video’ into that array somehow, from the outside
105: [16:37:36] <samsamek> I could create a database table with all the possible types, but that’s bad design IMO
106: [16:39:20] <kinglozzer> samsamek: But the original "getNames" method lives in an extension?
107: [16:39:28] <samsamek> yup!
108: [16:39:31] <kinglozzer> Okay
109: [16:40:22] <kinglozzer> Something like this maybe? https://gist.github.com/kinglozzer/812868cb1eff7bb54f5dfdc6a88c4cbd
110: [16:40:41] <samsamek> Yes!
111: [16:40:41] <kinglozzer> Each extension would be applied to Page
112: [16:41:01] <samsamek> gimme a minute to study it
113: [16:42:12] <samsamek> $this->owner->extend('updateNames', $names);
114: [16:42:24] <samsamek> that’s the hook right?
115: [16:42:45] <kinglozzer> That's what will trigger the calls to "updateNames" on the "child" extensions, yeah
116: [16:42:53] <samsamek> on *all* the child extensions right?
117: [16:42:56] <kinglozzer> Yeah
118: [16:42:58] <samsamek> you’re awesome mate
119: [16:43:15] <kinglozzer> :P
120: [16:52:35] <wmk> samsamek, good point
121: [16:53:00] <samsamek> wmk: which one exactly? :D
122: [16:53:14] <wmk> basically it's like thining "I'm currently in the extension class, but i have to behave like I'm in the original class I extend. Just use $this->owner"
123: [16:53:36] <wmk> so in your extension you can use $this->owner->extend to loop over all extensions of that owner
124: [16:53:54] <wmk> you won't extend the extension but the owner
125: [16:54:09] <samsamek> very convenient
126: [16:54:35] <samsamek> is this kind of extension system just something common in most php frameworks?
127: [16:55:08] <wmk> hmm, every framework has different paradigms.
128: [16:55:58] <wmk> kinglozzer, do you know the pattern name of Extension / DataExtension? In the past it was called DataDecorator, but i guess it's not the decorator pattern?
129: [16:58:14] <kinglozzer> No idea! It doesn't really fit the decorator pattern, no - http://designpatternsphp.readthedocs.io/en/latest/Structural/Decorator/README.html
130: [16:58:21] <wmk> jup.
131: [16:58:38] <wmk> have to look my php design patterns book when I'm in office the next time
132: [16:58:59] <kinglozzer> I can never remember any of them :P
133: [16:59:09] <wmk> hehe...
134: [16:59:09] <kinglozzer> Factory & dependency injection, that's about it
135: [16:59:11] <kinglozzer> :D
136: [16:59:36] <wmk> it's important to know them and remember where you can look up.
137: [17:00:22] <samsamek> O’Reily ftw
138: [17:01:30] * janneklouman-- quit (Ping timeout: 245 seconds)
139: [17:03:13] <wmk> samsamek, basically i read this years ago http://amzn.to/2kjoqDS
140: [17:03:35] <samsamek> I have this book, hehe
141: [17:03:59] <samsamek> it’s supposed to be one of the best
142: [17:04:43] <wmk> dunno if it's worth to buy the update?
143: [17:05:45] <wmk> ouch... the first comment hurts... "after 15 years of procedural php i decided last year to learn OO"
144: [17:06:06] <wmk> 15 years!!!
145: [17:22:37] * filisko quit (Ping timeout: 255 seconds)
146: [17:29:58] * kinglozzer quit ()
147: [17:30:21] <ss-helper> SilverStripe editing gridfield records of 'far' relation - http://stackoverflow.com/questions/41857857/silverstripe-editing-gridfield-records-of-far-relation
148: [17:34:17] * filisko has joined #silverstripe
149: [17:36:05] * wmk quit (Ping timeout: 240 seconds)
150: [17:39:47] * NETim_ quit (Ping timeout: 252 seconds)
151: [17:40:25] * NETim has joined #silverstripe
152: [17:40:48] * filisko quit (Ping timeout: 240 seconds)
153: [17:48:44] * sam__ has joined #silverstripe
154: [17:49:06] <sam__> I have a dataobject and I want to update on certain condition this is my code
155: [17:49:19] <sam__> http://www.sspaste.com/paste/show/5888e517eb63b
156: [17:49:36] <sam__> I searched but couldn't find any helpfull info.
157: [17:50:52] * eron has joined #silverstripe
158: [17:50:52] <ss-helper> eron: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
159: [17:51:38] <eron> I am using ss newsletter module and having an issue when I try to publish newsletter page with some content update
160: [17:51:48] <eron> it shows me this error and doesn't save Notice at line 338 of /var/www/html/dyam/framework/forms/CheckboxSetField.php
161: [17:55:58] * filisko has joined #silverstripe
162: [18:03:35] * eron quit (Ping timeout: 260 seconds)
163: [18:03:35] * sam__ quit (Ping timeout: 260 seconds)
164: [18:10:50] * sam__ has joined #silverstripe
165: [18:10:54] <sam__> I have a dataobject and I want to update on certain condition this is my code [23:19] <sam__> http://www.sspaste.com/paste/show/5888e517eb63b [23:19] <sam__> I searched but couldn't find any helpfull info
166: [18:24:17] * agent44 quit (Quit: Bai!)
167: [18:42:49] <samsamek> sam__: on what condition?
168: [18:46:10] * sam__ quit (Ping timeout: 260 seconds)
169: [19:19:41] * BackEndCoder quit (Excess Flood)
170: [19:20:30] * BackEndCoder has joined #silverstripe
171: [19:27:08] <Nightjar_> that... looks like it should be a form action handler.
172: [19:28:04] <Nightjar_> seems like whatever sam__ is doing, it's not... "the SilverStripe way" :/
173: [19:29:03] <Nightjar_> Needs a link to the docs on form building, should they return I think.
174: [19:30:42] * filisko quit (Ping timeout: 240 seconds)
175: [19:31:44] * DanaeNZ has joined #silverstripe
176: [19:36:05] * DanaeNZ quit (Ping timeout: 260 seconds)
177: [19:41:33] * janneklouman-- has joined #silverstripe
178: [19:43:57] * filisko has joined #silverstripe
179: [19:45:18] <samsamek> “The SilverStripe way"
180: [19:45:19] <samsamek> I like that.
181: [19:46:34] * janneklouman-- quit (Ping timeout: 264 seconds)
182: [20:46:13] * micmania1 has joined #silverstripe
183: [21:28:22] <samsamek> You can’t push a FieldList in a FieldList right?
184: [21:29:09] * DanaeNZ has joined #silverstripe
185: [21:29:16] <samsamek> In case you would need to merge to FieldList’s from two different getCMSFields()
186: [21:29:25] <samsamek> two*
187: [21:33:25] <Nightjar_> Nup
188: [21:33:26] <Nightjar_> well
189: [21:33:27] <Nightjar_> yup
190: [21:33:31] <Nightjar_> they're just lists
191: [21:33:38] <Nightjar_> but you're probably after something like CompositeField
192: [21:34:15] <Nightjar_> samsamek, ^
193: [21:34:58] <samsamek> not sure how compositefields would help, but I made a little workaround :p
194: [21:54:53] * UndefinedOffset quit (Quit: Leaving.)
195: [22:03:47] * UncleCheese has joined #silverstripe
196: [22:08:01] * Audlex has joined #silverstripe
197: [22:08:47] * UncleCheese quit (Ping timeout: 276 seconds)
198: [22:10:20] * LimRes quit (Ping timeout: 260 seconds)
199: [22:13:11] * Audlex quit ()
200: [22:13:26] * Audlex has joined #silverstripe
201: [22:14:33] <Audlex> could anyone point me in the right direction of duplicating a has_many when duplicating the page?
202: [22:14:46] <Audlex> i found a handy thread about it but it seems to be for 2.4
203: [22:19:27] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
204: [22:31:32] * filisko quit (Ping timeout: 276 seconds)
205: [22:43:34] * filisko has joined #silverstripe
206: [22:49:11] * janneklouman-- has joined #silverstripe
207: [22:54:31] * filisko quit (Ping timeout: 255 seconds)
208: [22:59:56] * BackEndCoder quit (Excess Flood)
209: [23:00:01] * ss-helper quit (Remote host closed the connection)
210: [23:00:17] * ss-helper has joined #silverstripe
211: [23:00:31] * BackEndCoder has joined #silverstripe
212: [23:04:02] * janneklouman-- quit (Read error: Connection reset by peer)
213: [23:09:50] * janneklouman-- has joined #silverstripe
214: [23:11:00] * filisko has joined #silverstripe
215: [23:30:46] * janneklouman-- quit (Read error: Connection reset by peer)
216: [23:33:40] * filisko quit (Ping timeout: 240 seconds)
217: [23:36:10] * micmania1 quit (Quit: micmania1)
218: [23:47:38] * janneklouman-- has joined #silverstripe
219: [23:57:24] <pippy> Audlex: overwrite the clone( ... ) function?

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