#silverstripe IRC Log

IRC log for 1 February 2014

All timestamps are in UTC.

1: [00:14:34] <guzzlefry> rawr
2: [00:14:47] <guzzlefry> Why does SilverStripe put Javascript stuff at the end of the body tag?
3: [00:18:42] <Colin[pi]> guzzlefry: the page displays faster that way
4: [00:18:57] <Colin[pi]> but you can change a setting to make it go to the head if you like
5: [00:19:24] <guzzlefry> I just need this dynamically generated google analytics code to be the very last piece of Javascript executed. >_>
6: [00:20:28] <Colin[pi]> ah I added an extension to my ContentController to do that
7: [00:20:39] <guzzlefry> Requirements::customScript <-- maybe this...
8: [00:20:48] <Colin[pi]> GoogleTracker class with an onAfterInit with a Requirements::customScript()
9: [00:21:14] <Colin[pi]> you want to see my source?
10: [00:22:09] <Colin[pi]> guzzlefry: http://sspaste.com/paste/show/52ec3b293acd9
11: [00:22:21] <Colin[pi]> (this is for a 2.4 based install)
12: [00:22:42] <Colin[pi]> then in the _config.php I have: Object::add_extension('ContentController','GoogleTracker');
13: [00:26:42] <Colin[pi]> make sense?
14: [00:27:56] <guzzlefry> yep, thanks
15: [00:27:59] <guzzlefry> So I guess...
16: [00:28:29] <guzzlefry> Calling Requirement::javascript() adds the scripts in a more sensible way.
17: [00:28:41] <guzzlefry> The template requirements stuff is completely backwards...
18: [00:29:40] <guzzlefry> include jQuery in templates/Page.ss, include something that requires jQuery in templates/Layout/Page.ss, and you're in trouble. :/
19: [00:32:56] <Pyromanik> guzzlefry, no FOUC. And that's where it belongs anyway.
20: [00:33:13] <Pyromanik> You can tell requriements to plonk in head, but not recommended.
21: [00:33:48] <Pyromanik> customScript will execute last after all other file based scripts incase it depends on something in them.
22: [00:34:46] <Pyromanik> same like it's not actually the closing body tag scripts go in at, they'll dump before the first occurance of a template hard <script> tag too. Which is a bit shit when it's <!--<script> :P
23: [00:35:06] <Pyromanik> which CAN be a bit shit*
24: [00:35:43] <guzzlefry> Pyromanik: The docs should tell you to use Requirements::javascript() unless you really really need to do it in template. :P
25: [00:36:03] <Pyromanik> also, wrong. JS in Layout gets included first, then in 'main'
26: [00:36:37] <Pyromanik> so you can't think in 'flow' style that layout will come after the stuff in the main, because the $Layout tag is further down the document flow.
27: [00:36:40] <guzzlefry> That's what I said...
28: [00:36:42] <guzzlefry> kinda
29: [00:36:50] <Pyromanik> you had it backwards
30: [00:37:00] <guzzlefry> I worded it poorly. :P
31: [00:37:03] <Pyromanik> Requirements::javascript() is for files.
32: [00:37:24] <guzzlefry> actually, I'm confused as shit now
33: [00:37:44] <Pyromanik> customScript() is for giving string parameters, which lets you give out custom stuff like GA tracker code custom to a site (eg if you have subsites, spronk's favourite toy).
34: [00:37:47] <guzzlefry> include jQuery in templates/Page.ss, include something that requires jQuery in templates/Layout/Page.ss, and you're in trouble. <-- I didn't mean to imply any execution order what-so-ever in that. :P
35: [00:38:11] <Pyromanik> right yeah I read that wrong.
36: [00:38:20] <Pyromanik> you're right.
37: [00:38:36] <guzzlefry> You read it correctly, I just worded it in an ambiguous way. :P
38: [00:39:00] <Pyromanik> but when it comes to includes, because they're actually overlaid into the template before rendering, it's generally fine.
39: [00:39:28] <guzzlefry> hrm, what happened to the IRC log stats?
40: [00:39:32] <Pyromanik> guzzlefry, you did. But on closer examination it's also correct.
41: [00:39:38] <Pyromanik> guzzlefry, nfi. they down?
42: [00:40:24] <guzzlefry> I thought they were in topic, guess not.
43: [00:41:31] <Pyromanik> http://logs.simon.geek.nz/stats.php
44: [00:42:14] <guzzlefry> oh okay
45: [00:42:30] <guzzlefry> just wanted to verify that spronk's favorite thing was in fact subsites. :P
46: [00:42:55] <guzzlefry> And simon must really like Safari. 0.o
47: [00:43:31] <Pyromanik> yeh pretty much
48: [00:44:29] <Pyromanik> anyway, it's bedtime methinks
49: [00:44:33] <Colin[pi]> nn
50: [00:44:33] <Pyromanik> ciao
51: [00:44:38] <Pyromanik> nn Colin[pi]
52: [01:12:01] * joelpittet quit (Remote host closed the connection)
53: [01:12:57] * joelpittet has joined #silverstripe
54: [01:17:03] * Shrike_Finland quit (Quit: Leaving.)
55: [01:17:35] * joelpittet quit (Ping timeout: 252 seconds)
56: [01:24:31] <spronk> SHUT UP MOTHERFUCKER
57: [01:24:31] <spronk> :P
58: [01:25:08] <simon_w|air> spronk, sub sites.
59: [01:25:09] <Colin[pi]> okk?
60: [01:25:13] <Colin[pi]> oh sub sites
61: [01:25:14] <Colin[pi]> lol
62: [01:28:11] <spronk> nah i'm over subsites
63: [01:28:22] <spronk> it can suck cock
64: [01:29:05] <simon_w|air> Oh, if it could, people would be so much happier to using it
65: [01:31:00] * SightUnseen quit (Quit: Leaving.)
66: [01:33:01] <spronk> lawl, probably
67: [02:07:12] * percel has joined #silverstripe
68: [02:08:42] <percel> can someone please help me with the staticpublisher add-on, everytime i try and run it via sake i get: PHP Fatal error: Call to undefined method Config_ForClass::set() in /var/www/cms/staticpublisher/code/controllers/StaticExporter.php on line 53
69: [02:13:20] * joelpittet has joined #silverstripe
70: [02:31:22] * Azure quit (Read error: Connection reset by peer)
71: [02:32:07] * Azure has joined #silverstripe
72: [02:44:17] * irogue has joined #silverstripe
73: [02:48:53] * irogue23 quit (Ping timeout: 245 seconds)
74: [03:36:09] * joelpittet quit (Remote host closed the connection)
75: [03:36:43] * joelpittet has joined #silverstripe
76: [03:41:40] * joelpittet quit (Ping timeout: 265 seconds)
77: [04:29:29] * cloph_away quit (Ping timeout: 240 seconds)
78: [04:29:34] * cloph has joined #silverstripe
79: [06:25:58] * SightUnseen has joined #silverstripe
80: [06:30:29] * SightUnseen quit (Ping timeout: 240 seconds)
81: [08:20:53] * ss23 quit (Ping timeout: 248 seconds)
82: [08:23:04] * ss23 has joined #silverstripe
83: [08:27:55] <simon_w> ss23, FIX IT
84: [08:32:03] * guzzlefry panics.
85: [08:33:51] * simon_w only has half his lights working
86: [08:34:12] <guzzlefry> How does that happen?
87: [08:34:16] <guzzlefry> circuit breaker?
88: [08:34:26] <simon_w> Fuse wire went bye byes
89: [08:34:41] <simon_w> Only half my circuits have breakers on them :(
90: [08:34:45] <guzzlefry> ss23: Write some instructions on replacing a fuse for simon_w
91: [08:36:28] <simon_w> Like he'd know what to do
92: [08:36:43] <simon_w> Most of the time, it's turn the switch back to on
93: [08:36:56] <simon_w> This time, I need more fuse wire. Which I don't have
94: [08:38:14] <simon_w> fatal error: hphp/runtime/ext/josn/ext_json.h: No such file or directory
95: [08:38:15] <simon_w> oops
96: [08:39:52] <guzzlefry> simon_w: you mean /json/ ;)
97: [08:40:08] <guzzlefry> Or whoever make the oopsies
98: [08:40:18] <simon_w> Yeah :p
99: [08:40:27] <simon_w> JsonExtension() : Extension("json", 1.2.1) {}
100: [08:40:31] <simon_w> /hphp/hiphop-php/hphp/runtime/ext/json/ext_json.cpp:191:39: error: too many decimal points in number
101: [08:40:36] <simon_w> How about that one? :p
102: [08:42:00] <guzzlefry> simon_w: assuming that code snippet is actually C/C++ code, you'll need to turn 1.2.1 instead a string.
103: [08:42:42] <simon_w> Good, good
104: [08:42:49] <simon_w> Now, let's see if another error popper up
105: [08:43:01] <simon_w> The one I haven't posted is a little too mean :p
106: [08:43:31] <guzzlefry> I thought you knew C/C++?
107: [08:44:04] <simon_w> I do
108: [08:44:15] <simon_w> I've already fixed these. I'm just bored waiting for it to compile
109: [08:44:19] <guzzlefry> oh, are you testing me? >_>
110: [08:44:33] <simon_w> Mmm, delicious fishy
111: [08:45:04] <guzzlefry> I forgot that C++ code takes forever to compile.
112: [08:45:17] <simon_w> Oh, it's not that
113: [08:45:21] <simon_w> There's just lots of it
114: [08:45:24] <guzzlefry> oh
115: [08:45:45] <guzzlefry> Has anyone ported that to Go yet?
116: [08:45:51] <simon_w> Ahahahahahahaha
117: [08:45:52] <guzzlefry> That seems to be the thing these days.
118: [08:46:04] <simon_w> It's built for performance
119: [08:46:07] <guzzlefry> "This already exists." "...yeah...LET'S REWRITE IT IN GO."
120: [08:46:37] <simon_w> Heck, it has PHP running faster than C++ in most user land cases
121: [08:47:43] <guzzlefry> PHP running under HHVM you mean?
122: [08:47:55] <simon_w> yes
123: [08:48:04] <guzzlefry> That's impressive.
124: [08:49:05] <guzzlefry> You don't actually compile the PHP into an intermediate format do you?
125: [08:49:11] <simon_w> Nope
126: [08:49:25] <simon_w> They're aiming for a drop-in replacement for php-fpm
127: [08:49:57] <guzzlefry> How close are they?
128: [08:50:15] <simon_w> Sure, to get the C++-ish speeds, you still need to do a pre-compilation, but that's just building the byte code
129: [08:50:23] <simon_w> For most things, it'll work fine
130: [09:17:57] * jrthomer quit (Ping timeout: 248 seconds)
131: [09:18:11] * jrthomer has joined #silverstripe
132: [09:30:27] * catcher quit (*.net *.split)
133: [09:30:28] * ajmitch quit (*.net *.split)
134: [09:33:51] <ss23> 21:34:26 <@simon_w> Fuse wire went bye byes
135: [09:33:57] <ss23> If you don't have any wire, how u going to fix it?
136: [09:34:38] * catcher has joined #silverstripe
137: [09:34:38] * ajmitch has joined #silverstripe
138: [09:46:50] * Shrike_Finland has joined #silverstripe
139: [10:17:36] * Azure quit (Read error: Connection reset by peer)
140: [10:18:19] * Azure has joined #silverstripe
141: [10:18:40] * violetina quit (Remote host closed the connection)
142: [10:20:15] * violetina has joined #silverstripe
143: [11:02:06] * violetina quit (Remote host closed the connection)
144: [11:04:58] * violetina has joined #silverstripe
145: [11:19:53] * violetina quit (Read error: Connection reset by peer)
146: [11:20:07] * violetina has joined #silverstripe
147: [11:28:15] * spronk has left #silverstripe
148: [11:30:02] * spronk has joined #silverstripe
149: [11:32:13] * Colin[pi] quit (Ping timeout: 245 seconds)
150: [11:50:16] * SightUnseen has joined #silverstripe
151: [11:54:45] * SightUnseen quit (Ping timeout: 248 seconds)
152: [11:58:17] * SightUnseen has joined #silverstripe
153: [12:00:06] * violetina quit (Read error: Connection reset by peer)
154: [12:00:58] * Shrike_Finland quit (Quit: Leaving.)
155: [12:01:07] * Azure quit (Read error: Connection reset by peer)
156: [12:01:34] * violetina has joined #silverstripe
157: [12:01:39] * Azure has joined #silverstripe
158: [12:07:46] * Azure quit (Read error: Connection reset by peer)
159: [12:08:15] * Azure has joined #silverstripe
160: [12:25:40] * Shrike_Finland has joined #silverstripe
161: [12:35:43] * ARNHOE has joined #silverstripe
162: [13:21:11] * ARNHOE quit (Remote host closed the connection)
163: [13:58:36] * SightUnseen quit (Quit: Leaving.)
164: [14:10:39] * SphereSilverNL has joined #silverstripe
165: [14:16:17] <SphereSilverNL> Is there a way to see which class/function initiated a query when using ?showqueries=1
166: [14:22:49] * gelignite has joined #silverstripe
167: [14:51:47] * ARNHOE has joined #silverstripe
168: [15:08:22] * ARNHOE quit (Remote host closed the connection)
169: [15:53:06] * violetina quit (Remote host closed the connection)
170: [15:55:31] * violetina has joined #silverstripe
171: [16:00:27] <Shrike_Finland> Hi, anyone with a working example of contact form with bootstrap-forms?
172: [16:28:10] <SphereSilverNL> Just add the extraclass, but be aware of labels being annoying ;)
173: [16:28:27] <SphereSilverNL> So, I have a global getURL() method in the global provider.
174: [16:28:53] <guzzlefry> Shrike_Finland: You can override the default form field templates if you need to.
175: [16:28:54] <SphereSilverNL> But it's called way too often. Is there a way to make the amount less? For example by setting a protected?
176: [16:52:43] <Shrike_Finland> Hmm, I tried to use this module (https://github.com/bluehousegroup/silverstripe-contact-form), but it does not print anything on screen. Installation went fine and after adding ->render(), got no errors. But no fields either…
177: [17:00:10] * gelignite quit (Quit: http://bit.ly/nkczDT)
178: [17:00:24] * Shrike_Finland quit (Quit: Leaving.)
179: [17:05:37] * Shrike_Finland has joined #silverstripe
180: [17:10:33] * Shrike_Finland quit (Quit: Leaving.)
181: [17:16:03] * Shrike_Finland has joined #silverstripe
182: [17:18:08] * SphereSilverNL quit (Remote host closed the connection)
183: [18:06:48] * Shrike_Finland quit (Quit: Leaving.)
184: [20:48:30] * ss-log has joined #silverstripe
185: [21:04:38] * ARNHOE has joined #silverstripe
186: [21:04:42] * ARNHOE quit (Client Quit)
187: [21:10:29] * simon_w|air quit (Ping timeout: 248 seconds)
188: [21:12:13] * simon_w quit (Ping timeout: 245 seconds)
189: [21:15:40] * ARNHOE has joined #silverstripe
190: [21:25:31] <Colin[pi]> dat moment when you go to download a torrent, think it's downloaded super fast, then realise you already downloaded it a few months back >_<
191: [21:26:56] * willr has joined #silverstripe
192: [21:27:17] * simon_w has joined #silverstripe
193: [21:27:30] * simon_w|air has joined #silverstripe
194: [21:43:36] * Sj0hn has joined #silverstripe
195: [21:50:21] * joelpittet quit ()
196: [21:51:54] <Sj0hn> Heya
197: [21:52:24] <Sj0hn> im using: https://github.com/arambalakjian/DataObject-as-Page-Filter trying 2 get it to work
198: [21:52:35] * Shrike_Finland quit (Quit: Leaving.)
199: [21:52:44] <Sj0hn> but when i enter the filter_settings it give me the follwing error when dev build
200: [21:52:51] <Sj0hn> T_CONSTANT_ENCAPSED_STRING
201: [21:53:22] <simon_w> You've got a syntax error
202: [21:54:54] <Sj0hn> Can you help me solve it?..
203: [21:56:08] <simon_w> Perhaps
204: [21:56:31] <Sj0hn> Ill give you a cookie :D
205: [21:57:32] <simon_w> Well, what code did you add?
206: [21:58:01] <Sj0hn> uhm.. basicly the same at Aram described.. hold on ill paste2.org it
207: [21:59:06] <Sj0hn> http://paste2.org/mYw2IB81
208: [21:59:58] <simon_w> 'ClassName' => 'ProductCategory' needs a comma after it
209: [22:00:44] <Sj0hn> oh wow xD
210: [22:00:48] <Sj0hn> thanks
211: [22:00:51] <Sj0hn> that was it
212: [22:01:50] <Colin[pi]> oh if I had a dollar for every misplaced comma or semicolon
213: [22:01:53] <Sj0hn> I would give you your cookie, but it will prbly not be so good when it will arrive
214: [22:05:43] <simon_w> Just get Colin[pi] to send me one :p
215: [22:06:02] <Colin[pi]> I'll get you some Tim Tams when you arrive
216: [22:06:11] <simon_w> We have Tim Tams here too
217: [22:06:21] <Colin[pi]> oh
218: [22:06:23] <Colin[pi]> well
219: [22:06:27] <Colin[pi]> um
220: [22:06:32] <simon_w> :D
221: [22:06:37] <Sj0hn> wut about them milka cookies?
222: [22:06:42] <Sj0hn> their great
223: [22:06:54] <simon_w> I remember getting Milka stuff in Bulgaria
224: [22:07:24] <Sj0hn> Milka choco swing = the best :D
225: [22:08:41] <Sj0hn> Got some good stuff here in holland aswell simon_w
226: [22:08:59] <simon_w> I still prefer Whittakers though
227: [22:09:18] <Sj0hn> never heard of it
228: [22:09:24] <Sj0hn> looks pretty fancy
229: [22:09:28] <simon_w> But not flavours I can get in Australia :(
230: [22:09:39] <simon_w> Sj0hn, is a local company
231: [22:09:45] <simon_w> Like, 10km north of here local
232: [22:12:34] <Sj0hn> nice :) i like local products, their most of the times way better then the over advertised stuff in the supermarkets
233: [22:12:45] * Shrike_Finland has joined #silverstripe
234: [22:19:06] <Sj0hn> Thanks again simon_w for the solving. Im off bbn
235: [22:19:11] * Sj0hn quit (Quit: Ik ga weg)
236: [22:27:12] * mrzero quit (Remote host closed the connection)
237: [22:28:23] * Shrike_Finland quit (Quit: Leaving.)
238: [22:29:21] * ARNHOE_ has joined #silverstripe
239: [22:29:21] * ARNHOE quit (Read error: Connection reset by peer)
240: [22:44:35] * Shrike_Finland has joined #silverstripe
241: [22:44:38] * joelpittet has joined #silverstripe
242: [22:50:08] * mrzero has joined #silverstripe
243: [22:57:59] * mrzero quit (Ping timeout: 260 seconds)
244: [23:05:13] * mrzero has joined #silverstripe
245: [23:05:14] * mrzero quit (Changing host)
246: [23:05:14] * mrzero has joined #silverstripe
247: [23:14:49] * ARNHOE_ quit (Remote host closed the connection)
248: [23:15:09] * Liquide has joined #silverstripe
249: [23:15:48] * Shrike_Finland quit (Quit: Leaving.)
250: [23:17:30] * Shrike_Finland has joined #silverstripe
251: [23:22:16] * Shrike_Finland quit (Client Quit)
252: [23:28:05] * Jakx has joined #silverstripe
253: [23:29:35] <Jakx> @willr, how do I apply a PasswordValidator to an ordinary PasswordField? i.e one created in a front end form?
254: [23:30:16] * Shrike_Finland has joined #silverstripe
255: [23:35:36] <willr> SilverStripe handles validating that on the member write for you anyway
256: [23:36:25] <willr> If you want to do your own custom validation you could by checking $validator->validate($password) in your form validate functionn
257: [23:41:41] <Jakx> @willr, if the field is defined in RequiredFields, is it not validated on form submit?
258: [23:44:26] <willr> nope
259: [23:45:01] <willr> it's checked on member onBeforeWrite
260: [23:45:25] <Jakx> well I'm fucked anyway because the ConfirmedPasswordField validate method is broken.
261: [23:48:30] <Jakx> @willr, I imagine if validation takes place at member onBeforeWrite, the error message isn't going to be assigned to the form field. Is that right?
262: [23:50:21] <willr> correct.
263: [23:53:50] <Jakx> @willr, hmmm. I wonder if there are too many disparities with form validation in silverstripe.

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