#silverstripe IRC Log

IRC log for 4 January 2015

All timestamps are in UTC.

1: [00:00:22] <madmatt> Yeah
2: [00:01:08] <madmatt> The project this comes from has a heavy amount of unit and behavioural (behat) tests, so it might be that there's some other thing that actually enforces that data existing
3: [00:01:10] <ezero> this is looking promising
4: [00:01:11] <madmatt> But I don't think so
5: [00:03:23] <ezero> really
6: [00:03:25] <ezero> cant do this
7: [00:03:25] <ezero> private static $defaults = array(
8: [00:03:26] <ezero> 'SPEntityID' => Director::absoluteBaseURL()
9: [00:03:26] <ezero> );
10: [00:04:13] <madmatt> Nah, not in PHP
11: [00:04:47] <madmatt> But you don't need to keep the way I've done it with the array, just do it in the code instead
12: [00:05:11] <ezero> yea ill fudge it in that method
13: [00:05:15] <ezero> requireDefaultRecords
14: [00:05:22] <ezero> it was kinda nice they way you did it
15: [00:08:39] * gelignite quit (Quit: http://bit.ly/nkczDT)
16: [00:10:27] <ezero> YES!
17: [00:10:31] <ezero> SUCCESS!
18: [00:11:09] <ezero> thanks madmatt :D and Zauberfisch
19: [00:11:15] <ezero> doing it like this instead
20: [00:11:15] <ezero> http://sspaste.com/paste/show/54a88501e7a62
21: [00:12:36] <madmatt> ezero: Nice :) Note that it won't overwrite existing values, but you should probably test for that (as it will run on every dev/build)
22: [00:12:50] <ezero> oh crap
23: [00:12:57] <ezero> lol yeah no it shouldn't!
24: [00:13:02] <ezero> ill check anyway :)
25: [00:13:08] <ezero> ill change the value using CMS
26: [00:13:13] <ezero> then run dev/build
27: [00:13:15] <ezero> to see if it retains
28: [00:13:20] <madmatt> Yep
29: [00:13:27] <madmatt> Have you written any phpunit tests yet/before?
30: [00:14:33] <ezero> ah, $ensureHasContent can just be array_keys($defaults)
31: [00:14:58] <ezero> you can change that in your code too :P
32: [00:15:07] <ezero> yes i have madmatt
33: [00:15:31] <ezero> should write a unit test for it
34: [00:16:02] <madmatt> ezero: Hah yeah, good point. In our code, it's because $defaults and what it checks for ($ensureHasContent) are different. In your case, that works fine though :)
35: [00:16:13] <ezero> yea
36: [00:16:42] <madmatt> Yeah, I suggest the unit test does the dev build, ensures it's written, changes the value to something else, and when written again, ensures that a subsequent dev/build doesn't change it. The most important property is that the if conditional works as expected
37: [00:16:56] <ezero> wicked! it retains CMS edited values
38: [00:18:36] <madmatt> Sweet :)
39: [00:18:41] <ezero> cool, ill write some unit tests and release the module :D
40: [00:18:52] <ezero> what i've done is added a SAML-service provider component to SilverStripe
41: [00:19:02] <ezero> using php-saml library
42: [00:19:28] <ezero> Allowing SilverStripe to Authenticate against other Identity Providers using SAML
43: [00:19:28] <madmatt> oh sweet :)
44: [00:19:42] <ezero> i just tested it with SimpleSAMLphp and it works
45: [00:19:54] <madmatt> SAML has always been this black-box of "it never works until you get everything and then it breaks"
46: [00:19:55] <ezero> i just wanted all the configuration for Service Provider to be stored in SilverStripe
47: [00:24:07] <madmatt> sweet :)
48: [00:30:05] <ezero> hmm i might have to make Identity Providers more generic then SAML .. because i want to add oAuth too later on
49: [00:30:43] <ezero> nevermind someone has done it
50: [00:30:43] <ezero> lol
51: [00:30:44] <ezero> https://github.com/BetterBrief/silverstripe-opauth
52: [00:50:24] * eagles0513875 quit (Quit: ZNC @ TrekWeb - https://trekweb.org)
53: [02:01:45] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
54: [02:08:20] * eagles0513875 has joined #silverstripe
55: [02:18:17] <simon_w> ezero, madmatt, they really should open source the SAML module I built for CWP
56: [02:20:23] * Martin__ quit (Ping timeout: 256 seconds)
57: [02:22:39] <ezero> where is it simon_w ?
58: [02:22:42] <ezero> is it available to agencies?
59: [02:23:49] <ezero> too late now i guess i'll release mine tonight.. it wont be no where near as nice as yours but will do for now :D
60: [02:24:14] <ezero> i've basically ripped off code from Anton
61: [02:24:15] <ezero> https://github.com/antons-/silverstripe-ssp
62: [02:24:32] <simon_w> ezero, ask the MoE
63: [02:24:33] <ezero> his takes libraries from SimpleSAMLphp and requires simpleSAMLphp configuration
64: [02:25:34] <ezero> i've based mine on https://github.com/onelogin/php-saml
65: [02:25:53] <ezero> ill ask Internal Affairs to get me the module
66: [02:26:18] <ezero> plus it should be on gitlab at least in a private repo so other agencies can use it
67: [02:55:08] <ezero> oh crap i gota do user provisioning as well :(
68: [03:01:22] * simon_w quit (Quit: Ping timeout: your mum)
69: [03:05:29] * mobiusnz has joined #silverstripe
70: [03:16:21] * azureRaven has joined #silverstripe
71: [03:16:30] * azureRaven quit (Client Quit)
72: [03:34:04] * azureRaven has joined #silverstripe
73: [03:49:05] * mobiusnz quit (Quit: Leaving.)
74: [04:27:44] * r_hector has joined #silverstripe
75: [04:38:21] * azureRaven quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
76: [04:44:47] * azureRaven has joined #silverstripe
77: [04:46:32] * azureRaven quit (Client Quit)
78: [04:48:40] * azureRaven has joined #silverstripe
79: [05:10:08] * azureRaven quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
80: [05:19:52] * azureRaven has joined #silverstripe
81: [05:21:44] * kerosene is now known as keroberros
82: [05:30:19] * mobiusnz has joined #silverstripe
83: [06:17:19] <ezero> cool , this will do for now ... https://github.com/shoaibali/silverstripe-saml-sp
84: [06:19:24] <ezero> oh stink! php-saml doesn't support Artifact binding :(
85: [06:19:27] <ezero> https://github.com/onelogin/php-saml/issues/48#event-213687307
86: [07:40:53] * keroberros quit (Ping timeout: 240 seconds)
87: [07:40:58] * UncleCheese has joined #silverstripe
88: [07:45:28] * UncleCheese quit (Ping timeout: 250 seconds)
89: [08:28:19] * kerosene has joined #silverstripe
90: [08:43:16] * azureRaven quit (Quit: Textual IRC Client: www.textualapp.com)
91: [09:48:17] * r_hector quit (Quit: Leaving.)
92: [10:47:06] * SomeNickUsedByMe has joined #silverstripe
93: [11:41:41] * Error404NotFound has joined #silverstripe
94: [12:02:56] * wmk has joined #silverstripe
95: [12:28:51] <wmk> hi SphereSilver
96: [13:03:31] * Martin__ has joined #silverstripe
97: [13:08:10] * MrGuits has joined #silverstripe
98: [13:10:38] <DimiStripe> Hey guys! Trying to add summary_fields for Member through MyMemberExtension (DataExtension) . However getting duplicated Name/Surname in DataGrid . (3.1.6)
99: [13:10:58] <DimiStripe> adding like: private static $summary_fields = array( 'FirstName', 'Surname', 'Email', 'City');
100: [13:11:07] * Martin__ quit (Ping timeout: 245 seconds)
101: [13:11:59] * Guits has joined #silverstripe
102: [13:13:52] <DimiStripe> and this is the result: http://tinypic.com/r/30hvgac/8
103: [13:14:13] <DimiStripe> anyone can tell me how to remove empty duplicates, and where are they coming ?
104: [13:14:37] * MrGuits quit (Ping timeout: 240 seconds)
105: [13:21:19] * jayashleysmith has joined #silverstripe
106: [13:21:27] <jayashleysmith> can anyone help me with a many_many relationship?
107: [13:33:43] * MrGuits has joined #silverstripe
108: [13:36:37] * Guits quit (Ping timeout: 240 seconds)
109: [13:38:25] * jayashleysmith quit (Ping timeout: 246 seconds)
110: [13:39:19] * Kingy[a] is now known as Kingy
111: [13:46:00] * DimiStripe quit (Quit: DimiStripe)
112: [13:53:12] * Error404NotFound quit (Ping timeout: 245 seconds)
113: [14:17:07] <wmk> guys, just stay here for hours and don't leave so soon...
114: [14:17:23] * babak quit (Quit: Connection closed for inactivity)
115: [15:29:22] * Kingy is now known as Kingy[a]
116: [16:08:26] * gelignite has joined #silverstripe
117: [18:49:59] * Stomach has joined #silverstripe
118: [18:53:19] * travis-ci has joined #silverstripe
119: [18:53:19] <travis-ci> silverstripe/silverstripe-framework#3809 (3.1 - 524185c : Loz Calver): The build passed.
120: [18:53:19] <travis-ci> Change view : https://github.com/silverstripe/silverstripe-framework/compare/8b0bcd93e8bc...524185c30110
121: [18:53:19] <travis-ci> Build details : http://travis-ci.org/silverstripe/silverstripe-framework/builds/45870521
122: [18:53:19] * travis-ci has left #silverstripe
123: [19:06:01] * SomeNickUsedByMe quit (Quit: Leaving)
124: [20:04:01] * pippy has joined #silverstripe
125: [20:13:18] * mobiusnz1 has joined #silverstripe
126: [20:13:19] * mobiusnz quit (Read error: Connection reset by peer)
127: [20:14:11] * spekulatius has joined #silverstripe
128: [20:20:54] * micmania1 has joined #silverstripe
129: [20:26:28] * adrexia has joined #silverstripe
130: [20:31:06] <ss23> Where is antmas when you need him!
131: [20:32:13] <ss23> If antmas comes on, tell him that I've got a meeting and I'll be back in a min :D
132: [20:36:53] * toddmorey has joined #silverstripe
133: [20:37:48] <Stomach> good morning team
134: [20:37:51] <Stomach> happy new year, etc
135: [20:38:22] * adrexia quit (Remote host closed the connection)
136: [20:47:31] * Olliepop has joined #silverstripe
137: [20:48:05] <toddmorey> Stomach: since it appears to still be a wee quiet in Wellington, I'll gladly return the well wishes for the new year. I'm excited/optimistic about 2015.
138: [21:09:25] * antmas has joined #silverstripe
139: [21:09:33] <antmas> morning all :)
140: [21:09:38] <antmas> ss23 what's up?
141: [21:09:43] * UncleCheese has joined #silverstripe
142: [21:10:29] <UncleCheese> isn't there a custom login forms module floating around somewhere?
143: [21:10:53] <ss23> antmas: Yo :D
144: [21:11:00] <ss23> antmas: Sorry for interupting you during your holidays, I feel bad ;_;
145: [21:11:08] <antmas> ss23 YOU HAVE MY ATTENTION
146: [21:11:27] <ss23> XD
147: [21:12:58] <mobiusnz1> greetings all
148: [21:13:02] * mobiusnz1 is now known as mobiusnz
149: [21:13:22] * willr has joined #silverstripe
150: [21:13:35] <mobiusnz> is there a recommended way to handle *really* wide tables? got a customer who wants to have ~200 fields
151: [21:13:53] <antmas> mobiusnz columns or rows you mean?
152: [21:13:58] <mobiusnz> antmas: rows
153: [21:14:01] <mobiusnz> err
154: [21:14:03] <mobiusnz> wait
155: [21:14:06] <mobiusnz> columnts
156: [21:14:15] <antmas> ther vertically thingy ones :)
157: [21:14:25] <mobiusnz> yeah them
158: [21:14:33] <Olliepop> you mean tables in the database or front-end?
159: [21:14:35] * mobiusnz 's brain still on holiday
160: [21:14:48] <antmas> 200 columns?
161: [21:14:56] <mobiusnz> yup
162: [21:14:59] <antmas> o.O
163: [21:15:11] <mobiusnz> Olliepop: it will just be administered from the backend
164: [21:15:12] <Olliepop> 200 columns
165: [21:15:12] <Olliepop> jesus
166: [21:15:40] <antmas> I can't imagine the gridview in the backend being nice to use with 200 columns
167: [21:15:40] <ss23> heh
168: [21:15:41] <ss23> gaaaay
169: [21:15:44] <mobiusnz> I'm thinking possibly grouping the columns, and linking them with 1-1 relationships
170: [21:15:44] <ss23> 10:15:11 < mobiusnz> Olliepop: it will just be administered from the backend
171: [21:15:45] <antmas> dat scrolling
172: [21:15:57] <mobiusnz> to make them tabular
173: [21:16:28] * antmas quit ()
174: [21:16:30] <Olliepop> mobiusnz what's the use case? Is it going to be a form for the end-user to fill out which can be managed from the CMS as well?
175: [21:16:39] <Olliepop> sounds like a nightmare
176: [21:18:44] <Stomach> you will need to have multiple databases handling the fields mobiusnz, which makes it a double nightmare
177: [21:19:09] * adrexia has joined #silverstripe
178: [21:20:38] <mobiusnz> Olliepop: it's basically survey results that are linked to dataobjects that are already in the system
179: [21:21:23] <mobiusnz> so they'll probably end up just doing a csv import, and then I'll be writing SS_Reports based on what info they want to pull out
180: [21:21:33] * arnhoe has joined #silverstripe
181: [21:21:41] <mobiusnz> but ideally it will be able to be easily modified if needed
182: [21:22:15] * arnhoe quit (Client Quit)
183: [21:24:10] * Olliepop quit (Quit: Page closed)
184: [21:24:34] * willr quit (Quit: willr)
185: [21:27:15] <mobiusnz> ah, just checked the brief from the customer. only 156 fields haha
186: [21:29:30] <Stomach> just 3 database tables then ;)
187: [21:29:33] <Stomach> no biggie :D
188: [21:29:42] <Stomach> store everything as a blob :P
189: [21:31:14] <mobiusnz> Stomach: is there a limit to database columns?
190: [21:31:25] <Stomach> theres a limit of 4096 in mysql
191: [21:31:35] <Stomach> but row size can only be 65000 bytes
192: [21:31:39] <Stomach> or kb,
193: [21:31:48] * willr has joined #silverstripe
194: [21:31:49] <Stomach> I hit it on a table with ~100 odd columns
195: [21:31:54] <Stomach> was very confused
196: [21:33:21] <mobiusnz> right
197: [21:36:40] <mobiusnz> so I guess my only option is to break them apart and link them with 1-1s?
198: [21:40:07] <Stomach> yeah - see if it works first but I have a feeling it wont
199: [21:40:22] <Stomach> I ended up justing storing everything as blobs as they don't count towards row size
200: [21:40:29] <Stomach> so 'Text' in SS
201: [21:44:16] * simon_w|work has joined #silverstripe
202: [21:51:49] <UncleCheese> anyone here know how to register as a sole trader in NZ?
203: [21:53:31] <ss23> I hear Satan has already cornered the Soul Trading market, UncleCheese
204: [21:54:22] <Stomach> UncleCheese - you don't need to do shit
205: [21:54:23] <Stomach> just start
206: [21:54:31] <UncleCheese> how do i pay taxes?
207: [21:54:39] <Stomach> you pay them :)
208: [21:54:52] <UncleCheese> do i just post it to the IRD ?
209: [21:54:58] <Stomach> yeah
210: [21:55:00] <Stomach> fill out an IR3
211: [21:55:04] <UncleCheese> IR3
212: [21:55:07] <UncleCheese> ok, let me look that up
213: [21:55:12] <Stomach> you only need to register if you want to become an incorporated entity
214: [21:55:14] <UncleCheese> and you have to pay three times ayear?
215: [21:55:26] <Stomach> only once
216: [21:55:31] <Stomach> but its best to pay it more often
217: [21:55:48] <Stomach> you will only need to register a company if you are making more than 60,000 per year
218: [21:55:54] <Stomach> then its $153 to do it via companies.govt.nz
219: [21:56:10] <Stomach> well technically you don't have to pay it
220: [21:56:11] <UncleCheese> companies pay 5% less tax
221: [21:56:14] <mobiusnz> registering a company is a good idea though, limits your liability massively
222: [21:56:17] <Stomach> but then you get all IRD on you're ass
223: [21:56:29] <UncleCheese> oh the ird won't be on my ass if i'm a sole trader?
224: [21:56:52] <pippy> IIRC you can earn up to 60k before having to pay tax?
225: [21:56:59] <Stomach> pippy - before GST
226: [21:56:59] <UncleCheese> just GST
227: [21:57:12] <pippy> ah
228: [21:57:17] * mahfuz has joined #silverstripe
229: [21:57:21] <mobiusnz> if you're a sole trader you don't charge gst
230: [21:57:28] <Stomach> as a sole trader you dont have to pay tax, only the income you pay yourself is taxed IIRC
231: [21:57:42] <UncleCheese> "only the income you pay yourself"
232: [21:57:47] <UncleCheese> uh?
233: [21:57:50] <Stomach> yeah, so business makes $10
234: [21:57:54] <Stomach> you pay yourself $8
235: [21:57:59] <UncleCheese> where does the other $2 go?
236: [21:58:04] <Stomach> you pay tax on the $8 through PAYE
237: [21:58:05] <mobiusnz> expenses
238: [21:58:14] <pippy> hookers and blow
239: [21:58:15] <UncleCheese> no he said the business makes $10
240: [21:58:16] <mobiusnz> you bought a $2 laptop
241: [21:58:26] <Stomach> yeah, the business keeps it until they buy stuff
242: [21:58:31] <Stomach> then tax is paid through that expensing
243: [21:58:41] <UncleCheese> i just don't want to go to jail
244: [21:58:44] <Stomach> there is no direct tax on the company
245: [21:58:50] <Stomach> go see a business adviser then
246: [21:58:54] <UncleCheese> hmm
247: [21:59:05] <Stomach> open an account with the bank for your sole trader - they will be able to give you documentation about it all
248: [21:59:19] <Stomach> if you have a good business bank manager
249: [22:00:04] <Stomach> jail in NZ isn't so bad :P
250: [22:00:09] <UncleCheese> all my income goes into my US bank account though
251: [22:01:17] <UncleCheese> do i need to do provisional tax?
252: [22:01:39] <Stomach> well then you aren't trading as a NZ sole trader
253: [22:01:40] <Stomach> o_O
254: [22:01:43] <Stomach> you're under US law
255: [22:01:55] <Stomach> and are effectively a US employee overseas
256: [22:02:00] <Stomach> that seems way more unwieldy
257: [22:03:42] <UncleCheese> i'm not sure that's true
258: [22:03:49] <Stomach> its probably not
259: [22:03:53] <Stomach> :D
260: [22:03:53] <UncleCheese> i operate out of NZ.. NZ taxes you on your global income
261: [22:04:01] <UncleCheese> they don't care where the money is
262: [22:04:30] <UncleCheese> maybe i'm excpecting this to be complicated because US tax code is such a circus
263: [22:04:32] * toddmorey quit (Quit: My Mac has gone to sleep. ZZZzzz…)
264: [22:04:58] <Stomach> yeah its not that bad
265: [22:05:08] <mobiusnz> http://www.ird.govt.nz/tool-for-business/how-to-start/choose-structure/
266: [22:07:48] * simon_w|air has joined #silverstripe
267: [22:17:48] * jenniferaslan has joined #silverstripe
268: [22:18:23] * travis-ci has joined #silverstripe
269: [22:18:23] <travis-ci> silverstripe/silverstripe-framework#3812 (3.1 - 883d4a6 : Will Morgan): The build passed.
270: [22:18:23] <travis-ci> Change view : https://github.com/silverstripe/silverstripe-framework/compare/524185c30110...883d4a60a9e1
271: [22:18:23] <travis-ci> Build details : http://travis-ci.org/silverstripe/silverstripe-framework/builds/45886731
272: [22:18:23] * travis-ci has left #silverstripe
273: [22:19:06] <mobiusnz> hmm, can I have slashes and spaces etc in column names?
274: [22:22:24] * Olliepop has joined #silverstripe
275: [22:40:40] * azureRaven has joined #silverstripe
276: [22:40:40] * azureRaven quit (Client Quit)
277: [22:41:02] * azureRaven has joined #silverstripe
278: [22:41:08] * camfindlay has joined #silverstripe
279: [22:43:18] * gelignite quit (Quit: http://bit.ly/nkczDT)
280: [22:52:56] <UncleCheese> Stomach didn't you say there was a module for custom login forms in SS?
281: [22:52:59] <simon_w|work> mobiusnz, yes, though it makes it really annoying to get the values
282: [22:53:36] <mobiusnz> simon_w|air: yeah. alternatively is it possible to have a map of friendly names to database names?
283: [22:54:09] <simon_w|air> mobiusnz, the fieldLabels method?
284: [22:54:54] <mobiusnz> that sounds like what I'm looking for
285: [22:54:55] * veb has joined #silverstripe
286: [22:55:36] <Stomach> UncleCheese, what ?
287: [22:55:44] <UncleCheese> maybe it wasnt' you
288: [22:55:49] <UncleCheese> but i think it was..
289: [22:56:00] <veb> hope you guys have an excellent new year!
290: [22:56:05] <veb> hope it's MUCH better than last
291: [22:56:20] <Stomach> I say lots of things
292: [22:56:34] <Stomach> oh, you mean the Security/Layout stuff
293: [22:56:42] <Stomach> I've got all that custom, but in a private repo
294: [22:56:50] <Stomach> I did talk about that sometime LAST YEAR
295: [22:56:51] <Stomach> hehehe
296: [22:57:39] <UncleCheese> where?
297: [22:59:07] <Stomach> is that what you're asking about? the security pages?
298: [22:59:15] <Stomach> it was just on here in a conversation I think
299: [23:01:07] <UncleCheese> yeah, security pages
300: [23:01:18] <UncleCheese> i'm looking for something that will allow me to have mutiple login pages
301: [23:06:37] * azureRaven quit (Ping timeout: 240 seconds)
302: [23:14:27] * veb is now known as vebb
303: [23:19:45] * vebb is now known as veb
304: [23:26:51] <mobiusnz> well, it's ugly but it seems to work http://www.sspaste.com/paste/show/54a9cc09d6a83
305: [23:28:21] <Stomach> mobiusnz - yum
306: [23:28:28] <mobiusnz> yep
307: [23:28:42] <mobiusnz> short column names means I can fit them all in one table too :)
308: [23:28:59] <Stomach> UncleCheese - when we need that I always end up writing a LoginPage for general access then overwriting the Security templates for admin access
309: [23:29:33] <UncleCheese> and your loginpage handles forgotpassword, failed logins, etc?
310: [23:30:06] <Stomach> yeah
311: [23:30:13] <Stomach> one sec I'll post a pastie
312: [23:31:51] <Stomach> http://pastie.org/private/s9qfwizkueg9uedkd586q
313: [23:31:59] <Stomach> something like that
314: [23:32:57] * veb quit (Quit: veb-irc: quit)
315: [23:36:36] * azureRaven has joined #silverstripe
316: [23:38:17] * veb has joined #silverstripe
317: [23:38:36] * azureRaven quit (Client Quit)
318: [23:42:32] * glenn-bautista has joined #silverstripe
319: [23:44:37] * azureRaven has joined #silverstripe
320: [23:46:33] <mobiusnz> is it possible to specify a "unique together" index in SS?

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