#silverstripe IRC Log

IRC log for 22 April 2014

All timestamps are in UTC.

1: [00:02:37] <Colin[pi]> I don't know whether to cringe or be impressed, equal portions of each: http://damian.drygiel.com/
2: [00:02:53] <jedateach> is there an easy way in SS unit tests to mimic another user/session?
3: [00:02:58] <Ryan-Toast> You know what they say about guys with big ears?
4: [00:03:02] <Ryan-Toast> Shhhhhhh
5: [00:03:16] * UncleCheese has joined #silverstripe
6: [00:03:26] <ss23> jedateach: Maybe have a look at testsession
7: [00:03:37] <ss23> jedateach: But uh... I'm 100% sure there is! I've just not done it so I'm not sure
8: [00:03:40] <ss23> not sure how
9: [00:05:10] <jedateach> cheers!
10: [00:18:05] * robert_ has joined #silverstripe
11: [00:18:06] * robert_ quit (Changing host)
12: [00:18:06] * robert_ has joined #silverstripe
13: [00:40:23] * n45 has joined #silverstripe
14: [00:40:59] * jedateach quit (Quit: jedateach)
15: [00:41:18] <Ryan-Toast> awkward moment when your boss grabs your kindle to have a look and the wallpaper is a bare ass.
16: [00:44:50] <ss23> niiiice
17: [00:44:52] <ss23> ;)
18: [00:45:19] * UncleCheese quit (Quit: UncleCheese)
19: [00:58:28] <lrniningine> how do i add a dataobject to a has_many list, i'm trying $photographer->Photographs()->add($photograph) where Photographs is a Photograph in has_many - i think it's erroring but i'm getting no output (putting an error_log after this line doesn't fire)
20: [00:59:26] <lrniningine> i didn't find the datamodel subject very helpful
21: [00:59:58] <ss23> Yeah, do that, and also $photograph->FoobarID = Baz
22: [00:59:58] <ss23> etc
23: [01:00:01] <ss23> Make the relationship both ways
24: [01:01:56] <lrniningine> http://bpaste.net/show/YcKzbrdAbLUj02eFVgBA/ 2 is never getting called
25: [01:02:01] <lrniningine> nothing in apache error log or ss error log
26: [01:04:57] <lrniningine> apart from the glaring error - which isn't the cause of the failing execution
27: [01:09:24] <lrniningine> silent death on a NULL apparently, is there additional debugging i can turn on?
28: [01:14:48] * n45 quit (Ping timeout: 240 seconds)
29: [01:16:39] * boytikz has joined #silverstripe
30: [01:24:04] * UncleCheese has joined #silverstripe
31: [01:24:12] <Stomach> lrniningine - do you have a has_one on the reciprocal?
32: [01:25:08] <Stomach> ie $has_many = array('Photographs' => 'PhotoGraph'); and then in Photograph $has_one = array('Photographer' => 'Photographer');
33: [01:25:58] <Stomach> then Photographer::get()->first()->Photographs()->add($photograph); should work
34: [01:26:27] <Stomach> the photograph has to be written before you add it, it has to have an ID
35: [01:27:24] <Stomach> weird its not working from your code paste, cant see anything immediate
36: [01:27:51] <Stomach> you need to write the photographer
37: [01:28:11] <Stomach> not sure how create from request works internally sorry
38: [01:34:49] <lrniningine> the issue was that it was silently erroring and stopping execution
39: [01:35:05] <lrniningine> (i was accidentally giving it a null) wondering what else i can enable to get more print debugging outpuit
40: [01:35:20] <lrniningine> yeah i got it all working nicely btw
41: [01:41:00] * Danae has joined #silverstripe
42: [01:45:37] * travis-ci has joined #silverstripe
43: [01:45:37] <travis-ci> [travis-ci] silverstripe/silverstripe-framework#2364 (master - 1dcaf36 : Damian Mooyman): The build passed.
44: [01:45:37] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-framework/compare/99c4b586810d...1dcaf36c9b5f
45: [01:45:37] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-framework/builds/23473200
46: [01:45:37] * travis-ci has left #silverstripe
47: [01:56:56] <Colin[pi]> QUIET HERE TODAY
48: [01:56:58] <Colin[pi]> IMA SHOUT
49: [01:58:55] <Stomach> :(
50: [01:58:58] * travis-ci has joined #silverstripe
51: [01:58:58] <travis-ci> [travis-ci] silverstripe/silverstripe-cms#846 (master - 61ebe08 : Damian Mooyman): The build passed.
52: [01:58:58] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-cms/compare/ecda66a1c445...61ebe0843766
53: [01:58:58] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-cms/builds/23473211
54: [01:58:58] * travis-ci has left #silverstripe
55: [01:59:07] <Colin[pi]> HI STOMACH
56: [01:59:17] <Stomach> HI COLIN[PI]
57: [01:59:20] <Colin[pi]> UGUU
58: [01:59:23] <Colin[pi]> HOW ARE YOU
59: [01:59:32] <Stomach> IM OKAY
60: [01:59:36] <Stomach> ID RATHER NOT BE AT WORK
61: [01:59:40] <Stomach> BUT THATS ALRIGHT
62: [01:59:41] <Stomach> HOW ARE YOU
63: [01:59:47] <Colin[pi]> ME TOO BUT I WORK FROM HOME SO I HAVE NO CHOICE
64: [01:59:51] <Colin[pi]> I AM GOOD ALSO
65: [02:00:04] <Stomach> YOU ARE ALWAYS AT WORK
66: [02:00:09] <Stomach> THAT MUST BE DEPRESSING
67: [02:00:33] <Colin[pi]> YES, YES IT IS
68: [02:00:39] <Colin[pi]> BUT I MANAGE
69: [02:01:41] <Stomach> THATS GOOD NEWS
70: [02:01:56] <Stomach> WHAT ARE YOU WORKING ON AT THE MOMENT
71: [02:03:44] <Colin[pi]> QUOTING.. AHEM... quoting on a new project right at this minute (my throat is sore from yelling)
72: [02:03:55] <Colin[pi]> and I have like 5 other projects to juggle
73: [02:03:56] <Colin[pi]> :\
74: [02:05:08] <Colin[pi]> and OH what's this, I need to remind a client to pay today
75: [02:05:12] <Colin[pi]> THAT'S strange
76: [02:05:17] <Colin[pi]> that almost never happens
77: [02:05:19] <Colin[pi]> -_-
78: [02:06:36] <Stomach> haha
79: [02:06:52] <Stomach> of course it doesn't :D
80: [02:13:23] <Ryan-Toast> I thought 4 days off is supposed to leave yopu refreshed and ready to work, not the opposite.
81: [02:13:55] <Colin[pi]> Ryan-Toast: no it has that effect sometimes.. WANT MOAR
82: [02:14:04] <Ryan-Toast> DO WANT
83: [02:14:20] <Ryan-Toast> Only two days until the weekend.
84: [02:15:04] <Colin[pi]> yeah this week is like "pfff, why bother"
85: [02:17:28] <Colin[pi]> Ryan-Toast: are you going to WDCNZ?
86: [02:18:25] <Ryan-Toast> Colin[pi]: Still deciding.
87: [02:18:30] <Colin[pi]> I've booked :D
88: [02:18:34] <Ryan-Toast> I knowss23 want’s me to bring my gf.
89: [02:18:37] <Colin[pi]> LOL
90: [02:18:40] <Ryan-Toast> ss23**
91: [02:18:48] <Colin[pi]> mine is staying here, that's why I'm more comfortable going
92: [02:19:00] <Ryan-Toast> Mine like Wellington.
93: [02:19:54] <Ryan-Toast> So she’ll most likely tag along, but we will be in Brisabane the previous weekend so may not be able to get more tim,e off.
94: [02:20:31] <Colin[pi]> i'll be there from 30 Jul to 03 Aug
95: [02:24:19] <Ryan-Toast> can you filter by multiple IDs?
96: [02:25:59] <Ryan-Toast> something like: return Client::get()->Filter(array('Countries.ID' => $this->Countries()->map()->toArray()))->Limit(4);
97: [02:28:55] <ss23> Colin[pi]: Come on
98: [02:28:57] <ss23> Colin[pi]: It'll be fun ;)
99: [02:29:05] <Colin[pi]> ss23: NU UH
100: [02:29:11] <ss23> :D
101: [02:29:34] <Colin[pi]> nah we're going up to QLD in June to get a bit of warmth together ;)
102: [02:29:45] <ss23> Ryan-Toast: Yes, that's fine
103: [02:29:55] <ss23> Colin[pi]: I'm planning on going to Japan in June o/
104: [02:29:58] <Ryan-Toast> ss23: tried, and failed :P
105: [02:30:03] <Ryan-Toast> doesn’t like the array
106: [02:30:06] <Colin[pi]> ss23: :o awesome!
107: [02:30:08] <Ryan-Toast> waiiiit
108: [02:30:11] <ss23> Ryan-Toast: (See the "'Age' => array(17, 74)" example in http://doc.silverstripe.com/framework/en/topics/datamodel)
109: [02:31:19] <Ryan-Toast> ss23: how can I make ->map() only contain the ids?
110: [02:31:41] <Stomach> ->map('ID', 'ID')
111: [02:32:00] <ss23> I'm so good at SilverStripe, if you ask me a question, it'll get an answer even if I'm AFK
112: [02:32:03] <ss23> ^.^
113: [02:32:17] <Stomach> simon_w level
114: [02:32:18] <Ryan-Toast> ss23: hola holla get dolla.
115: [02:32:21] <Ryan-Toast> cheers.
116: [02:32:38] <Colin[pi]> we've lost simon_w now to facebook and womens
117: [02:32:40] <Colin[pi]> ;_;
118: [02:34:01] <Colin[pi]> brb r3b00t
119: [02:34:05] * Colin[pi] quit (Quit: pants)
120: [02:34:15] <Ryan-Toast> warning: incoming game
121: [02:34:32] <ss23> REBOOT!
122: [02:34:38] <Ryan-Toast> aww yiss
123: [02:35:52] * Bollig|DesignCty has joined #silverstripe
124: [02:36:44] * Colin[pi] has joined #silverstripe
125: [02:50:18] <simon_w> That's right, you're all losing me!
126: [02:53:28] <ss23> :(
127: [02:53:36] <ss23> simon_w: So does HHVM have Parity with PHPs constant system?
128: [02:53:47] <ss23> simon_w: http://codepad.viper-7.com/yNdIGF
129: [02:53:51] <simon_w> ss23, no, and that's by design
130: [02:53:54] <ss23> lol
131: [02:53:55] <ss23> laaame
132: [02:54:06] <simon_w> ss23, also, if you want to see how that works in HHVM, spin up your own VM with me
133: [02:54:06] <Ryan-Toast> simon_w: And rRyan becomes one step closer to being a SS big fish, muhahahaha
134: [02:54:19] <ss23> simon_w: With you? :P
135: [02:54:38] <simon_w> ss23, with it
136: [03:02:54] * boytikz quit (Read error: Connection reset by peer)
137: [03:08:09] <UncleCheese> quick poll
138: [03:08:45] <UncleCheese> my son cracked my the display on my mid-2011 13" macbook air
139: [03:08:59] <ss23> hahaha
140: [03:09:14] <UncleCheese> Other than grossly exaggerated and sarcastic suggestions for punitive measures to take against my 21-month-old son, what should i do? Repair or replace?
141: [03:09:25] <UncleCheese> replacement display is $599 USD
142: [03:09:29] <ss23> UncleCheese: simon_w knows most about how apple does their repairs!
143: [03:09:36] <UncleCheese> just shy of 700 kiwibucks
144: [03:10:00] <UncleCheese> i've already replaced the keyboard, which required taking everything apart, so i'm confident i can handle the display
145: [03:10:10] <UncleCheese> new MB air is $1589 kiwi
146: [03:10:11] <ss23> No insurance? I thought Apple often did replacements for free?
147: [03:10:19] <UncleCheese> it would be out of coverage anyway
148: [03:10:21] <UncleCheese> 3 years
149: [03:10:32] <UncleCheese> and they don't cover accidental damage anyway
150: [03:10:44] <ss23> What baout insurance?
151: [03:10:48] <UncleCheese> although to be fair, this was intentional damage
152: [03:10:52] <UncleCheese> nah, didn't buy it
153: [03:11:08] <Colin[pi]> <UncleCheese> my son cracked my the display on my mid-2011 13" macbook air
154: [03:11:11] <Colin[pi]> ^ whooooops
155: [03:11:11] <UncleCheese> so is it worth an extra 800 bucks to just get a new one?
156: [03:11:29] <simon_w> Yes
157: [03:11:30] <UncleCheese> i mean it's a three-year-old machine.. that's getting up there
158: [03:11:44] <simon_w> Having more than 2 GB of RAM is useful :p
159: [03:11:48] <UncleCheese> and how would you suggest unloading my current machine?
160: [03:11:52] <UncleCheese> trademe?
161: [03:12:12] <simon_w> Good luck selling a broken, 3 year old laptop
162: [03:12:19] <UncleCheese> it's gotta be worth something
163: [03:12:26] <simon_w> Turn it into a headless server
164: [03:12:30] <UncleCheese> whoa!
165: [03:12:40] <UncleCheese> that's a really good fucking idea
166: [03:12:44] <ss23> lol
167: [03:12:47] <ss23> I got another good one
168: [03:12:50] <ss23> Stop buying fucking macs
169: [03:12:52] <UncleCheese> i'd need to get a static IP from snap though aye?
170: [03:12:53] <Danae> My server only has a couple gigs ram
171: [03:13:08] <simon_w> Only if you want to remotely accessible
172: [03:13:08] <Danae> you can do no-ip or something similar
173: [03:13:10] <ss23> UncleCheese: I just do ddns at home
174: [03:13:17] <UncleCheese> ...
175: [03:13:23] <Danae> your router can generally handle dyndns conversion
176: [03:13:28] <ss23> (Technically it's just normal DNS, but I use the Zonomi API to do a call on ifup)
177: [03:13:59] <ss23> It's cool, they have a "Set my IP to the one requesting this", so it is literally like `wget api.zonomi.com/set/my/ip?apikey=foo
178: [03:14:03] <ss23> `
179: [03:14:05] <ss23> and that's it
180: [03:14:08] <ss23> :D
181: [03:14:09] <UncleCheese> alright, this just got way to complicated
182: [03:14:15] <UncleCheese> you guys are talking to me like i'm a developer or something
183: [03:14:16] <Danae> you mean, fun
184: [03:14:56] <ss23> XD
185: [03:15:13] <UncleCheese> that's a really cool idea… custom dns server
186: [03:15:28] <ss23> lol
187: [03:15:46] <simon_w> "At the moment we are too busy deleting code to make a decent web page. No we don't want help making web pages, thank you."
188: [03:15:58] <UncleCheese> actually
189: [03:15:59] <UncleCheese> i have a great idea
190: [03:16:04] <UncleCheese> i'll just give it to my wife as a gift
191: [03:16:49] <ss23> IF ANYONE COMES IN HERE BEING DICKS BAN THEM
192: [03:16:51] <ss23> #justfyi
193: [03:16:58] <UncleCheese> or better yet, just give it to my son.. he seems to quite enjoy throwing blocks at it.
194: [03:18:00] <ss23> UncleCheese: XD
195: [03:18:52] * Bollig|DesignCty quit (Quit: Bollig|DesignCty)
196: [03:20:13] * cloph_away has joined #silverstripe
197: [03:20:35] * cloph quit (Ping timeout: 252 seconds)
198: [03:26:20] <Colin[pi]> UncleCheese: one time, my son took to "drawing" all over my flat panel TV with the pointy end of the remote control
199: [03:26:33] <simon_w> Good on him!
200: [03:26:47] <simon_w> Teaches you for not getting a CRT :p
201: [03:27:00] <Colin[pi]> was only out of the room for a few mins, didn't notice until the screen went to black and I could see "scribble" marks everywhere
202: [03:27:06] <Colin[pi]> I'm like "wtf"
203: [03:27:14] <Colin[pi]> and then realised what it was from
204: [03:27:31] <Colin[pi]> SO lucky that the screen is quite resilient, and was manage to "buff them right out"
205: [03:27:38] <Colin[pi]> *and managed
206: [03:31:59] <Colin[pi]> simon_w: still a fan of CRTs? ;)
207: [03:32:11] <Colin[pi]> hook one up for dev work and see how you like it :D
208: [03:32:51] <simon_w> My gaming machine's a CRT :p
209: [03:32:58] <Colin[pi]> wat
210: [03:33:09] <Colin[pi]> dat 4:3
211: [03:33:23] <simon_w> 17" eMac!
212: [03:38:47] <Colin[pi]> heh: http://i.imgur.com/Jpl9vBy.jpg
213: [03:39:53] <Danae> hahaha
214: [03:40:11] <Ryan-Toast> Colin[pi]: you on /r/programmerhumor?
215: [03:40:15] <Colin[pi]> I am yes
216: [03:41:16] <Ryan-Toast> Good subreddit :)
217: [03:43:03] * chrisrio has joined #silverstripe
218: [03:43:41] <chrisrio> hey team, can I do a natural sort on an arraylist (or any sort of SS-centric data structure)?
219: [03:53:04] * danfo quit (Quit: danfo)
220: [03:53:56] <Zauberfisch> chrisrio: ArrayList actually has an array property that stores all items
221: [03:54:44] <Zauberfisch> so you can do anything with the array if you want to
222: [03:55:28] <Zauberfisch> $array = $arrayList->toArray(); // just returns $this->items; of the ArrayList
223: [03:55:39] <Zauberfisch> // do something with $array
224: [03:55:49] <Zauberfisch> $arrayList = new ArrayList($array);
225: [03:57:14] * CodeTrap quit (Ping timeout: 240 seconds)
226: [03:58:15] * UncleCheese quit (Quit: UncleCheese)
227: [03:59:18] * CodeTrap has joined #silverstripe
228: [03:59:31] <chrisrio> cheer Zauberfisch thats exactly what I ended up doing - just not too sure how efficient it is :P
229: [04:04:35] * UncleCheese has joined #silverstripe
230: [04:05:12] <UncleCheese> Colin[pi]: I've kind of gotten used to the crayon designs all over our screen. It's kind of hard to imagine watching a show without them
231: [04:05:42] <UncleCheese> when i watch someone else's TV, my brain automatically adds the lines
232: [04:13:38] <Ryan-Toast> Can you make Dataobjects searchable?
233: [04:14:10] <UncleCheese> by.......
234: [04:14:24] <Ryan-Toast> Any of their fields if I’m displaying them as pages?
235: [04:14:35] <Ryan-Toast> i.e title/content
236: [04:14:40] <UncleCheese> you're talking about the candy-ass search thing that comes with SS?
237: [04:14:48] <Ryan-Toast> yarp
238: [04:14:52] <UncleCheese> not without a huge battle
239: [04:14:57] <Ryan-Toast> yay
240: [04:15:06] <Ryan-Toast> google search mdule then?
241: [04:15:08] <UncleCheese> you're much better off putting the effort into using Sphinx, Solr, or just a Google search
242: [04:15:24] <UncleCheese> it's been a while since i've seen a site worth a damn use that site search thing
243: [04:15:41] <Ryan-Toast> It’s pretty bad.
244: [04:16:04] <UncleCheese> they should exclude it from the framework
245: [04:16:05] <jordanmk> hey guys
246: [04:16:33] <UncleCheese> if they're willing to cast off MetaTitle as being too opinionated, then I can't see how the Search contorller makes the cut
247: [04:16:56] <Ryan-Toast> shrug
248: [04:19:02] <Zauberfisch> chrisrio: meh. you should be fine
249: [04:19:18] <jordanmk> in my templates, i've been doing this quite a lot: http://pastebin.com/2qwuD10V
250: [04:20:14] <Zauberfisch> jordanmk: alternative proposal:
251: [04:20:21] <jordanmk> and then adding the associated $allowed_actions
252: [04:20:22] <UncleCheese> ugly!
253: [04:20:23] <jordanmk> allowing me to have URLs like /Page/SubscriptionSuccessful, /Page/Error as well as the standard /Page
254: [04:20:25] <Zauberfisch> whats the name of your file?
255: [04:20:30] <jordanmk> i get the feeling that it's not the right way to do things
256: [04:20:36] <UncleCheese> jordanmk: no
257: [04:20:37] <Zauberfisch> it's not
258: [04:20:40] <Zauberfisch> the right way is:
259: [04:20:41] <jordanmk> yeah didn't think so lol
260: [04:20:46] <Zauberfisch> Controller.ss // for index
261: [04:20:50] <UncleCheese> i believe you just broke SilverStripe.
262: [04:21:01] <Zauberfisch> Controller_SubscriptionSuccessful.ss // for SubscriptionSuccessful
263: [04:21:12] <Zauberfisch> Controller_SubscriptionCancelled.ss // for SubscriptionCancelled
264: [04:21:13] <Zauberfisch> ...
265: [04:21:19] <Zauberfisch> and so on
266: [04:21:36] <jordanmk> ah, i see
267: [04:21:44] <Zauberfisch> where Controller is the name of your controller or model (eg SubscriptionController or Page)
268: [04:21:45] <UncleCheese> Zauberfisch: jordanmk there's a cleaner way to do it that won't pollute your file system with redundant templates
269: [04:22:00] <UncleCheese> have each action just return an array of custom variables
270: [04:22:01] <Zauberfisch> indeed, there are multiple ways of doing this
271: [04:22:16] <Zauberfisch> I usually also resort to ->customise() instead of multiple templates
272: [04:22:19] <UncleCheese> public function someaction() { return array ('Title' => $this->Something, 'Content' => $this->SomethingElse) }
273: [04:22:45] <UncleCheese> in fact, i would hijack the handleAction() method so you don't have to create a bunch of redundant controller methods, either
274: [04:23:00] * an_Eskimo quit (Quit: Page closed)
275: [04:23:26] <jordanmk> i kind of simplified things in that content i put on Pastebin, each of the actions also has various different includes and other hard-coded paragraphs
276: [04:23:34] <jordanmk> so i don't think i could do what you're suggesting UncleCheese
277: [04:23:35] <UncleCheese> yeah, yo'ure right Zauberfisch, you'd have to use customise() to override the native properties
278: [04:23:57] <UncleCheese> still, though, you could have it return a rendered template
279: [04:24:06] * an_Eskimo has joined #silverstripe
280: [04:24:22] <UncleCheese> just put those little snippets that are currently in your display logic into includes
281: [04:24:39] * chrisrio quit (Quit: Page closed)
282: [04:24:56] <UncleCheese> and then use return $this->renderWith('SomeIncludeDefinedDynamically');
283: [04:24:58] <Zauberfisch> jordanmk: http://paste2.org/KzgZjfpM
284: [04:25:46] <UncleCheese> yeah, the fisch nailed it
285: [04:25:46] <jordanmk> cheers Zauberfisch, that makes sense
286: [04:26:08] <UncleCheese> although, to be pedantic, i would define the controller actions in lowercase to distinguish them from template accessors
287: [04:26:35] <jordanmk> so if i also wanted other content that is dispersed both inbetween the title and content, as well as below both of them, how would i go about that?
288: [04:27:07] <UncleCheese> if each condition renders an unpredictable set of fields, then you might consider using includes
289: [04:27:17] <UncleCheese> so
290: [04:27:26] <UncleCheese> paste coming up
291: [04:27:32] <jordanmk> cheers :D
292: [04:30:28] <Zauberfisch> jordanmk: here a more extensive example, and a motential solution to your question of one action having more content
293: [04:30:31] <Zauberfisch> http://paste2.org/Gb5gXBVf
294: [04:30:50] <Zauberfisch> not the cleanest way though, as I have put '<p>' into php
295: [04:31:06] <UncleCheese> something like this: http://paste2.org/xvx2jOVC
296: [04:31:22] <Zauberfisch> if SubscriptionCancelledMessage is a HTMLText though from a HTMLEditorField, then the '<p>' is not needed because its already there
297: [04:32:18] <UncleCheese> oops.. revised. http://paste2.org/B2HDeGyd
298: [04:33:03] <Zauberfisch> UncleCheese: line 9 should have no ;
299: [04:33:11] <UncleCheese> :O
300: [04:33:56] <jordanmk> ah yeah i see what yours is doing as well UncleCheese
301: [04:35:08] <UncleCheese> the caveat there is that if you have any actions that don't just inject content into your template, then you'll want to create a whitelist or blacklist of some sort so that you can have them render normally
302: [04:35:31] <jordanmk> hmm, so there are essentially 3 good but different approaches: Controller_SubscriptionSuccessful.ss etc., Zauberfish's way, and UncleCheese's way
303: [04:36:15] <UncleCheese> in order of most verbose to least verbose.. as it gets less verbose, it becomes more opinionated
304: [04:36:26] <jordanmk> yep
305: [04:36:27] <Zauberfisch> I like customise() best, because it has the least redundant code
306: [04:36:38] <UncleCheese> so if you want some wiggle room, go with a more verbose solution
307: [04:36:47] <Zauberfisch> handleAction might be less verbose on php, but more verbose on template
308: [04:36:56] <Zauberfisch> thus overall I think customise is less verbose
309: [04:37:33] <Zauberfisch> also the customise approach lets you define each action in php and do stuff there
310: [04:37:45] <jordanmk> i feel that Zauberfish's way would be the best if my code was actually like the pastebin i put up, and the Controller_Action.ss way would be better for what i currently have, where there's various static content dispersed throughout which is different for each action
311: [04:37:54] <Zauberfisch> as were the handleAction approach would completely disable the default action mehaviour
312: [04:38:03] <UncleCheese> 4th way is to do it all on the template
313: [04:38:23] <UncleCheese> <% include ActionContent Title=$TheTitle, Content=$TheContent %>
314: [04:38:38] <Zauberfisch> UncleCheese: good point.
315: [04:38:52] <UncleCheese> ss is trying to promote composition over inheritance
316: [04:38:54] <Zauberfisch> but I have experienced some problems with included and passing parameters
317: [04:39:00] <Zauberfisch> I haven't pinned it down yet
318: [04:39:04] <UncleCheese> that's too bad
319: [04:39:24] <Zauberfisch> but it seems that sometimes content passed to an include is escaped wrongly
320: [04:39:35] <UncleCheese> you should see the reusablehtml module one of our devs built here.. it's crazy
321: [04:39:38] <Zauberfisch> eg HTMLText turining into Text, and thus all HTML is escaped
322: [04:39:39] <UncleCheese> i wonder if it's in a public repo
323: [04:39:50] <Zauberfisch> UncleCheese: it is
324: [04:40:00] <UncleCheese> nah
325: [04:40:02] <UncleCheese> https://github.com/heyday/silverstripe-reusablehtml
326: [04:40:05] <UncleCheese> too bad
327: [04:40:16] <Zauberfisch> oh
328: [04:40:23] <Zauberfisch> I thought you where talking about the
329: [04:40:25] <Stomach> get it open sourced !
330: [04:40:26] <Zauberfisch> <:button thing
331: [04:40:47] <Zauberfisch> https://github.com/heyday/silverstripe-composeparser
332: [04:40:56] <UncleCheese> i know.. heyday is a bit behind on releasing their stuff
333: [04:41:05] <UncleCheese> Yeah, Zauberfisch that's the one
334: [04:41:48] <UncleCheese> THAT is composition over inheritance :D
335: [04:41:59] <UncleCheese> reminds me a lot of ReactJS
336: [04:42:23] <UncleCheese> it's so hard working on projects that use that, though.. when I want to make a simple html update, it's like impossible to find anything
337: [04:42:54] <Stomach> no its not
338: [04:43:01] <Stomach> unless pieter wrote it
339: [04:43:20] <Stomach> :D
340: [05:14:41] <lrniningine> how do i get an image into the modeladmin grid field
341: [05:14:49] <lrniningine> want to put thumbnails into it
342: [05:16:01] * Ryan-Toast quit (Quit: Ryan-Toast)
343: [05:33:18] * an_Eskimo quit (Ping timeout: 240 seconds)
344: [05:39:54] * Bollig|DesignCty has joined #silverstripe
345: [05:48:10] * UncleCheese quit (Quit: UncleCheese)
346: [05:53:33] * violetina has joined #silverstripe
347: [05:55:48] <Avroceptyr> you.....PHP on it
348: [05:55:51] * Avroceptyr giggles
349: [05:56:06] <Avroceptyr> golden showers for everyone!
350: [05:56:46] <Zauberfisch> I don't get it
351: [05:57:06] <Colin[pi]> pee aitch pee
352: [05:59:50] * anselmdk has joined #silverstripe
353: [05:59:51] * violetina quit (Remote host closed the connection)
354: [06:02:39] * trent001 has joined #silverstripe
355: [06:07:14] <trent001> Hey guys just trying to use fulltext search to search DataObject I have created myself I see in the source that it defaults to only search the sitetree and files. Have tried adding the code at line 34 of FulltextSearchable.php to my _config.php and also adding indexes to my DataObject but not working as of yet. Just wondering if I am heading down the right path. Am using 3.1 Cheers
356: [06:07:49] <simon_w> trent001, you'll want to roll your own search form. The inbuilt one is kinda rigid and not worth the time
357: [06:08:34] <Colin[pi]> ugh Google your UI design and usability is so, so, so bad
358: [06:08:34] <Zauberfisch> search in silverstripe is sort of a stepchild that noone plays with
359: [06:10:56] <trent001> Ok cheers Simon that's where I was actually heading next should be pretty easy was just hoping there maybe a work around as I am on a bit of tight deadline :)
360: [06:13:55] <trent001> It has served me well in the past when only needing to search the SiteTree and Files :)
361: [06:16:31] * trent001 quit ()
362: [06:26:48] * Danae quit (Ping timeout: 240 seconds)
363: [06:38:06] * camel_case has joined #silverstripe
364: [06:40:34] * qlex has joined #silverstripe
365: [06:46:40] * boytikz has joined #silverstripe
366: [06:48:03] <Zauberfisch> have never used the composer autoloader before, whats the best practice to use that with silverstripe?
367: [06:50:17] <simon_w> It gets used automatically if it's present
368: [06:50:26] <Zauberfisch> ah, yeah. just figured it out
369: [06:50:51] <Zauberfisch> zend has renamed their class to use namespace instead of the old Zend_Some_Super_crazy_Class_Name
370: [06:51:10] <Zauberfisch> should have looked that up eariler I guess
371: [06:53:17] * hubertusanton quit (Read error: Connection reset by peer)
372: [07:08:57] * qlex says hi
373: [07:09:05] <qlex> has anyone experimented with css stles for tables in ss ?
374: [07:09:09] <qlex> like the demos here: http://css-tricks.com/responsive-data-tables/
375: [07:11:41] <Zauberfisch> qlex: not sure what you are getting at
376: [07:11:51] <Zauberfisch> I don't see how this is related to silverstripe
377: [07:14:45] <qlex> i was just trying to find out if this responsive css styling should go to editor.css / typography.css so that it's picked up correcttly when somebody creates tables in WYSIWYG.
378: [07:16:37] <Zauberfisch> ah, ok. now I see
379: [07:16:38] <Zauberfisch> hmmm
380: [07:16:51] <Zauberfisch> never bothered with advanced styling inside the editor
381: [07:17:20] <Zauberfisch> so i would not put it into editor.css
382: [07:17:43] * Bollig|DesignCty quit (Quit: Bollig|DesignCty)
383: [07:19:55] <jordanmk> hey
384: [07:20:01] <jordanmk> can anyone see a problem with this code?
385: [07:20:01] <jordanmk> http://pastebin.com/rGFevHsB
386: [07:20:47] <jordanmk> the if statement passes, but then the blog subscriber is not updated in the database
387: [07:20:50] <jordanmk> :S
388: [07:21:14] <jordanmk> and i get an error of "[User Error] Uncaught Exception: Object->__call(): the method 'write' does not exist on 'DataList'"
389: [07:21:45] <Zauberfisch> because ::get() always returns a datalist
390: [07:21:48] <Zauberfisch> not a dataobject
391: [07:22:12] <jordanmk> i see
392: [07:22:25] <jordanmk> how would i get the DataObject with the matching UnsubscribeID?
393: [07:23:05] <qlex> Zauberfisch: thanx for info. I tried styling table in editor.css and it was picked up by wysiwyg. but responvie styling will help me display tables on smartphones (website will have many tables created by content authors via wysiwyg editor)
394: [07:23:21] <Zauberfisch> jordanmk: http://paste2.org/BIhywFv8
395: [07:24:16] <jordanmk> cheers, that worked :D
396: [07:31:00] <Zauberfisch> qlex: yes, the WYSIWYG editor will use editor.css, but I usually don't want that for resposive style. I want the editor to display normal style
397: [07:36:36] * ARNHOE has joined #silverstripe
398: [07:51:31] * qlex needs to run but will return tomorrow to continue with the topic :)
399: [07:51:33] <qlex> bye!
400: [07:51:35] * qlex has left #silverstripe
401: [07:59:05] * Bollig|DesignCty has joined #silverstripe
402: [08:02:28] * kinglozzer has joined #silverstripe
403: [08:13:46] * r3v3rb has joined #silverstripe
404: [08:13:54] <r3v3rb> how do I extend ContentControllerSearchExtension
405: [08:14:37] <r3v3rb> I have tried ContentControllerSearchExtension extensions: - SearchExtension in my config.yml but it doesnt seem to get extended when view a search result
406: [08:16:20] <r3v3rb> or it returns the 'Search' template but no results :(
407: [08:24:37] <r3v3rb> so is it possible to override the search results template and use a generic search_results.ss without hacking the CMS ContentControllerSearchExtension?
408: [08:33:34] * micmania1 has joined #silverstripe
409: [08:34:36] <r3v3rb> mornning micmania1
410: [08:34:40] * VRoxane has joined #silverstripe
411: [08:34:55] <micmania1> mornin'
412: [08:35:31] <r3v3rb> do you know if there is a way to sort the class type in search results - I want Page first then DO second
413: [08:36:16] <micmania1> Nope, you'd probably have to write a custom query
414: [08:37:41] <r3v3rb> looking that way
415: [08:38:26] <r3v3rb> I'll leave alone until client thinks 'Why are my PDF's always listed at the top of the results' then charge for 'fixing' ;)
416: [08:39:55] * boytikz quit (Read error: Connection reset by peer)
417: [08:40:00] <r3v3rb> this job has been 'hard work' for the last two weeks when they decided to go live with 'everything' on day one and introduced 6 new page type/templates into the mix - all of which required tablet/mobile versions too with lots of 'fixes' to get them working with the silly designers spec that wasn't responsive :\
418: [08:50:53] * cloph_away is now known as cloph
419: [09:03:20] * Bollig|DesignCty quit (Quit: Bollig|DesignCty)
420: [09:04:45] * desperate has joined #silverstripe
421: [09:05:26] * Filla has joined #silverstripe
422: [09:06:37] <desperate> Moring
423: [09:06:51] <desperate> 'n' *
424: [09:06:53] <Filla> hi
425: [09:08:30] * Colin[pi] quit (Ping timeout: 265 seconds)
426: [09:09:00] <desperate> On the home page of my site I have a has_many relation of GalleryImages
427: [09:09:14] <desperate> in short the user can upload images to appear on a carousel on the home page
428: [09:09:21] <desperate> http://paste2.org/GKYIN4hH
429: [09:09:43] <desperate> I have a tab in the cms where the user can upload images
430: [09:10:30] <desperate> it works well bgut I would like to add a preview of the image on the gridfield
431: [09:10:46] <desperate> because at the moment just the image name is listed
432: [09:10:49] <desperate> is that possible?
433: [09:14:27] * LoveDuckie quit (Remote host closed the connection)
434: [09:15:55] <Zauberfisch> r3v3rb: I have actually just implemented Zend Lucene search, and turned out to be pretty straight forward
435: [09:16:17] <r3v3rb> okay, I may need to chat with you in the near future ;)
436: [09:16:27] <r3v3rb> let's see if client notices first :D
437: [09:16:38] <Zauberfisch> (I did just a very basic one though)
438: [09:17:39] <Zauberfisch> just enough to have same results as default search, but better quality of the search results
439: [09:30:36] * stnvh has joined #silverstripe
440: [09:39:18] * UncleCheese has joined #silverstripe
441: [09:53:28] <desperate> does anyone know how the search feature in SS works
442: [09:53:40] <desperate> is it possible to specify the tables which are inlcuded in the search
443: [09:55:12] * thibault has joined #silverstripe
444: [10:04:50] <Zauberfisch> a lot of talk about search today :O
445: [10:05:13] <Zauberfisch> http://logs.simon.geek.nz/index.php?date=2014-04-22#log_1257809
446: [10:05:18] <Zauberfisch> desperate
447: [10:06:47] <desperate> ok so looks like I have to write my own in order to search the dataobject
448: [10:07:07] <Zauberfisch> yes
449: [10:08:53] <desperate> Zauberfisch: did you see my previous question about adding images to CMS Gridfield
450: [10:13:49] * r3v3rb quit (Quit: Textual IRC Client: www.textualapp.com)
451: [10:16:15] * danfo has joined #silverstripe
452: [10:42:12] * Liquide has joined #silverstripe
453: [10:51:33] <desperate> has anyone used this: http://www.ssbits.com/snippets/2009/adding-a-thumbnail-to-a-dataobjectmanager-or-complex-table-field/
454: [10:54:17] * Liquide quit ()
455: [10:55:21] <VRoxane> @desperate yes I did (a long time ago)
456: [11:13:14] <Filla> is it neccessary to upgrade from v2.4 if I don't need new features? are new security bugfixes going into old branch aswell?
457: [11:21:42] <Zauberfisch> Filla: currently there are still security releases for 2.4
458: [11:21:52] <Zauberfisch> not sure how long they will keep that up though
459: [11:27:33] <Zauberfisch> anyone familiar with Zend Lucene here?
460: [11:27:49] <Zauberfisch> I want fuzzy search but the docs are horrible :/
461: [11:28:01] <Zauberfisch> so far I have been using QueryParser to parse a search string
462: [11:28:08] <Zauberfisch> but that returns a boolean query
463: [11:28:22] <Zauberfisch> can I get QueryParser to return a fuzzy query?
464: [11:33:00] <Filla> seems to be straight http://framework.zend.com/manual/1.12/en/zend.search.lucene.query-api.html
465: [11:33:26] <Zauberfisch> suppose I should have mentioned I am using latest
466: [11:33:29] <Zauberfisch> 2.3
467: [11:33:48] <Zauberfisch> those are 1.12 docs
468: [11:33:59] <Zauberfisch> there is some docs on 2.3, but they are anything but straigt
469: [11:35:43] <Zauberfisch> also those docs you posted don't really tell me how I can parse a string to become a fuzzy query
470: [11:37:33] * Shrike_Finland has joined #silverstripe
471: [11:46:24] * UncleCheese quit (Quit: UncleCheese)
472: [11:55:06] * VRoxane quit (Quit: Page closed)
473: [12:09:18] * thibault quit (Ping timeout: 240 seconds)
474: [12:18:13] * UndefinedOffset has joined #silverstripe
475: [12:28:25] * stnvh quit ()
476: [12:35:59] * danfo quit (Quit: danfo)
477: [12:42:46] * Shrike_Finland quit (Quit: Leaving.)
478: [12:43:36] * danfo has joined #silverstripe
479: [12:50:15] * Maarten has joined #silverstripe
480: [12:53:44] <Maarten> hi all! For some strange reason an importfunction in my CsvBulkLoader class is not working. I build it exactly as the SS example, so I can't understand why. Am I doing something wrong, or isn't this supported anymore? See my paste: http://www.sspaste.com/paste/show/5356629345b25
481: [12:57:02] <Maarten> this is the ss example I based it on: http://doc.silverstripe.org/framework/en/howto/csv-import
482: [13:00:35] <Zauberfisch> Maarten: idk
483: [13:00:39] * thibault has joined #silverstripe
484: [13:00:45] <Zauberfisch> the CSVBulkloader is not well built
485: [13:01:06] <Zauberfisch> how complex is your data, and how often do you need to import it?
486: [13:01:28] <desperate> Guys, I am working from a tutorial to add thumbs to my gridfield
487: [13:01:29] <desperate> http://blog.fraser-hart.co.uk/thumbnails-in-silverstripe-3-gridfield-summaries/
488: [13:01:40] <Maarten> Zauberfish the DataObject is not very complex, but I have hundreds of questions to import
489: [13:01:51] <desperate> in the example on that page there is summary_fields
490: [13:01:52] <Maarten> so I use it a lot
491: [13:02:06] <desperate> the array has thumbnail->thumbnail
492: [13:02:17] <desperate> but I can't see where thumbnail is defined
493: [13:03:34] <desperate> stuggling to see how the thumbnail is related
494: [13:03:51] <Maarten> Zauberfish Damn... just found it! Now it's working: I had 'TrueAns' => 'importTrueAnswerNew' but there have to be an -> there for some reason, so after changing it to this it works: 'TrueAns' => '->importTrueAnswerNew'
495: [13:03:52] <desperate> the only other mention of 'thumbnail' in that example is getThumbnail
496: [13:07:20] <UndefinedOffset> desperate: the grid field would be calling getThumbnail(), in silverstripe methods that start with "get" are considered getters like many other programming languages. This is defined in the ViewableData class http://api.silverstripe.org/3.1/source-class-ViewableData.html#99-114
497: [13:08:01] <desperate> ah ok thanks
498: [13:08:16] <UndefinedOffset> np
499: [13:11:25] * pazuur has joined #silverstripe
500: [13:14:10] <pazuur> Can someone help me selecting the "LastEdited" from a dataObject? " $last_photo = PhotoItem::get()->sort('LastEdited')->limit(1); " doesn't seem to work?
501: [13:17:42] * Evelin has joined #silverstripe
502: [13:18:29] <Zauberfisch> pazuur: ::get() retunrs a DataList
503: [13:18:34] <Zauberfisch> not a dataObject
504: [13:18:48] <Zauberfisch> $list = PhotoItem::get()->sort('LastEdited')->limit(1);
505: [13:19:15] <Zauberfisch> $last_photo = $list->First();
506: [13:20:09] <pazuur> Thanks for your reply i am going to try this one!
507: [13:20:13] * Alboes has joined #silverstripe
508: [13:23:00] <Zauberfisch> but if you are only interested in the LastEdited value. not the photo, then you can do $maxLastEdited = PhotoItem::get()->max('LastEdited');
509: [13:23:11] * stnvh has joined #silverstripe
510: [13:24:18] * Evelin quit (Ping timeout: 240 seconds)
511: [13:25:14] <pazuur> No i was interested in the last inserted photo, thanks works great!
512: [13:25:38] * VRoxane has joined #silverstripe
513: [13:26:30] <VRoxane> Hello everyone ! I really need some light on this : http://www.sspaste.com/paste/show/53529b652ac7d ([User Error] Couldn't find field ...)
514: [13:27:42] <Zauberfisch> VRoxane did you /dev/build?
515: [13:29:47] * Shrike_Finland has joined #silverstripe
516: [13:31:06] <VRoxane> Zauberfisch yes I did
517: [13:31:31] <Alboes> has version 3.1.3 problems with file upload? Not working here for all my sites
518: [13:31:41] <micmania1> Alboes: yes, upgrade to 3.1.4
519: [13:32:28] <Alboes> okay, thanks, I'm gonna try
520: [13:32:33] <Zauberfisch> VRoxane: check the database. does the field actually exist?
521: [13:33:01] <Zauberfisch> Alboes: not that I am aware of. perhaps file permission issues on the assets folder?
522: [13:33:05] <Zauberfisch> oh. nvm
523: [13:33:18] <Zauberfisch> missed the message from micmania1
524: [13:33:47] <VRoxane> Yes it does, this is driving me nuts. The search engine works with two other DOs but not this one.
525: [13:34:20] * Shrike_Finland quit (Ping timeout: 265 seconds)
526: [13:34:28] <Zauberfisch> do you perhaps have that DB field also defined in the parent class or a subclass?
527: [13:34:41] <Alboes> Zauberfish: yes, I already checked the file permissions. Thanks for the suggestion
528: [13:35:15] <Zauberfisch> Alboes: nvm me. I didn't know there was a bug in 3.1.3. so my answer should be ignored
529: [13:36:42] <micmania1> Never experienced it myself but I think that's why 3.1.4 was rushed out soon after 3.1.3 release.
530: [13:39:40] <VRoxane> Zauberfisch, nope my four DOs extend DataObject. Three have basically the same fields (Location, Vente, Lot). The fourth (Neuf) has different fields + has_many Lots. But I don't think it should be a pb for the search engine...
531: [13:41:18] <micmania1> VRoxane: add ?showqueries=1 to your URL and it'll show you the query that its generating. That should help debugging
532: [13:46:10] <VRoxane> Ok I just did that : It doesn't even show me any query about my DO Lot. (I tried with another DO and I see the query). I can copypaste it in the SSPaste's comments if needed
533: [13:51:29] * StripedSilver has joined #silverstripe
534: [13:51:44] <StripedSilver> Greetings brethren!
535: [13:53:01] <StripedSilver> I need a bit of help with silverstripe userforms.
536: [13:53:19] <StripedSilver> Does someone have experience with mailing the submission ID to an email?
537: [13:53:46] <desperate> Can someone take a look at my paste: http://paste2.org/LNzbXts5
538: [13:53:58] <desperate> been working on this for about 3 hours
539: [13:55:11] <desperate> the only error output I can get is: error at line 759 of D:\Software\WAMP\www\assembly\framework\core\Object.php
540: [13:55:22] <StripedSilver> What's wrong with it Desperate?
541: [13:56:05] <StripedSilver> Could you try removing the summary fields completely?
542: [13:56:24] * Filla quit (Quit: Page closed)
543: [13:59:19] * anselmdk quit (Quit: anselmdk)
544: [14:00:06] * StripedSilver_ has joined #silverstripe
545: [14:00:13] <desperate> actually now I am getting this: [User Error] Uncaught Exception: Object->__call(): the method 'galleryimage' does not exist on 'GalleryImage'
546: [14:00:18] * StripedSilver quit (Ping timeout: 240 seconds)
547: [14:00:40] <StripedSilver_> Ah hey.
548: [14:00:45] <StripedSilver_> Sorry, change of IP.
549: [14:01:12] <StripedSilver_> Could you show me your updated code?
550: [14:02:11] <kinglozzer> desperate: Your GalleryImageThumb method is wrong
551: [14:02:29] <kinglozzer> It should be return $this->Image()->SetHeight(40);
552: [14:02:48] <kinglozzer> Image is the relation name (has_one), so that's the method you need to call
553: [14:03:11] <desperate> grr
554: [14:03:40] <StripedSilver_> This was wrong too, I think, 'GalleryImageThumb' => 'Picture'.
555: [14:04:19] <desperate> Thumbnail?
556: [14:04:37] <StripedSilver_> Yeah, 'Picture' isn't defined.
557: [14:04:46] <StripedSilver_> Oh wait, nevermind.
558: [14:04:50] <StripedSilver_> Label.
559: [14:04:57] <desperate> ohh i think it works!
560: [14:05:07] <StripedSilver_> It should work after you fix the function.
561: [14:05:11] <StripedSilver_> Awesome.
562: [14:05:16] <desperate> yeah the function fixes it
563: [14:05:23] <desperate> butlike you say, Picture isn't defined
564: [14:05:26] <StripedSilver_> Anyway, so does anyone have experience with silverstripe useforms (https://github.com/silverstripe/silverstripe-userforms)?
565: [14:05:27] <desperate> I don't like that
566: [14:05:42] <VRoxane> Zauberfisch, micmania1, can I test the query in Phpmyadmin ?
567: [14:05:53] <StripedSilver_> No no, I was wrong, that's the column name.
568: [14:06:05] <StripedSilver_> Doesn't it say "Picture" in the table on the top?
569: [14:06:14] <StripedSilver_> For the thumbnails column?
570: [14:06:19] <micmania1> VRoxane: yes, $dataList->dataQuery()->sql() I think will give you the query
571: [14:06:23] <kinglozzer> StripedSilver_: Picture is the label, GalleryImageThumb refers to a method
572: [14:06:34] <StripedSilver_> Yeah, I know, I messed it up.
573: [14:06:43] <StripedSilver_> I think it's working as intended now.
574: [14:06:51] <desperate> i changed it to Thumbnail and it works
575: [14:07:11] <Zauberfisch> VRoxane: sure. just make sure you replace the " with `
576: [14:07:28] <Zauberfisch> silverstripe displays ", but SQL doesn't accept them
577: [14:08:08] <StripedSilver_> No takers for userforms?
578: [14:08:22] <StripedSilver_> I'm trying to customize the template and attach the submission ID to the sent email(s).
579: [14:12:48] * StripedSilver_ quit (Ping timeout: 240 seconds)
580: [14:13:17] <desperate> thank you kinglozzer and @StripedSilver_
581: [14:15:11] <VRoxane> StripedSilver what is the submission ID ?
582: [14:24:01] * opalfroot_ has joined #silverstripe
583: [14:27:03] * StripedSilver has joined #silverstripe
584: [14:27:52] <StripedSilver> VRoxane, the submission ID is what's saved by useforms.
585: [14:28:08] <StripedSilver> https://github.com/silverstripe/silverstripe-userforms/issues/163
586: [14:28:33] <StripedSilver> Basically the ID generated for each record added/submitted.
587: [14:28:43] <StripedSilver> I'd like to mail that as a field.
588: [14:31:48] * pazuur quit (Ping timeout: 240 seconds)
589: [14:34:33] <StripedSilver> Anyone? I'd really appreciate the help!
590: [14:35:19] <VRoxane> Does this help ? http://www.sspaste.com/paste/show/53567b0c28d68
591: [14:36:13] <StripedSilver> Ah, I think it does, it's a custom contact form as opposed to useforms though, right?
592: [14:36:28] <VRoxane> Yes I used it on a 2.4
593: [14:36:42] <VRoxane> Maybe you can use some of it to retrieve your record ID ?
594: [14:36:50] <StripedSilver> I'm probably going to use this if I can't get it to work in useforms.
595: [14:37:09] <StripedSilver> Yeah, just about to try that.
596: [14:37:15] <StripedSilver> Thanks! I think it might help.
597: [14:37:42] <VRoxane> :)
598: [14:38:15] <VRoxane> Zauberfisc, micmania1 : I have to go for now, thank you for your help, I'll try to solve this again tonight, I'll probably be back here on IRC :) See you later everybody !
599: [14:38:32] <micmania1> cya
600: [14:39:04] <StripedSilver> Later man, thanks again.
601: [14:39:25] <VRoxane> I'm no bro, though ! Haha !
602: [14:40:30] * VRoxane quit (Quit: Page closed)
603: [14:45:37] <Maarten> Hey... I was expecting an 'Int' field to be able to have NULL when there is no value. I see in the documents however that the function nullvalue returns '0'. Anybody knows if there is a way to have a nullable int-datatype?
604: [14:47:02] <Maarten> I see Silverstripe disallows NULL to be a legal value in the table. Why?
605: [14:47:18] <Zauberfisch> Maarten: no idea why, but yeah, it does not do NULL
606: [14:50:02] <Maarten> Zauberfish Weird. So developers have to write their own datatype to be able to do NULL. Damn. That's crazy. I have a question with a trueAnswer index and would like to work zerobased. But what if an answer in the imported csv-file is left open? --> it should be NULL!! Not 0, because that's Choice A of the question. Strange strange strange... but I'll work it out :)
607: [14:52:37] <kinglozzer> Hrm, can I ask for anyone's thoughts on something? I'm looping over a list of my own ViewableData instances with a Link() method. The Link() method searches for a 'holder' page, there's only one and it never changes. When rendering these, it does a database query every time to get the Link(). What's the best way of caching the query to get the 'holder'?
608: [14:52:48] <kinglozzer> I could set it as a static property, but that feels completely wrong
609: [14:53:19] <kinglozzer> Maybe SS_Cache, but I still don't want to be unserializing the same record hundreds of times :/
610: [15:03:18] * opalfroot_ quit (Ping timeout: 240 seconds)
611: [15:06:11] * muskie9 has joined #silverstripe
612: [15:06:48] * Maarten quit (Ping timeout: 240 seconds)
613: [15:06:49] * bwaah_ has joined #silverstripe
614: [15:07:48] <bwaah_> has any one used restrictedobjects module on ss3.1.2
615: [15:11:09] * Shrike_Finland has joined #silverstripe
616: [15:12:02] <kinglozzer> Never mind, I have a factory class fetching my objects so I'll just abstract the logic for getting the 'holder' page out to that and cache it there :)
617: [15:21:01] <bwaah_> im trying to inergrate the module on ss3 but am getting errors after adding the extensions on the restrictedobjects _cofig file Fatal error: Call to a member function hasMethod() on a non-object in C:\xampp\htdocs\testsite1.1\framework\forms\gridfield\GridFieldSortableHeader.php on line 113.
618: [15:27:09] * ARNHOE quit ()
619: [15:27:12] <micmania1> kinglozzer: what was wrong with using a static?
620: [15:28:36] * babak quit (Quit: Connection closed for inactivity)
621: [15:29:45] <kinglozzer> micmania1: Nothing really wrong with it, it'd work fine, I just wanted to keep my ViewableData class as clean as possible :P
622: [15:30:18] <kinglozzer> I'm doing pretty-much the same thing anyway, just in a different class and without a static property
623: [15:30:40] <kinglozzer> (ty Injector::get())
624: [15:31:20] <micmania1> I always thought it cached query results anyway when ran in a template
625: [15:32:53] <kinglozzer> micmania1: I think it does if accessing a property directly or something, but my Link() method is getting the 'holder' link and then joining it to another unique URL segment, so I guess it can't cache that
626: [15:34:14] <kinglozzer> Holy shit, before: Time per request: 2555.311 [ms] (mean) and after: Time per request: 700.135 [ms] (mean)
627: [15:34:45] <kinglozzer> Not a bad saving for about 4 lines of code :P
628: [15:35:21] * jenniferaslan has joined #silverstripe
629: [15:36:50] * camel_case quit (Ping timeout: 276 seconds)
630: [15:37:49] <micmania1> I had to learn nginx today
631: [15:37:59] <micmania1> Went to put a site live expecting the usual apache setup.
632: [15:38:18] <micmania1> Nope - Nginx. Only 2 devs who've done it in the past have left
633: [15:38:38] <kinglozzer> D:
634: [15:38:38] <micmania1> its been... erm... fun.
635: [15:38:53] <kinglozzer> I've never had to touch nginx so far thankfully...
636: [15:39:02] <micmania1> Its quite nice actually
637: [15:39:56] <micmania1> only thing that pissed me off is I had to write 150 redirects this morning - all in .htaccess before I knew
638: [15:40:18] * bwaah_ quit (Ping timeout: 240 seconds)
639: [15:40:37] <micmania1> Obviously nginx doesn't use .htacess! FML!
640: [15:42:00] <kinglozzer> :P
641: [15:43:06] <micmania1> I think i'll just create a module to catch the 404s and make it editable through the CMS so its not my job any more lol
642: [15:45:41] * Shrike_Finland quit (Quit: Leaving.)
643: [15:46:59] * Alboes quit (Remote host closed the connection)
644: [15:51:41] <kinglozzer> micmania1: Sounds like a great idea actually!
645: [15:51:56] * Alboes has joined #silverstripe
646: [15:53:04] * Alboes quit (Remote host closed the connection)
647: [16:16:48] * Maarten has joined #silverstripe
648: [16:21:54] <Maarten> hi all, I just created a CMS validator that checks if the value of my index-field already exists (must be unique). To prevent checking it's own value stored previously I also need to make sure it skips 'index'-values where the ID is the same as current model. I tried $data['ID'] from within the Validator, but for some strange reason Silverstripe empties the ID-field in $data after a validation error. Is this a SS bug or purpos
649: [16:31:58] * stnvh quit ()
650: [16:37:33] * anselmdk has joined #silverstripe
651: [16:37:41] * kinglozzer quit ()
652: [16:39:58] * danfo quit (Quit: danfo)
653: [16:44:47] <Maarten> Anybody got a clue how to get the current ID of a DataObject from within a Validator?
654: [16:49:48] * thibault quit (Ping timeout: 240 seconds)
655: [16:56:37] * danfo has joined #silverstripe
656: [17:12:42] * gelignite has joined #silverstripe
657: [17:14:46] * danfo quit (Quit: danfo)
658: [17:16:57] * muskie9 quit (Remote host closed the connection)
659: [17:18:21] * violetina has joined #silverstripe
660: [17:31:17] * danfo has joined #silverstripe
661: [17:47:55] * muskie9 has joined #silverstripe
662: [17:50:52] * camel_case has joined #silverstripe
663: [17:53:06] * muskie9 quit (Ping timeout: 240 seconds)
664: [18:04:58] * StripedSilver quit (Quit: Page closed)
665: [18:27:48] * wilson-staff has joined #silverstripe
666: [18:28:33] <wilson-staff> Hi guys, i have a blank... How do i get rid of slashes in the URL? d\'administration Related to magic-quotes?
667: [18:36:56] <wilson-staff> guys?
668: [18:41:45] <UndefinedOffset> wilson-staff double check phpinfo() make sure magic-quotes is off, personally i've never seen that issue before :S
669: [18:41:49] <UndefinedOffset> what version of ss?
670: [18:47:11] <wilson-staff> Version 3.1.2 => solved. I just removed the WARNING in framewok/core/Constant.php
671: [18:47:18] * wilson-staff quit (Quit: Page closed)
672: [18:52:20] <Maarten> Hi all, Anybody got a clue how to get the current ID of a DataObject from within a Validator? I tried $data('ID'), but the ID field is emptied by Silverstripe after first validation. Is there another way of getting the ID, like in a session variable or something like that?
673: [18:53:42] <Maarten> Would be great, 'cause I'm looking at it for too long now, and I'm even thinking about creating an extra ID-field in $db (ofcoarse that's stupid, and I don't want to have double data)
674: [19:14:49] <simon_w> Maarten, if it's a field in the form, then it should get passed to the form's validator
675: [19:16:34] <Maarten> @simon_w thanks for your response simon. but there seem to be some kind of problem in ss3 with the ID. It gets erased after a validation error is raised
676: [19:19:30] <Maarten> @simon_w I have a readonly field with the ID in it, but it says '(none)' after first trying to save my DataObject wich is blocked by a validation error
677: [19:21:02] <Maarten> after saving the DataObject when the validation is okay (even after correction) the ID suddenly returned, so Silverstripe knows the ID still
678: [19:21:24] <simon_w> Maarten, readonly fields don't submit values. You need a HiddenField to pass in the value
679: [19:22:05] * Ryan-Toast has joined #silverstripe
680: [19:22:29] * Pyromanik has joined #silverstripe
681: [19:22:30] <Maarten> @simon_w you gotta be kidding me. damn.. would be great if that solves it... I'll find out
682: [19:22:41] <Pyromanik> wholey fucking shit omgaaaawd
683: [19:22:42] <Pyromanik> http://www.wimp.com/badgerconfounds/
684: [19:23:29] <Pyromanik> also this so I can link micmania1 to it tomorrow: http://www.mynewzealandcampervantrip.com/10-silly-things-kiwis-say.html :>
685: [19:30:13] * Shrike_Finland has joined #silverstripe
686: [19:31:29] * bwaaah has joined #silverstripe
687: [19:36:36] * Alboes has joined #silverstripe
688: [19:37:41] * Alboes quit (Remote host closed the connection)
689: [19:39:25] * anselmdk quit (Quit: anselmdk)
690: [19:39:57] * anselmdk has joined #silverstripe
691: [19:40:35] * anselmdk quit (Client Quit)
692: [19:41:49] * anselmdk has joined #silverstripe
693: [19:42:17] * gelignite quit (Ping timeout: 264 seconds)
694: [19:46:01] <Maarten> @simon_w Don't know what's happening here. HiddenField with ID in it keeps on throwing an jQuery injectionerror on SAVE of the DataObject. If I change the HiddenField into a NumericField (with ID in it) it's the same error. Whatever other variable I put in the new Field (Hidden or Numeric) is working, but the value is ID it's throwing an error
695: [19:46:57] <simon_w> Do you still have the readonly field with the same name?
696: [19:49:34] <Maarten> @simon_w No, that's removed. This is what I have: http://www.sspaste.com/paste/show/5356c4a04d657
697: [19:50:12] <Maarten> (I tried both lines)
698: [19:50:15] <simon_w> Maarten, and if you look at the response you get from the server, what's the actual error message?
699: [19:50:29] <Maarten> 500: (Error at line 14 of C:\WWW_Wamp\dancequest\www\framework\control\injector\InjectionCreator.php)
700: [19:50:58] <simon_w> Nope, that's not the full response
701: [19:51:22] <Maarten> you mean the $data object?
702: [19:51:31] <simon_w> Nope
703: [19:52:00] <Maarten> so what do you mean?
704: [19:52:03] <simon_w> If you look at the body of the response from the server (in your browser's inspector), there'll be a line with the actual error message above the line with the location
705: [19:52:37] <Maarten> alright, I'll have a look
706: [19:53:29] * Shrike_Finland quit (Quit: Leaving.)
707: [19:54:25] * Shrike_Finland has joined #silverstripe
708: [19:58:18] * bwaaah quit (Ping timeout: 240 seconds)
709: [20:00:53] * Pyromanik quit (Ping timeout: 255 seconds)
710: [20:02:36] <Maarten> @simon_w you gotta help me out here, don't know where to find that error message. I tried to look at the html in realtime, but that errormessage dissapears too quickly. I also looked in the console and in the POST-package getting from the server. But where do you mean?
711: [20:05:41] <simon_w> Maarten, is there a Net tab?
712: [20:07:03] <Maarten> I use chrome. In the network tab I can view the POST message..... Ah, I see that that page got sub-tabs. So you probably mean the response tab. Now I see it. Wait a moment..
713: [20:07:23] <Maarten> ERROR [User Error]: singleton() Called without a class IN POST /dancequest/www/admin/questions/Question/EditForm/field/Question/item/4705/ItemEditForm Line 155 in C:\WWW_Wamp\dancequest\www\framework\core\Core.php
714: [20:07:47] <simon_w> can you pastie the call stack?
715: [20:08:42] <Maarten> @simon_w here it is: http://www.sspaste.com/paste/show/5356c4a04d657
716: [20:09:55] <simon_w> Oh, I see what's happening
717: [20:10:13] <simon_w> yeah, you need to name your field something else
718: [20:10:36] * simon_w quit (Quit: Leaving)
719: [20:13:33] * gelignite has joined #silverstripe
720: [20:16:29] * UndefinedOffset quit (Quit: Leaving.)
721: [20:17:41] * SightUnseen has joined #silverstripe
722: [20:20:05] * SightUnseen has left #silverstripe
723: [20:21:31] <Maarten> @simon_w thanks! that was it! :)
724: [20:28:37] * opalfroot has joined #silverstripe
725: [20:29:28] <opalfroot> hey guys having problems creating DataObject - keeps coming up Forbidden despit canCreate return true....any ideas?
726: [20:29:30] * an_Eskimo has joined #silverstripe
727: [20:55:05] * Shrike_Finland quit (Quit: Leaving.)
728: [20:56:03] * henkpoley has joined #silverstripe
729: [20:58:32] * Danae has joined #silverstripe
730: [20:59:37] <opalfroot> anyone?
731: [21:01:38] <Ryan-Toast> opalfroot: Paste your dataobject code?
732: [21:02:07] * IzaL has joined #silverstripe
733: [21:02:46] * IzaL has left #silverstripe
734: [21:03:58] * henkpoley quit (Quit: henkpoley)
735: [21:06:12] * UncleCheese_ has joined #silverstripe
736: [21:14:50] * CodeTrap quit (Ping timeout: 240 seconds)
737: [21:21:12] <UncleCheese_> Happy de facto Thursday, everyone
738: [21:21:34] <Stomach> yay!
739: [21:21:52] <Stomach> anyone ever have problems with GD adding artifacts to images?
740: [21:21:58] <Stomach> http://www.designdenmark.co.nz/products/bath-mat/
741: [21:22:51] <opalfroot> Ryan-Toast you still there?
742: [21:23:00] <Ryan-Toast> opalfroot: yeah
743: [21:23:06] * Shrike_Finland has joined #silverstripe
744: [21:23:15] * desperate quit (Quit: Page closed)
745: [21:23:45] <opalfroot> Ryan-Toast http://pastebin.com/T1w7ZYcg
746: [21:24:03] <opalfroot> it's really rough I'm trying to convert from some old code...so lots of bits commented out
747: [21:26:33] <Ryan-Toast> opalfroot: lol, I’ll have a look.
748: [21:26:36] <opalfroot> only by giving full admin do I get the create access ....
749: [21:27:35] <Ryan-Toast> opalfroot: What version are you running?
750: [21:28:14] <opalfroot> 3.1.2
751: [21:28:18] * gelignite quit (Quit: http://bit.ly/nkczDT)
752: [21:28:31] <Ryan-Toast> opalfroot: and why is thsis a dataobject, over a page?
753: [21:29:31] <opalfroot> I have 6 divisions of a single company all using this thing...
754: [21:29:39] <Ryan-Toast> opalfroot: fun :)
755: [21:29:45] <opalfroot> yea :(
756: [21:30:24] <opalfroot> just keep getting forbidden shown when I try to create a page as any user other than Admin
757: [21:30:39] <Ryan-Toast> Console say anything?
758: [21:31:05] <Ryan-Toast> are Categories allowed to be created by your usetrs?
759: [21:31:20] <Ryan-Toast> and members, images, and divisions?
760: [21:31:30] <opalfroot> warn,error and nginx all quiete
761: [21:31:49] <Ryan-Toast> if your dataobject is trying to reference them and they aren’yt allowed to be created that could return a forbidden message
762: [21:32:17] <opalfroot> is the default action permissive>
763: [21:32:42] <Ryan-Toast> opalfroot: *Shrug. It’s the only thing I can think of looking at your code.
764: [21:32:47] <Ryan-Toast> all else seems well.
765: [21:33:05] <opalfroot> I'll jam in some debug into the parent can function to see why it's bombing
766: [21:41:56] * Azure quit (Quit: Blue Sky Fish)
767: [21:45:48] * Maarten quit (Ping timeout: 240 seconds)
768: [21:54:54] * CodeTrap has joined #silverstripe
769: [21:55:05] * Azure has joined #silverstripe
770: [21:56:25] * Shrike_Finland quit (Quit: Leaving.)
771: [21:59:05] * violetina quit (Remote host closed the connection)
772: [22:04:17] <Danae> opalfroot: What's the Division has_one look like on your Member extension?
773: [22:06:01] <opalfroot> 2 ticks
774: [22:06:26] <opalfroot> private static $has_one = array( 'Division'=>'BaseDivision' );
775: [22:06:33] <opalfroot> literally that's it
776: [22:06:44] <opalfroot> I think I know where the bug is though....
777: [22:06:53] <opalfroot> it's strangely in the canView code
778: [22:07:02] * Ryan-Toast quit (Quit: Ryan-Toast)
779: [22:07:32] <Danae> I guess that makes sense - you need View permissions to view the object you just created
780: [22:08:43] * danfo quit (Quit: danfo)
781: [22:09:36] <opalfroot> yea need to check for it having an ID before doing anything else
782: [22:09:56] * Ryan-Toast has joined #silverstripe
783: [22:14:52] * danfo has joined #silverstripe
784: [22:22:38] <ss23> Morning everyone ^.^
785: [22:23:40] <Stomach> sup sup
786: [22:24:09] * simon_w has joined #silverstripe
787: [22:35:28] <ss23> hahahaha
788: [22:35:36] <ss23> Replied to a github issue with lots of random emoji
789: [22:35:42] <ss23> next issue raise "[meaningless icon]"
790: [22:57:34] * Colin[pi] has joined #silverstripe
791: [22:59:32] * onphire has joined #silverstripe
792: [23:01:03] <onphire> hey guys - does anyone have experience using an ecommerce module for SS? Any insights as to wich ones work well / ones I should avoid?
793: [23:03:08] <Colin[pi]> onphire: I built a site recently in ss-shop, was... interesting
794: [23:03:14] <spronk> yeahhh
795: [23:03:17] <spronk> swipestripe
796: [23:03:23] <spronk> is easily the best
797: [23:03:33] <Colin[pi]> most folks seem to be recommending shopify or swipestripe if you need to do it in SS
798: [23:03:43] <spronk> yeah
799: [23:03:52] <onphire> yeah i saw swipestripe looked like the best at a glance
800: [23:04:00] <spronk> shopify isn't even in ss, so yknow, that gives you an idea about the state of it :P
801: [23:04:00] <Stomach> swipestripe is much better than the other solutions
802: [23:04:18] * anselmdk quit (Quit: anselmdk)
803: [23:04:21] <Stomach> although I'm editing it a lot for every shop we do
804: [23:04:33] <onphire> ok great, was it ieasy to set up the payment gateways?
805: [23:04:43] <Stomach> yeah, DPS payment works out of the box
806: [23:05:02] <Stomach> paypal needed a bit of work for it to go through
807: [23:05:15] <Stomach> but fairly simple :)
808: [23:05:16] <onphire> ok, well that sounds like a good base to work from then
809: [23:05:27] <onphire> i am moving over from magento, where nothing is easy
810: [23:05:37] <onphire> so i am sure it will be a breath of fresh air
811: [23:06:26] <onphire> thanks for the help all
812: [23:07:35] <Stomach> ive done a couple of migrations from magento to swipestripe
813: [23:07:39] <Stomach> magento is fun :D
814: [23:08:00] <spronk> god magento is a beast
815: [23:08:34] <Stomach> so is opencart
816: [23:08:59] <Stomach> some of the code I see from people with no idea what's going on running ecommerce sites makes me cry
817: [23:09:05] <Stomach> and then I see other peoples code!
818: [23:09:55] <onphire> hahaha yeah, I fell very dirty working in magento!
819: [23:10:11] <onphire> feel*
820: [23:10:23] <onphire> god i cant type today
821: [23:15:59] <spronk> magento's code isn't... THAT bad
822: [23:16:05] <spronk> its just... waaayyy overcomplicated
823: [23:16:22] <spronk> https://www.youtube.com/watch?v=eA-2DvAwc-w
824: [23:16:23] * opalfroot quit (Quit: Page closed)
825: [23:19:44] <Colin[pi]> I had to make some fairly major changes in ss-shop as well, mostly by extensions though which is nice
826: [23:30:53] <Danae> somebody please rescue me from ExpressionEngine
827: [23:36:24] * kim___ has joined #silverstripe
828: [23:38:18] <kim___> I have a question that hopefully someone can answer. After uploading a site to a hosting provider I am getting the following errorClass 'Page' not found UserDefinedForm.php on line 7. I do not get this with the site locally. Any ideas?
829: [23:39:12] <Stomach> have you done a dev/build and a flush?
830: [23:40:16] <kim___> yes many times with no change
831: [23:40:35] <Stomach> are you sure that the class Page is uploaded (probably in mysite/code/Page.php)
832: [23:41:21] <kim___> yes just checked again to be sure
833: [23:42:22] <Stomach> no idea then
834: [23:42:24] <Stomach> sorry
835: [23:43:05] <kim___> thanks. it is driving me crazy because it does not make sense
836: [23:43:36] <Stomach> yeah, sounds like a curly one
837: [23:48:27] <Danae> Are you using git modules for your cms/framework and deployment?
838: [23:48:49] <Danae> oh hold on that shouldn't matter really
839: [23:49:08] <Stomach> nah it shouldn't, as long as they are deployed
840: [23:51:08] <kim___> not sure if it is something that is set up incorrectly on the site. The hosting provider set up silverstripe initially and I uploaded the customized mysite and themes directories
841: [23:51:44] * onphire quit (Quit: Page closed)
842: [23:52:04] <Danae> Does the server Page.php actually have the class declaration code in it and everything?
843: [23:52:31] <kim___> if I remove the userforms just to see what happens I get the same error but related to the homepage rather than userforms
844: [23:53:39] <Stomach> yeah so its not finding the class Page, check the file that contains it for special characters or something
845: [23:54:04] <kim___> ok I will try that
846: [23:57:18] <kim___> I am using netbeans as an editor how would you recommend that I insure that there are no special characters
847: [23:57:38] <Stomach> no idea
848: [23:57:50] <Stomach> delete all the code in page, create a new one and upload it and see if you get a new error
849: [23:57:51] <Stomach> :D
850: [23:58:05] <Danae> I'm using PHPStorm and have UTF-8 on, plus make sure you have linux-friendly carriage returns
851: [23:58:14] <Danae> no problems with special characters

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