#silverstripe IRC Log

IRC log for 17 May 2013

All timestamps are in UTC.

1: [00:02:49] <Pyromanik> how to insert field after content before metadata?
2: [00:03:02] <Pyromanik> using addfieldstotab?
3: [00:03:14] <Pyromanik> (I know I can insertAfter())
4: [00:04:39] <Pyromanik> gumble: it'd be better to assign the contact page in the CMS, then you can eg. $SiteConfig.ContactPage.Link
5: [00:04:46] <simon_w> addFieldToTab(blah, blah, 'Metadata')?
6: [00:04:48] <Pyromanik> and if the client changes things, it won't break.
7: [00:04:59] <Pyromanik> simon_w: nah, doesn't work
8: [00:05:23] <Pyromanik> addFieldToTab(Root.Main, new FormField, Root.Main.MetaData) does though
9: [00:05:38] <Pyromanik> I never know when to use dot paths and when not :<
10: [00:05:44] <Pyromanik> it's not absolutely clear.
11: [00:06:06] <Pyromanik> no wait I lied
12: [00:06:12] <Pyromanik> addFieldToTab(Root.Main, new FormField, Root.Main.MetaData) does not work either
13: [00:06:29] <Pyromanik> still had a sneaky insert after
14: [00:06:32] <simon_w> If you're using MetaData, then doh :p
15: [00:06:33] <Pyromanik> forgot to comment it
16: [00:06:35] <simon_w> It's Metadata
17: [00:06:43] <Pyromanik> oh, doh indeed :<
18: [00:07:41] <Pyromanik> yeah, root.main, new field, Metadata) works.
19: [00:07:54] <Pyromanik> but not Root.Main.Metadata
20: [00:08:17] <Pyromanik> dot paths either work or without works. Never does both work.
21: [00:08:26] <Pyromanik> :/
22: [00:08:28] <Pyromanik> I don't get it
23: [00:12:46] * samthejarvis quit (Ping timeout: 250 seconds)
24: [00:13:27] * simon_w quit (Ping timeout: 245 seconds)
25: [00:14:17] * Jeremy1 quit (Ping timeout: 252 seconds)
26: [00:33:09] * howardgr_ quit (*.net *.split)
27: [00:33:13] * MattSS quit (*.net *.split)
28: [00:33:14] * jrthomer quit (*.net *.split)
29: [00:33:15] * Bollig|DesignCty quit (*.net *.split)
30: [00:33:20] * pippy quit (*.net *.split)
31: [00:33:20] * ss23 quit (*.net *.split)
32: [00:33:22] * ooystein quit (*.net *.split)
33: [00:33:25] * Motoservo quit (*.net *.split)
34: [00:33:30] * spronk quit (*.net *.split)
35: [00:33:30] * discorpia quit (*.net *.split)
36: [00:33:35] * willr_ quit (*.net *.split)
37: [00:33:36] * LoveDuckie quit (*.net *.split)
38: [00:33:40] * Kapdap quit (*.net *.split)
39: [00:33:45] * kerosene quit (*.net *.split)
40: [00:33:46] * PigeonFriend quit (*.net *.split)
41: [00:33:53] * Kolin quit (*.net *.split)
42: [00:34:12] * lenix quit (*.net *.split)
43: [00:34:13] * FrozenFire quit (*.net *.split)
44: [00:34:14] * cjt quit (*.net *.split)
45: [00:34:18] * abitran quit (*.net *.split)
46: [00:34:18] * ss-log quit (*.net *.split)
47: [00:34:19] * Zauberfisch|idle quit (*.net *.split)
48: [00:34:20] * spronk2 quit (*.net *.split)
49: [00:34:24] * nickmolhoek quit (*.net *.split)
50: [00:34:24] * jcwacky quit (*.net *.split)
51: [00:34:25] * Pyromanik quit (*.net *.split)
52: [00:34:26] * DigNZ quit (*.net *.split)
53: [00:34:30] * gumble quit (*.net *.split)
54: [00:34:30] * popeshoe quit (*.net *.split)
55: [00:34:31] * elgrodo quit (*.net *.split)
56: [00:34:32] * lewellyn quit (*.net *.split)
57: [00:34:33] * ec8or_ quit (*.net *.split)
58: [00:34:38] * ajmitch quit (*.net *.split)
59: [00:34:39] * onre quit (*.net *.split)
60: [00:34:40] * mrzero quit (Write error: Broken pipe)
61: [00:52:00] * FrozenFire has joined #silverstripe
62: [00:52:00] * lenix has joined #silverstripe
63: [00:52:00] * spronk2 has joined #silverstripe
64: [00:52:00] * Zauberfisch|idle has joined #silverstripe
65: [00:52:00] * ss-log has joined #silverstripe
66: [00:52:00] * abitran has joined #silverstripe
67: [00:52:00] * kerosene has joined #silverstripe
68: [00:52:00] * spronk has joined #silverstripe
69: [00:52:00] * discorpia has joined #silverstripe
70: [00:52:00] * Kolin has joined #silverstripe
71: [00:52:00] * PigeonFriend has joined #silverstripe
72: [00:52:00] * Motoservo has joined #silverstripe
73: [00:52:00] * LoveDuckie has joined #silverstripe
74: [00:52:00] * Kapdap has joined #silverstripe
75: [00:52:00] * Pyromanik has joined #silverstripe
76: [00:52:00] * willr_ has joined #silverstripe
77: [00:52:00] * cjt has joined #silverstripe
78: [00:52:00] * jcwacky has joined #silverstripe
79: [00:52:00] * nickmolhoek has joined #silverstripe
80: [00:52:00] * howardgrigg has joined #silverstripe
81: [00:52:00] * MattSS_ has joined #silverstripe
82: [00:52:00] * simon_w has joined #silverstripe
83: [00:52:00] * mrzero has joined #silverstripe
84: [00:52:00] * gumble has joined #silverstripe
85: [00:52:00] * popeshoe has joined #silverstripe
86: [00:52:00] * elgrodo has joined #silverstripe
87: [00:52:00] * lewellyn has joined #silverstripe
88: [00:52:00] * ec8or_ has joined #silverstripe
89: [00:52:00] * ajmitch has joined #silverstripe
90: [00:52:00] * onre has joined #silverstripe
91: [00:52:42] * cloph_away quit (Excess Flood)
92: [00:52:44] * Jeremy1 has joined #silverstripe
93: [00:52:44] * jrthomer has joined #silverstripe
94: [00:52:44] * Bollig|DesignCty has joined #silverstripe
95: [00:52:44] * pippy has joined #silverstripe
96: [00:52:44] * ss23 has joined #silverstripe
97: [00:52:44] * ooystein has joined #silverstripe
98: [00:54:48] * cloph_away has joined #silverstripe
99: [01:03:26] * [1]LoveDuckie has joined #silverstripe
100: [01:05:41] * LoveDuckie quit (Ping timeout: 256 seconds)
101: [01:05:41] * [1]LoveDuckie is now known as LoveDuckie
102: [01:07:56] * DigNZ has joined #silverstripe
103: [01:07:56] * DigNZ quit (Remote host closed the connection)
104: [01:08:11] * DigNZ has joined #silverstripe
105: [01:11:04] * Colin[pi] has joined #silverstripe
106: [01:15:34] <Colin[pi]> g'day all
107: [01:19:26] * cjt quit (Ping timeout: 246 seconds)
108: [01:20:27] * cjt has joined #silverstripe
109: [01:27:18] * UncleCheese has joined #silverstripe
110: [01:27:39] <cjt> Still can't seem to work out how to pull data from two different blogs on one site...
111: [01:27:57] <Colin[pi]> what do you mean 'pull data'?
112: [01:28:35] <cjt> If i've got something like return ($BlogEntries) ? DataObject::get("BlogEntry", "ParentID = $BlogEntries->ID", "Date DESC", "", $limit) : false;
113: [01:28:46] <cjt> thats going to get the entries from the BlogEntry which is what I want
114: [01:29:04] <cjt> but if I've got a number of different blogholders which all have blogentries how do I choose which holder to use?
115: [01:30:02] <Colin[pi]> that's what I do on in my blog... I have a widget that pulls the latest posts
116: [01:30:06] <Colin[pi]> so the widget has a dropdown field
117: [01:30:13] <Colin[pi]> which links to the BlogHolder
118: [01:30:23] <cjt> I'm not using any widgets..
119: [01:30:27] <Colin[pi]> and then it passes the ID and pulls out the posts from each blog
120: [01:30:35] <Colin[pi]> no but it's the same principle
121: [01:30:46] <cjt> so I need to get the blogholder ID?
122: [01:30:52] <Colin[pi]> yes
123: [01:30:56] <cjt> hmm
124: [01:30:59] <Colin[pi]> that's how I do it, or the segment
125: [01:31:07] <Colin[pi]> URL segment that is
126: [01:31:22] <cjt> unsure on how to do either, docs anywhere that will explain?
127: [01:31:49] <cjt> or keywords to google
128: [01:32:19] <Colin[pi]> which part are you not sure of, how to get the url segment?
129: [01:32:22] <cjt> yup
130: [01:33:15] <Colin[pi]> but explain to me what you want to do on the site
131: [01:33:27] <Colin[pi]> each blog should pull up it's own posts, right?
132: [01:33:51] <cjt> I have my homepage, which lists snips from the last three posts on a blog on my site, I've got another blog on the same site, and I want to get the last three snips from that blog
133: [01:34:03] <cjt> one blog isn't a problem, but how do I do it for another blog
134: [01:34:18] <Colin[pi]> oic
135: [01:35:02] <Colin[pi]> so is it hard coded in the template? i.e. you said it's not using a widget
136: [01:35:16] <cjt> yeah
137: [01:35:43] <cjt> its just a function on my homepage.php
138: [01:35:43] <cjt> http://pastebin.com/yUdBmUxt
139: [01:36:12] <Colin[pi]> controller function, yeah?
140: [01:36:18] <cjt> yup
141: [01:36:36] <Colin[pi]> k.. so what you could do is make it MyBlogEntries($segment)
142: [01:36:53] <Colin[pi]> in the template you would put $MyBlogEntries('name-of-blog')
143: [01:37:05] <Colin[pi]> oops
144: [01:37:12] <Colin[pi]> $MyBlogEntries(name-of-blog)
145: [01:37:15] <Colin[pi]> (no quotes)
146: [01:37:34] <Colin[pi]> and use the segment to find the blog holder
147: [01:38:02] <cjt> is the name of the blog going to be the page name of the blogholder?
148: [01:38:53] <Colin[pi]> URLSegment
149: [01:39:41] <Colin[pi]> $BlogEntries = DataObject::get_one("BlogHolder","URLSegment = '".Convert::raw2sql($segment)."'");
150: [01:42:12] <Colin[pi]> make sense, or no?
151: [01:46:59] <gumble> I now reinstalled my server the third time and always am getting to restore the themes and mysite directory through my backup and set up a few pages, which work. but then I am getting "Notice at line 173 of /opt/lampp/htdocs/framework/dev/Deprecation.php" if I want to edit anything in the cms!! why could that be??
152: [01:47:41] <gumble> no only if I try to edit pages of a special page type but I don't get any error message telling me what ecactly is wrong
153: [01:47:46] <gumble> only that damn notice thing
154: [01:54:09] <Pyromanik> cjt: are you using SS 2.4?
155: [01:54:20] <cjt> na 3.0.5
156: [01:54:21] <Colin[pi]> ah good question :)(
157: [01:54:27] <Pyromanik> cjt: then you're doing it wrong.
158: [01:54:29] <Colin[pi]> I think I gave you 2.4 info
159: [01:54:39] <cjt> how should I be doing it then eh?
160: [01:54:44] <Pyromanik> DataObject::get("BlogEntry", "ParentID = $BlogEntries->ID", "Date DESC", "", $limit) <-- deprecated code
161: [01:54:49] <Pyromanik> well
162: [01:54:56] <Pyromanik> if you want blog entries from more than one blog on your site
163: [01:55:03] <cjt> which I do
164: [01:55:05] <Pyromanik> if you want blog entries from ALL blogs on your site
165: [01:55:11] <Pyromanik> BlogEntry::get()
166: [01:55:11] <Pyromanik> done
167: [01:55:22] <Pyromanik> if you want blog entries from certain blogs on your site
168: [01:56:07] <Pyromanik> BlogEntry::get()->filter('ParentID', $numeric_array_of_blogholder_ids)
169: [01:56:13] <Pyromanik> done
170: [01:56:22] <cjt> okay that makes perfect sense
171: [01:56:26] <cjt> but how do I get the blogholder ids?
172: [01:56:37] <Colin[pi]> that was why I said to use segment
173: [01:56:50] <Pyromanik> well it depends on what you're tryign to do
174: [01:56:58] <Pyromanik> if the user selects them, then they're saved somewhere
175: [01:57:03] <cjt> place snipits from two different blogs on the homepage
176: [01:57:11] <Pyromanik> are there only 2 blogs?
177: [01:57:15] <cjt> yup
178: [01:57:32] <cjt> but there might be more in the future...
179: [01:57:52] <Pyromanik> foreach(BlogHolder::get() as $blog)
180: [01:57:55] * DesignerX has joined #silverstripe
181: [01:58:09] <Pyromanik> $blog->ID
182: [01:58:20] <Pyromanik> build an ArrayList
183: [01:58:32] <Pyromanik> there might be an easier way
184: [01:58:40] <Pyromanik> but I'm a bit busy to investigate sorry
185: [01:58:46] <Pyromanik> that should be your job anyway!
186: [01:58:52] <cjt> all good, cheers for the info though
187: [01:59:06] <Colin[pi]> yeah it's prolly not a good idea to hard code segments or IDs in the template
188: [01:59:11] <Pyromanik> see if blogholder has a 'latest' type method
189: [01:59:14] <Colin[pi]> for future expansion
190: [01:59:39] <Pyromanik> in which case you can just have a controller method that returns BlogHolder::get()
191: [02:00:02] <Pyromanik> and you can <% loop AllBlogs %>$Summary<% end_loop %>
192: [02:00:22] * willmorgan has joined #silverstripe
193: [02:05:01] <Colin[pi]> can a DO have it's own controller?
194: [02:05:06] <DesignerX> hi guys, $summary_fields on an object doesnt change the columns show in GF (tested inside ModelAdmin) , is this a bug or is there a 2nd step to get this working ?
195: [02:07:08] <gumble> what does silverstripe want to tell me? "FileIFrameField->Field is deprecated. Use UploadField"
196: [02:08:51] <gumble> when I call $fields->addFieldToTab("Root.Images",new imageField("Icon"));
197: [02:14:50] <Colin[pi]> what version, gumble?
198: [02:15:09] <gumble> 3.0;5;
199: [02:15:15] <gumble> fresh from website
200: [02:15:59] <cjt> Cheers Colin[pi] and Pyromanik got it all working due to your smarts _b
201: [02:17:07] <Colin[pi]> yay
202: [02:19:07] <Colin[pi]> gumble, I think ImageField is deprecated in 3.x ?
203: [02:19:49] <Colin[pi]> ah well in 3.1 anyway... let me check earlier
204: [02:19:56] <gumble> haha, and what should I use now? :D
205: [02:20:12] <Colin[pi]> Use UploadField with $myField->getValidator()->setAllowedExtensions(array('jpg', 'gif', 'png'))
206: [02:20:15] <gumble> is 3.1 stable? should I maybe be using that one?
207: [02:20:15] <Colin[pi]> (from the source)
208: [02:20:47] <Colin[pi]> give uploadfield a go first
209: [02:22:15] <gumble> still getting a error
210: [02:22:18] <gumble> ah ok
211: [02:22:21] <gumble> I'll try
212: [02:22:58] <Colin[pi]> Pyromanik, can I bounce a question off you?
213: [02:24:10] * willmorgan quit (Ping timeout: 256 seconds)
214: [02:25:46] <gumble> Colin[pi], thanks, worked
215: [02:25:53] <Colin[pi]> awesome
216: [02:26:11] <gumble> how do I differ the $variable name from the text that is shown in the panel in the cms
217: [02:26:23] <gumble> e.g. in the cms there should stand: Icon on hover
218: [02:26:37] <gumble> and the image should be $iconHover or something :D
219: [02:37:05] * Jeremy2 has joined #silverstripe
220: [02:37:11] * gumble quit (Ping timeout: 252 seconds)
221: [02:37:34] * UncleCheese quit (Quit: UncleCheese)
222: [02:40:57] * Jeremy1 quit (Ping timeout: 264 seconds)
223: [02:51:19] <DesignerX> ok ! after I change $summary_fields on an object I need to do ?flush on the URL of the ModelAdmin ! just note for anyone having the same problem
224: [02:51:59] * DigNZ quit (Quit: DigNZ)
225: [02:57:26] * DigNZ has joined #silverstripe
226: [02:57:27] * DigNZ quit (Remote host closed the connection)
227: [02:57:41] * DigNZ has joined #silverstripe
228: [03:02:08] * Jeremy2 quit (Quit: Jeremy2)
229: [03:16:17] * Jeremy1 has joined #silverstripe
230: [03:23:33] * travis-ci has joined #silverstripe
231: [03:23:33] <travis-ci> [travis-ci] silverstripe/silverstripe-cms#377 (3.1 - 180defd : Sean Harvey): The build passed.
232: [03:23:33] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-cms/compare/2567cda0b405...180defd2cad9
233: [03:23:33] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-cms/builds/7240164
234: [03:23:33] * travis-ci has left #silverstripe
235: [03:27:38] * cloph_away1 has joined #silverstripe
236: [03:28:57] * cloph_away quit (Ping timeout: 264 seconds)
237: [03:38:35] <Colin[pi]> can anyone help with some dataobject/controller questions?
238: [03:45:34] * Jeremy1 quit (Quit: Jeremy1)
239: [03:46:00] * Jeremy1 has joined #silverstripe
240: [04:09:38] <ss23> Cool, I figured out why this site is so slow. Unmoderated comments on the blog, combined with web crawlers trying to catalouge all 10k comments on each post
241: [04:09:52] <Colin[pi]> yay :\
242: [04:10:19] <Colin[pi]> I used to have comments enabled on my blog, but then I took an arrow in the knee
243: [04:10:23] <ss23> lol
244: [04:10:28] <Colin[pi]> actually I had recaptcha enabled
245: [04:10:33] <Colin[pi]> and it didn't stop spam :(
246: [04:10:35] <ss23> yeah
247: [04:10:46] <ss23> Captches are kind of a nice idea, but they don't really help a lot of the time :<
248: [04:11:53] * simon_w quit (Ping timeout: 248 seconds)
249: [04:14:59] <Colin[pi]> they aren't even a nice idea, they're stupid... sigh... must be a better way :)
250: [04:17:07] <ss23> I mean nice in terms of "lets pick something that is easy for humans and hard for machines to stop spam", not the specific choice of entering text etc
251: [04:17:36] <Colin[pi]> ah right hehe
252: [04:24:22] <elgrodo> due to Thai law I have to moderate all comments
253: [04:24:53] <Colin[pi]> that sounds like fun
254: [04:25:35] <kerosene> in case someone mentions the king?
255: [04:25:57] <ss23> Bad things could happen if you don't moderate here and end up inadvertedly hosting CP or something
256: [04:26:09] <ss23> Doubt you would go to prison for it, but probably more problems than most people want to deal with
257: [04:30:46] <elgrodo> kerosene: Correct, if any LM comment is left on a site then someone will get the blame. Was a case last year where a woman named Jiew was given a suspended sentence due to a blog comment she didn't clear 'fast enough'
258: [04:31:00] <kerosene> god damn
259: [04:31:24] <elgrodo> if the website owner is not to blame next in line is the website developer...
260: [04:34:56] <elgrodo> Trying to import a 14000 row CSV file using model admin...
261: [04:38:06] * Shrike_Finland has joined #silverstripe
262: [04:38:34] * Shrike_Finland quit (Client Quit)
263: [04:40:00] * sewid has joined #silverstripe
264: [04:40:57] * Colin[pi] quit (Ping timeout: 256 seconds)
265: [04:45:12] * simon_w|air has joined #silverstripe
266: [04:46:34] * DigNZ quit (Quit: DigNZ)
267: [04:48:44] * cjt has left #silverstripe
268: [04:54:52] <ss23> om nom nom, 400k spam comments in total. Not bad.
269: [04:54:58] <Pyromanik> hahaha
270: [04:55:18] <spronk> :|
271: [04:55:23] <Pyromanik> I've had numbers like that before. It stops the blog from loading all together because fetching them runs PHP out of memory
272: [04:55:53] <Pyromanik> which on the plus side also denies the spambots access to post more :P
273: [04:56:05] <ss23> haha
274: [04:56:10] <ss23> I'm just disabling comments
275: [04:56:11] <ss23> Speaking of
276: [04:56:15] <ss23> DELETE * FROM PageComment
277: [04:56:18] <ss23> will break anything?
278: [04:56:20] <Pyromanik> though I guess if they manual post direct to the form action
279: [04:56:29] <Pyromanik> ss23: nup.
280: [04:56:33] <ss23> sweeeeet
281: [04:56:36] <Pyromanik> DROP TABLE PageComent
282: [04:56:40] <Pyromanik> dev/build
283: [04:56:42] <Pyromanik> :P
284: [04:56:45] <ss23> lol
285: [04:56:48] <ss23> Hmm
286: [04:57:02] <ss23> That one works too, and will reset my autoincrement, but I don't trust this to dev/build properly. I didn't write it and it's old
287: [04:57:07] <ss23> Better to avoid tempting fate
288: [04:57:09] <Pyromanik> I ususally go for TRUNCATE PageComments
289: [04:57:25] <ss23> oh, thats even better!
290: [04:57:34] <ss23> oh god
291: [04:57:40] <Pyromanik> ?
292: [04:57:42] <simon_w|air> I just uninstalled comments entirely
293: [04:57:44] <ss23> freaked me out for a second
294: [04:57:49] <ss23> Pyromanik: Comments vs Comment
295: [04:57:53] <Pyromanik> oic
296: [04:57:54] <ss23> "HALP I ACCDEITNYL DELETED MY DB"
297: [04:57:57] <Pyromanik> lulz
298: [04:58:00] <ss23> then "wait no *phew*"
299: [04:58:06] <ss23> simon_w|air: Yeah, I don't understand why page comments are in core
300: [04:58:11] <ss23> Are they removed from SS3?
301: [04:58:13] <simon_w|air> ss23, they're not!
302: [04:58:14] <Pyromanik> ss23: they're not anymore
303: [04:58:17] <ss23> Yay :D
304: [04:58:42] <ss23> I forgot how bad the SS2 UI was
305: [04:58:54] <simon_w|air> rm -rf cms
306: [04:59:11] <ss23> inb4"holy shit you broke our site"
307: [05:00:37] * nickmolhoek quit (Quit: nickmolhoek)
308: [05:03:12] <Pyromanik> site in a day
309: [05:03:13] <Pyromanik> :D
310: [05:03:20] <Pyromanik> time to drink rum, thanks tankr :D
311: [05:03:26] * Pyromanik quit (Quit: leaving)
312: [05:06:39] <ss23> Speaking of time to drink, I am tired.
313: [05:06:43] <ss23> Going to bed to have a nap I think...
314: [05:15:36] <DesignerX> hi, everyone
315: [05:16:27] <spronk> DesignerX: *nod*
316: [05:17:11] <DesignerX> Question : On MyObject , I need to get a TextField value & validate it before writing it to the database . is this done with only $this>InputTextField or is there a way to make sure this doesnt get the value from the datatabse?
317: [05:18:30] <spronk> o_O
318: [05:18:35] <spronk> onbeforewrite?
319: [05:18:42] <DesignerX> yeh
320: [05:18:54] * sminnee has joined #silverstripe
321: [05:18:55] * sminnee quit (Changing host)
322: [05:18:55] * sminnee has joined #silverstripe
323: [05:19:33] <ss23> IRCing from the router again...
324: [05:19:44] <simon_w|air> nup
325: [05:23:27] <simon_w|air> hooray, GoTest is still here
326: [05:23:38] <ss23> yay!
327: [05:23:52] <ss23> simon_w|air: There is that lol bug where 32bit Go apps crash after a long period though
328: [05:24:57] <simon_w|air> Well, it's a 64bit VPS, so should be fine
329: [05:25:08] <DesignerX> spronk: thanks, that worked
330: [05:25:35] <simon_w|air> So, current way of displaying logs is a good starting point?
331: [05:26:20] <DesignerX> another noob question : in model admin, it look for the "title" in the object to create the breadcrumbs, can I make it look for a differnt field to be used in the breadcrumbs for that object ?
332: [05:27:21] <spronk> hmm, you could possibly override Title()? I dno, not sure
333: [05:28:42] <DesignerX> I need the breadcrumbs to look for ID or any other field if title does not exist.
334: [05:29:35] <spronk> http://api.silverstripe.org/3.0/source-class-ModelAdmin.html#440-458
335: [05:29:37] <simon_w|air> DesignerX, if there's no Title field it looks for Name, then uses ID
336: [05:30:02] <spronk> does it?
337: [05:30:05] <simon_w|air> DesignerX, that's if there's a database field with that name, not if it has a value.
338: [05:30:16] <simon_w|air> spronk, DataObject::getTitle()
339: [05:30:20] <spronk> ahhh
340: [05:30:21] <spronk> mm
341: [05:30:36] <simon_w|air> used by LeftAndMain::Breadcrumbs(), which is what actually builds the breadcrumbs
342: [05:30:58] <simon_w|air> DesignerX, if you don't want that, override getTitle()
343: [05:31:00] <spronk> DesignerX: you could always ovverride getTitle()
344: [05:33:20] <DesignerX> that sounds good, I will have a look now
345: [05:38:10] <DesignerX> worked :)
346: [05:38:26] <spronk> marv
347: [05:42:28] * gordon__ has joined #silverstripe
348: [05:45:51] * elgrodo quit (Ping timeout: 252 seconds)
349: [05:52:07] * willr_ quit (Quit: willr_)
350: [05:57:26] * sewid quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
351: [05:59:33] * spronk has left #silverstripe
352: [05:59:42] * Jeremy1 quit (Quit: Jeremy1)
353: [05:59:54] * spronk has joined #silverstripe
354: [06:06:27] * Jeremy2 has joined #silverstripe
355: [06:07:21] * Jeremy2 quit (Client Quit)
356: [06:11:08] * zfmf1 has joined #silverstripe
357: [06:21:56] <DesignerX> with rederWith(array() ) , does it look for the last items in the array 1st ?
358: [06:24:31] <simon_w|air> No, the first one
359: [06:26:57] * zfmf1 quit (Ping timeout: 240 seconds)
360: [06:33:01] * Ramon has joined #silverstripe
361: [06:45:49] * willmorgan has joined #silverstripe
362: [06:47:45] * zfmf1 has joined #silverstripe
363: [06:59:28] * g4b0 has joined #silverstripe
364: [07:09:33] <Zauberfisch|idle> can someone start this repo please: https://github.com/Zauberfisch/foo
365: [07:09:55] <willmorgan> Zauberfisch|idle I presume you mean star
366: [07:10:06] <Zauberfisch|idle> haha
367: [07:10:11] <Zauberfisch|idle> yes indeed
368: [07:10:12] <willmorgan> and yes I've done that
369: [07:11:42] <DesignerX> why do you star it ?
370: [07:12:21] <Zauberfisch|idle> thanks willmorgan
371: [07:12:28] <willmorgan> <3
372: [07:12:35] <Zauberfisch|idle> DesignerX I wanted someone to star it to try something
373: [07:12:37] <willmorgan> i think PigeonFriend might be hungover
374: [07:13:01] <DesignerX> kk, GL :)
375: [07:13:13] <Zauberfisch|idle> DesignerX github has just introduced a new feature: redirecting users from the old name after renaming a repo
376: [07:13:23] <Zauberfisch|idle> and I wanted to try if the stars are kept as well
377: [07:13:27] <Zauberfisch|idle> and it works, yay
378: [07:13:34] <DesignerX> nice :)
379: [07:13:36] <Zauberfisch|idle> so we are all good for renaming sapphire to framework
380: [07:13:39] * chillu has joined #silverstripe
381: [07:13:56] <Zauberfisch|idle> chillu
382: [07:13:59] <Zauberfisch|idle> just the man we needed
383: [07:14:06] <chillu> hello
384: [07:14:33] <Zauberfisch|idle> mv sapphire framework
385: [07:16:12] <chillu> ?
386: [07:17:16] <Zauberfisch|idle> don't you read the mailing list? :P
387: [07:17:32] <Zauberfisch|idle> just kidding
388: [07:17:44] <Zauberfisch|idle> github just announced redirects after repo rename
389: [07:20:37] <chillu> Yes? I've already done that like … 12h ago :D
390: [07:24:34] <chillu> wtf I posted a response back then, no idea what happened to it. Re-responded now
391: [07:28:17] * Ramon quit (Quit: Page closed)
392: [07:28:40] * Ramon has joined #silverstripe
393: [07:58:41] * kinglozzer has joined #silverstripe
394: [08:04:21] * Pyromanik has joined #silverstripe
395: [08:04:26] <Pyromanik> so like
396: [08:04:28] <Pyromanik> wtf
397: [08:04:31] <Pyromanik> mate
398: [08:04:44] <Pyromanik> f'n radio won't play songs from the ol' school yard.
399: [08:05:00] <Pyromanik> (cat stevens reference for those too slow)
400: [08:05:11] <Pyromanik> what do?
401: [08:05:52] <Pyromanik> full mad because songs not from (and also from) the ol' school yard pumping into the output masheen so hard it's not funny.
402: [08:05:55] <Pyromanik> what do?
403: [08:05:58] <Pyromanik> DEAR INTERNETS!
404: [08:06:05] <Pyromanik> dilemma
405: [08:06:10] <Pyromanik> DILEMMA!
406: [08:06:22] <Pyromanik> SOUND THE ALARMS
407: [08:06:30] <Pyromanik> willmorgan:
408: [08:06:34] <Pyromanik> you are not willr
409: [08:06:42] <Pyromanik> I just don't even.
410: [08:07:07] <Pyromanik> all the doofs and yet none of the doof doofs
411: [08:07:30] <Pyromanik> MMMMMMMMMMMMMMMMMMAAAAAAAAAAAAAAAAAAAAAAAAAAADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
412: [08:07:34] * Pyromanik quit (Client Quit)
413: [08:10:18] <willmorgan> ...
414: [08:11:02] <onre> :D
415: [08:11:19] * travis-ci has joined #silverstripe
416: [08:11:19] <travis-ci> [travis-ci] silverstripe/silverstripe-framework#5 (3.1 - 9b0102b : Ingo Schommer): The build passed.
417: [08:11:19] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-framework/compare/a87bbb29034f...9b0102b4881c
418: [08:11:19] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-framework/builds/7243839
419: [08:11:19] * travis-ci has left #silverstripe
420: [08:13:56] <PigeonFriend> willmorgan: you need any help from me today?
421: [08:14:14] <willmorgan> erm, not that i know of
422: [08:18:20] * howardgrigg quit (Ping timeout: 256 seconds)
423: [08:18:48] * howardgrigg has joined #silverstripe
424: [08:19:28] <DesignerX> are there any known problems MyObject is renderd with a custom template then not being able to access relations inside that template ?
425: [08:27:13] * Ramon quit (Ping timeout: 250 seconds)
426: [08:32:02] <g4b0> hi all
427: [08:32:32] * Marvanni has joined #silverstripe
428: [08:33:04] <g4b0> chillu: could you please have a look at https://github.com/silverstripe/silverstripe-framework/pull/1933 ?
429: [08:33:36] <Marvanni> Hi, I'm validating a user login against a remote SOAP server. At the moment I create a new Member record for each remote username on login if it does not exist, so I know the user is logged in.
430: [08:34:18] <Marvanni> Is there any way to login a Member without the need to have a Member record (but based on session variable from remote SOAP server?)
431: [08:34:47] <PigeonFriend> Marvanni: It's probably possible, but I wouldn't recommend it. You'll probably have to deal with lots of issues that will arise
432: [08:35:16] <PigeonFriend> Marvanni: we did something similar from a RESTFUL server and we make a user for each one... just saves a lot of issues
433: [08:36:03] <Marvanni> I guess your right..
434: [08:36:06] * Pyromanik has joined #silverstripe
435: [08:36:17] <Pyromanik> I used the computer at work
436: [08:36:34] <Pyromanik> and it sucked at even playing the radio (which it does all day)
437: [08:36:49] <Pyromanik> and NONE of the songs which I told it to play played
438: [08:36:55] <Pyromanik> I JUST DON'T EVEN
439: [08:37:03] <Pyromanik> WILLR, TELL ME HOW THIS IS DONE
440: [08:37:09] * Pyromanik quit (Client Quit)
441: [08:37:22] <chillu> g4b0: merged
442: [08:37:40] <g4b0> tnks :)
443: [08:38:28] <g4b0> another hint: https://github.com/silverstripe/silverstripe-framework/issues/1783
444: [08:38:36] <chillu> Also, the validator you linked to apparently is "web savvy": http://websavvy-access.org/ lol the logo really screams "web savvy"
445: [08:39:18] <chillu> Sorry you've exhausted your pull request budget for today :D
446: [08:39:22] <g4b0> lol
447: [08:39:31] <Bollig|DesignCty> lol
448: [08:39:31] * Pyromanik has joined #silverstripe
449: [08:39:39] <Pyromanik> WHAT EVEN DOOOOOOOOOO!?
450: [08:39:43] * Pyromanik quit (Client Quit)
451: [08:39:47] <ss23> o.o
452: [08:39:51] <ss23> I think we broke Pyro
453: [08:40:49] <Bollig|DesignCty> Let's be honest, he was already a little ruined...
454: [08:43:58] <ss23> lol
455: [08:45:18] * webguest has joined #silverstripe
456: [08:47:45] <webguest> i have a form class with jquery validation inside http://paste2.org/wnEmHxEz which i load into a div using a ajax
457: [08:47:49] <webguest> my page class http://paste2.org/UIfcb2MY
458: [08:47:57] * travis-ci has joined #silverstripe
459: [08:47:58] <travis-ci> [travis-ci] silverstripe/silverstripe-framework#7 (3.1 - 5e663b1 : Ingo Schommer): The build passed.
460: [08:47:58] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-framework/compare/9b0102b4881c...5e663b123b87
461: [08:47:58] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-framework/builds/7244569
462: [08:47:58] * travis-ci has left #silverstripe
463: [08:48:00] <webguest> this works, but my jquery validation isnt loaded
464: [08:48:02] <webguest> any ideas?\
465: [08:49:36] * r3v3rb has joined #silverstripe
466: [08:55:16] <webguest> in other words, when i use renderWith the Requirements::customScript dont get loaded from the Form class, how do i fix this?
467: [09:04:46] * samthejarvis has joined #silverstripe
468: [09:05:10] <samthejarvis> "PHP Fatal error: Couldn\\'t parse /home/empire/public_html/mysite/code/model" - anyone seen this?
469: [09:05:30] <samthejarvis> when building config static manifest in /home/empire/public_html/framework/core/manifest/ConfigStaticManifest.php on line 208
470: [09:06:17] <samthejarvis> happens when simply adding fields to a $db / $has_one
471: [09:06:33] <samthejarvis> using SS3.1
472: [09:09:37] <samthejarvis> doesn't matter what $db is, if it's defined it'll throw this error
473: [09:11:19] <samthejarvis> hah! Never call a class "Case" :)
474: [09:12:43] * webguest quit (Ping timeout: 250 seconds)
475: [09:20:39] <willmorgan> or it will "Break"
476: [09:21:28] <Marvanni> How would you convert a SOAP resultset into an ArrayList->push($item) ?
477: [09:21:57] <Marvanni> When I do this i get clas blah does not have a method 'XML_val'
478: [09:22:01] <willmorgan> parsing the SOAP with XML
479: [09:22:16] <willmorgan> sorry, you need to do something like Convert::xml2array($soapResult);
480: [09:22:22] <willmorgan> and get it in to a good format
481: [09:22:31] <willmorgan> $data = Convert::xml2array($soapResult);
482: [09:22:42] <willmorgan> ArrayList->push(new ArrayData($data));
483: [09:22:45] <Zauberfisch|idle> chillu haha, fail, I didn't notice you already renamed it
484: [09:22:47] * FireMe has joined #silverstripe
485: [09:23:04] <Zauberfisch|idle> oh, github is really awesome, even the issue links are still working
486: [09:23:05] <Zauberfisch|idle> in https://github.com/silverstripe/silverstripe-cms/pull/703
487: [09:23:16] <Zauberfisch|idle> there is a silverstripe/sapphire#1880 link
488: [09:23:19] <Zauberfisch|idle> which still works
489: [09:23:22] * webguest has joined #silverstripe
490: [09:24:10] <webguest> does any one know how to get a "Requirements::customScript " to work when you are using renderWith?
491: [09:24:20] <Marvanni> $list->push(new ArrayData((array)$item));
492: [09:24:28] <Marvanni> I have an Object, no XML...
493: [09:24:36] <Marvanni> this seems to work
494: [09:27:00] <willmorgan> webguest post code
495: [09:27:08] <webguest> http://paste2.org/fXy4AeW3 & http://paste2.org/wnEmHxEz
496: [09:27:25] <willmorgan> and what lines am I supposed to be looking at webguest?
497: [09:27:40] <webguest> moment i pasted the worng one
498: [09:27:54] <FireMe> is there somthing wrong with my write function because i am getting HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request. http://pastie.org/7919739
499: [09:28:21] <willmorgan> FireMe: line 9 is passing nothing to the redirect function, so yes, you have something wrong
500: [09:28:32] <willmorgan> you need to pass a parameter to the redirect function otherwise it won't go anywhere and will give you a 500
501: [09:28:58] <willmorgan> for now change return $this->redirect(); to return $this->redirectBack();
502: [09:28:58] <webguest> willmorgan, see my page class http://paste2.org/1b7EecA4
503: [09:29:13] <webguest> line 99
504: [09:29:16] <webguest> it returns the form,
505: [09:29:18] <FireMe> ok
506: [09:29:30] <willmorgan> webguest: is this over AJAX or standard HTTP?
507: [09:29:31] <webguest> on my site, it gets loaded into a div, using loadResults(RegistrationForm)
508: [09:29:35] <willmorgan> right, so AJAX
509: [09:29:52] <willmorgan> webguest we had that problem here a while ago
510: [09:29:59] <willmorgan> my advice to you is to move all your customscript in to the template file
511: [09:30:01] <webguest> im using "jqxhr = $.ajax(link) "
512: [09:30:03] <willmorgan> you don't need it in the controller
513: [09:30:24] <webguest> hmm, well im using this form on multiple pages
514: [09:30:28] <FireMe> i am still getting same error
515: [09:30:30] <webguest> (btw im using 2.4.10)
516: [09:30:35] <willmorgan> webguest nothing to do with jquery - simply move ALL customscript in to an include file, and then include that in your controller template
517: [09:30:53] <willmorgan> JS has NO reason to be in your PHP
518: [09:30:59] * osterlaus has joined #silverstripe
519: [09:31:31] <willmorgan> for the bigger picture, there are much more elegant ways to communicate server based data down to the client
520: [09:31:41] <willmorgan> but for now stick it in the template
521: [09:31:52] <willmorgan> FireMe: did you make the redirectBack change? is it all fixed now?
522: [09:31:52] <webguest> ok thx
523: [09:33:01] <FireMe> no, could it be becuase i have not declared the new db field in my controller, because i just added it in mamp?
524: [09:34:48] <FireMe> just added it still getting error
525: [09:35:31] <willmorgan> same or different error?
526: [09:39:00] <FireMe> its todo with this line i believe return $this->redirect($this->Link(confirmation));
527: [09:39:42] <FireMe> use of undefined constant confirmation - assumed 'confirmation
528: [09:39:43] <FireMe> '
529: [09:39:46] <willmorgan> oh yeah
530: [09:39:50] <willmorgan> you need to use quotes around confirmation
531: [09:39:55] <willmorgan> 'confirmation' instead of confirmation
532: [09:40:13] <FireMe> oh simple mistake, thanks
533: [09:40:34] <willmorgan> no probs
534: [09:40:52] <willmorgan> you should probably make sure you are coding with E_ALL error reporting on - it will help you learn faster and also make sure you don't learn any bad habits
535: [09:41:18] <FireMe> E-All ?
536: [09:42:45] <FireMe> when i added this line back to my bookingform function the error is back ? $fieldset->push(TimeSlot::get()->byID($this->request->param('ID'))->getAvailablePlacesDropDown());
537: [09:44:09] <willmorgan> what is the error
538: [09:44:56] <FireMe> HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request. same one
539: [09:52:45] * osterlaus quit (Quit: Leaving.)
540: [09:58:23] * ivoba has joined #silverstripe
541: [10:10:25] <ivoba> hi ppl, can i redirect a form submit by passing a different controller than $this ?
542: [10:10:41] <PigeonFriend> ivoba: sure, why not?
543: [10:10:53] <ivoba> like $form = new Form($myController ...
544: [10:11:39] <ivoba> ok then how do i get a controller of a certain page?
545: [10:12:44] <FireMe> so anyone got any ideas why this line $fieldset->push(TimeSlot::get()->byID($this->request->param('ID'))->getAvailablePlacesDropDown());
546: [10:12:46] <FireMe> would be causing me to get a HTTP Error 500 on form submition?
547: [10:13:47] <PigeonFriend> ivoba: ModelAsController::controller_for($model)
548: [10:13:55] * webguest quit (Quit: Page closed)
549: [10:14:07] <PigeonFriend> FireMe: find out what the error is in the error log
550: [10:14:16] <PigeonFriend> or turn on dev mode and get a descriptive error
551: [10:14:22] <PigeonFriend> then see what it is and we can help from there
552: [10:14:55] <FireMe> i am in dev mode but its not givin me a descriptive error for some reason
553: [10:17:32] <FireMe> ha php error Call to a member function getAvailablePlacesDropDown() on a non-object in
554: [10:21:20] <PigeonFriend> so its a non-existant ID
555: [10:21:45] <FireMe> i dont think so
556: [10:22:23] <FireMe> the dropdown populates with the right number of places reamianing
557: [10:22:55] <PigeonFriend> clearly not, because you're getting a 500 error
558: [10:23:06] <PigeonFriend> this is when you submit the form right?
559: [10:23:14] <PigeonFriend> oh the lols of SilverStripe Forms
560: [10:23:28] <PigeonFriend> that ID param is no available when the form is submitted
561: [10:24:10] <FireMe> is it becuase it changes from event/book/1 to event/bookingform ?
562: [10:25:07] <PigeonFriend> yep
563: [10:25:37] <ivoba> $model = Page::get_one('RedirectToThisPage');
564: [10:25:48] <FireMe> but it worked with this line $fieldset->push(new TextField('TimeSlotID','TimeSlotID',$this->request->param('ID')));
565: [10:25:52] <PigeonFriend> ivoba: yep
566: [10:25:54] <ivoba> PigeonFriend: works thx
567: [10:28:18] <PigeonFriend> FireMe: that will work, but it wont assign a value on the form submit. you're getting an error because the object iwth that ID doesnt exist, where as the latter example is going to assign a value of null and it wont error#
568: [10:28:48] <PigeonFriend> please gist your controller function that does the fieldset work and i'll fix for you
569: [10:29:51] <FireMe> the getAvailablePlacesDropDown function or bookingform function?
570: [10:31:41] <FireMe> here's both http://pastie.org/7919973
571: [10:33:12] <PigeonFriend> FireMe: i cant edit that
572: [10:33:14] <PigeonFriend> gist please
573: [10:33:40] <FireMe> there is a repastie button on top
574: [10:34:09] <FireMe> its like 2pages on top of each other
575: [10:34:38] <PigeonFriend> FireMe: i dont see it
576: [10:35:06] <FireMe> top right?
577: [10:35:37] <PigeonFriend> oh
578: [10:35:38] <PigeonFriend> i see it
579: [10:35:41] <PigeonFriend> what a shit site
580: [10:35:54] <PigeonFriend> the difference is, gists are designed for code
581: [10:36:01] <PigeonFriend> this is designed for lulsec
582: [10:36:22] <FireMe> lol, dint wanna keep spaming the sspastie
583: [10:38:12] <PigeonFriend> FireMeL try that
584: [10:38:13] <PigeonFriend> http://pastie.org/7919993
585: [10:38:30] <PigeonFriend> FireMe: gist.github.com
586: [10:39:05] <FireMe> ok will use that
587: [10:41:30] <FireMe> im getting unexpected ; on line $fieldset->push(new HiddenField('TimeSlotID', $timeSlotID);
588: [10:41:43] <PigeonFriend> i missed a close bracket off the end
589: [10:42:04] <FireMe> oh yes
590: [10:43:01] <FireMe> Uncaught Exception: Object->__call(): the method 'postvar' does not exist on 'Event_Controller'
591: [10:44:16] <PigeonFriend> $this->request->postVar()
592: [10:45:11] <FireMe> where do i put that ?
593: [10:45:31] <PigeonFriend> instead of $this->postVar
594: [10:46:06] <FireMe> so it doesnt need the 'TimeSlotID'
595: [10:48:55] <PigeonFriend> no, it does
596: [10:50:11] <FireMe> yes believe it works now
597: [10:54:31] <FireMe> i think i have gotta change my getAvailablePlaceDropDown function now thow because i have added it so you can book more than one place, and it currently just counts rows with that time slot id
598: [11:01:01] * gumble has joined #silverstripe
599: [11:01:28] <FireMe> how would i get this line $placesremaining = $this->Places - $this->Bookings()->count(); to do $this->Places - ($this->bookings->NumSlots and add the field values together)?
600: [11:01:55] * samthejarvis quit (Ping timeout: 250 seconds)
601: [11:09:24] <PigeonFriend> FireMe: you'd save yourself hassle and create a Booking for each place
602: [11:12:11] <FireMe> i thought i could maybe add something on the current function, like the number of rows returned add the INTs together for NumSlots and then subtract that from places?
603: [11:14:03] <kinglozzer> chillu: If you get a minute, can you look at merging this for me? https://github.com/silverstripe/silverstripe-cms/pull/740 simple fix, just to save me having to patch it every time :)
604: [11:17:10] <chillu> kinglozzer: merged
605: [11:17:47] <kinglozzer> Thanks
606: [11:21:28] <FireMe> if i was to do $this->Bookings('NumSlots') does that select the field NumSlots in my bookings table?
607: [11:23:07] * travis-ci has joined #silverstripe
608: [11:23:07] <travis-ci> [travis-ci] silverstripe/silverstripe-cms#378 (3.1 - cf81c32 : Ingo Schommer): The build passed.
609: [11:23:07] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-cms/compare/180defd2cad9...cf81c32dd874
610: [11:23:07] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-cms/builds/7247799
611: [11:23:07] * travis-ci has left #silverstripe
612: [11:30:05] * ivoba quit (Ping timeout: 276 seconds)
613: [11:36:54] <simon_w|air> FireMe, $this->Bookings()->Sum('NumSlots')?
614: [11:37:35] * travis-ci has joined #silverstripe
615: [11:37:35] <travis-ci> [travis-ci] silverstripe/silverstripe-cms#379 (3.0 - 041a8bd : Ingo Schommer): The build passed.
616: [11:37:35] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-cms/compare/d7c937710a9b...041a8bd5a737
617: [11:37:35] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-cms/builds/7248070
618: [11:37:35] * travis-ci has left #silverstripe
619: [11:39:17] <FireMe> so this line should be ok $placesremaining = $this->Places - $this->Bookings()->Sum('NumSlots')->count();
620: [11:40:08] <simon_w|air> no count(), sum() returns the actual sum
621: [11:41:41] <FireMe> ya it works
622: [11:42:37] <FireMe> so this $placesremaining = $this->Places - $this->Bookings()->Sum('NumSlots'); is an ok way of doing it
623: [11:46:56] * Zauberfisch has joined #silverstripe
624: [11:53:00] * travis-ci has joined #silverstripe
625: [11:53:00] <travis-ci> [travis-ci] chillu/sapphire#154 (pulls/shortcode-docs - 85a447b : Ingo Schommer): The build has errored.
626: [11:53:00] <travis-ci> [travis-ci] Change view : https://github.com/chillu/sapphire/compare/29d1dd785557...85a447b3ba4d
627: [11:53:00] <travis-ci> [travis-ci] Build details : http://travis-ci.org/chillu/sapphire/builds/7248434
628: [11:53:00] * travis-ci has left #silverstripe
629: [11:53:17] <FireMe> is there a better way to do these functions seem to be retyping alot of code https://gist.github.com/anonymous/a97a2ef9d8f9a532caf0
630: [11:54:02] * UncleCheese has joined #silverstripe
631: [11:54:12] * travis-ci has joined #silverstripe
632: [11:54:12] <travis-ci> [travis-ci] chillu/sapphire#155 (pulls/shortcode-docs - 146b5a8 : Ingo Schommer): The build has errored.
633: [11:54:12] <travis-ci> [travis-ci] Change view : https://github.com/chillu/sapphire/compare/85a447b3ba4d...146b5a81cbc6
634: [11:54:12] <travis-ci> [travis-ci] Build details : http://travis-ci.org/chillu/sapphire/builds/7248451
635: [11:54:12] * travis-ci has left #silverstripe
636: [11:56:36] * ivoba has joined #silverstripe
637: [12:00:15] <kinglozzer> FireMe: You could create a class property, $AvailablePlaces, then in do $this->AvailablePlaces = $this->Places - $this->Bookings()->Sum('NumSlots'); - then getAvailablePlaces() { return $this->AvailablePlaces }
638: [12:00:43] <kinglozzer> getAvailablePlacesDropdown() could use it as well, $range = range(1, $this->AvailablePlaces, 1);
639: [12:01:22] <FireMe> yes
640: [12:02:14] <kinglozzer> FireMe: I commented https://gist.github.com/anonymous/a97a2ef9d8f9a532caf0
641: [12:02:24] <FireMe> ok
642: [12:02:42] * kinglozzer lunch
643: [12:07:51] * Zauberfisch quit (Read error: Connection reset by peer)
644: [12:08:33] * UndefinedOffset has joined #silverstripe
645: [12:08:56] <FireMe> it seems to of broken it but im not getting any errors
646: [12:09:16] * gumble quit (Ping timeout: 256 seconds)
647: [12:14:25] * r3v3rb quit (Quit: r3v3rb)
648: [12:14:49] * travis-ci has joined #silverstripe
649: [12:14:49] <travis-ci> [travis-ci] silverstripe/silverstripe-framework#10 (3.0 - 76cef06 : Ingo Schommer): The build passed.
650: [12:14:49] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-framework/compare/a35de54882c5...76cef0644095
651: [12:14:49] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-framework/builds/7248465
652: [12:14:49] * travis-ci has left #silverstripe
653: [12:17:47] * henkpoley has joined #silverstripe
654: [12:20:50] * travis-ci has joined #silverstripe
655: [12:20:50] <travis-ci> [travis-ci] silverstripe/silverstripe-framework#11 (3.1 - 306d3b0 : Ingo Schommer): The build passed.
656: [12:20:50] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-framework/compare/5e663b123b87...306d3b0c7e02
657: [12:20:50] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-framework/builds/7248751
658: [12:20:50] * travis-ci has left #silverstripe
659: [12:23:15] * travis-ci has joined #silverstripe
660: [12:23:15] <travis-ci> [travis-ci] silverstripe/silverstripe-framework#12 (3.1 - e0f4bd6 : Ingo Schommer): The build passed.
661: [12:23:15] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-framework/compare/306d3b0c7e02...e0f4bd6113af
662: [12:23:15] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-framework/builds/7248790
663: [12:23:15] * travis-ci has left #silverstripe
664: [12:34:43] * travis-ci has joined #silverstripe
665: [12:34:43] <travis-ci> [travis-ci] silverstripe/silverstripe-cms#380 (3.1 - b2e9353 : Ingo Schommer): The build passed.
666: [12:34:43] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-cms/compare/cf81c32dd874...b2e935375549
667: [12:34:43] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-cms/builds/7248848
668: [12:34:43] * travis-ci has left #silverstripe
669: [12:54:46] * UncleCheese_ has joined #silverstripe
670: [12:58:31] <FireMe> how can i get the if statement in this template to work? https://gist.github.com/anonymous/07d0caa0e973e1d979e9
671: [12:59:45] <willmorgan> what have you tried?
672: [12:59:49] <willmorgan> www.whathaveyoutried.com
673: [12:59:51] <FireMe> if i have the if statment in my control it doesnt work because $bookingform is not on the timeslot dataobject
674: [13:00:45] <FireMe> is there a way to get booking for to function in a timeslot control
675: [13:01:10] <FireMe> bookingform is on my event.php
676: [13:03:39] * DrCuriosity has joined #silverstripe
677: [13:04:24] <FireMe> is there a way to make my bookingform function available on my timeslot class
678: [13:08:13] * UncleCheese quit (Quit: UncleCheese)
679: [13:08:14] * UncleCheese_ is now known as UncleCheese
680: [13:23:18] * gumble has joined #silverstripe
681: [13:37:46] <DesignerX> Hi, using Dropdown, how can i add that small (x) to remove the has_one relation ?
682: [13:39:37] * henkpoley quit (Quit: henkpoley)
683: [13:42:08] * ^pH has joined #silverstripe
684: [13:49:10] * henkpoley has joined #silverstripe
685: [13:54:19] <kinglozzer> FireMe: <% if Top.getAvailablePlaces
686: [13:54:55] <FireMe> if top, what does that do?
687: [13:55:09] <kinglozzer> DesignerX: I'd guess $dropdown->setHasEmptyDefault(true); from looking at the API
688: [13:56:07] <DesignerX> FireMe: it moves to the top scope in the template
689: [13:56:16] <kinglozzer> FireMe: Using $Top takes the scope out of your loop. E.g. "$SomeVar <% with Member %> $Top.SomeVar <% end_with %>", both times $SomeVar is called would return the same value - because $Top takes it out of the 'Member' scope
690: [13:56:31] <DesignerX> $top = top scope, if Top I think it checks if you already at top scope ?
691: [13:57:13] <DesignerX> kinglozzer: $Top = Top scope in the template , $Up is one scope up?
692: [13:57:22] <kinglozzer> DesignerX: Yeah
693: [13:57:46] <FireMe> its not working
694: [13:57:47] <kinglozzer> So perhaps <% if Up.getAvailablePlaces would be better
695: [13:57:58] <kinglozzer> FireMe: You're using an '!' in your example
696: [13:58:08] <kinglozzer> As far as I know, ! isn't supported in templates
697: [13:58:17] <willmorgan> you use "not" instead of !
698: [13:58:23] <willmorgan> <% if not $Something %>
699: [13:58:24] <kinglozzer> <% if not Up.getAvailablePlaces %>
700: [13:58:26] <kinglozzer> ^^
701: [13:58:43] <willmorgan> not sure if we're supposed to be prefixing with $
702: [13:59:06] <DesignerX> kinglozzer: setEmptyString does not provide th (x) to remove the relation.. GF by default provdes this feature but couldnt find out where its done in the code !
703: [13:59:40] <DesignerX> willmorgan: inside <% %> you shouldnt use $
704: [14:00:04] <willmorgan> it is possible to do so, DesignerX. i don't know whether that is the direction things are heading though.
705: [14:00:09] <willmorgan> that is the question.
706: [14:00:09] <kinglozzer> DesignerX: Yeah it's automatically in there if it's scaffolded, I've never needed to add it - just remove it
707: [14:00:23] <zfmf1> i have in the DO a integer field how can i set it to lenght 15 on static $db = array('xyz', 'Int') when i use 'Int(15)' its used as default value
708: [14:00:24] * Colin[pi] has joined #silverstripe
709: [14:00:39] <UndefinedOffset> DesignerX willmorgan I thought 3.0 introduced the $ in <% %> ?
710: [14:00:54] <kinglozzer> willmorgan: Both $ and no $ work fine, it's just a best practice sort of thing IIRC. Ask simon_w|air, or perhaps chillu will know when to use which
711: [14:01:00] <willmorgan> zfmf1: $db = array('xyz' => 'Int(15)')
712: [14:01:24] <DesignerX> UncleCheese: realy ? never tested it lol, I remember the "white screen of death" with SS2.4 when I used that so I learn my leason , but I like it with $, makes more sense
713: [14:01:48] <UndefinedOffset> DesignerX willmorgan per the docs http://doc.silverstripe.org/framework/en/reference/templates-upgrading-guide you're supposed to use $ now
714: [14:01:51] <FireMe> is this correct? <% if not Top.getAvailablePlaces 0 %>$BookingForm<% else %>Sorry registration for this event is closed, event is fully booked<% end_if %> because i am getting the else but it should be the form?
715: [14:01:53] <zfmf1> willmorgan: i tryed that ,no its used as default value , length is 11 and default value is 15 :)
716: [14:02:05] <kinglozzer> DesignerX: When you should/shouldn't use it depends on the type of variable I think
717: [14:02:11] <UndefinedOffset> FireMe which version of silverstripe are you using?
718: [14:02:16] <willmorgan> zfmf1: oh, not fun. that's not how it's supposed to work either, iirc
719: [14:02:19] <FireMe> 3.1.0
720: [14:02:38] <willmorgan> zfmf1: i'm going to read through the db builder and see how it's supposed to work
721: [14:02:41] <UndefinedOffset> FireMe ok just checking because <% if not .... will not work in < 3.0 :P
722: [14:02:43] <willmorgan> also bear in mind integer sizes and their fields
723: [14:03:12] <kinglozzer> FireMe: If the if and the else are the wrong way around, just remove the 'not'
724: [14:03:26] * travis-ci has joined #silverstripe
725: [14:03:26] <travis-ci> [travis-ci] chillu/sapphire#156 (pulls/htmleditorfield-stacked - cb39236 : Ingo Schommer): The build failed.
726: [14:03:26] <travis-ci> [travis-ci] Change view : https://github.com/chillu/sapphire/compare/433b883c6b64^...cb3923697bb2
727: [14:03:26] <travis-ci> [travis-ci] Build details : http://travis-ci.org/chillu/sapphire/builds/7251754
728: [14:03:26] * travis-ci has left #silverstripe
729: [14:04:46] <kinglozzer> zfmf, willmorgan: Int is hardcoded to 11 http://api.silverstripe.org/3.0/source-class-Int.html#2-72
730: [14:04:53] <willmorgan> yeah, i can see that now
731: [14:05:00] <willmorgan> one other option would be to use Decimal
732: [14:05:17] <kinglozzer> Yep
733: [14:05:25] <willmorgan> Decimal(15,0)
734: [14:05:33] <willmorgan> Decimal->Int() also works
735: [14:05:58] <FireMe> getAvailablePlaces is in my timeslot class its the $bookingform that is not?
736: [14:06:44] <kinglozzer> FireMe: I see, use $Up.BookingForm then
737: [14:07:01] <FireMe> ok
738: [14:08:36] <zfmf1> kinglozzer: willmorgan: its not good but ok thanks ;)
739: [14:08:56] <willmorgan> zfmf1: it looks quite straightforward to create a new DBfield
740: [14:08:58] <FireMe> not wasn't working so went for > 0 and it works ok now
741: [14:09:05] <willmorgan> you are better off just writing a patch for Int though
742: [14:09:39] <willmorgan> personally I think you should be setting the default value for everything inside the $defaults array
743: [14:10:02] <willmorgan> no use having things like "Enum('opt1,opt2','opt2')" and then having $defaults somewhere
744: [14:10:05] <willmorgan> everything should be merged in to one
745: [14:10:29] <FireMe> ok it isnt working lol
746: [14:16:17] <UncleCheese> chillu: there's no way in GridFieldItemEditForm to access the DataList of the parent GridField, is there?
747: [14:17:02] * catcher has joined #silverstripe
748: [14:17:05] <chillu> It has a reference to $this->gridField ?
749: [14:42:42] * gumble quit (Ping timeout: 246 seconds)
750: [14:49:51] <DesignerX> I have an Object that I cant save to the DB, I did a dev/build & I still have the same problem. I checked the Database & found no Table with the same Class ( Object has db fields added so it should have its own table ) .. any idea why
751: [14:52:34] <UncleCheese> chillu: it does have a reference to $this->gridField, but if the data has been sorted, I don't have access to that mutated list
752: [14:52:47] <UncleCheese> trying to figure out how that might work, if ever
753: [14:53:12] <UncleCheese> most of the list mutations come in from URL parameters, which aren't with you on GridFieldItemEditForm
754: [14:54:45] * catcher has left #silverstripe
755: [14:54:56] * catcher has joined #silverstripe
756: [14:55:51] * Nivery has joined #silverstripe
757: [14:56:32] <chillu> UncleCheese: GridField->getManipulatedList()?
758: [14:56:40] <UncleCheese> wait, that exists?
759: [14:56:49] <chillu> both in 3.0 and 3.1
760: [14:56:49] <UncleCheese> or are you sending me on a mission to create this method?
761: [14:57:03] <chillu> No, it exists
762: [14:57:57] <UncleCheese> that would be amazing. I don't see how the edit form would persist the state of the list, but i'll give it a true
763: [14:57:58] <UncleCheese> trye
764: [14:58:00] <UncleCheese> try
765: [14:58:16] <UncleCheese> if you sort a list, edit, and go back, you lose state, so i'm not optimistic. :)
766: [15:05:25] <DesignerX> hi again, any idea why the value of my TextField for "Title" db field is effected by getTitle() ? if I set any value for getTitle() (so I can customize the breadcrumbs in GF) , the value of new TextField("Title", "Title"), === getTitle() !
767: [15:12:18] <UncleCheese> yeah, ViewableData objects always look for getXXX before they return the value of the property itself
768: [15:12:47] <UncleCheese> see ViewableData::__get()
769: [15:15:38] <DesignerX> UncleCheese: ah , problem is sometimes I have empty title for my objects , which means the GF breadcrumbs will not work (missing link) as it doesnt check the value of $Title field.. any work arounds ?
770: [15:16:24] * sewid has joined #silverstripe
771: [15:16:42] <UncleCheese> function getTitle() { return $this->getField('Title') ?: $this->getField('ID');}
772: [15:17:10] <UncleCheese> or ?: "Untitled $this->class"
773: [15:18:14] <DesignerX> UncleCheese: if this return the ID, the value of my new TextField("Title")), will always be set to the value of getTitle()
774: [15:19:01] <DesignerX> let me test ...
775: [15:23:26] * micmania1 has joined #silverstripe
776: [15:24:36] <DesignerX> UncleCheese: that fixed 1/2 the problem, now in the template $Title will always return the value of getTitle(0 not the value of the dbField(Title)
777: [15:25:48] <DesignerX> so in this case, it will show the Object ID in the template if no title exists ... I guess I have to rename my Title fields to heading or something else :(\
778: [15:25:51] <UncleCheese> of course.. because you've provided a specific accessor for that property, so it will always use that when available
779: [15:26:31] <DesignerX> I may look at changing the GridField breadcrumbs ?
780: [15:26:37] <UncleCheese> I dunno.. IMO, $Title should never be optional
781: [15:26:45] <UncleCheese> if you have an optional field, call it something else
782: [15:27:01] <UncleCheese> no, getTitle() is used all over the framework for DataObjects
783: [15:27:12] <UncleCheese> every dataobject should know how how to produce a human-readable title
784: [15:27:33] * micmania1 quit (Ping timeout: 250 seconds)
785: [15:27:41] <UncleCheese> And don't call your field $Name, either, because that's the fallback when $Title doesn't exist. :)
786: [15:27:52] <DesignerX> so you think I should leave Title & Name for the Framework to use & I use differnt Fieldnames ?
787: [15:28:11] <UncleCheese> yeah, if there's a good chance they'll be null, then definitely
788: [15:28:22] <UncleCheese> i don't do too many projects where $Title fields aren't populated
789: [15:28:29] <UncleCheese> Not sure i've ever seen it, to be honest
790: [15:29:27] <DesignerX> Its for a Gadgets Module I coocked up, I dont always want Title, I just want a "gallery" to go in a section without title
791: [15:35:22] <kinglozzer> chillu: Are there still plans to (eventually) redesign the main SilverStripe site/forums? They're looking so neglected :(
792: [15:36:28] * sewid quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
793: [15:36:38] <chillu> Personally, I would love to see most forum activity to move to stackoverflow. But yes, it's still in the cards. But I doubt that we'll add features to the forum, we're struggling to even put a new theme on ss.org with all our other open source commitments
794: [15:37:25] <chillu> The forum module is open source after all (in terms of feature dev)
795: [15:38:19] <FireMe> why do i get www.doc.silverstripe.org is unavailable or may not exist.
796: [15:38:30] <kinglozzer> FireMe: www
797: [15:38:34] <willmorgan> FireMe: http://doc.silverstripe.org/
798: [15:38:36] <willmorgan> -_-
799: [15:38:41] <kinglozzer> Haha
800: [15:39:05] <FireMe> the links are mest up on silverstripe search then
801: [15:39:31] <kinglozzer> Yeah chillu that'd be nice for development stuff, but CMS users who aren't developers probably won't post on there
802: [15:39:39] <willmorgan> FireMe: what did you search for and where?
803: [15:41:04] <FireMe> all the links on the documentation search return links like http://www.doc.silverstripe.org/framework/en/3.1/howto/pagination
804: [15:41:18] <willmorgan> what is the current page that you are on that contain that link
805: [15:41:30] <FireMe> http://doc.silverstripe.org/DocumentationSearchForm?Search=Paginating&Entities=framework&Versions=3.1&action_results=Search
806: [15:41:43] <willmorgan> ooher
807: [15:41:43] <willmorgan> this is bad
808: [15:41:59] * jrthomer quit (Remote host closed the connection)
809: [15:42:04] <willmorgan> FireMe: https://github.com/silverstripe/silverstripe-framework/issues/new?labels=documentation
810: [15:42:06] <willmorgan> raise a bug :)
811: [15:42:20] <FireMe> did i find a bug lol
812: [15:42:30] <willmorgan> as i said, raise it
813: [15:42:55] <FireMe> im not a member of github
814: [15:43:08] <kinglozzer> willmorgan, FireMe: Should it be raised here instead? https://github.com/silverstripe/silverstripe-docsviewer
815: [15:43:37] <willmorgan> :o unless the report a bug link is also broken
816: [15:44:30] <FireMe> someone else will have to do it for me lol
817: [15:44:35] <willmorgan> ....
818: [15:44:48] <willmorgan> FireMe: https://github.com/silverstripe/silverstripe-docsviewer/issues/new
819: [15:45:12] <FireMe> i will have to register then
820: [15:45:56] <willmorgan> github is good
821: [15:46:08] <willmorgan> maybe one day you will submit pull requests :)
822: [15:46:33] * jrthomer has joined #silverstripe
823: [15:47:02] <FireMe> lol do you want me to mess stuff up lol
824: [15:48:05] <willmorgan> i want you to stop saying lol
825: [15:48:30] <willmorgan> <3
826: [15:51:31] <FireMe> https://github.com/silverstripe/silverstripe-docsviewer/issues/28 is this the correct way of posting?
827: [15:56:16] <kinglozzer> FireMe: Yep. Leave a comment with your example link: http://doc.silverstripe.org/DocumentationSearchForm?Search=Paginating&Entities=framework&Versions=3.1&action_results=Search
828: [15:56:29] <kinglozzer> So that others can recreate the issue easily :)
829: [15:57:46] * g4b0 quit (Quit: Sto andando via)
830: [15:58:54] * Nivery quit (Quit: Nivery)
831: [16:03:33] * kinglozzer Weekend time
832: [16:03:38] <willmorgan> enjoy
833: [16:03:41] <kinglozzer> Cya all
834: [16:03:49] <kinglozzer> willmorgan and you
835: [16:03:51] * UncleCheese_ has joined #silverstripe
836: [16:03:51] * kinglozzer quit (Remote host closed the connection)
837: [16:06:45] * henkpoley quit (Remote host closed the connection)
838: [16:07:08] * henkpoley has joined #silverstripe
839: [16:07:19] * webguest has joined #silverstripe
840: [16:07:23] * henkpoley quit (Remote host closed the connection)
841: [16:08:06] * FireMe quit (Ping timeout: 256 seconds)
842: [16:08:44] <webguest> how can i filter a DataObject again? i want to get all members from a specific group... but also with a filter: $Group4 = DataObject::get_one('Group', "\"Title\" = 'Dealers'"); .... $Group4->Members ($filter = DistributorID = {$m->ID}")
843: [16:08:46] <webguest> something like this
844: [16:10:21] <willmorgan> webguest: what version of SS?
845: [16:10:27] <webguest> 2,4,10
846: [16:10:52] <willmorgan> webguest: how far have you got with your current code? paste on www.sspaste.com if you can
847: [16:11:30] <webguest> http://paste2.org/bPkNvGeh
848: [16:11:58] <webguest> line 54
849: [16:16:14] <willmorgan> how are dealers linked to distributors?
850: [16:16:29] <willmorgan> i see you have several groups
851: [16:16:44] * FireMe has joined #silverstripe
852: [16:17:01] <willmorgan> oh, i think i see
853: [16:17:03] <webguest> i have a has_one
854: [16:17:11] <webguest> so a member-member relation
855: [16:17:16] <willmorgan> yeah, i see that now. :) thanks.
856: [16:17:21] <webguest> ty
857: [16:17:44] <webguest> Customer - Dealer = DealerID Dealer - Distributor = DistributorID
858: [16:18:26] <willmorgan> DataObject::get('Member', 'DistributorID = ' . (int) $m->ID);
859: [16:18:47] <willmorgan> your query would be spot on if you were writing SQL - just the framework is different
860: [16:19:03] <webguest> this was my first guess, too, see commented in the code, but a customer might also have a DistributorID
861: [16:19:24] <webguest> and i only want to see dealers
862: [16:19:32] * UncleCheese_ quit (Quit: UncleCheese_)
863: [16:19:39] <FireMe> example posted, im going to go and shoot some arrows now
864: [16:19:52] <willmorgan> okay, please keep away from schools
865: [16:20:00] <webguest> (:
866: [16:20:08] <willmorgan> webguest: how about...
867: [16:21:08] <willmorgan> ah shit
868: [16:21:15] <willmorgan> you will probably need to write custom SQL for this, i'm afraid
869: [16:21:36] <willmorgan> query the Group_Members table and basically do an inner join to Members where DistributorID = $m->ID
870: [16:21:45] <willmorgan> 90% sure that will do what you want
871: [16:21:47] <willmorgan> have you done that before?
872: [16:22:43] <webguest> not yet
873: [16:22:50] <willmorgan> lol
874: [16:22:56] <willmorgan> someone in here will disagree with me
875: [16:23:00] <webguest> in native SQL i might me able to do this, but the SS way is more difficult
876: [16:23:10] <willmorgan> but the fastest way is to literally write the SQL is just DB::query($yourSQL);
877: [16:23:24] <willmorgan> and then you just load it in to the dataobjectset
878: [16:23:26] <webguest> hmm, cant you filter a DataObject for the 2nd time? :D
879: [16:23:55] <willmorgan> not in SS2.4
880: [16:23:59] <webguest> hmm ok
881: [16:24:07] <webguest> thx, ill try it like you suggested
882: [16:24:11] <willmorgan> in 3+, you can, because they wrote a sick-ass class called DataList
883: [16:24:25] <willmorgan> you know you've written a good ORM when you rage out DBAs
884: [16:25:22] <webguest> btw how is SS 3 at the moment? when i tried it 6 months ago it was very slow, and buggy (preview, newsletter module, bulkUpload), no good (fast) alternative for managing DataObjects.. but how is at the moment? i do believe it is great in a short while
885: [16:25:46] <willmorgan> webguest: the agency I work at has been using SS3 since about November last year
886: [16:26:00] <willmorgan> we've been running SS3.1 for the most part and simply patching as we go along
887: [16:26:01] <willmorgan> it's amazing
888: [16:26:13] <willmorgan> my advice is to skip 3.0 altogether and go for 3.1 beta
889: [16:26:15] <willmorgan> it's pretty stable
890: [16:26:22] <willmorgan> patches going in all the time
891: [16:26:29] <webguest> and how are the modules?
892: [16:26:38] <webguest> and how do you manage DataObjects?
893: [16:26:38] <willmorgan> in fact, it's the base branch now: https://github.com/silverstripe/silverstripe-framework
894: [16:26:45] <willmorgan> what modules in particular?
895: [16:26:56] <webguest> like newsletter
896: [16:27:01] <webguest> a lot of ppl want that
897: [16:27:27] <webguest> when i tested it 6 months ago it was buggy
898: [16:27:48] <webguest> and my SS 3 was slower compared to SS 2.4
899: [16:28:12] <willmorgan> webguest: the newsletter module appears to support 3 at the moment
900: [16:28:18] <willmorgan> https://github.com/silverstripe/silverstripe-framework (see the require: block)
901: [16:29:18] <willmorgan> managing dataobjects is done using GridField/ModelAdmin
902: [16:29:33] <willmorgan> judging from the mailing list, there might be some cool new stuff coming in for that soon
903: [16:29:38] <webguest> yes i tried that, but i t was also slow, having to save first, before you could upload images
904: [16:29:50] <willmorgan> speedwise, yes, 3.0 is slower than 2.4, but 3.1 is faster than 3.0
905: [16:29:55] <webguest> ok
906: [16:30:06] <willmorgan> 3.1 is about the same speed as 2.4, IMHO.
907: [16:30:08] <webguest> i thought maybe it was my server, im on shared hosting with PHP Version 5.3.3-7+squeeze14
908: [16:30:10] <willmorgan> i'm not benchmarking or anything
909: [16:30:16] <webguest> imho?
910: [16:30:21] <willmorgan> In My Humble Opinion
911: [16:30:22] <catcher> I have a DataExtension that defines a property via static $db. I'm trying to access it in onBeforeWrite() in the same extension, and it's telling me the property isn't defined. What am I missing?
912: [16:30:41] <willmorgan> catcher: as always, paste your code
913: [16:30:58] <UndefinedOffset> catcher you need to use $this->owner->MyProperty
914: [16:30:59] <webguest> willmorgan, do you know when 3.1 is released?
915: [16:31:02] <willmorgan> webguest: upgrade your hosting. 5.3.19 is pretty sweet
916: [16:31:12] <willmorgan> webguest: i don't know. there are a few things left to do on the roadmap - maybe chillu knows
917: [16:31:12] <catcher> owner, duh - thanks UndefinedOffset
918: [16:31:17] <UndefinedOffset> np ;)
919: [16:31:23] <webguest> well, im on shared hosting
920: [16:31:28] <webguest> so no control over php
921: [16:31:50] <catcher> I finally remembered when it was called decorator, and now... :)
922: [16:32:38] <willmorgan> you can still "upgrade" your hosting ;)
923: [16:33:38] * popeshoe quit (Quit: Leaving)
924: [16:34:18] <webguest> really, how?
925: [16:35:34] <willmorgan> by changing to a better provider
926: [16:36:07] <catcher> webguest, some shared hosts let you choose your php version with .htaccess (or equivalent)
927: [16:36:15] * chillu quit (Quit: chillu)
928: [16:36:21] <willmorgan> 5.3.3 was released back in 2010
929: [16:36:22] <webguest> oh, yes, i know :P but this one doesn't ..
930: [16:36:33] <willmorgan> 5.3.25 is the latest
931: [16:44:04] * sewid has joined #silverstripe
932: [16:46:26] <webguest> willmorgan: http://paste2.org/A3fGAtvM - is this what you ment?
933: [16:46:26] * sewid quit (Client Quit)
934: [16:46:43] <webguest> im getting an error,
935: [16:46:56] <willmorgan> yeah, you will do
936: [16:47:05] <willmorgan> "JOIN GROUP ON GROUP"
937: [16:47:13] <willmorgan> group is a table name and a reserved word
938: [16:47:19] <webguest> [User Error] Couldn't run query: SELECT "Member"."ClassName", "Member"."Created", ...
939: [16:47:58] <willmorgan> webguest: http://paste2.org/vIYh35bn
940: [16:48:48] <willmorgan> actually, do you even need the group at all?
941: [16:48:54] <willmorgan> i don't think you need to join the group table
942: [16:49:05] <webguest> yes
943: [16:49:13] <webguest> so i know for sure we find dealers
944: [16:49:16] <willmorgan> you're not passing in any group id!
945: [16:49:55] <webguest> but im searching on title
946: [16:50:06] <willmorgan> webguest: http://paste2.org/et6Kfzpw
947: [16:50:12] <willmorgan> but you already have $Group4 loaded
948: [16:50:34] <willmorgan> less joins = simpler to understand for both man and machine = faster queries
949: [16:51:07] <webguest> hmm couldnt run query again
950: [16:51:17] <willmorgan> do you have this publically accessible?
951: [16:51:27] <willmorgan> it'd help if i could just see the error
952: [16:51:34] <willmorgan> if it's a DB error, it's likely to be further down at the end of the actual error message
953: [16:53:39] <webguest> well, its getting late, my hungry :) and for now the previous code works
954: [16:53:42] <webguest> so super thx
955: [16:53:55] <willmorgan> okay no worries
956: [16:54:06] <willmorgan> i'll be on a little bit later so tag me then if you want to improve it
957: [16:54:31] <webguest> thx
958: [16:55:21] <UncleCheese> who here uses GridField Better Buttons?
959: [16:58:59] * webguest quit (Ping timeout: 250 seconds)
960: [17:01:02] * UncleCheese_ has joined #silverstripe
961: [17:13:58] * jrthomer quit (Remote host closed the connection)
962: [17:14:55] * jrthomer has joined #silverstripe
963: [17:16:09] * zfmf1 has left #silverstripe
964: [17:16:24] * UncleCheese_ quit (Quit: UncleCheese_)
965: [17:17:30] * priithansen has joined #silverstripe
966: [17:26:00] * ivoba quit (Quit: Leaving)
967: [17:36:42] * UncleCheese quit (Quit: UncleCheese)
968: [17:45:09] * willmorgan quit (Ping timeout: 248 seconds)
969: [18:01:43] <catcher> Anyone have tricks for debugging onBeforeWrite? Tough to see what's happening when it hangs before it can respond.
970: [18:03:08] <catcher> Ah, I suppose I can just return instead of dying
971: [18:05:13] * r3v3rb has joined #silverstripe
972: [18:06:46] * r3v3rb has left #silverstripe
973: [18:08:28] <catcher> I need to run this new onBeforeWrite for a couple thousand objects. Any better way than a BuildTask that gets & writes them all, maybe with a delay?
974: [18:11:11] <FrozenFire> That'd be the only way, really.
975: [18:11:17] <FrozenFire> You'll want to start a transaction first, though.
976: [18:11:52] <FrozenFire> DB::getConn()->transactionStart(); foreach(MyDO::get() as $object) $object->write(); DB::getConn()->transactionEnd();
977: [18:12:52] <catcher> FrozenFire, interesting, thanks. Will that freeze other DB activity until the atomic-ized operation is done?
978: [18:13:42] <FrozenFire> Transactions buffer the actual write operations until you end the transaction. This way, you don't perform a huge number of small writes. It collects all the writes that happen in the transaction, and do them as a bulk update.
979: [18:13:59] <FrozenFire> For very large updates like yours, that can mean 500% performance increase, if not more.
980: [18:14:29] <FrozenFire> It also means that if something causes an error during the process, it won't write the half-finished transaction.
981: [18:14:39] <FrozenFire> It can be very memory intensive, though.
982: [18:14:39] <catcher> very good to know, ty
983: [18:14:54] <FrozenFire> This happens on the DBMS-level, though, just so you know.
984: [18:15:00] <FrozenFire> It's part of most database systems
985: [18:15:04] <catcher> So I guess that'd prevent the need for inserting a delay
986: [18:16:26] <FrozenFire> Definitely.
987: [18:16:50] <FrozenFire> Transactions should drastically reduce performance loss.
988: [18:17:09] * miniprawn has joined #silverstripe
989: [18:18:38] <miniprawn> is there any builtin way to get a download link to a File? to force "save as"-dialog?
990: [18:18:51] <miniprawn> a pdf in this case
991: [18:34:34] * sewid has joined #silverstripe
992: [18:36:36] * sewid quit (Client Quit)
993: [18:38:13] * miniprawn quit (Ping timeout: 250 seconds)
994: [18:46:39] * UncleCheese has joined #silverstripe
995: [19:00:50] * Rovio_ has joined #silverstripe
996: [19:01:34] * Rovio_ quit (Client Quit)
997: [19:01:36] * gordon__ quit (Read error: Connection reset by peer)
998: [19:02:40] * lerni has joined #silverstripe
999: [19:13:36] * sewid has joined #silverstripe
1000: [19:17:58] * sewid quit (Ping timeout: 256 seconds)
1001: [19:25:35] * FireMe has joined #silverstripe
1002: [19:26:01] <FireMe> back from shooting my arrows
1003: [19:26:38] <FrozenFire> Is that a euphemism for something?
1004: [19:26:53] <FireMe> no lol
1005: [19:27:25] <FireMe> i shoot a recurve bow
1006: [19:28:42] <onre> :D
1007: [19:28:44] <onre> great conversation
1008: [19:30:22] * micmania1 has joined #silverstripe
1009: [19:33:30] <FireMe> a little off topic thow, lets get back to talking about silverstripes, i saw a really good silver stripe down the road the other day.
1010: [19:37:23] <lerni> can anybody tell me why RedirectorPage shows up in sitemap.xml. Its easy to hack but I ask myself is this a bug or a feature?
1011: [19:38:53] * micmania1 quit (Ping timeout: 250 seconds)
1012: [19:40:26] <lerni> if the redirector page is in the sitemap.xml it shows the link of the page where it redirects and this means the items show up two times
1013: [19:42:10] * UncleCheese_ has joined #silverstripe
1014: [19:42:24] <lerni> so you can find the same item with for example priority .9 & .8 or what ever
1015: [19:42:32] * UncleCheese_ quit (Client Quit)
1016: [19:42:44] * micmania1 has joined #silverstripe
1017: [19:43:55] * UncleCheese_ has joined #silverstripe
1018: [19:48:45] * lerni quit (Remote host closed the connection)
1019: [19:48:50] * lerni has joined #silverstripe
1020: [19:50:03] * UndefinedOffset quit (Read error: Connection reset by peer)
1021: [19:51:08] * UncleCheese_ quit (Quit: UncleCheese_)
1022: [19:51:33] <FrozenFire> lerni, It'd need special logic to ignore RedirectorPage
1023: [19:51:44] <FrozenFire> Since RedirectorPage is just a Page
1024: [19:51:48] <FrozenFire> Nothing particularly special about it
1025: [19:55:18] <catcher> regex fun- This truncates at a word boundary: http://sspaste.com/paste/show/51968b0700174
1026: [19:55:35] <catcher> I need to truncate at a hyphen boundary, and the obvious things aren't working.
1027: [19:56:08] * sewid has joined #silverstripe
1028: [19:56:08] * SightUnseen has joined #silverstripe
1029: [19:56:23] * SightUnseen has left #silverstripe
1030: [19:56:38] <catcher> I suppose I could convert hyphens to spaces before running it through & then converting back, but that seems like cheating.
1031: [19:56:53] <lerni> FrozenFire i'm poking around with it atm. redirector pages are gone but still see some duplicates...
1032: [20:00:31] <catcher> Ah, got it
1033: [20:00:45] * Shrike_Finland has joined #silverstripe
1034: [20:13:25] * zfmf1 has joined #silverstripe
1035: [20:14:55] * simon_w|air quit (Quit: This computer has gone to sleep)
1036: [20:17:53] <FireMe> am i doing this line incorrect? $holder = EventsHolder::get()->First()->Where("StartDate >= DATE(NOW())");
1037: [20:18:51] <FrozenFire> Yes
1038: [20:19:08] <FrozenFire> Specify what you want, then which of them you want.
1039: [20:19:33] <FrozenFire> You're saying "Get my the EventsHolders. Now get me the first one. Now, first one, please where my this"
1040: [20:19:48] <FrozenFire> Get me**
1041: [20:23:55] <FireMe> return ($holder) ? Event::get()->filter('ParentID', $holder->ID)->where("EventID = {$this->ID} AND Date >= DATE(NOW())")->sort('Date ASC')->limit($num) : false;?
1042: [20:24:27] <FrozenFire> Blegh. Ternary with complex statements
1043: [20:25:06] <FireMe> ok that dont work :-(
1044: [20:32:34] <FireMe> this is my line that works, but i dont want it to show events in the past return ($holder) ? Event::get()->filter('ParentID', $holder->ID)->sort('Date ASC')->limit($num) : false;
1045: [20:34:55] * sewid quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
1046: [20:35:50] * SightUnseen1 has joined #silverstripe
1047: [20:36:05] * SightUnseen1 has left #silverstripe
1048: [20:41:29] * FireMe-iphone has joined #silverstripe
1049: [20:42:54] * FireMe-iphone quit (Remote host closed the connection)
1050: [20:44:02] * pevjan has joined #silverstripe
1051: [20:49:01] <FrozenFire> FireMe, Just to be clear, you should almost never use where.
1052: [20:49:12] <FrozenFire> Always use filter, unless you have a good reason otherwise
1053: [20:49:22] <FireMe> ok
1054: [20:49:54] <FireMe> how would you do date >= date now?
1055: [20:49:57] * micmania1 quit (Ping timeout: 250 seconds)
1056: [20:49:59] <FrozenFire> Event::get()->filter(array( "ParentID" => $holder->ID, "EventID" => $this->ID, "Date:GreaterThan" => date("c")))
1057: [20:50:06] <lerni> CURDATE()
1058: [20:50:35] <lerni> no where :-)
1059: [20:50:37] <lerni> where('"Date" >= CURDATE()')
1060: [20:50:45] <FrozenFire> Don't do that
1061: [20:50:49] <FrozenFire> That's MySQL-specific
1062: [20:51:40] <lerni> ok I see
1063: [20:51:58] <FrozenFire> Using a GreaterThan filter with date("c") will suffice for 99% of cases.
1064: [20:55:14] <FrozenFire> Though you might want to set the time on the date to be the beginning of the day
1065: [20:55:43] <FireMe> ($holder) ? Event::get()->filter(array( "ParentID" => $holder->ID, "ID" => $this->ID, "Date:GreaterThan" => date("c")))->limit($num) : false; not display any dates at all?
1066: [20:55:59] <FrozenFire> E.g. date("c", mktime(0, 0, 0))
1067: [20:56:16] <FrozenFire> Since date("c") will use the current time
1068: [20:56:24] <FrozenFire> And the time on the event might be that day, but earlier than now.
1069: [20:59:38] * zfmf1 has left #silverstripe
1070: [21:03:59] * willmorgan has joined #silverstripe
1071: [21:08:45] * WillM has joined #silverstripe
1072: [21:15:44] * pevjan quit (Remote host closed the connection)
1073: [21:19:29] <FireMe> this is my full function does not return any events now, but there are future events in the system https://gist.github.com/FireMe/4f7e5e634a3a1f1fbac2
1074: [21:27:39] * UncleCheese quit (Quit: UncleCheese)
1075: [21:27:49] <FrozenFire> Well, that's sort of a duh situation
1076: [21:28:01] <FrozenFire> If you limit the ID of the event to the ID of the current object, then you're going to have issues
1077: [21:28:15] <FrozenFire> At best, it'll just return the current object
1078: [21:28:27] <FrozenFire> But I suspect that you're placing this method on your holder.
1079: [21:28:49] <FrozenFire> Try taking a step back and think about what you're doing a bit.
1080: [21:29:04] * pevjan has joined #silverstripe
1081: [21:29:06] <FrozenFire> You have EventsHolder, which is serving as the parent to a bunch of Events.
1082: [21:29:32] <FireMe> yes
1083: [21:29:36] <FrozenFire> If each Event has_one EventsHolder as Parent, then yeah, it'll be ParentID
1084: [21:29:48] <FrozenFire> But is it "Parent" => "EventsHolder"?
1085: [21:31:14] <FireMe> i think i got this from the tutorial on latest news on homepage, will have to have a look at it again
1086: [21:31:24] <FrozenFire> There isn't a whole lot of magic in the SS ORM.
1087: [21:31:42] <FrozenFire> The name you give a has_one is how its field is defined.
1088: [21:31:57] <FrozenFire> So naming a has_one "Parent" means that it'll just create a field called "ParentID"
1089: [21:32:05] <FrozenFire> There's nothing magical about the word "Parent" in SS
1090: [21:35:15] * pevjan quit (Remote host closed the connection)
1091: [21:38:39] * Nightjar has joined #silverstripe
1092: [21:38:41] * kerosene quit (Ping timeout: 256 seconds)
1093: [21:39:34] <FireMe> is silverstripe based on zend?
1094: [21:40:30] <FrozenFire> No. It does use a couple of ZF1 components, though
1095: [21:40:49] <FrozenFire> I think the two main ones are Zend_Locale and Zend_Cache
1096: [21:41:00] * kerosene has joined #silverstripe
1097: [21:41:28] <FireMe> ive got this training course on zend from lynda.com, and wondering if it would help me with silverstripe?
1098: [21:45:59] <FrozenFire> Most likely not.
1099: [21:46:12] <FrozenFire> As well, most people are moving away from ZF1 to ZF2
1100: [21:46:21] <FrozenFire> And SS is nothing like ZF2
1101: [21:46:35] <FrozenFire> I mean, they're both "MVC" in a sense, but not much similarity beyond that.
1102: [21:47:57] <FireMe> its hard to learn, you do php, then silverstripe changes alot of the coding style so its hard to do for me
1103: [21:49:31] <FrozenFire> SilverStripe does have a very steep learning curve. But it's pretty simple once you actually understand it
1104: [21:49:43] <FrozenFire> I hope you have read through all of the SilverStripe tutorials
1105: [21:49:51] <FrozenFire> Since they're unusually useful
1106: [21:50:03] <FrozenFire> That is, most tutorials suck. SilverStripe's are really good.
1107: [22:01:21] * lerni quit (Remote host closed the connection)
1108: [22:13:53] * willr_ has joined #silverstripe
1109: [22:13:53] * willr_ quit (Changing host)
1110: [22:13:53] * willr_ has joined #silverstripe
1111: [22:17:10] * ^pH- has joined #silverstripe
1112: [22:17:59] * pevjan has joined #silverstripe
1113: [22:20:25] <pevjan> I get the following error when loading the start page on my 3.0.5 site: "PHP Fatal error: Object::add_extension() - Can't find extension class for "SiteTreeFileExtension" in [path]/framework/core/Object.php on line 524"
1114: [22:20:35] <pevjan> any idea what it is?
1115: [22:20:37] * ^pH quit (Ping timeout: 256 seconds)
1116: [22:29:05] * willr_ quit (Quit: willr_)
1117: [22:33:09] <FireMe> i have just installed the mathspamprotector but its saying spam protection solution incorrect all the time?
1118: [22:33:47] <FireMe> oh you gotto write out eight not 8
1119: [22:36:28] * willr_ has joined #silverstripe
1120: [22:37:37] <willr_> pevjan - you need to update your modules
1121: [22:37:46] <willr_> or get the correct version*
1122: [22:38:07] <willr_> Might have the 3.1 supported version of the module
1123: [22:38:16] <pevjan> willr_: thanks. How do I know which is the correct version? I was hoping Composer would handle that for me :)
1124: [22:38:51] <willr_> it should ideally. Check the composer.json file for each of your modules. It could also be your custom extensions
1125: [22:39:44] <pevjan> willr_: I don't believe I have custom extensions, so it is probably the blog plugin. I'll try to get an earlier version of it.
1126: [22:40:32] <willr_> I assume you've tried the usual dev/build to clear the mainfest
1127: [22:41:56] <pevjan> I have, yes
1128: [22:42:49] * joelpittet has joined #silverstripe
1129: [22:52:04] * priithansen quit (Quit: priithansen)
1130: [22:55:45] * joelpitt_ has joined #silverstripe
1131: [22:56:24] * joelpittet quit (Ping timeout: 256 seconds)
1132: [23:00:22] <pevjan> willr_: it works now, thanks!
1133: [23:01:15] <pevjan> I am using the blog plugin, but I want to make some customizations to the blog page templates. Any ideas on how to be able to customize it, yet update it when new releases are made without it overwriting my changes?
1134: [23:01:32] <pevjan> The changes I want to make are adding a sidebar navigation. Can I eat the cake and have it?
1135: [23:03:42] <willr_> Have you seen how themes work? You can customise the template by copying the template file to yourtheme/templates
1136: [23:04:09] <willr_> if you need to alter the functionality, see dataextensions
1137: [23:04:43] <pevjan> willr_: apparently I didn't understand how themes work, I didn't know you could override it in your own theme folder
1138: [23:05:40] <willr_> Doesn't have to be a template as well, mysite/templates/BlogPage.ss will override blog/templates/BlogPage.ss so you can easier have your own templates outside of the module
1139: [23:07:30] <FireMe> how does a gridfield determine what width a column should be?
1140: [23:08:34] <willr_> FireMe probably in the same way a table does in html
1141: [23:08:47] * kerosene quit (Ping timeout: 256 seconds)
1142: [23:12:17] * joelpitt_ quit (Remote host closed the connection)
1143: [23:12:55] * catcher quit (Quit: Leaving)
1144: [23:13:18] <FireMe> just seems abit random i have a surname field and its half the size width as a single digit number field
1145: [23:16:08] <willr_> You could probably use css to style each cell
1146: [23:17:49] <FireMe> when you drag the browser width to 1/4 the size it looks fine

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