#silverstripe IRC Log

IRC log for 9 June 2013

All timestamps are in UTC.

1: [00:23:02] * funkygibbon has joined #silverstripe
2: [00:38:55] * priithansen has joined #silverstripe
3: [00:58:59] * pippy quit (Ping timeout: 252 seconds)
4: [01:00:29] * pippy has joined #silverstripe
5: [01:18:53] * priithansen quit (Quit: priithansen)
6: [01:25:24] * mattybalaam quit (Quit: mattybalaam)
7: [01:57:10] * mattybalaam has joined #silverstripe
8: [01:57:32] * mattybalaam quit (Client Quit)
9: [01:59:49] * pex quit (Quit: pex)
10: [02:08:17] * kerosene quit (Ping timeout: 256 seconds)
11: [02:38:01] * gelignite quit (Quit: http://bit.ly/nkczDT)
12: [02:42:35] * kerosene has joined #silverstripe
13: [03:02:17] * Motoservo quit (Quit: Motoservo)
14: [03:03:54] * RojoD has joined #silverstripe
15: [03:03:55] * RojoD quit (Changing host)
16: [03:03:55] * RojoD has joined #silverstripe
17: [03:06:00] * Motoservo has joined #silverstripe
18: [03:08:43] * RojoD quit (Ping timeout: 248 seconds)
19: [03:11:16] * Motoservo quit (Read error: Connection reset by peer)
20: [03:18:07] * Motoservo has joined #silverstripe
21: [03:53:42] * willr has joined #silverstripe
22: [03:59:10] * cloph_away has joined #silverstripe
23: [04:00:06] * cloph_away1 quit (Ping timeout: 276 seconds)
24: [04:08:54] * lewellyn quit (Ping timeout: 245 seconds)
25: [04:28:00] <willr> irouge, we got our new cyberoam in the office today. Flash little thing!
26: [04:28:11] <willr> irogue* damn autocorrect
27: [04:34:14] * DigNZ1 quit (Quit: DigNZ1)
28: [05:55:16] * DigNZ has joined #silverstripe
29: [05:56:07] * DigNZ quit (Client Quit)
30: [06:01:12] * DigNZ has joined #silverstripe
31: [06:01:14] * DigNZ quit (Client Quit)
32: [06:43:31] * Hippieee quit (Quit: Leaving)
33: [07:20:51] * Hippiee has joined #silverstripe
34: [07:32:31] * lenix has joined #silverstripe
35: [07:35:50] * discorpi1 has joined #silverstripe
36: [07:38:29] * ss-log quit (Ping timeout: 276 seconds)
37: [07:38:33] * discorpia quit (Ping timeout: 276 seconds)
38: [07:38:35] * lenix- quit (Ping timeout: 276 seconds)
39: [07:38:48] * ss-log has joined #silverstripe
40: [07:38:50] * ss-log quit (Changing host)
41: [07:38:50] * ss-log has joined #silverstripe
42: [07:41:54] * Hippiee quit (Read error: Connection reset by peer)
43: [08:02:08] * willr quit (Quit: willr)
44: [08:14:47] * kot-obomot has joined #silverstripe
45: [08:23:21] * kot-obomot quit (Ping timeout: 250 seconds)
46: [08:56:30] * zippy__ has joined #silverstripe
47: [09:14:47] * Guits quit (Ping timeout: 256 seconds)
48: [09:22:11] * lewellyn has joined #silverstripe
49: [09:43:27] * zippy__ quit (Quit: zippy__)
50: [10:51:05] * priithansen has joined #silverstripe
51: [11:09:48] * RojoD has joined #silverstripe
52: [11:09:48] * RojoD quit (Changing host)
53: [11:09:48] * RojoD has joined #silverstripe
54: [11:38:01] * priithansen quit (Quit: priithansen)
55: [11:43:14] * mattybalaam has joined #silverstripe
56: [11:46:44] * gelignite has joined #silverstripe
57: [11:46:48] * osterlaus has joined #silverstripe
58: [12:08:15] * gumble has joined #silverstripe
59: [12:09:40] <gumble> hey, I have a few uploadFields for my images. it all worked great. but now, if I upload a image, the cms just adds a new field underneath the image, but I don't want that multiple images can be uploaded under 'subtitle'? how do I change that
60: [12:28:34] <mattybalaam> Is it a has_one?
61: [12:42:55] * Liquide has joined #silverstripe
62: [12:47:49] <gumble> yes that's what I figured out too, thanks anyways
63: [12:48:13] <gumble> it wasn't I copied the code and just changed the uploadfields not the has one
64: [13:34:45] * gumble quit (Ping timeout: 264 seconds)
65: [13:36:55] * Hippiee has joined #silverstripe
66: [13:52:52] * guest1451 has joined #silverstripe
67: [13:53:09] * guest1451 quit (Changing host)
68: [13:53:09] * guest1451 has joined #silverstripe
69: [13:59:19] <mattybalaam> I have a many_many relationship between a data object, and a selection of tags, using the silverstripe-tagfield module. However listing these tags gives me too many results to be useful on a page of links. How might I got about only showing tags in the list if they are on more than a set amount (e.g. 3) dataobjects?
70: [14:00:15] <mattybalaam> So far I have been trying to use the examples on this page as a base, and then using $Children.count http://doc.silverstripe.org/framework/en/howto/grouping-dataobjectsets
71: [14:01:40] <mattybalaam> Which is easy when counting basic $db records. But I can’t work out how to combine this method with a many-many join table
72: [14:12:51] <guest1451> I've been following this http://doc.silverstripe.org/framework/en/topics/forms and have written a template for my form however I can't seem to get it to refill the form with the post data when server side validation fails. Here's a paste for some context http://pastie.org/private/wyftqbfixfpdi4kv9cwloa
73: [14:50:47] * LoveDuckie has joined #silverstripe
74: [14:51:16] <LoveDuckie> Anybody know of a way of getting a db field from within the PageController of a Page?
75: [14:51:36] <LoveDuckie> Trying to write a function within a page controller that returns a field in particular.
76: [15:15:02] * willmorgan has joined #silverstripe
77: [15:20:28] <LoveDuckie> doing $this->Field from the Page_Controller doesn't seem to yield the results that I am after.
78: [15:21:05] * zfmf1 has joined #silverstripe
79: [15:25:56] * Hippiee quit (Quit: Leaving)
80: [15:31:06] <mattybalaam> How do I call in a many_many into a function? Usually I can make a function like return CustomImage::get(), but how might I do this with a jointable, e.g. CustomImage_Tags ?
81: [15:33:06] <mattybalaam> Silverstripe 3 by the way.
82: [15:39:03] <mattybalaam> I wish to count the occurrence of every TAGID in the CustomImage_Tags table
83: [15:53:37] * priithansen has joined #silverstripe
84: [16:26:59] * guest1451 has left #silverstripe
85: [16:47:40] * willmorgan quit (Ping timeout: 245 seconds)
86: [17:11:55] * RojoD quit (Ping timeout: 256 seconds)
87: [17:42:40] * RojoD has joined #silverstripe
88: [17:42:41] * RojoD quit (Changing host)
89: [17:42:41] * RojoD has joined #silverstripe
90: [17:48:19] * funkygibbon quit (Ping timeout: 245 seconds)
91: [18:03:09] * gumble has joined #silverstripe
92: [18:05:36] <gumble> can I somehow <% if pagetype="mypagetype" %> ?
93: [18:29:33] <gumble> and how would I do <% if parent->children %>? the .ss template documentation dosn't help me at all
94: [18:38:52] <mattybalaam> Yes, are on using 3 or 2.4?
95: [18:39:46] <mattybalaam> On 3 you use <% if ClassName = myPageType %>
96: [18:40:10] <mattybalaam> I think on 2.4 it needs to be <% if ClassName = $myPageType %> but a bit rusty
97: [18:42:37] * funkygibbon has joined #silverstripe
98: [18:43:04] <mattybalaam> Perhaps try something like <% control Parent %> <% if ClassName = $myParentType %>
99: [18:43:39] <mattybalaam> Not testing these by the way, you could also try <% if Parent.ClassName = $myParentType %
100: [18:45:19] * mattybalaam quit (Quit: mattybalaam)
101: [18:51:43] * funkygibbon quit (Ping timeout: 246 seconds)
102: [18:52:25] * priithansen quit (Quit: priithansen)
103: [19:08:24] <gumble> mattybalaam, thanks!
104: [19:08:53] <gumble> and is there any function like $Number
105: [19:09:03] <gumble> I want a menu where the childrens are listed as numbers
106: [19:09:03] <gumble> 1
107: [19:09:04] <gumble> 2
108: [19:09:04] <gumble> 3
109: [19:10:32] <gumble> can I somehow get their position number or something?
110: [19:17:48] <gumble> found it nm
111: [19:21:51] * Peavers has joined #silverstripe
112: [19:22:37] * Peavers quit (Client Quit)
113: [19:25:38] * SightUnseen has joined #silverstripe
114: [19:29:13] * SightUnseen has left #silverstripe
115: [19:40:03] * mento has joined #silverstripe
116: [19:48:10] * priithansen has joined #silverstripe
117: [19:48:24] * DigNZ has joined #silverstripe
118: [19:48:53] * DigNZ quit (Client Quit)
119: [20:03:19] * willmorgan has joined #silverstripe
120: [20:06:24] * DigNZ has joined #silverstripe
121: [20:06:24] * DigNZ quit (Client Quit)
122: [20:32:58] * Peavers has joined #silverstripe
123: [20:35:26] <Peavers> Good folks,
124: [20:35:38] * osterlaus quit (Quit: Leaving.)
125: [20:36:37] * DigNZ has joined #silverstripe
126: [20:36:38] * DigNZ quit (Remote host closed the connection)
127: [20:36:52] * DigNZ has joined #silverstripe
128: [20:38:10] <Peavers> I'm looking for the best way to get a list of all members, but a lot of suggestions on forums etc are saying to use DataObject::get("SQL Statement") - Surely thats not the cleanest way?
129: [20:38:17] * nickmolhoek has joined #silverstripe
130: [20:38:18] * nickmolhoek quit (Remote host closed the connection)
131: [20:38:32] * nickmolhoek has joined #silverstripe
132: [20:39:33] <ss23> Peavers: When you say "list", do you mean to like, display a paginated list, or to use programatically?
133: [20:39:52] <Peavers> sorry, a string.
134: [20:40:02] <Peavers> or array,
135: [20:40:33] <ss23> An array? So thats you want it programtically? What for? You need to provide lots more details, Peavers!
136: [20:41:11] <Peavers> lol, I want to create a row of checkboxes in the cms the user can check or uncheck each member
137: [20:42:06] <ss23> Does it not suport foreach (Members::get() as $member) {?
138: [20:42:15] <ss23> But it sounds like you would want something paginated, which would involve a limit
139: [20:42:30] <Peavers> why would I need a limit?
140: [20:42:34] <Peavers> if I wanted all members?
141: [20:42:44] <Peavers> (Im nub, just intreasted as to why)
142: [20:43:00] <ss23> Because normally in a user interface, showing every possible member at once is bad. Lets say you had 500 members, users would wnat to be able to do it in 20 user chunks or so
143: [20:43:17] <ss23> If you know you won't have lots of members, you probably won't need it I guess
144: [20:43:19] <Peavers> this is true, but luckly its never going to have more than 15 members
145: [20:43:24] <ss23> but if you were making a module for other people, I would think about pagination
146: [20:43:36] <Peavers> thats a good point
147: [20:44:56] <ss23> If the get() by itself doesn't work, I would try like get()->filter(); or somethign to "trick" it
148: [20:45:01] <ss23> Shouldn't need raw SQL
149: [20:45:26] <Peavers> yeah didn't think s
150: [20:45:27] <Peavers> so
151: [20:52:34] <Peavers> Could I do something like " $fields->addFieldToTab('Root.Main', new CheckboxField('$member'));"
152: [20:52:40] <Peavers> or do I need to do something with $member first?
153: [20:52:53] <ss23> Eh, unlikely....
154: [20:53:35] <ss23> Peavers: Why not have a look at the code of how the CMS does it already? Doesn't it have a sectino built in for things like editing members? That would give you an idea right?
155: [20:54:11] <Peavers> Yeah I'm already going off the BlogHolder
156: [20:54:19] <Peavers> as it has a dropdown of all members
157: [20:55:23] * willmorgan quit (Read error: Connection reset by peer)
158: [20:55:48] * spronk has left #silverstripe
159: [20:57:48] * mento quit (Ping timeout: 250 seconds)
160: [21:02:40] <gumble> how do I access the third child of an element? I have to have a "forward" and "backwards" link which always switches to the next or last child, I dunno how to do that
161: [21:02:53] <ss23> gumble: In jQuery? In DOM?
162: [21:04:02] <gumble> ss23, not a backwards like the browser-backwards. I have the childs listed in a menue like "1", "2", "3", .. and forwards has to link from page nr 5. to nr. 6
163: [21:04:12] <gumble> I shouldn't need javascript for that
164: [21:05:03] <gumble> backwards would always link from on the child before. so if you are on child nr. 4 backwards would link to child nr. 3
165: [21:06:06] <ss23> Sorry, I don't understand. You're talking about the Silverstripe templating system thoguh?
166: [21:12:27] <gumble> ss23, yes, I have a menu like: loop childs -> <a href="link">$Pos</a> and I have to have a <a href="-1"> which links from child nr 5 to 4 and from 4 to 3 and a forward link <a href="+1"> which links from 1 to 2 and 2 to 3 and so on.... hard to explain
167: [21:12:48] <gumble> I need to know what to put instead -1 and +1 or how to write a function which does something like that
168: [21:12:59] <ss23> Yeah, I think I get the idea, but no idea osrry
169: [21:13:12] * spronk has joined #silverstripe
170: [21:13:12] <ss23> I hate the Silverstripe templating system specifically cause I don't know how to do stuff like this :P
171: [21:14:04] <gumble> yes, I would need something like nthChildOf()
172: [21:18:35] * chillu has joined #silverstripe
173: [21:19:01] <gumble> is there a better way to do: <% loop $Children %><% if $Pos=3 %>.... ? I'd have to loop 3 time through children elseways
174: [21:27:33] * MrJeremy has joined #silverstripe
175: [21:28:08] <gumble> paginatedlists solve my problem as it seems
176: [21:34:19] <spronk> hmm
177: [21:34:44] <spronk> why would I be getting a warning on 1763 of DataObject when trying to create an object in modeladmin?
178: [21:34:53] <spronk> 1763 is chekcing belongs many many stuff
179: [21:35:29] * Pyromanik has joined #silverstripe
180: [21:36:13] * zfmf1 has left #silverstripe
181: [21:41:29] * nikrolls has joined #silverstripe
182: [21:45:47] * mobiusnz has joined #silverstripe
183: [21:46:46] <mobiusnz> the tools folder seems to have disappeared from silverstripe-installer?
184: [21:50:10] <gumble> why does if $Link always return false?
185: [21:50:34] <spronk> quick: what's a module that uses gridfield in Dataobject ?
186: [21:50:35] <Pyromanik> mobiusnz: there was a tools folder?
187: [21:50:45] <Pyromanik> spronk: like, why?
188: [21:51:00] <spronk> exampleeee
189: [21:51:08] <Pyromanik> spronk: userforms?
190: [21:51:09] <mobiusnz> Pyromanik: yeah, it had scripts to set up piston with framework and cms modules automagically
191: [21:51:10] <spronk> modeladmin docs suxxxxx
192: [21:51:14] <spronk> oo userforms
193: [21:51:29] <Pyromanik> spronk: there's nothing different
194: [21:51:40] <Pyromanik> about gridfield in a DO compared to a page (which is a DO).
195: [21:51:50] <spronk> i want some copy pasteability here man
196: [21:51:52] <spronk> too early to think
197: [21:51:53] <Pyromanik> mobiusnz: use composer now.
198: [21:51:54] <spronk> :P
199: [21:52:06] <Peavers> More importantly, if I have a checkboxsetfield with an array of each user in the cms, why doesn't it save the values when you tick the box!?
200: [21:52:08] <mobiusnz> ha
201: [21:52:12] <mobiusnz> I mean ah
202: [21:52:15] <mobiusnz> new thing to learn
203: [21:52:38] <Pyromanik> spronk: new GridField('Name', 'Title', $this->ManyRelationName(), GridFieldConfig_RelationEditor::create());
204: [21:52:46] <Pyromanik> mobiusnz: not really
205: [21:52:48] <Pyromanik> it goes like this
206: [21:52:54] <Pyromanik> composer install
207: [21:52:56] <Pyromanik> done.
208: [21:53:27] <Pyromanik> apparently, I can never get the f'n thing working :<
209: [21:53:35] <spronk> YUSS
210: [21:53:37] <Pyromanik> so back to gridfield
211: [21:53:44] <spronk> successfully avoided thinking
212: [21:53:46] <spronk> cheers pyro
213: [21:53:47] <ss23> Pyromanik is a nooby!
214: [21:53:49] <ss23> :D
215: [21:53:59] <spronk> somebody mentioned boobies?
216: [21:54:04] <Pyromanik> I want it to be more awesome in that I want it to recognise the relation it came from
217: [21:54:05] <ss23> :O
218: [21:54:09] <ss23> spronk: I wish..
219: [21:54:13] <Pyromanik> before you create the new object in it
220: [21:54:16] <spronk> gridfieldconfig is a bit of a meash
221: [21:54:26] <Pyromanik> spronk: you've piqued my interetst...
222: [21:54:39] <Pyromanik> spronk: yes and no
223: [21:54:40] <spronk> ;D
224: [21:55:02] <ss23> dammit, I remember quoting 2 hours for a job, but we didn't agree on an hourly rate
225: [21:55:05] <Pyromanik> components are a bit confusing (names & docs & usecases), but config is good.
226: [21:55:05] <ss23> :<
227: [21:55:12] <ss23> I'm literally the worst at freelance/contracting.
228: [21:55:27] <Pyromanik> ss23: just put down 650 on the bill
229: [21:55:29] <ss23> lol
230: [21:55:48] <Pyromanik> when they complain go "Oh ok, special for you because you've been a good guy is $80"
231: [21:55:57] <Peavers> ss23 you'll know the answer to my question
232: [21:56:00] <ss23> XD
233: [21:56:02] <spronk> the fact that you have to specify the config manually is a bit dumb
234: [21:56:08] <ss23> Will I? :O
235: [21:56:13] <Peavers> I got my list of checkboxes built from an array of members
236: [21:56:21] * RojoD quit (Ping timeout: 240 seconds)
237: [21:56:25] <Peavers> but I can't save the results when I tick them all... it only saves the first one.
238: [21:56:47] <Peavers> Do I need to set a many_many relationship?
239: [21:57:02] <spronk> Uncaught Exception: Object->__call(): the method 'settabset' does not exist on 'GridField'
240: [21:57:03] <spronk> what is this shit
241: [21:57:04] <ss23> Hmm. Does that happen because the checkbox's names/values are conflicting in the actual HTML, so the script only ever sees one checkbox, or is your save method/function thing not right?
242: [21:57:26] <Peavers> No idea.. its all in the cms side
243: [21:57:37] <Pyromanik> Peavers: umm
244: [21:57:41] <Pyromanik> what have you go
245: [21:57:42] <Pyromanik> t
246: [21:57:48] <Pyromanik> and checkboxes is the worst idea
247: [21:58:14] <Peavers> http://pastebin.com/grN9bMbG
248: [21:58:52] <Peavers> which gives me a pretty set of checkboxes, but they don't save when I hit save...
249: [21:58:57] <spronk> fuck
250: [21:58:58] <spronk> seriously
251: [21:59:31] <ss23> Calm your farm, spronk!
252: [21:59:36] <ss23> Take a chill pill bill, spronk!
253: [21:59:39] <spronk> BRAINLESS ON MONDAY MORNIGN
254: [21:59:39] <ss23> Relax, Max, spronk!
255: [21:59:56] <ss23> you think you're brainless? I couldn't figure out how to display a countdown for how many hours left till the next midday.
256: [22:00:53] <spronk> lol
257: [22:01:11] <mobiusnz> [RuntimeException]
258: [22:01:11] <mobiusnz> The lock file does not contain require-dev information, run install with th
259: [22:01:11] <mobiusnz> e --no-dev option or run update to install those packages.
260: [22:01:11] <mobiusnz> ?
261: [22:01:38] <Peavers> whats in your composer.json file?
262: [22:02:14] <mobiusnz> I don't have a composer.json file
263: [22:02:24] <Peavers> ...
264: [22:02:32] <mobiusnz> I just did composer create-project
265: [22:03:01] <spronk> ugh
266: [22:03:01] <mobiusnz> hmm
267: [22:03:05] <spronk> errors
268: [22:03:07] <Peavers> composer create-project silverstripe/installer ./
269: [22:03:09] <Peavers> yeah?
270: [22:03:11] <spronk> that the cms shows
271: [22:03:13] <mobiusnz> Peavers:
272: [22:03:14] <mobiusnz> yeah
273: [22:03:36] <mobiusnz> ok, looks like that's not actually an error. running composer update —no-dev seems to grab the rest of the stuff
274: [22:06:11] <Pyromanik> mobiusnz: no
275: [22:06:13] <Pyromanik> if you have nothing
276: [22:06:33] <Pyromanik> you want composer create-project silverstripe/installer dirname versionNumber
277: [22:07:05] <Pyromanik> eg. composer create-project silverstripe/installer newsite 3.0.5
278: [22:07:09] * IainKay quit (Ping timeout: 264 seconds)
279: [22:07:17] <Pyromanik> .yt
280: [22:07:19] <Pyromanik> where is that?
281: [22:07:45] * spronk quit (Ping timeout: 264 seconds)
282: [22:07:45] <Pyromanik> omg
283: [22:07:52] <Pyromanik> I didn't even know that island existed
284: [22:07:57] <Pyromanik> http://en.wikipedia.org/wiki/Mayotte
285: [22:08:03] <ss23> No bro
286: [22:08:07] <ss23> Thats just his t1
287: [22:08:07] * IainKay has joined #silverstripe
288: [22:08:10] <ss23> He's actualy IN THE CLOUD
289: [22:08:11] <ss23> ~~~~
290: [22:08:28] <Pyromanik> AfricanAngels.net?
291: [22:08:34] <Pyromanik> sounds like a site you shouldn't visit
292: [22:08:41] <Pyromanik> for fear of computer aids.
293: [22:09:10] <gumble> has someone any idea why the pagination code here: http://doc.silverstripe.org/framework/en/howto/pagination is not working for me? the simeple <% loop PaginatedPages %> works, but the example underneath that fails because all the <% if $variable %> return 'false', even the <% if $Link %> returns false
294: [22:10:03] <mobiusnz> Pyromanik: composer create-project silverstripe/installer ./ && composer update —no-dev seemed to work, and installed 3.0.5
295: [22:12:20] <Pyromanik> you shouldn't need composer update
296: [22:12:24] <Pyromanik> install should do everything
297: [22:12:36] <Pyromanik> but if it worked, it worked.
298: [22:12:48] <Pyromanik> like I said, I can't get the damn thing working well.
299: [22:13:36] * spronk has joined #silverstripe
300: [22:13:51] <spronk> grrrrrrr why would $this->getParent() return the wrong freaking object
301: [22:14:24] <Peavers> So I'm still stuck... Do I need to use saveInto( ) and give it a dataobject?
302: [22:14:30] <Peavers> looking at http://api.silverstripe.org/2.4/class-CheckboxSetField.html#_setValue
303: [22:15:45] <spronk> fucks sakes. my site tree is ProductsPage->AccessoryCategory->AccessoryPage
304: [22:15:52] <spronk> getParent() on accessorypage returns ProductsPage
305: [22:18:19] <Peavers> ffs
306: [22:18:22] <Peavers> solved it.
307: [22:18:48] <Peavers> checkboxes don't want to be a boolean value in the database table.
308: [22:19:05] <Peavers> 'Attendees' => 'Varchar(255)', not 'Attendees' => 'boolean',
309: [22:20:10] <spronk> what the fuck silverstripe
310: [22:20:22] * micmania1 has joined #silverstripe
311: [22:20:31] <spronk> loading an AccessoryPage, database says ParentID is 30
312: [22:20:35] <spronk> debugger says 6
313: [22:21:12] <micmania1> Is there any documentation on displaying many_many_extraFields in the CMS (specifically GridField)?
314: [22:21:35] <micmania1> I read somewhere it was supported in 3.1 (which i'm using).
315: [22:29:45] <spronk> k
316: [22:29:51] <Peavers> soooo.... how do I store the value of the checkbox rather than the ID...
317: [22:30:50] <spronk> parent::validate changes the $record->ParentID value :S
318: [22:33:23] <ss23> :D
319: [22:33:35] <ss23> Contract signed and stuff for working at Silverstripe
320: [22:33:47] <ss23> Well boys, looks like there's actually going to be someone on #silverstripe who does work at Silverstripe.
321: [22:33:56] <Peavers> _b grats
322: [22:34:03] <spronk> what the fffff
323: [22:34:16] <Peavers> I feel sorry that you're going to have to deal with me on a professional level now though ;)
324: [22:34:29] <ss23> haha
325: [22:34:37] <spronk> nw ss23
326: [22:34:46] <ss23> Peavers: Is that because I'll be in here and working for Silverstripe, or because you're a Silverstripe client that I'll be dealing with?
327: [22:34:52] <spronk> why woiuld $original show a ParentID of 30, but $record show parentID of 6?
328: [22:35:03] <Peavers> Client ;)
329: [22:35:25] <ss23> Peavers: Oh darn! And I hear my job is going to be supporting clients ALL DAY LONG
330: [22:35:46] <ss23> :P
331: [22:38:10] <LoveDuckie> Anybody know how I can return data from a field from the Page_Controller of a Page?
332: [22:38:25] <LoveDuckie> i.e. Page has a field called "Name" => "Varchar(255)"
333: [22:38:31] <LoveDuckie> I want Page_Controller to return that value
334: [22:38:39] <LoveDuckie> from a function
335: [22:38:49] <Peavers> return $Name?
336: [22:39:02] <LoveDuckie> Yeah, tried but for some strange reason it says that the field doesn't exist.
337: [22:39:21] <Peavers> return DataObject::get('Name')?
338: [22:39:35] <micmania1> LoveDuckie: You can just call $this->Name from your Controller.
339: [22:39:39] <Peavers> or that
340: [22:39:52] <LoveDuckie> micmania1, that's what I did first but again it said the field didn't exist. I'll try one more time and examine closer.
341: [22:40:25] <micmania1> Have you built your database? Remember to run /dev/build?flush=1 after adding new fields.
342: [22:40:33] <LoveDuckie> yup
343: [22:44:25] <LoveDuckie> So peculiar.
344: [22:44:34] <LoveDuckie> what's the SS paste bin site?
345: [22:44:41] <LoveDuckie> Perhaps I could dump what code I am using now
346: [22:44:58] <nikrolls> sspaste.com
347: [22:46:15] <Peavers> possible to get member by id in a template file?
348: [22:48:06] <micmania1> If its the current Member you're after you can use $CurrentUser, otherwise you'll have to create a function elsewhere that does it for you.
349: [22:48:14] <Peavers> yeah its not lol
350: [22:48:27] <spronk> ok
351: [22:48:31] <spronk> what. the. absolute. fuck
352: [22:49:03] <spronk> seems like... DataList->add() is changing the ParentID on my dataobject from the one it loaded
353: [22:53:01] * gelignite quit (Quit: http://bit.ly/nkczDT)
354: [22:55:15] <LoveDuckie> OK, seemed to fix my problem.
355: [22:55:22] <LoveDuckie> Seems like that it doesn't like RandomOrder to be the name
356: [22:55:33] <LoveDuckie> must be a key word for something else in the framework
357: [22:59:48] * micmania1 quit (Quit: Page closed)
358: [22:59:52] <spronk> this is fucking ridiculous. has anyone else had issues with gridfield and add existing using the wrong ParentID?
359: [23:05:26] * chillu quit (Quit: chillu)
360: [23:09:07] <Peavers> $map = $members->map('ID', 'FirstName'); gives me the users firstname in a checkbox in the cms, but in the template if I try and use $Attendees it just gives me the checkbox ID such as 1,2,3,4,5,6 rather than the john, jo, sarah, smith etc etc
361: [23:09:26] <Peavers> I want to do something like $Ateendees.FirstName in the template... but how?
362: [23:10:03] <nikrolls> .FirstName should work if you are accessing an item
363: [23:10:21] <nikrolls> <% loop $Attendees %>
364: [23:10:25] <nikrolls> $FirstName
365: [23:11:01] <spronk> where's simon_w when you need him
366: [23:11:12] <Peavers> doesn't return anything...
367: [23:11:53] <nikrolls> Oh sorry, you mention above that Attendees is a Varchar?
368: [23:11:55] <Peavers> if I just use $Attendees I get the checkboxes that I've ticked in the cms rather than the name... the name isn't being stored in the database either its just adding the checkbox id
369: [23:11:59] <Peavers> which is where I think my issue is
370: [23:12:02] <Peavers> yeah
371: [23:12:14] <nikrolls> Right, so that is plaintext
372: [23:12:40] <nikrolls> If Attendees was a list of objects with FirstName properties, then .FirstName would work
373: [23:12:55] <Peavers> hmm..
374: [23:13:11] <Peavers> its a checkboxsetfield I think
375: [23:13:30] <nikrolls> SSPaste?
376: [23:13:37] <Peavers> yeah one sec
377: [23:14:47] <Peavers> http://www.sspaste.com/paste/show/51b50c3b1d842
378: [23:16:23] * priithansen quit (Quit: priithansen)
379: [23:17:03] <nikrolls> Right, so you're adding a CheckboxSetField in getCMSFields, but that doesn't have any effect if you're using Attendees in a template
380: [23:17:29] <Peavers> when I use Attendees in the template, it outputs the checkbox value as a number...
381: [23:17:30] <nikrolls> CheckboxSetField will just store the ID in the text field
382: [23:17:44] <Peavers> so if I tick the first checkbox it outputs 1, tick the third it gives 3 etc etc
383: [23:17:57] <nikrolls> You would want Attendees to be a relationship, eg has_many or many_many
384: [23:18:20] <nikrolls> Then CheckboxSetField will save references to the Members and then you can access their properties in a template
385: [23:18:27] <nikrolls> Or anywhere else, for that matter
386: [23:19:18] <Peavers> what would it be in a relationship with? itself?
387: [23:19:24] <Peavers> Attendees => Attendee?
388: [23:19:42] <nikrolls> What is the class you have shown me?
389: [23:19:50] <Peavers> MeetingPage
390: [23:20:05] <nikrolls> Cool, so MeetingPage would have a relationship with Attendee
391: [23:20:29] <nikrolls> 'Attendees' => 'Attendee' (local field name => remote table/class)
392: [23:20:52] * priithansen has joined #silverstripe
393: [23:21:41] * metanat has joined #silverstripe
394: [23:24:19] <metanat> Should composer's autoloader be required before each modules _config.php files are loaded?
395: [23:27:04] <MrJeremy> anyone got any code to add days and/or months to a SS_Datetime?
396: [23:27:59] <Peavers> Still not saving the value aye
397: [23:28:08] <spronk> Uncaught ValidationException: Page type "Accessory Page" not allowed as child of this parent page
398: [23:28:16] <spronk> this is effing lies
399: [23:28:46] <Peavers> its created a table, but the tables empty?
400: [23:32:17] <nikrolls> Peavers: (should be) a working example http://www.sspaste.com/paste/show/51b51032447df
401: [23:36:54] <Peavers> and how'd I access that in the template?
402: [23:37:14] <Peavers> <% loop $Attendees %> $FirstName etc etc?
403: [23:37:55] <nikrolls> Yep, you should be able to loop the relationship and access all of their properties in 'local' scope while in the loop
404: [23:38:37] <Peavers> still nothin...
405: [23:39:01] <Peavers> values should be getting saved into the members_attendees table yeah?
406: [23:40:19] * DigNZ quit (Quit: DigNZ)
407: [23:40:26] <nikrolls> MeetingPage_Attendees
408: [23:40:31] <Peavers> yeah sorry
409: [23:40:33] <Peavers> its still empty
410: [23:41:25] <nikrolls> Do the checkboxes stay checked after you save the page?
411: [23:41:29] <Peavers> yup
412: [23:41:59] <nikrolls> Quite odd. What does <% debug $Attendees %> get you?
413: [23:42:04] <nikrolls> Possibly a scope issue
414: [23:42:43] <spronk> ugh
415: [23:42:45] <Peavers> 500 page error
416: [23:42:58] <spronk> there is some kind of dodgy bug with GridField and relationeditor with respect to page hierarchy
417: [23:43:25] <nikrolls> Could be the wrong way to use debug, I admit.
418: [23:43:50] <nikrolls> If the MeetingPage_Attendees table is empty then it must be saving somewhere else
419: [23:43:57] <nikrolls> Which would be causing an issue
420: [23:44:02] <nikrolls> You removed the other Varchar?
421: [23:44:10] <Peavers> the other?
422: [23:44:26] <nikrolls> s/other/original
423: [23:44:38] <Peavers> I've got one 'Attendees' => 'Varchar(255)',
424: [23:44:45] <Peavers> should I not?
425: [23:45:09] <nikrolls> Yeah, I'd take that out -- and replace it with the Attendees many_many/has_many
426: [23:45:50] <Peavers> the results are no longer saved
427: [23:45:52] <Peavers> if I dothat
428: [23:47:18] <nikrolls> They shouldn't be going into a Varchar for your purpose
429: [23:47:27] <nikrolls> So you now need to get them saving into the relationship
430: [23:47:53] <spronk> Pyromanik: you ever seen bug where page type appears twice in the right click list
431: [23:47:54] <Peavers> just noticed I had ' Attendees' insteald of 'Attendees'
432: [23:47:56] <Peavers> would that matter?
433: [23:48:02] * zippy__ has joined #silverstripe
434: [23:48:07] <zippy__> Morning
435: [23:48:09] <nikrolls> A space before?
436: [23:48:13] <Peavers> yeah lol
437: [23:48:17] <nikrolls> Possibly, I've noticed that before
438: [23:48:50] <Peavers> removed the space and my page crashed ;)
439: [23:49:14] <nikrolls> You may need to build again
440: [23:49:19] <Peavers> yeah did that
441: [23:49:32] <Peavers> now the sites cuput
442: [23:50:19] <nikrolls> Not sure how else I can help on that. Except maybe if you can SSPaste the whole page class, I may see something?
443: [23:50:49] <Peavers> I'm scared, its an embarrasing mess lol
444: [23:51:11] <nikrolls> So were mine when I first started. Feel free to PM me the link
445: [23:51:26] <nikrolls> If that doesn't break any rules here? ;)
446: [23:52:52] <Pyromanik> spronk: nope
447: [23:52:59] <Peavers> if only you'd acknowledge the chat request lol
448: [23:53:05] <Pyromanik> ss23: so turns out there are 2 zpanels
449: [23:53:21] <Pyromanik> zpanel.co.nz (lolz) and zpanelcp.com
450: [23:53:33] <Pyromanik> so turns out the NZ version is even more bad than first thought.
451: [23:53:44] <spronk> uughhhh
452: [23:54:13] <Pyromanik> spronk: stop naming your pages the same.
453: [23:54:37] <spronk> i'm not
454: [23:54:40] <spronk> there's some bug
455: [23:54:41] <Peavers> nikrolls accept your PM request!
456: [23:54:42] <spronk> i dnow tf it is
457: [23:54:52] <ss23> lol Pyromanik XD
458: [23:55:13] <nikrolls> Peavers Heh, just a sec
459: [23:55:15] <ss23> Pyromanik: Well I'll always make sure to never use any kind of zpanel
460: [23:55:18] * Bollig|DesignCty has joined #silverstripe
461: [23:55:37] <Pyromanik> yeh
462: [23:55:47] <Pyromanik> ss23: went to zpanel.co.nz
463: [23:55:52] <Pyromanik> only one page works
464: [23:56:07] <Pyromanik> and it's "zpanel was apprently hacked, but this is not true. A user asked a question in the forum".
465: [23:56:24] <Pyromanik> and that's the entirety of the site.
466: [23:56:46] <ajmitch_> Pyromanik: whatever you do, don't look at the zpanel code
467: [23:58:19] <ss23> I don't even know!
468: [23:58:24] <ss23> ajmitch_: I hear it's actaulyl really nice
469: [23:58:35] <ss23> Whenever I wanna get r00t on a zpanel box I just run the provided suid binary to run anything as root!
470: [23:58:37] <ajmitch_> not when I looked at it awhile ago
471: [23:58:38] <ss23> :)
472: [23:58:44] <ss23> NOw *thats* caring for your hackers
473: [23:58:45] <ajmitch_> heh
474: [23:59:28] <ajmitch_> now that's bringing back memories
475: [23:59:59] * priithansen quit (Quit: priithansen)

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