#silverstripe IRC Log

IRC log for 16 March 2016

All timestamps are in UTC.

1: [00:01:00] <aaron___> nah nothing obvious at all
2: [00:01:16] <aaron___> we have heaps of memory left, php was doing the right thing and firing up 30ish processes
3: [00:02:03] <micmania1> Any long-running requests? Maybe nginx is hitting maximum number of connections?
4: [00:03:51] <aaron___> the processes are sitting open for awhile, both nginx and php
5: [00:03:56] <aaron___> no long mysql queries though
6: [00:04:46] <micmania1> Do you have any external services? API, Session storage, etc.
7: [00:04:47] <aaron___> i think the nginx/php processes are just idle though
8: [00:04:52] <aaron___> nothing external
9: [00:05:23] <EasyCo_> What is is that's taking up time? Is it the Time To First Byte (TTFB) as in slow server response?
10: [00:05:52] <aaron___> actually i am not sure - how can i check
11: [00:06:01] * BrewNaked quit (Remote host closed the connection)
12: [00:06:55] <EasyCo_> https://developer.chrome.com/devtools/docs/network
13: [00:09:05] * TRB143 quit (Remote host closed the connection)
14: [00:10:12] * nontgor quit (Ping timeout: 276 seconds)
15: [00:11:16] <aaron___> EasyCo_ its TTFB
16: [00:14:59] * aaron___ quit (Quit: Page closed)
17: [00:15:22] * aaron___ has joined #silverstripe
18: [00:17:13] * micmania1 quit (Quit: micmania1)
19: [00:19:49] <aaron___> @EasyCo_ getting an average of 5s TTFB on normal load vs 10-15s with 50-100 users
20: [00:24:41] <aaron___> side question, what is the correct way use partial caching with a loop?
21: [00:24:50] <aaron___> i currently have
22: [00:25:04] <aaron___> <% loop PaginatedItems %><% cached 'database', $LastEdited %><% include Product%><% end_cached %> <% end_loop %>
23: [00:39:09] <DanaeNZ> aaron___: I'd put the cache outside of the loop tbh
24: [00:41:08] <aaron___> if the DO updates, would it take that into account though?
25: [00:41:18] <aaron___> e.g. if a product is changed, will the cache refresh
26: [00:51:43] * UncleCheese has joined #silverstripe
27: [00:53:05] * UncleCheese quit (Client Quit)
28: [00:56:14] * n8_ quit (Ping timeout: 252 seconds)
29: [00:56:16] * micmania1 has joined #silverstripe
30: [01:01:39] * UncleCheese has joined #silverstripe
31: [01:06:21] * Tanger has joined #silverstripe
32: [01:29:40] * TRB143 has joined #silverstripe
33: [01:39:13] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
34: [01:51:19] <micmania1> DanaeNZ: did that thing fix your problem?
35: [01:52:09] <DanaeNZ> micmania1: nope, it looks like there was a bigger issue tho - the platform version was too far ahead so the assets ownership is not correct. I need to relaunch with an older infrastructure version and try that fix again
36: [01:54:42] <micmania1> ah, is someone helping you?
37: [01:54:54] * BrewNaked has joined #silverstripe
38: [01:59:09] * BrewNaked quit (Ping timeout: 244 seconds)
39: [02:43:39] <DanaeNZ> micmania1: A bit - not directly with the zip problem
40: [02:43:51] <DanaeNZ> but it may be related
41: [02:44:27] <micmania1> DanaeNZ: are you able to downgrade your infrastructure version yourself (via .platform.yml)?
42: [02:45:07] <DanaeNZ> micmania1: Yep that's the plan - downgrade and test. Just takes a while for each deployment and meanwhile we have to do a million things on the same site
43: [02:48:02] <micmania1> After you do the downgrade the deployments should be pretty quick (2-4mins)
44: [02:53:12] * aaron___ quit (Ping timeout: 252 seconds)
45: [02:57:58] * sven_b has joined #silverstripe
46: [02:57:58] <ss-helper> sven_b: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
47: [02:59:53] <sven_b> hi, i'm trying to get a hang on SS. I'd like to query all Members and include their age DataObject set. Normally I'd do that in MySQL. In my page controller I have something like this so far:function getMemberList(){ $MemberList = DataObject::get("Member"); return $MemberList; }
48: [03:00:41] <sven_b> include theire age based on their birthday (part of the member fields)
49: [03:03:50] * zippy has joined #silverstripe
50: [03:04:02] <zippy> Stomach: good game eh!
51: [03:04:49] * nontgor has joined #silverstripe
52: [03:05:35] <Stomach> NEW ZEALAND NUMBER ONE
53: [03:06:39] <ss23> NZ NUMBER ONE!
54: [03:12:56] <DanaeNZ> my god is it still cricket
55: [03:13:04] <DanaeNZ> did they hit the ball good?
56: [03:13:09] <ss23> I dunno
57: [03:13:11] <ss23> I just wanted to praise NZ
58: [03:13:15] <ss23> I didn't know there was cricket on
59: [03:13:21] <ss23> Where is the cricket? Cause it's raining in wgtn atm
60: [03:13:22] <ss23> :O
61: [03:17:12] * spronk quit (Quit: I may need a longer sleep timer...)
62: [03:18:07] <Stomach> its the 20/20 world cup
63: [03:19:03] <ss23> that's almost 21/20!
64: [03:20:18] <zippy> DanaeNZ: it's always cricket... it's #cricket
65: [03:20:28] * sven_b quit (Quit: Page closed)
66: [03:35:17] * zippy quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
67: [03:43:49] * BrewNaked has joined #silverstripe
68: [03:44:36] * micmania1 quit (Quit: micmania1)
69: [03:48:36] * BrewNaked quit (Ping timeout: 276 seconds)
70: [03:59:12] * robbieaverill quit (Ping timeout: 252 seconds)
71: [04:03:01] * krofek__ has joined #silverstripe
72: [04:04:30] * spronk has joined #silverstripe
73: [04:06:40] * krofek_ quit (Ping timeout: 268 seconds)
74: [04:17:30] * DanaeNZ quit (Quit: TIME TO FEED)
75: [04:23:18] * Sentro has joined #silverstripe
76: [04:24:51] <Sentro> having difficulty searching for a module that does bulk link records for gridfield
77: [04:25:18] <Sentro> is there an altertive to gridfieldrelationhandler module?
78: [04:32:39] * Stomach quit (Ping timeout: 244 seconds)
79: [04:45:42] * vitaly_ quit (Quit: Leaving...)
80: [04:55:12] * adrexia quit (Quit: My Mac has gone to sleep. ZZZzzz…)
81: [04:59:15] <Sentro> I just found the right module for me . Just to share to other guys too https://github.com/milkyway-multimedia/ss-gridfield-utils/blob/master/docs/en/AddExistingPicker.md
82: [05:06:23] * Sentro quit (Quit: Sentro)
83: [05:32:38] * BrewNaked has joined #silverstripe
84: [05:37:04] * BrewNaked quit (Ping timeout: 264 seconds)
85: [05:40:14] * Sentro has joined #silverstripe
86: [06:30:24] * Sentro quit (Quit: Sentro)
87: [07:04:27] * Stomach has joined #silverstripe
88: [07:06:21] * MrTopless has joined #silverstripe
89: [07:09:36] * Mike123 has joined #silverstripe
90: [07:10:46] * zippy has joined #silverstripe
91: [07:10:51] * zippy quit (Client Quit)
92: [07:21:52] * BrewNaked has joined #silverstripe
93: [07:25:20] * swaiba has joined #silverstripe
94: [07:26:22] * BrewNaked quit (Ping timeout: 248 seconds)
95: [07:29:21] * Frans_Amsterdam has joined #silverstripe
96: [07:37:31] * wmk has joined #silverstripe
97: [07:44:48] <swaiba> good morning all
98: [07:45:06] <swaiba> swaiba bot wants to draw attention to any help on this please :) http://stackoverflow.com/questions/35910394/scaffold-listbox-multiple-select-in-modeladmin-filter-for-dataobject-with-enum
99: [07:49:03] * spronk quit (Max SendQ exceeded)
100: [07:57:31] * spronka has joined #silverstripe
101: [07:57:36] * Stomach quit (Quit: zzz)
102: [08:10:20] * arnhoe has joined #silverstripe
103: [09:08:56] * Tanger quit (Quit: Tanger)
104: [09:10:22] * BrewNaked has joined #silverstripe
105: [09:14:43] * BrewNaked quit (Ping timeout: 244 seconds)
106: [09:47:20] * kinglozzer has joined #silverstripe
107: [09:56:35] * cloph is now known as cloph_away
108: [10:15:10] * Firesphere_ has joined #silverstripe
109: [10:29:34] * kerozene quit (Ping timeout: 240 seconds)
110: [10:37:50] * kerozene has joined #silverstripe
111: [10:40:59] * Agilix_ has joined #silverstripe
112: [10:40:59] <ss-helper> Agilix_: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
113: [10:51:28] * GioVdK has joined #silverstripe
114: [10:57:38] * spronka quit (Quit: My Mac has gone to sleep. ZZZzzz…)
115: [10:59:15] * BrewNaked has joined #silverstripe
116: [11:03:43] * BrewNaked quit (Ping timeout: 244 seconds)
117: [11:06:25] * DimiStripe has joined #silverstripe
118: [11:56:09] * nontgor quit (Ping timeout: 260 seconds)
119: [12:30:01] * UndefinedOffset has joined #silverstripe
120: [12:48:07] * BrewNaked has joined #silverstripe
121: [12:49:37] * wmk quit (Read error: Connection reset by peer)
122: [12:50:02] * wmk has joined #silverstripe
123: [12:52:57] * BrewNaked quit (Ping timeout: 260 seconds)
124: [13:41:16] * lerni has joined #silverstripe
125: [14:10:17] <Agilix_> Anyone know if https://github.com/silverstripe-australia/silverstripe-memberprofiles is still useable?
126: [14:16:53] <swaiba> Agilix_ it looks like it was updated just a few months ago - so I'd say yes
127: [14:16:54] <wmk> Agilix_, define usable ;)
128: [14:17:15] <wmk> you have to try if it fits your needs. but it works with 3.2
129: [14:17:21] <wmk> and should work with 3.3
130: [14:37:04] * BrewNaked has joined #silverstripe
131: [14:37:21] <Agilix_> yea it's installing correctly through composer but a dev/build will give an error
132: [14:40:03] <swaiba> what error is that?
133: [14:41:34] * BrewNaked quit (Ping timeout: 240 seconds)
134: [14:43:13] <Agilix_> not sure, all I get is "there is a server problem". The logs aren't generated. And the server logs do not catch anything
135: [14:44:47] * Frans_Amsterdam quit (Ping timeout: 250 seconds)
136: [14:45:10] <swaiba> https://docs.silverstripe.org/en/3.3/getting_started/installation/common_problems/
137: [14:45:11] <Agilix_> It only happens when I add the memberprofiles stuff
138: [14:45:32] <swaiba> turn "server problem" into "stacktrace" :)
139: [14:47:24] <Agilix_> aha
140: [14:47:54] <Agilix_> I get this error: http://pastie.org/10762508
141: [14:48:09] <Agilix_> Which is odd, I assumed the /dev/build/ would be able to handle that
142: [14:48:37] <swaiba> Agilix_ honestly it's not nice but I'd recommend you just make the field in the DB
143: [14:49:00] <swaiba> then it will "work" instead of dealing with the order these are included - whcih will be the real issue
144: [14:49:11] <swaiba> (if not something in your custom code base)
145: [14:50:50] <Agilix_> But what will happen if we deploy it to production? Do I still need to create this field myself?
146: [14:52:18] <Agilix_> It is of the memberprofiles db space
147: [14:54:47] * Firesphere_ quit (Ping timeout: 268 seconds)
148: [14:56:52] * wmk quit (Ping timeout: 264 seconds)
149: [15:02:34] <swaiba> Anyone ever integrated with "Sage 200"?
150: [15:02:56] <swaiba> Agilix_ cannot answer - I'm just saying now it's the quickest solution
151: [15:03:19] <swaiba> you are welcome ot debug the exact cause - as i said it might be your own code or the order the modules are included
152: [15:03:37] <Agilix_> Where is the order defined?
153: [15:05:14] <Agilix_> The thing is, there are gonna be a lot more fields probably
154: [15:05:28] <Agilix_> Code shows at least 4 more
155: [15:08:24] * BrewNaked has joined #silverstripe
156: [15:09:20] <Agilix_> Opened up an issue with them to see what it could be
157: [15:09:50] <swaiba> https://docs.silverstripe.org/en/3.3/developer_guides/configuration/configuration/
158: [15:10:02] <swaiba> it's the before and after bit of the yml
159: [15:10:36] <swaiba> and good luck with a issue on that module - AFAIK the owner was ajshort and he left - outstanding list looks huge
160: [15:13:24] <Agilix_> Best case scen is I get it fixed, Worst case is I need to decorate myself :p
161: [15:39:29] <Agilix_> Removed it, now my theme is broken again :p the horrors :p
162: [15:45:31] * MrTopless quit (Ping timeout: 252 seconds)
163: [15:52:00] * Varis has joined #silverstripe
164: [15:54:52] * Varis quit (Client Quit)
165: [16:05:12] * arnhoe quit ()
166: [16:05:44] <Neomang> I'm having trouble properly filtering my results. I'm doing DataObject::get()->filter('Slug', $request->param('ID') so that the url will be www.site.com/page/post/slug
167: [16:05:56] * Mike123 quit (Ping timeout: 252 seconds)
168: [16:06:04] <Neomang> but this never returns an actual result
169: [16:06:23] <swaiba> and you are sure $request->param('ID') has the right data?
170: [16:08:19] <cloph_away> (and that you don't need Slug::get()->filter('ID', $request->param('ID'))?)
171: [16:14:51] <Agilix_> Just to bounce of the idea here. If I want to add 'front-end' members who can log in but to custom pages (so not cms admin) Do I decorate the member class and work with groups or ?
172: [16:15:27] <Agilix_> So they will have a front-end register, login and profile page
173: [16:18:13] <swaiba> cloph_away or even... Slug::get()->ByID($request->param('ID') ?
174: [16:18:46] <swaiba> Agilix_ decorate
175: [16:21:33] <Agilix_> k, thought so. Read about extend but seems to give a few side effects that we do not prefer
176: [16:23:36] <Neomang> cloph_away I'm not trying to filter by ID, I'm just using what's in the designated ID parameter in the url. I have a varchar named Slug in the dataobject I'm referring to, and I'm just trying to pull the one record that matches the slug given
177: [16:24:37] <Neomang> swaiba yes I checked and made sure the data is right. If i do a sql dump of the query and insert the information in ID into the query, it returns the result i want, just not through SS
178: [16:33:29] * lerni quit (Remote host closed the connection)
179: [16:33:35] <Neomang> Weirdly, if I try just DataObject::get() I also get no results, it's only when I use get()->byID($request->param('ID'))
180: [16:33:56] * lerni has joined #silverstripe
181: [16:38:22] * lerni quit (Ping timeout: 248 seconds)
182: [16:45:22] * MrTopless has joined #silverstripe
183: [16:49:57] <kinglozzer> Neomang: Don't do DataObject::get(), do MyDataObjectName::get()
184: [16:50:20] <kinglozzer> Otherwise it doesn't know whether to fetch pages, files, images or any other objects
185: [16:51:00] <kinglozzer> Or was that just an example? :P
186: [16:52:57] <kinglozzer> Other guess: you need to add ->first() on the end
187: [16:52:59] <kinglozzer> Neomang: If you're still stuck, paste your code here so we can take a look: http://pastie.org
188: [16:53:07] * captain_carrots has joined #silverstripe
189: [16:53:08] <ss-helper> captain_carrots: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
190: [16:53:11] * wmk has joined #silverstripe
191: [16:53:32] <captain_carrots> Hey, has anyone else encountered issues with the links not working?
192: [16:53:59] <captain_carrots> When I add an image from Assets into my content, its adding the subpages to the URL
193: [16:54:37] <captain_carrots> so instead of mywebsite/Assests/file, i get mywebsite/pagename/Assets/file
194: [16:58:04] * wmk quit (Ping timeout: 264 seconds)
195: [17:00:18] <ss-helper> Versioned DataObject not Writing to Live - http://stackoverflow.com/questions/36042138/versioned-dataobject-not-writing-to-live
196: [17:06:12] <Agilix_> K, so I tried to extend the member, now I get the database issues again :
197: [17:12:25] <kinglozzer> captain_carrots: I've never seen that before. Any custom modules that could be causing it?
198: [17:12:37] <kinglozzer> How are you adding the images? By clicking the 'Insert Media' button?
199: [17:12:42] <Agilix_> Any way I can see where the order goes wrong?
200: [17:12:47] <captain_carrots> I just did a fresh install.
201: [17:13:06] <captain_carrots> And yes, insert media.
202: [17:15:05] <kinglozzer> captain_carrots: If you view the HTML source in TinyMCE after you insert them, is it incorrect there?
203: [17:15:23] <kinglozzer> Or is it only when you view the page on the front-end?
204: [17:15:30] <kinglozzer> I wonder if it's an incorrect base tag or something
205: [17:16:08] <captain_carrots> I'll provide a screencap
206: [17:16:54] <captain_carrots> http://imgur.com/uC8rk97
207: [17:17:04] * Agilix_ quit (Ping timeout: 252 seconds)
208: [17:17:17] <kinglozzer> Yeah the image source is fine, it's probably the base tag that's incorrect
209: [17:17:34] <captain_carrots> source looks fine, populates fine, resolves to that full url for some reason
210: [17:17:50] <kinglozzer> captain_carrots: Have you got this at the top of your <head> in your templates? <% base_tag %>
211: [17:18:27] <Neomang> kinglozzer, yeah I was using DataObject as a placeholder, the actual object is called EducationPost. I'll paste the code and show you, one sec
212: [17:18:58] <captain_carrots> no. no base tag. im a complete jackass
213: [17:19:03] <kinglozzer> :D
214: [17:19:21] <captain_carrots> thank you king, i need more sleep
215: [17:19:24] <captain_carrots> lol
216: [17:19:55] <kinglozzer> No problem captain_carrots :P better something easy than some obscure bug
217: [17:20:20] <captain_carrots> yeah, tell me about. Have you checked out 3.3 yet? I really like the visual changes to the backend.
218: [17:20:46] <kinglozzer> captain_carrots: Yeah it's great. If you like that, you'll love 4.0 ;)
219: [17:21:19] <captain_carrots> nice, is there any expected timetable?
220: [17:22:14] <Neomang> kinglozzer http://pastie.org/private/jikm9p2buc7o1a253or4jw here's the relevant code
221: [17:23:01] <kinglozzer> Sexier left-hand menu at last! http://i.imgur.com/ddstY2B.png
222: [17:23:02] <Neomang> it's just sample stuff to sort out the structure we'll be using, but I definitely need to be able to pull up posts by their slug
223: [17:23:22] <Neomang> very nice!
224: [17:23:23] <kinglozzer> captain_carrots: I don't think there's anything set in stone yet, but my guess would be 3 - 6 months
225: [17:24:11] <captain_carrots> yessssssss! love the flat look. i've been using the flat-admin theme by mediabeast. but im all about that natural look!
226: [17:24:12] <kinglozzer> Neomang: So it doesn't find the correct post when searching by ID?
227: [17:24:18] <kinglozzer> Or it works with ID, but not slug?
228: [17:24:28] <Neomang> it works with the numerical id, but not slug
229: [17:24:44] <Neomang> and it doesn't retrieve anything with just get()
230: [17:24:45] <kinglozzer> $educationPost = EducationPost::get()->filter('Slug', $request->param('ID'))->first();
231: [17:24:51] <kinglozzer> That what you're doing?
232: [17:25:03] <Neomang> aside from the first()
233: [17:25:04] <Neomang> yeah
234: [17:25:09] <kinglozzer> Try adding that :)
235: [17:25:35] <kinglozzer> Otherwise it'll return a DataList (with only one item, but still a list)
236: [17:25:43] <captain_carrots> ok king, thanks so much man! time to get some work done. Keep up the good work!
237: [17:25:47] <Neomang> oh dang
238: [17:25:57] <Neomang> that did it, I knew it would be something simple I was missin
239: [17:26:00] <Neomang> missing
240: [17:26:02] <Neomang> thanks!
241: [17:26:07] <kinglozzer> No problem :)
242: [17:31:09] * kinglozzer quit ()
243: [17:57:37] * GioVdK quit (Ping timeout: 244 seconds)
244: [18:32:10] * Copperis has joined #silverstripe
245: [18:41:43] * Stomach has joined #silverstripe
246: [18:42:42] * gelignite has joined #silverstripe
247: [18:43:10] * lerni has joined #silverstripe
248: [18:44:42] * Stomach quit (Client Quit)
249: [18:45:19] <lerni> anybody already on chrome 49 and if so has access to SilverStripe Backend per httpS ?
250: [18:51:54] <lerni> with this combination you'll see a lot of success notifications in the upper left corner of the CMS by just loading it. a college also noticed this but so far I have no idea why this happens. anybody?
251: [19:04:10] * jules0x has joined #silverstripe
252: [19:04:36] <jules0x> is anyone using the silverstripe DMS module?
253: [19:09:09] * Stomach has joined #silverstripe
254: [19:39:17] * lerni quit (Remote host closed the connection)
255: [19:39:43] * lerni has joined #silverstripe
256: [19:44:01] * lerni quit (Ping timeout: 240 seconds)
257: [19:44:27] * DanaeNZ has joined #silverstripe
258: [19:56:10] <DanaeNZ> Ahhh, still haven't fixed the zip archiving error. More debugging time
259: [19:59:13] * adrexia has joined #silverstripe
260: [20:00:59] * chillu_23 has joined #silverstripe
261: [20:04:03] * Firesphere_ has joined #silverstripe
262: [20:06:52] * micmania1 has joined #silverstripe
263: [20:09:20] * Phlunk3 quit (Remote host closed the connection)
264: [20:14:54] * Phlunk3 has joined #silverstripe
265: [20:18:43] * robbieaverill has joined #silverstripe
266: [20:19:36] <robbieaverill> @unit test people: thoughts on adding reflection wrappers into SapphireTest to help with testing protected methods?
267: [20:20:23] * Firesphere_ quit (Ping timeout: 268 seconds)
268: [20:21:26] <micmania1> robbieaverill: you can do it, but i’ve seen docs or a blog somewhere in phpunit saying “just because you can, it doesn’t mean you should.”
269: [20:21:57] <micmania1> robbieaverill: I think if the method is doing something complex then its worth it
270: [20:25:15] * UndefinedOffset quit (Quit: Leaving.)
271: [20:26:28] * Stomach quit (Quit: zzz)
272: [20:27:18] * Stomach has joined #silverstripe
273: [20:38:58] * lerni has joined #silverstripe
274: [20:41:41] <robbieaverill> micmania1: Yeah, I know it's debated as to whether it should be done. There are many schools of thought, but at the end of the day if you want to *unit* test code including protected or private methods, you basically have no choice but to use reflection
275: [20:42:24] <micmania1> yeah, I always have but I had a discussion recently that made me think twice.
276: [20:42:28] <robbieaverill> micmania1: the reason I mention it is because in my first SS module I've noticed that I've used reflection in a couple of different tests already, so I found myself looking through SapphireTest to see if there were any pre-packaged methods for getting reflection methods from object
277: [20:42:57] <robbieaverill> micmania1: of course the other train of thought is that you should test the method as part of another test for a public method, but that's not a *unit* test right!? :)
278: [20:43:31] <micmania1> well, our discussion was based on “What is a unit” and others thought a unit was a class whereas I always thought og it as a method.
279: [20:44:00] <robbieaverill> I see.
280: [20:44:07] * UndefinedOffset has joined #silverstripe
281: [20:44:15] <micmania1> so who knows. Programming is hard and very subjective :)
282: [20:44:45] <robbieaverill> micmania1: Another interesting consideration is that when you're unit testing, you aren't testing in a production like environment, so what's the harm in illegally accessing protected methods to prove that your code will work correctly in prod?
283: [20:45:14] <robbieaverill> That's true, and this debate is probably why Sebastian hasn't put reflection handlers into the PHPUnit core (yet)
284: [20:45:39] <ss-helper> Re: Cloud flare cramping forum posts style - https://groups.google.com/d/msg/silverstripe-dev/70ul1Rt1wts/o3rsdvVPCAAJ
285: [20:46:18] * Mitcheru has joined #silverstripe
286: [20:46:34] <micmania1> yeah, I think something complex and critical (eg. a private method that is used by all public methods) is worth testing.
287: [20:48:53] <xyphoid> C++ has friend classes which are a nice solution to that - maybe PHP will pick it up one day
288: [20:50:49] <Mitcheru> Heya, does anyone know the URL format for sending AJAX requests to SilverStripe? ... I can't seem to find this information anywhere? SS 3.3
289: [20:50:54] <Mitcheru> I keep 404-ing...
290: [20:51:15] <Hailwood> Hey guys, we're trying to run a dev/ task via sake, but we're getting this error: PHP Fatal error: Class 'MySQLSchemaManager' not found in framework/search/FulltextSearchable.php on line 56 any ideas?
291: [20:51:16] <micmania1> Mitcheru: do you have a code example?
292: [20:51:42] <Mitcheru> @micmanial Yeah, hang on...
293: [20:51:51] <micmania1> Hailwood: there’s a module calling FulltextSearchable::enable() to early. Check _config.php's
294: [20:53:01] <Hailwood> micmania1, But why would it only happen via sake? If I visi http://domain.com/dev/tasks/... then it's fine
295: [20:53:51] <micmania1> I’m not sure. I’ve just seen a few people ask that question before and that is usually the answer :p
296: [20:54:07] <Hailwood> So if you don't put it in _config.php then where do you put it?
297: [20:54:16] <micmania1> Do you have $_FILE_TO_URL_MAPPING set for the site?
298: [20:54:54] <Hailwood> yep
299: [20:55:46] <BrewNaked> Could someone please set me straight on the appropriate replacement to the deprecated LeftAndMain::require_javascript() that has been previously used in the _config.php for adding Javascript pages to all CMS pages?
300: [20:55:53] <micmania1> Do you get the error running framework/cli-script.php instead of sake?
301: [20:56:24] <DanaeNZ> I fixed the zip bug micmania1
302: [20:57:00] <micmania1> DanaeNZ: what was the issue? Was it platform or php version?
303: [20:57:34] <DanaeNZ> I used that fix you passed me (is_resource), also used SilverStripe's send_file function instead of readfile, and finally used a mixture of sys_temp_dir and tempnam to generate the temp file instead of just sys_tmp_dir
304: [20:58:06] <DanaeNZ> I found the particular error: filesize() stat failed
305: [20:58:28] <DanaeNZ> I'm going to try it again cos sometimes these things break again for no reason
306: [20:58:58] <Mitcheru> @micmanial: Here, http://pastebin.com/WrDVuR9b (please excuse the Silverstripe newbie). Also, I know that's not the recommended way to return a JSON response in SS but I was just being impatient ;-)
307: [21:00:04] <micmania1> Mitcheru: the .get() should be .get($Link(‘TestAjax’))
308: [21:02:56] <Mitcheru> @mimanial I think you mean .get('$Link('TestAjax')')? I've made the change but still get a 404.
309: [21:03:16] <Hailwood> micmania1, This is freaking odd http://i.imgur.com/fLpPfnf.png
310: [21:03:53] <micmania1> Hailwood: php framework/cli-script.php
311: [21:04:35] <micmania1> There’s no shebang in cli-script.php so it doesn’t know to execute it with php
312: [21:05:30] <Hailwood> ^ missed one in the image, oh well - just don't tell the client ;)
313: [21:05:43] <Hailwood> Ok so same error as sake
314: [21:06:01] <Hailwood> (which is a different error now I've commented out the FullTextSearch::enable() in _config.php)
315: [21:07:03] <Hailwood> The error is correct, that file isn't there.. but why is it looking for it?
316: [21:08:26] <Hailwood> I believe it's an error from siteconfig & reports being extracted out
317: [21:12:17] <micmania1> Hailwood: try running flush=1 on your cli command. It uses a different cache which might not be flushed.
318: [21:14:49] <Hailwood> BOOM!
319: [21:15:05] <Hailwood> Thanks micmania1 - why on earth does it use it's own cache..
320: [21:15:13] <robbieaverill> I hate that too
321: [21:15:36] <micmania1> Hailwood: because you’re running as root so your webserver doesn’t have permission to read it :p
322: [21:16:36] <micmania1> If you run sudo -u www-data framwork/cli-script.php … then it will use the same cache
323: [21:17:02] <micmania1> On my vagrant boxes, I change the webserver user to vagrant so I don’t need to worry about it :p
324: [21:20:50] * UndefinedOffset quit (Quit: Leaving.)
325: [21:30:49] <Mitcheru> :micmanial Today I learned you have to perform a /dev/build when you change a controller's $allowed_actions... AJAX problem solved.
326: [21:30:58] <Mitcheru> D'oh.
327: [21:35:29] <Stomach> Mitcheru - not a dev/build, just a flush :)
328: [21:35:43] <DanaeNZ> do any of you consider it your job to fuck around with .htaccess redirects after the site is live? because fuck that shit
329: [21:35:46] <Stomach> basically anytime you change anything 'private static' in silverstripe, you need to flush the manifests
330: [21:35:52] <Stomach> DanaeNZ - yes
331: [21:36:06] <Stomach> we usually do it before the site is live though...
332: [21:36:23] <Stomach> and use this https://github.com/silverstripe-labs/silverstripe-redirectedurls
333: [21:36:37] * vitaly_ has joined #silverstripe
334: [21:36:45] <DanaeNZ> yeah I didn't even know there were supposed to be redirects, tho it makes sense
335: [21:37:00] <DanaeNZ> see I tried that - but some of the redirects didn't work
336: [21:37:13] <DanaeNZ> and they have domain specific redirects
337: [21:37:20] <DanaeNZ> I want to go back to that module though
338: [21:37:30] <vitaly_> Morning o/ What would be the best E-Commerce solution for SS?
339: [21:41:10] <DanaeNZ> this site is gonna be the death of me
340: [21:44:17] <Mitcheru> :Stomach Ah okay - thanks! Geez.. self-learning huh?
341: [21:44:35] <Stomach> vitaly_ - we use swipestripe
342: [21:44:38] <Stomach> Mitcheru :D
343: [21:44:42] <Stomach> DanaeNZ what is the site
344: [21:45:12] <micmania1> > Stomach: basically anytime you change anything 'private static' in silverstripe, you need to flush the manifests
345: [21:45:15] <micmania1> Not in ss4 :D
346: [21:45:27] <DanaeNZ> Stomach: probably shouldn't say after badmouthing them lol
347: [21:45:38] <Stomach> micmania1 yeah I know :D
348: [21:45:41] <ss-helper> Preferred method for converting framework to PSR-2 - https://groups.google.com/d/msg/silverstripe-dev/IoMtKlju3Rc/HQPy-UdTCAAJ
349: [21:45:43] <DanaeNZ> I just need a holiday
350: [21:45:54] <Stomach> waiting for that full manifest destruction :D
351: [21:45:57] <micmania1> There was a PR to apply it to SS3 as well - not sure if i t ever made it
352: [21:46:15] <micmania1> I think it might be in 3.3 but not on by default
353: [21:47:01] <vitaly_> Stomach: Thanks, I'll have a look :)
354: [21:48:02] * robbieaverill quit (Ping timeout: 252 seconds)
355: [21:55:04] * Phlunk3 quit (Remote host closed the connection)
356: [22:03:46] * robbieaverill has joined #silverstripe
357: [22:07:51] * DimiStripe_alt has joined #silverstripe
358: [22:09:27] * DimiStripe quit (Ping timeout: 260 seconds)
359: [22:09:28] * DimiStripe_alt is now known as DimiStripe
360: [22:15:34] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
361: [22:29:47] * steven__ has joined #silverstripe
362: [22:30:35] <steven__> Hi, someone here who can help me with a DataObject and calculating the age based on the birthday?
363: [22:33:23] <steven__> I extended the Member with birthdate (Date) and on a page controller I want to get the whle DataObject including age... so far I just get the dataobject which of course doesn't have the age:
364: [22:33:24] <steven__> function getMemberList(){ $MemberList = DataObject::get("Member"); return $MemberList; }
365: [22:33:39] * Stomach quit (Ping timeout: 248 seconds)
366: [22:41:40] <micmania1> steven__: I don’t think that functionality is built in. Checkout Carbon - that might be able to work that stuff out for you if you don’t want to deal with date calculations yourself (who does?)
367: [22:43:17] * lerni quit (Remote host closed the connection)
368: [22:43:52] <steven__> I can write a php function for it, i'm just new at SS and won't know how to hook that in. E.g. can I call a custom function and inject it into the DataObject so I could in the Template just use $Age?
369: [22:44:36] <micmania1> steven__: checkout https://docs.silverstripe.org/en/3.3/developer_guides/model/extending_dataobjects/
370: [22:47:30] <steven__> But that will create real DB fields, right? The age calculation mostly has to be when the query runs against the actual date. Normally i would just do in a MySQL query which then results in a new field with the age in it
371: [22:51:00] <micmania1> ah, you could do it in a MySQL query. You’d have to alter the DataObject::get(‘Member’) inner query so you’ll have to dig into the core code to see ha=ow its done
372: [22:51:05] <micmania1> I’ll check to see if there’s some docs
373: [22:51:31] <steven__> that'd be great, thanks
374: [22:51:46] <micmania1> steven__: maybe this https://docs.silverstripe.org/en/3.1/developer_guides/model/sql_query/
375: [22:52:27] <micmania1> You can get the query by $list = Member::get(); (instead of DataObject::get())
376: [22:52:39] <micmania1> then $query = $list->dataQuery()->query();
377: [22:52:53] <micmania1> then $query will be SQLQuery and will put you where the docs are :)
378: [22:53:50] <steven__> Ta
379: [23:00:02] * ss-helper quit (Remote host closed the connection)
380: [23:00:15] * ss-helper has joined #silverstripe
381: [23:03:26] * micmania1 quit (Quit: micmania1)
382: [23:09:58] * steven__ quit (Quit: Page closed)
383: [23:15:09] * DanaeNZ quit (Remote host closed the connection)
384: [23:15:45] * DanaeNZ has joined #silverstripe
385: [23:20:03] * DanaeNZ quit (Ping timeout: 246 seconds)
386: [23:22:57] * Stomach has joined #silverstripe
387: [23:32:13] * micmania1 has joined #silverstripe
388: [23:44:44] * DanaeNZ has joined #silverstripe

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