#silverstripe IRC Log

IRC log for 16 August 2016

All timestamps are in UTC.

1: [00:00:02] * ss-helper quit (Remote host closed the connection)
2: [00:00:17] * ss-helper has joined #silverstripe
3: [00:04:01] <Hailwood> Hmm, when using omnipay, what do you folks normally do for the transactionID? originally I was using the orderID but realized that's not going to work if they payment fails and we need to re-initialize it for any reason.
4: [00:10:18] * bubaphex quit (Quit: My Mac has gone to sleep. ZZZzzz…)
5: [00:11:50] * bubaphex has joined #silverstripe
6: [00:26:21] * bubaphex quit (Quit: My Mac has gone to sleep. ZZZzzz…)
7: [00:32:06] * b00mtastik has joined #silverstripe
8: [00:34:47] * b00mtastik has left #silverstripe
9: [00:51:39] <Firesphere> Hailwood: uniqueid('transaction', true);
10: [00:51:46] <Firesphere> Hailwood: uniquid('transaction', true);
11: [00:52:06] <Firesphere> Hailwood: uniqid('transaction', true);
12: [00:52:12] <Firesphere> The last one is the correct spelling
13: [00:54:27] <Hailwood> Thanks Firesphere
14: [00:54:40] <muskie9> is it not possible to sort an ArrayList by RAND() from a layout loop?
15: [00:54:53] <muskie9> *** as the $Children in a GroupedList lol
16: [00:59:28] * MattSS is now known as madmatt
17: [00:59:44] * madmatt quit (Changing host)
18: [00:59:44] * madmatt has joined #silverstripe
19: [01:00:04] <ss-helper> SilverStripe 3.1.20, 3.2.5, 3.3.3 and 3.4.1 Release Announcement - https://groups.google.com/d/msg/silverstripe-announce/fJIOy_tof2M/6douQBoeBgAJ
20: [01:07:26] * madmatt changed the topic to 'Welcome to #silverstripe | Current stable: http://www.silverstripe.org/download | SilverStripe 4 Alpha: http://www.silverstripe.org/4/ | StripeCon EU is on: 13-15 October in Slovenia! Details at https://stripecon.eu | Dev Mailing List: http://silverstripe.org/dev-list | Feature requests: http://silverstripe.uservoice.com'
21: [01:30:41] * bubaphex has joined #silverstripe
22: [01:32:30] * bubaphex quit (Client Quit)
23: [01:34:14] * robbiea has joined #silverstripe
24: [01:34:42] <robbiea> Hi guys. Is it "OK" to apply an extension to an object for single use inside a getCMSFields() method?
25: [01:35:37] <robbiea> via. SomeClass::add_extension('SomeClassExtension')
26: [01:41:43] <Firesphere> Ehm, sure, why not?
27: [01:41:53] <Firesphere> but you'd register it in a yml file, not _config.php
28: [01:44:29] <robbiea> Scenario - I have an Image extension. In one specific place in my module I'm creating a File rather than an Image. I don't want my ImageExtension applied to all Files, but just this one particular File instance
29: [01:45:26] <Firesphere> Like that. Well, it's possible, but not very practical or useful, as it won't be "that" object outside of the getCMSFields
30: [01:46:50] <robbiea> Yes... the alternative I see is copying and pasting some logic which is a little annoying
31: [01:47:03] <Firesphere> You can't use a trait?
32: [01:50:00] <robbiea> I'm not sure that will help me. The extension I'm using adds a DB field - making it a trait would just conflict with the $db defined in the class that uses it
33: [01:50:15] <robbiea> Maybe I'll just apply the extension to the File class and get over it :)
34: [01:50:38] * bubaphex has joined #silverstripe
35: [02:13:38] * AlphaCactus_ has joined #silverstripe
36: [02:16:26] * AlphaCactus quit (Ping timeout: 258 seconds)
37: [02:16:32] * AlphaCactus_ is now known as AlphaCactus
38: [03:11:04] * robbiea quit (Remote host closed the connection)
39: [03:11:12] * bubaphex quit (Quit: My Mac has gone to sleep. ZZZzzz…)
40: [03:21:48] * bubaphex has joined #silverstripe
41: [03:56:07] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
42: [05:13:48] * Azure|dc has joined #silverstripe
43: [05:15:12] * Azure quit (Ping timeout: 240 seconds)
44: [05:19:21] * Jakx has joined #silverstripe
45: [05:19:44] <Jakx> yo
46: [05:23:53] <Jakx> In 3.4, when I create an object dynamically via a method (e.g MyController::getMyMethod()), the corresponding <% if $Mymethod %> template logic fails, even though <% with %> will output information from the object. Mind you, $MyMethod.DateField outputs data, but $MyMethod.DateField.Nice does not. Is there something I'm not considering?
47: [05:26:25] <DanaeNZ> Jakx: if .Nice is not working on a DateField, then the function is probably not returning the dbObject equivalent, but instead just a plain string. Are you returning plain ArrayData?
48: [05:27:35] <Jakx> DanaeNZ, I'm returning MyDataObject::create(array( . . . );
49: [05:28:04] <DanaeNZ> Hmmm, probably a bunch of stuff that won't work as expected
50: [05:28:22] <DanaeNZ> Did you write the object or do you just want to return arbitrary data?
51: [05:28:38] <DanaeNZ> if arbitrary, may as well return an ArrayData::create(array())
52: [05:29:03] <Jakx> DanaeNZ, not written yet, this is actually a confirmation/summary step, before writing!
53: [05:29:15] * bubaphex quit (Quit: My Mac has gone to sleep. ZZZzzz…)
54: [05:29:31] <Jakx> DanaeNZ, returning ArraData is no fun. Will have to format everything manually, lol. I'll give it a try.
55: [05:29:52] <Jakx> (DanaeNZ, ... or DBField::create_tag().)
56: [05:30:04] <DanaeNZ> Yeah true. I'm not sure exactly what will and won't work if you return a straight ::create()
57: [05:30:29] <DanaeNZ> Chuck a $Debug in your template to see exactly what it's showing you Jakx
58: [05:32:12] <Jakx> DanaeNZ, it only has information on the page, and the controller.
59: [05:37:03] <DanaeNZ> Jakx: within the scope of the <% with %>
60: [05:37:27] <Jakx> DanaeNZ, facepalm
61: [05:37:41] <DanaeNZ> ;)
62: [05:39:10] * DanaeNZ quit (Quit: TIME TO FEED)
63: [05:39:13] <Jakx> DanaeNZ, debug just seems to put out the fields I define in the create() method verbatim.
64: [05:39:37] <Jakx> Using ArrayData it is then.
65: [05:43:16] * Jakx quit (Quit: Leaving)
66: [06:04:24] * micmania1 quit (Quit: micmania1)
67: [06:12:59] * pweh has joined #silverstripe
68: [06:53:35] <Firesphere> Hello folks
69: [06:55:52] * guci0 has joined #silverstripe
70: [06:55:53] <guci0> Morning!
71: [06:57:14] * Mike123 has joined #silverstripe
72: [06:58:48] * arnhoe has joined #silverstripe
73: [07:01:14] <Mike123> hi
74: [07:01:39] <Mike123> why resampled images has 2x more size than original ? how can i prevent this ?
75: [07:17:37] * spronk quit (Quit: I may need a longer sleep timer...)
76: [07:19:36] <Firesphere> Hi Mike123
77: [07:19:45] <Firesphere> What do you mean "2x more size"?
78: [07:19:52] <Firesphere> As in space used?
79: [07:20:11] <Firesphere> That could be due to the amount of resampled images. e.g. one for the CMS and three for the frontend.
80: [07:21:43] <guci0> Mike123: check In your _config.php: GD::set_default_quality(80);
81: [07:21:48] <Firesphere> To lower the quality of the images, to save space, you can set the default quality in your config.yml, for example:
82: [07:21:52] <Firesphere> GDBackend:
83: [07:21:53] <Mike123> Firesphere, i mean original image is 90kb and with setWidth() this image is 160kb
84: [07:21:53] <Firesphere> default_quality: 75
85: [07:22:09] <guci0> or yml
86: [07:22:11] <guci0> :)
87: [07:22:22] <Firesphere> guci0: preferably yml, using yml is way faster.
88: [07:22:33] <Firesphere> Mike123: Could be if it tries to upscale instead of downscale?
89: [07:22:35] <guci0> <ok>
90: [07:22:46] <guci0> nice to know :)
91: [07:23:02] <Firesphere> In general, a quality setting of 75 is good enough for web.
92: [07:25:42] <Mike123> ok i set the GB as you said, refreshed all resampled, but size is still the same...
93: [07:26:26] <Mike123> original image is 768x533 , the resampled is 520x361
94: [07:27:05] <guci0> check another image
95: [07:27:13] <Mike123> the only difference is in bit depth
96: [07:27:18] <guci0> maybe original is quality ex. 20
97: [07:28:19] <Mike123> well i have 40 images
98: [07:28:31] <Mike123> so all of them are having problem like this
99: [07:30:14] <Mike123> btw, when i change GB setting, nothing changes at all, no quality changes and no size changes at all
100: [07:32:59] <Mike123> sorry for mistype not GB but GD
101: [07:37:47] * spronk has joined #silverstripe
102: [07:42:29] * phorloop has joined #silverstripe
103: [07:44:57] <Mike123> guci0, Firesphere, i set GD to 10, and refreshed resampled images, no changes
104: [07:45:06] <Mike123> where could be the problem ?
105: [07:48:16] <guci0> are u del _resampled folder from assets?
106: [07:49:38] <Mike123> yes
107: [07:49:47] <guci0> flush?
108: [07:49:52] <Mike123> yes
109: [07:53:43] * pweh quit (Ping timeout: 252 seconds)
110: [07:55:45] * pweh has joined #silverstripe
111: [08:03:36] * phorloop quit (Quit: My laptop go to sleep. ZZZzzz…)
112: [08:07:31] * janneklouman-- has joined #silverstripe
113: [08:24:17] * phorloop has joined #silverstripe
114: [08:28:03] * phorloop quit (Client Quit)
115: [08:45:44] * agent44 has joined #silverstripe
116: [08:48:12] * r3v3rb has joined #silverstripe
117: [08:49:02] <r3v3rb> Zauberfisch is stripe con Friday and Saturday?
118: [08:49:34] * spronk quit (Quit: I may need a longer sleep timer...)
119: [08:51:14] <Zauberfisch> r3v3rb: yes, with a welcome party sort of thing on thursday evening
120: [08:51:37] <r3v3rb> Cool, looking at tickets now :)
121: [08:51:39] <Zauberfisch> so if you arrive thursday during the day, you should devenetly attend there :)
122: [08:51:58] <Zauberfisch> cool
123: [08:52:04] <Zauberfisch> well, I have to leave now
124: [08:52:09] <Zauberfisch> cay tomorrow or something
125: [08:52:19] <r3v3rb> Flights get there at mid day catch you later
126: [08:58:23] * spronk has joined #silverstripe
127: [09:15:52] * spronka has joined #silverstripe
128: [09:25:38] * guci0 quit (Ping timeout: 264 seconds)
129: [09:45:09] * spronk quit (Quit: I may need a longer sleep timer...)
130: [10:06:00] * hewp has joined #silverstripe
131: [10:08:04] * emi has joined #silverstripe
132: [10:08:05] <ss-helper> emi: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
133: [10:09:01] * pweh quit (Ping timeout: 252 seconds)
134: [10:11:15] <emi> Hi all, I have some special Page Type and I want to bind some action before Publishing... Before user click on Save & Publish I want to make some SQL query, but I dont know where should I put this query. Which method/function is executed before Save & Publish?
135: [10:19:01] * swaiba_ has joined #silverstripe
136: [10:20:09] * swaiba quit (Read error: Connection reset by peer)
137: [10:38:40] <swaiba_> emi http://api.silverstripe.org/3.0/class-SiteTreeExtension.html
138: [10:38:43] * hewp quit (Ping timeout: 252 seconds)
139: [10:59:00] * wmk has joined #silverstripe
140: [10:59:41] <wmk> summer time --- anyone around?
141: [11:00:41] <wmk> https://stripecon.eu/ <- tame your silver dragon!
142: [11:01:10] <ss23> emi: the onBeforeWrite or onBeforePublish method
143: [11:01:24] <ss23> emi: Search for one of those and you should find some documentation on the website about it
144: [11:17:27] <swaiba_> guess who is back, wmk is back
145: [11:17:28] <swaiba_> o/
146: [11:20:14] <wmk> swaiba_, did you check the hotel for the conference?
147: [11:22:13] <swaiba_> does anyone know how to right align the contents of a gridfield column?
148: [11:29:32] <Kingy> text-align ...
149: [11:29:50] <Kingy> :P
150: [11:32:13] <swaiba_> Kingy and to apply that to selected column only?
151: [11:34:22] <ss23> there's a selected field on the entire tr isn't there?
152: [11:34:27] <ss23> if not, might need JS
153: [11:47:50] * hewp has joined #silverstripe
154: [11:47:54] <emi> ss23 Thank You, thats what I was looking for :)
155: [12:02:05] <wmk> swaiba_, with some luck each gridfield column has a specific css class...?!
156: [12:11:53] * hewp quit (Read error: Connection reset by peer)
157: [12:23:26] * UndefinedOffset has joined #silverstripe
158: [12:28:43] * agent44 quit (Quit: zzz)
159: [12:32:38] * agent44 has joined #silverstripe
160: [12:35:28] <swaiba_> wmk this is sounding seriously like I've got to do some CSS :(
161: [12:36:19] <wmk> the hardest thing with css is settin up gulp *duck*
162: [12:40:50] <wmk> seriously: can't you configure the columnprovider in the grid?
163: [12:56:50] * Mike123 quit (Ping timeout: 264 seconds)
164: [12:56:55] * lucinderella has joined #silverstripe
165: [12:57:18] * agent44 quit (Ping timeout: 276 seconds)
166: [12:57:18] * lucinderella is now known as agent44
167: [13:09:26] * emi quit (Ping timeout: 264 seconds)
168: [13:46:52] * spronka quit (Quit: My Mac has gone to sleep. ZZZzzz…)
169: [13:58:56] * AlphaCactus quit (Remote host closed the connection)
170: [13:59:10] * otterpocket has joined #silverstripe
171: [13:59:48] <otterpocket> Hello, is there a native way to access control controller actions based on a users group?
172: [14:12:36] * muskie9 has joined #silverstripe
173: [14:16:48] * otterpocket quit (Quit: Leaving)
174: [14:41:38] * darjusIT has joined #silverstripe
175: [14:44:04] * marvanni has joined #silverstripe
176: [14:53:01] * flowsn has joined #silverstripe
177: [14:53:10] * flowsn quit (Client Quit)
178: [14:53:33] * wmk quit (Ping timeout: 240 seconds)
179: [15:10:55] * arnhoe quit ()
180: [15:28:55] * lietzmk has joined #silverstripe
181: [15:45:05] * DimiStripe quit (Quit: DimiStripe)
182: [15:49:19] * AlphaCactus has joined #silverstripe
183: [15:55:42] * Azure|dc quit (Remote host closed the connection)
184: [15:57:19] * DimiStripe has joined #silverstripe
185: [15:58:51] * UndefinedOffset quit (Quit: Leaving.)
186: [15:59:48] <DimiStripe> Hey guys , having example.com/controller/action/ID , is it possible to assign "masking" URL somehow , so it would show : example.com/customslug ?
187: [16:08:03] * janneklouman-- quit (Ping timeout: 250 seconds)
188: [16:12:18] <swaiba_> DimiStripe htaccess rules, $this->redirect(...) or similar ?
189: [16:12:33] <DimiStripe> it should not redirect
190: [16:12:49] <swaiba_> what is a mask then?
191: [16:12:53] <DimiStripe> but serve request from that controller
192: [16:13:17] <swaiba_> so you see one url and call another?
193: [16:13:28] <DimiStripe> i mean you see the URL like example.com/customslug, but actually you get the result from example.com/controller/action/ID
194: [16:13:43] <swaiba_> you have to request the one with information and then show the other one... that is what I've already said
195: [16:14:03] <swaiba_> if you only see the one without information then how do you know the action and id to pass?
196: [16:14:19] <DimiStripe> action and id are static
197: [16:14:39] <DimiStripe> thus I'll have different URL masks for different IDs and Actions
198: [16:15:17] <swaiba_> well just call the functions and render based on the other controller within the "slug" one
199: [16:18:06] <DimiStripe> well, then I'll need creating lots of controllers :)
200: [16:34:05] * UndefinedOffset has joined #silverstripe
201: [16:35:27] <swaiba_> well I'm out of ideas DimiStripe the only one I'd have left is to have an intellegent 404 page that maps certain URLs to these other urls
202: [16:35:52] <swaiba_> using something like this... https://github.com/axllent/silverstripe-intelligent-404
203: [16:35:57] <swaiba_> and without...
204: [16:36:01] * swaiba_ vanishes
205: [16:36:03] * swaiba_ quit (Remote host closed the connection)
206: [17:03:00] * marvanni quit (Quit: marvanni)
207: [17:03:45] * agent44 quit (Quit: zzz)
208: [17:05:06] <neomang> I'm trying to sort an ArrayList made up of ArrayData objects, is $list->sort('field') sufficient to sort by one of the ArrayData fields or do I need an extra reference to the ArrayData object itself?
209: [17:18:04] <muskie9> neomang I think the reference to 'field' should suffice
210: [17:18:38] <neomang> that's frustrating, because it doesn't appear to be actually sorting mine then
211: [17:18:43] <neomang> off to figure out why
212: [17:32:08] <muskie9> neomang are you $list = $list->sort('field') ?
213: [17:35:48] <neomang> no i was not
214: [17:36:55] <neomang> It's funny because I had to do that in a previous file, and forgot that I had until you mentioned it.
215: [17:36:59] <neomang> Thanks muskie9
216: [17:37:32] <muskie9> ya, it's funky... same with filter(), filterAny(), exclude(), etc
217: [17:38:12] <neomang> yeah, you forget sometimes when most things are done simply by method
218: [17:38:41] <neomang> but the few that return a new immutable data object
219: [17:38:52] <neomang> just catch you off guard at first
220: [17:48:38] * gelignite has joined #silverstripe
221: [17:54:51] * marvanni has joined #silverstripe
222: [18:43:05] * marvanni quit (Quit: marvanni)
223: [18:49:13] <darjusIT> Hi, i have Project page and in frontend I have edit,create,delete urls. Is it posible to make tasks in some url like this projects/view/2/task_list
224: [18:55:06] <darjusIT> found solution made url handler in controller 'view/$ID/tasks_list' => 'tasks_list'
225: [19:07:34] * muskie9 quit (Ping timeout: 260 seconds)
226: [19:15:42] * gelignite quit (Ping timeout: 244 seconds)
227: [19:30:43] * marvanni has joined #silverstripe
228: [19:33:13] * gelignite has joined #silverstripe
229: [19:50:58] * muskie9 has joined #silverstripe
230: [20:24:56] * marvanni quit (Ping timeout: 244 seconds)
231: [20:24:58] * muskie9 quit (Ping timeout: 244 seconds)
232: [20:29:16] * UndefinedOffset quit (Quit: Leaving.)
233: [20:31:53] * bubaphex has joined #silverstripe
234: [20:34:04] * marvanni has joined #silverstripe
235: [20:43:18] * chillu_23 has joined #silverstripe
236: [20:48:53] * marvanni quit (Quit: marvanni)
237: [20:50:30] * chillu_2323 has joined #silverstripe
238: [20:51:53] * chillu_23 quit (Ping timeout: 258 seconds)
239: [20:51:53] * chillu_2323 is now known as chillu_23
240: [20:52:22] * chillu_23 quit (Client Quit)
241: [20:54:37] * chillu_23 has joined #silverstripe
242: [21:27:32] * DanaeNZ has joined #silverstripe
243: [21:43:26] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
244: [21:53:37] * DanaeNZ quit (Remote host closed the connection)
245: [21:54:14] * DanaeNZ has joined #silverstripe
246: [21:55:33] * bubaphex quit (Quit: My Mac has gone to sleep. ZZZzzz…)
247: [21:57:30] * bubaphex has joined #silverstripe
248: [21:58:18] * DanaeNZ quit (Ping timeout: 244 seconds)
249: [22:00:41] * micmania1 has joined #silverstripe
250: [22:06:00] * DanaeNZ has joined #silverstripe
251: [22:08:43] * Azure has joined #silverstripe
252: [22:14:04] * darjusIT quit (Read error: Connection reset by peer)
253: [22:18:26] * Azure quit (Remote host closed the connection)
254: [22:32:09] * Azure has joined #silverstripe
255: [22:36:58] * chillu_23 quit (Quit: chillu_23)
256: [22:38:04] * chillu_23 has joined #silverstripe
257: [22:49:33] * lietzmk quit (Quit: Leaving)
258: [22:57:24] * Azure quit (Ping timeout: 260 seconds)
259: [22:57:38] * Azure has joined #silverstripe
260: [23:02:57] * bubaphex quit (Quit: My Mac has gone to sleep. ZZZzzz…)
261: [23:04:44] * bubaphex has joined #silverstripe
262: [23:11:38] <DanaeNZ> attach XML to email to other developers, developers don't read email and ask for xml. PASTE XML INLINE INTO EMAIL
263: [23:11:40] <DanaeNZ> SUCK IT
264: [23:11:44] <DanaeNZ> MY 1000 LINE XML
265: [23:11:47] <DanaeNZ> FUCK YOOOUUUU
266: [23:12:14] <Hailwood> And just for bonus points you used a non-monospace font right?
267: [23:13:03] <Hailwood> Extra bonus points if it was comic-sans
268: [23:14:11] <DanaeNZ> I should have
269: [23:14:22] <DanaeNZ> PHPStorm retains code formatting and colour
270: [23:14:49] <Hailwood> Not if you copy as plain text ;)
271: [23:15:40] <Hailwood> The other way to earn points is to send it as an image, especially if it's multi-screen worthy in which case in no case ever do you splice those images together for them.
272: [23:17:06] <DanaeNZ> oh god yes
273: [23:17:14] <DanaeNZ> and don't have them even line up properly
274: [23:17:25] <DanaeNZ> have double ups of lines
275: [23:17:28] <DanaeNZ> or even miss lines for the fun of it
276: [23:18:36] <Hailwood> ideally slighly pixelated so you cannot tell the difference between O0Q
277: [23:32:34] <DanaeNZ> muaaahahahahahaha
278: [23:33:10] <DanaeNZ> omg, the error was because their documentation is shit. So they respond, "the documentation is updated" and paste some new XML spec that I assume is correct
279: [23:33:23] <DanaeNZ> but it's not right, so I have to trawl through their shitty PDF to find the right format
280: [23:33:27] <DanaeNZ> Still get errors
281: [23:33:37] <DanaeNZ> This API is fucking shit
282: [23:33:57] <DanaeNZ> This one bug has been going back and forth for weeks
283: [23:39:07] * Nightjar has joined #silverstripe
284: [23:41:13] <Nightjar> yeh gidday y'all
285: [23:45:23] <xyphoid> DanaeNZ: ahaha you are describing my entire life
286: [23:45:32] <xyphoid> my sympathy
287: [23:47:40] <DanaeNZ> oh man
288: [23:47:45] <DanaeNZ> no, MY sympathy
289: [23:48:14] <Hailwood> DanaeNZ, What api is it?
290: [23:52:24] <DanaeNZ> Zaui
291: [23:52:49] <DanaeNZ> well that's in the logs now
292: [23:52:58] <DanaeNZ> oh well, public API for the most part
293: [23:53:16] * spronk has joined #silverstripe
294: [23:58:16] <DanaeNZ> Huge emails with aaaaall the xml MUAHHAHAHAHA
295: [23:58:35] <DanaeNZ> SUCK MY DIIIIICK
296: [23:59:51] <xyphoid> my fave ones are where APIs emit invalid XML
297: [23:59:58] <xyphoid> or when you get SQL errors back

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