#silverstripe IRC Log

IRC log for 1 May 2014

All timestamps are in UTC.

1: [00:00:18] <Ryan-Toast> antmas: I don’t even know what to add to a adatalist.
2: [00:05:21] <antmas> yeah they aren't the best
3: [00:05:26] <antmas> as well all would agree :P
4: [00:05:32] <antmas> we*
5: [00:09:39] <Stomach> what do you want to do Ryan-Toast - display tabular data?
6: [00:09:45] <Ryan-Toast> Stomach: yes
7: [00:10:02] <Stomach> http://api.silverstripe.org/3.1/class-TabularStyle.html
8: [00:10:05] <Stomach> ?
9: [00:10:15] <Stomach> who knows what that is!
10: [00:10:20] <Stomach> :S
11: [00:10:28] <Ryan-Toast> Stomach: Is there an example on how to use it?
12: [00:11:02] <Stomach> not that i know of
13: [00:11:13] <Stomach> i didnt even know it existed until just then
14: [00:11:23] <Ryan-Toast> Stomach: Lol.
15: [00:11:29] <Ryan-Toast> Stomach: I’ll have a play anyway.
16: [00:12:05] <Stomach> if all of the information is on a single dataobject type can't you just use summary fields to show what you want?
17: [00:12:16] <Stomach> or managed through a single dataobject type
18: [00:12:24] <Ryan-Toast> Stomach: It’s information pulled from a json query
19: [00:13:25] <Stomach> you can convert that to a SS_List and then pass it into a gridfield
20: [00:15:49] <Ryan-Toast> Stomach: Orly?
21: [00:16:05] <Stomach> I guess so - thats all that a gridfield is created with
22: [00:20:57] * jenniferaslan quit (Quit: jenniferaslan has left the room)
23: [00:22:10] <antmas> ugh Json
24: [00:23:39] <antmas> https://www.youtube.com/watch?v=oOuaHh9TZkg
25: [00:23:43] <Stomach> http://pastie.org/9129321
26: [00:23:45] <antmas> JSON!
27: [00:24:55] <Stomach> Ryan-Toast ^
28: [00:31:56] <zagoodwin> has anyone built a module so the media embed works with vimeo as well?
29: [00:35:46] <Ryan-Toast> Stomach: Cheers, man.
30: [00:36:19] <Ryan-Toast> Seems like biz like that should be in the docs
31: [00:36:37] <Stomach> add it :P
32: [00:38:44] <antmas> or
33: [00:38:46] <antmas> you know
34: [00:38:51] <antmas> ask ss23
35: [00:39:16] <ss23> :O
36: [00:39:20] <antmas> huehuehue
37: [00:39:22] <ss23> idk
38: [00:39:31] <ss23> Ask antmas about .NET
39: [00:39:32] <ss23> ha.
40: [00:39:46] <Giganaire> yuss, found a belated birthday present for ss23
41: [00:39:51] <antmas> AMA with antmas at 8pm
42: [00:39:52] <ss23> :S
43: [00:39:55] <Giganaire> http://www.1-day.co.nz/products/AAREVN517
44: [00:40:03] <ss23> pls
45: [00:40:08] <ss23> implying I don't already have it
46: [00:40:14] <ss23> wtf
47: [00:40:17] <ss23> brush head is not replaceable?!
48: [00:40:19] <antmas> it was ss23 bday?
49: [00:40:26] <ss23> IT was, a while ago
50: [00:40:26] <ss23> :P
51: [00:40:31] <antmas> :O
52: [00:40:33] <ss23> Was Giganaire's too
53: [00:40:44] <antmas> are you guys bday bros?
54: [00:40:54] <Giganaire> close
55: [00:41:16] <antmas> aw shit
56: [00:41:22] <antmas> mother's day?
57: [00:41:23] <Giganaire> we once had a combined bday party when he turned 18 on the 18th and i turned 23 on the 23rd
58: [00:41:24] <antmas> man
59: [00:42:03] <antmas> I need to eat
60: [00:42:07] <antmas> snd food pls
61: [00:42:12] * DesignerX has joined #silverstripe
62: [00:42:56] <simon_w> Well, that interview went well :)
63: [00:43:05] * Giganaire sends antmas some of the Butter Chicken he made last night
64: [00:43:12] <antmas> simon_w: did you kiss the interviewer?
65: [00:43:17] <antmas> I hear that helps
66: [00:43:19] <simon_w> Ewwww
67: [00:43:21] <antmas> Giganaire: :D
68: [00:43:37] <antmas> simon_w: where is it for?
69: [00:43:40] <antmas> or, who rather
70: [00:43:41] <Giganaire> curries are super easy in a slow cooker
71: [00:43:57] <antmas> curries are easy fullstop
72: [00:43:59] <Giganaire> and cos of slow cooking it's awesome cos the sauce gets to sink into the meat
73: [00:44:00] <simon_w> Recruitment Hive
74: [00:44:46] <antmas> Giganaire: do you make your own currie paste?
75: [00:44:49] <antmas> curry*
76: [00:45:00] <Giganaire> antmas: nah i buy it from the local Halal shop
77: [00:45:24] <antmas> nice
78: [00:45:33] <antmas> better that than pattacks
79: [00:45:35] <antmas> :/
80: [00:45:40] <Giganaire> very
81: [00:45:47] <Giganaire> i bought Medium Butter Chicken
82: [00:45:59] <antmas> nz medium? or indian medium?
83: [00:46:14] <Giganaire> it was definitely indian medium
84: [00:46:30] <Giganaire> was knocking back the milk
85: [00:46:42] <Giganaire> my sinuses are still free and clear!
86: [00:46:49] <antmas> hehe
87: [00:47:04] <antmas> yeah, it's cold enough outside that we're cranking the curries at home
88: [00:47:21] <antmas> might do a Tom Yum tonight
89: [00:47:32] * willagain has joined #silverstripe
90: [00:47:41] <willagain> hello
91: [00:47:53] <simon_w> Morning
92: [00:48:05] <willagain> we have had a penetration test on our site. it went ok but they had a few queries around ss and passwords
93: [00:48:18] * DesignerX quit (Ping timeout: 240 seconds)
94: [00:48:55] <willagain> "During the audit of the database SEH noted that a generic Salt and password hash are stored within the same database table"
95: [00:49:18] <ss23> willagain: That's a) intentional, b) not a security issue
96: [00:49:39] <willagain> "In the event that an attacker compromises the database the hashed password can be used in conjunction with the generic salt to crack the password using a brute forcing technique."
97: [00:49:53] <willagain> yeah, i trust ss more than the audit people : )
98: [00:49:58] <ss23> Maybe if he has more computational power than currently exists in the universe! :P
99: [00:50:13] <ss23> Well hmm
100: [00:50:21] <willagain> so looking in the db, the salts are always the same for a user. thats normal right?
101: [00:50:34] <simon_w> willagain, salts change when the password gets changed
102: [00:50:37] <ss23> willagain: The only way to avoid that "security issue" is to buy an HSM which might be $10k or more ;)
103: [00:51:19] <simon_w> ss23, you can break something like 90% of passwords in a couple of weeks, even when they're salted :p
104: [00:51:51] <willagain> in the member password table, my user id has a couple of rows, both with the same salt.
105: [00:52:01] <ss23> simon_w: No way around that, since people have bad passwords
106: [00:52:04] * DesignerX has joined #silverstripe
107: [00:52:11] <willagain> is that because i've updated the password twice to the same passwords or something?
108: [00:52:12] <ss23> If 90% of people use "password" as their password, aint gunna be able to do anything to help!
109: [00:52:18] <ss23> simon_w: But still, I would be surprised at 90%
110: [00:52:22] <ss23> simon_w: But I haven't done the math
111: [00:52:40] <willagain> SS can force people to not be silly
112: [00:52:41] <willagain> http://doc.silverstripe.com/framework/en/topics/security
113: [00:52:44] <simon_w> ss23, there's a couple of articles about a sha1+salt dictionary attack
114: [00:52:51] <willagain> there are settings to say use a propper password
115: [00:52:58] <ss23> Yeah willagain
116: [00:53:22] <simon_w> willagain, just changing letters to numbers (the usual thing that causes) has almost no effect on time to break
117: [00:53:26] <ss23> simon_w: None that I know of (unless you're just talking about standard one by one dictionary attack in which case... that exists for *everything*)
118: [00:53:38] <ss23> simon_w: Yes it does :/
119: [00:53:58] <ss23> Most people are using dictionary passwords. Numbers/smybols change that
120: [00:54:35] <simon_w> ss23, anyone who can get access to a database dump has a dictionary with all those common changes in it
121: [00:55:01] <simon_w> A dictionary attack isn't just running through /usr/share/dict/words
122: [00:55:20] <ss23> Sure, dictionaries are easy to get, point is that when you add more combinatinos like that, the amount of passwords that can be cracked easily is less
123: [00:55:48] <simon_w> "Your password requires a number"
124: [00:55:48] <simon_w> Most common password is now password1
125: [00:56:21] <simon_w> Anyway, all it does is potentially add an hour or so on to crack time
126: [00:56:23] <simon_w> That's nothing
127: [00:56:46] <ss23> simon_w: Source?
128: [00:56:52] <ss23> Also, 12:52:45 <@simon_w> ss23, there's a couple of articles about a sha1+salt dictionary attack
129: [00:56:55] <ss23> 12:53:27 <+ss23> simon_w: None that I know of (unless you're just talking about standard one by one dictionary attack in which case... that exists for *everything*)
130: [00:56:58] <ss23> Can you clarify?
131: [00:57:47] <willagain> hmm. ok so essentially the report is correct, if they get the db, they could crack all the passwords. and there is nothing further we can do about that in terms of how we deal with the salt?
132: [00:58:02] <simon_w> http://arstechnica.com/security/2013/05/how-crackers-make-minced-meat-out-of-your-passwords/
133: [00:58:10] <ss23> rofl simon_w
134: [00:58:15] <ss23> I was expecting a technical document
135: [00:58:27] <ss23> Yes, I know how password crackers work :P
136: [00:58:59] <ss23> willagain: Yes, the only solution is an HSM
137: [00:59:05] <ss23> willagain: (The only "proper" solution)
138: [00:59:38] <simon_w> Though, if someone has access to your database, they can probably also change your source so that gets bypassed
139: [01:00:58] * DesignerX quit (Ping timeout: 240 seconds)
140: [01:01:35] <simon_w> willagain, basically, if someone has access to your database, you're screwed anyway. It's a much better idea to prevent unauthorised access to it
141: [01:07:05] <Colin[pi]> morning!
142: [01:07:52] <ss23> moin moin Colin[pi]
143: [01:09:30] * Ryan-Toast looks at clock
144: [01:09:38] <Ryan-Toast> Colin[pi]: you lie!
145: [01:13:44] * zippy__ has joined #silverstripe
146: [01:14:26] <Colin[pi]> still morning here!
147: [01:14:36] <zippy__> willagain: yeap, just this week I had a database of a site I wanted admin access to, instead of asking for access I just brute forced the admin passwords since they were md5 - with 10 accounts only took a few minutes to get a login...
148: [01:14:45] <zippy__> Colin[pi]: Afternoon good sir
149: [01:15:54] <ss23> Speaking of, I think it might be possible to break into certain silverstripe sites in less than a day
150: [01:16:01] <ss23> But I have to do some math to find out
151: [01:17:28] <zippy__> anyone use CloudFlare at all / much?
152: [01:21:18] <Ryan-Toast> How can I include a css file in a page tempate that’s being called by renderwith?
153: [01:21:23] <simon_w> Morning Colin[pi]
154: [01:21:37] <Ryan-Toast> Can I just make a Class for the page template and use Requirements?
155: [01:21:43] <simon_w> zippy__, yes
156: [01:21:52] <zippy__> good, even the free plan?
157: [01:22:07] <simon_w> Ryan-Toast, <% require css(path/to/blah.css) %>?
158: [01:22:20] <simon_w> zippy__, reasonably
159: [01:22:36] <zippy__> sounds a bit mixed
160: [01:22:41] <Ryan-Toast> simon_w: Chur. It’s weird, the page is including the GridField css, but it isn’t styling it.
161: [01:25:49] <Ryan-Toast> simon_w: Ah, was an inheritance issue on the iFrame
162: [01:31:15] * Tanger has joined #silverstripe
163: [01:33:54] <zippy__> I want to create a group which can only login, and access a certain Model Admin tab. I created the group and set the permissions to just 'Access to MyAdmin' section but on login I am getting "I'm sorry, but you can't access that part of the cms…." even if I go direct to the model admin page…. is the certain minamum level of permissions to access the CMS?
164: [01:34:42] <zippy__> nm, I am a dick
165: [01:34:47] <zippy__> forgot to assign the user to the group
166: [01:34:50] <zippy__> "TIMMMYYYY"
167: [01:36:01] <Giganaire> antmas: http://shop.khanapakana.com/shan-butter-chicken-mix-50-grams/
168: [01:36:19] <Colin[pi]> I think my blog is slowly turning into buzzfeed: http://www.praxis.net.au/blog/the-top-5-social-media-blunders-of-all-time/
169: [01:37:36] * UncleCheese_ quit (Quit: UncleCheese_)
170: [01:42:06] * UncleCheese_ has joined #silverstripe
171: [01:47:24] <zippy__> UncleCheese_: betterbuttons not support canView / canDelete / canCreate?...
172: [01:47:32] <zippy__> always on
173: [01:47:34] <UncleCheese_> hmm
174: [01:47:39] <UncleCheese_> yeah, not sure
175: [01:48:50] <antmas> Giganaire: nice
176: [01:48:57] <antmas> package looks like it's from the 70s
177: [01:49:10] <Ryan-Toast> Stomach: that worked :) just need to figure out how to get the GridField headers in :P http://i.imgur.com/gwTgDj0.jpg
178: [01:49:27] <Stomach> just add them to the gridfield config
179: [01:49:31] <antmas> Ryan-Toast: oh hey, so gridfield / datalist working?
180: [01:49:39] <Ryan-Toast> antmas: yarp
181: [01:49:42] <antmas> nice
182: [01:49:54] <Ryan-Toast> Stomach: Yeah I did, I’m just figuring out what I’m supposed to put in it :P
183: [01:50:00] <Stomach> lol
184: [01:50:23] <Ryan-Toast> Stomach: I have GridFieldToolbarHeader
185: [01:50:31] <Ryan-Toast> which seemingly does nada
186: [01:51:20] <Stomach> I think its the filterheader you want
187: [01:51:26] <Stomach> with no filters set
188: [01:51:26] <Stomach> lol
189: [01:52:04] <Stomach> arraylists are filterable, so you should be able to just use it
190: [01:52:32] <antmas> http://www.lifehacker.com.au/2014/05/all-code-is-bad-so-dont-stress-if-yours-sucks/
191: [01:52:58] <Stomach> http://stilldrinking.org/programming-sucks
192: [01:53:44] <Colin[pi]> Stomach: that article is great
193: [01:53:55] <Stomach> yeah I read it last night
194: [01:54:10] <antmas> Stomach: dude, I read that last week and I feel exactly the same as him
195: [01:54:14] <antmas> or her wahtever
196: [01:54:20] <antmas> have this argument with people all the time
197: [01:54:26] <Colin[pi]> all code sucks
198: [01:54:31] <Stomach> I laughed out loud at the "this code won a competition, because it can"
199: [01:54:39] <Colin[pi]> I just wish clients could understand on the same level we can
200: [01:54:50] <antmas> Colin[pi]: or the mrs
201: [01:54:53] <antmas> :/
202: [01:55:07] <Stomach> haha
203: [01:55:15] <Colin[pi]> antmas: lol my gf looks at me coding sometimes and she's like "how.... do you understand all of that"
204: [01:55:22] <Colin[pi]> my reply: "I don't."
205: [01:55:27] <antmas> ahahah me too
206: [01:55:39] <jordanmk> hi guys
207: [01:56:08] <antmas> howdy
208: [01:56:51] <Colin[pi]> well hi thar
209: [01:56:59] <jordanmk> i've got a SilverStripe 2.4 site with a Blog. i'm trying to create a new blog entry (there are already about 10). i fill in the page name, author field, and content box, click Save (not Save and Publish), and then i just get an error at the bottom left which says "Error saving content"
210: [01:57:33] <jordanmk> any ideas on what could be the problem, or on how i could get more information than just "Error saving content"?
211: [01:59:22] <Colin[pi]> jordanmk: can you look at your web console in the browser?
212: [01:59:33] <Colin[pi]> there will probably be an error appearing there via the ajax
213: [02:00:02] <Giganaire> anyone else here going to the auckland AWS summit?
214: [02:00:49] <jordanmk> yep: http://pastebin.com/H0Ft9rJb
215: [02:01:03] * gelignite quit (Quit: http://bit.ly/nkczDT)
216: [02:01:43] <jordanmk> oh and also this: http://pastebin.com/YtmnV5CU
217: [02:01:57] <jordanmk> both of those come up each time i try to save a new blog post.
218: [02:02:02] <jordanmk> i can edit exiting blog posts just fine
219: [02:02:31] <Colin[pi]> 500 (There has been an error) -- no, really? YOU DONT SAY
220: [02:02:32] <willagain> still reading my pen test report
221: [02:02:47] <willagain> they are complaining about secure flag not set for some cookies
222: [02:02:58] <willagain> is this a silverstripe thing i can configure/
223: [02:03:02] <jordanmk> when i try to duplicate one of the existing blog posts, i also get the same error
224: [02:03:16] <jordanmk> so i don't think it has anything to do with the content of the new post
225: [02:03:18] <Colin[pi]> jordanmk: anything in server logs?
226: [02:03:28] <jordanmk> where would i check for that?
227: [02:03:36] <Colin[pi]> error.log for apache
228: [02:04:55] <PapaBearNZ> Does anyone have an example of a gridfield column that displays a SS Boolean as a tick or cross icon instead of a 1 or zero?
229: [02:05:20] <PapaBearNZ> Silverstripe 3.1 based site.
230: [02:07:20] <Colin[pi]> you know I reckon like 80% of SS3 questions I see here are gridfield related
231: [02:07:33] <Colin[pi]> sounds like a job for.... BETTER DOCS MAN (ss23)
232: [02:10:51] <jordanmk> Colin[pi], can't find any error log. would it be in the root folder? the public_html?
233: [02:11:17] <Colin[pi]> jordanmk: no it's usually off somewhere else
234: [02:11:24] <Colin[pi]> depends on the server config
235: [02:12:27] <jordanmk> would there be some way to find them through cPanel?
236: [02:12:43] <Stomach> PapaBearNZ - you could write a function "getNiceCheckbox" which returns the code the the tick or cross depending on whether or not its true
237: [02:13:04] <Stomach> then use that in your summary fields
238: [02:13:14] <jordanmk> i see an Error Logs page in cPanel, but it only lists two errors which are from a long time ago
239: [02:13:29] <Colin[pi]> jordanmk: I usually look at mine via SSH :\
240: [02:13:31] <Stomach> + require some CSS or whatever
241: [02:14:47] * nbezzala has joined #silverstripe
242: [02:14:49] <Colin[pi]> is it simple or difficult to programmatically sort a branch of the sitetree by title?
243: [02:15:10] <Stomach> you can just augment the hierarchy to show them in a different order if you want instead
244: [02:15:20] <Colin[pi]> ooh, that might be a better approach
245: [02:15:32] <Stomach> and then set $default_sort = 'Title' on the class for other instances where you get them
246: [02:16:09] <zippy__> uh oh...
247: [02:16:25] <zippy__> canView = false, I can't see anything in my grid, yet the Export to CSV will export the items...
248: [02:17:05] <jordanmk> okay so when i try to create a new page, i get the same error
249: [02:17:11] <jordanmk> it's not anything specific to blog entries
250: [02:17:13] <Stomach> let me know if that works Colin[pi]
251: [02:17:18] <Stomach> I'm interested
252: [02:17:26] <Colin[pi]> k I'm looking now
253: [02:17:31] <jordanmk> just can't create/save anything new on the whole site, but i can save changes to existing pages...
254: [02:18:03] <Colin[pi]> jordanmk: not a privileges thing for the database user account is it?
255: [02:18:39] <Colin[pi]> Stomach: hmm just changing default_sort isn't enough, eh?
256: [02:18:44] <Stomach> nah
257: [02:18:46] <Stomach> http://pastie.org/9129515
258: [02:18:54] <Stomach> something like that as an extension on page
259: [02:19:01] <Colin[pi]> hmm k
260: [02:19:05] <jordanmk> Colin[pi], looking in cPanel, the database user has all permissions
261: [02:19:14] <Colin[pi]> jordanmk: welp, not that then
262: [02:21:24] * nbezzala quit (Read error: Connection reset by peer)
263: [02:21:28] * nbezzala_ has joined #silverstripe
264: [02:22:13] * nbezzala_ is now known as nbezzala
265: [02:26:00] * babak has joined #silverstripe
266: [02:26:09] <jordanmk> Colin[pi], i managed to get errors logged
267: [02:26:14] <jordanmk> this is the error: http://pastebin.com/uSUX3X8P
268: [02:27:06] <Colin[pi]> non public constructor?
269: [02:27:12] <Colin[pi]> is it a singleton?
270: [02:27:31] <simon_w> Oh, it's that problem
271: [02:27:34] <simon_w> jordanmk, upgrade :p
272: [02:27:52] <Giganaire> naww, the fire was just a grow house not a P lab
273: [02:28:26] <jordanmk> simon_w, what would you say is the easiest way to upgrade SilverStripe on a site that's live (and which i only have FTP access for)?
274: [02:28:51] <simon_w> jordanmk, move host :p
275: [02:28:59] <simon_w> Basically, you want this commit https://github.com/silverstripe/silverstripe-framework/commit/f49f1ff5df283b7324cbcd5840a8ea05ed727ce8
276: [02:29:30] <jordanmk> i should be able to get access through more than just FTP if there's a better way to upgrade
277: [02:30:05] <jordanmk> should i just do it hacky and make the changes from that commit locally and push up the new file by FTP?
278: [02:30:12] <simon_w> Well, if you can get SSH, then you can just wget the release tar ball and move things around on the server
279: [02:30:26] <Colin[pi]> simon_w: another class called Transliterator appeared?
280: [02:30:46] <simon_w> Colin[pi], http://php.net/Transliterator
281: [02:30:50] <Colin[pi]> OIC
282: [02:31:04] <Colin[pi]> damn php core changes
283: [02:31:42] <Colin[pi]> like when Derick Rethans thought "I know, let's put a class called DateTime into the core and release... I'M SURE THAT WOULDN'T BREAK ANY USERLAND CODE AT ALL."
284: [02:31:59] <simon_w> Apparently, the first version had it called Date
285: [02:32:07] <Colin[pi]> sheesh
286: [02:34:23] <Giganaire> other languages fix this by just, y'know, namespacing core classes
287: [02:35:16] <Colin[pi]> Giganaire: but it's not the php way!
288: [02:35:17] <Colin[pi]> ;)
289: [02:35:48] <Giganaire> the more i use proper OO languages the more i realise the "php way" can suck a bag of dicks
290: [02:35:53] <Colin[pi]> lol
291: [02:36:31] <Colin[pi]> you know there's a problem when you have Rasmus saying things like "each page should only load a maximum of 5-10 objects"
292: [02:36:48] <simon_w> The main problem was people not namespacing their own classes
293: [02:37:01] <Colin[pi]> simon_w: well that was before namespaces were introduced
294: [02:37:15] <simon_w> "Proper OO" should have you aware that the global namespace is a bad place to put things
295: [02:37:34] <simon_w> Colin[pi], PHP's had pseudo namespaces since PHP4
296: [02:38:11] <simon_w> It's one of the few things ZF1 got right
297: [02:38:26] <simon_w> The size of the rabbit hole they created, less so
298: [02:38:47] <Colin[pi]> in any case, a stupid decision to introduce a class called "Date" or "DateTime" into a userland which was without a date class for such a long time
299: [02:38:59] <Colin[pi]> how could they think it wouldn't clash?
300: [02:39:09] <Colin[pi]> or they just didn't care I guess
301: [02:39:40] <simon_w> Yeah, Derick's kinda like that
302: [02:40:13] <Colin[pi]> simon_w: each of the kinda notable fuckups across the years with PHP... I look who's involved, it's usually him lol
303: [02:40:48] <jordanmk> simon_w and Colin[pi], after applying the changes from that commit, saving new pages is working again. Cheers for the help!
304: [02:40:55] <Colin[pi]> yay
305: [02:41:37] <simon_w> Colin[pi], Let's add a DateTimeImmutable, which still has all the setters, and make DateTime a subclass of it, so that you can change the value of your arguments when type hinting a DateTimeImmutable!
306: [02:42:00] <Colin[pi]> lol wat
307: [02:42:21] <simon_w> Until 5.5RC1, DateTime extended DateTimeImmutable
308: [02:42:35] <simon_w> This was committed without an RFC or peer review
309: [02:42:39] <Colin[pi]> oh wow
310: [02:43:35] <simon_w> It took about 5 people to convince him it was a problem too
311: [02:43:42] <simon_w> "Oh, no one actually does that though"
312: [02:43:54] <Colin[pi]> yeah I get the feeling he's not too open to suggestions from others
313: [02:45:06] <Colin[pi]> php is a perfect example of what that blog was talking about... code that's a steaming pile of crap... it's a wonder it works at all lol
314: [02:45:33] <simon_w> It's also a great example of why some people shouldn't be allowed to make design decisions
315: [02:45:42] <simon_w> The HHVM code base is so much nicer!
316: [02:46:47] <zippy__> cock
317: [02:48:18] <zippy__> ah jezus
318: [02:49:16] <zippy__> I have an object called Foo, I have set a user to view only permissions on it. I have an object called Bar which is a has_many on Foo, the user has create/edit/delete permissions on this, however the user only gets a view only of Bar as it's pulling in based on Foo
319: [02:49:56] <zippy__> Is it possible to allow users to add/edit items relationion when the parent is simply view..
320: [02:50:25] <zippy__> can't edit a teacher record, but can add/edit/remove children from them
321: [02:51:19] * nbezzala quit (Read error: Connection reset by peer)
322: [02:51:31] <Colin[pi]> Stomach: extension seems to work like this: http://pastie.org/9129564
323: [02:51:41] <Colin[pi]> (I only need the children of one class to be sorted)
324: [02:51:47] <Stomach> cool
325: [02:51:55] <Stomach> you could just decorate that class couldnt you?
326: [02:51:57] * nbezzala has joined #silverstripe
327: [02:52:04] <Colin[pi]> actually yeah I could
328: [02:52:17] <Stomach> cool, thats useful
329: [02:52:18] <Stomach> :D
330: [02:53:16] <Colin[pi]> yep works, renamed as SortedChildrenExtension and decorated ClientFolder
331: [02:53:27] <Colin[pi]> (and removed instanceof check)
332: [02:53:57] <Colin[pi]> hmm drag-n-drop reordering might not like it though, I wonder what happens ^_^
333: [02:54:14] <Stomach> it will change the sort order of it
334: [02:54:17] <Stomach> which doesn't matter
335: [02:54:25] <Stomach> because the default sort and that extension should override it
336: [02:54:29] <Stomach> simon_w - is that right?
337: [02:54:58] <Colin[pi]> I just dragged and dropped, it changed position without error, and was back in alpha order on reload
338: [02:59:55] <Stomach> is that what you want?
339: [03:00:04] <Stomach> maybe there is some way to disable sorting on them
340: [03:00:45] <Colin[pi]> that's what I want, yeah... it doesn't matter too much if they drag-n-drop, they always want alpha order.. as long as it doesn't error
341: [03:00:49] <Colin[pi]> and thanks
342: [03:00:53] <Stomach> cool as
343: [03:01:48] <Colin[pi]> ah, when i did the drag and drop, it updated all the sort values in the branch
344: [03:02:03] <Colin[pi]> so now if I disable the extension, they remain in alpha order :)
345: [03:02:06] <Colin[pi]> but that's ok
346: [03:02:27] <Stomach> haha
347: [03:02:38] <Stomach> whos turning off and on sort orders anyway :D
348: [03:02:50] <Colin[pi]> yeah just a side effect, wont matter overall
349: [03:05:54] * muskie9 has joined #silverstripe
350: [03:07:24] * muskie9 quit (Client Quit)
351: [03:09:34] <Stomach> is there a way to automatically include a parent classes allowed actions on a child class?
352: [03:10:01] <Stomach> ie, I don't want to define the actions in my extended classes, they should be inherited somehow - is there a way to do that?
353: [03:10:39] <Colin[pi]> I thought they were inherited?
354: [03:11:11] <Stomach> it doesn't seem like it
355: [03:11:30] <Stomach> I'm working on a LeftAndMain class which I want to use as the base for other classes, like modeladmin
356: [03:11:35] <Stomach> maybe I should just look at modeladmin
357: [03:11:50] <simon_w> Stomach, if you override action methods in your class, you need to redefine them as allowed actions
358: [03:12:16] <Stomach> ah okay, so there is just no merge
359: [03:12:30] <Stomach> that makes sense for security I guess
360: [03:13:36] <Stomach> so it does work as I wanted it to automatically
361: [03:13:38] <Stomach> thats nice
362: [03:13:39] <Stomach> :D
363: [03:14:38] * cloph_away has joined #silverstripe
364: [03:15:02] * cloph quit (Ping timeout: 252 seconds)
365: [03:21:38] * nbezzala quit (Read error: Connection reset by peer)
366: [03:22:36] <zippy__> is it possible to change the managed models at run time?
367: [03:31:39] * UncleCheese_ quit (Quit: UncleCheese_)
368: [03:37:18] * UncleCheese has joined #silverstripe
369: [03:44:28] <Ryan-Toast> antmas: http://i.imgur.com/VUCAiBq.jpg
370: [03:46:07] <Stomach> how did you do that api field in the top left, thats pretty cool
371: [03:46:13] <Colin[pi]> Ryan-Toast: I am interested in Herp, Derp and possibly Lerp
372: [03:46:32] <Ryan-Toast> Colin[pi]: I’ll sign you up to them.
373: [03:46:49] <Colin[pi]> api field should prolly be in siteconfig, no?
374: [03:46:58] <zippy__> I want dfgdfg
375: [03:47:02] <Ryan-Toast> Colin[pi]: it is
376: [03:47:07] <Colin[pi]> oh is it? ok
377: [03:47:19] <Ryan-Toast> Colin[pi]: Yeah, you can just save it from the module as well.
378: [03:47:37] <Ryan-Toast> Stomach: Custom render page
379: [03:47:46] <Stomach> oh okay, cool
380: [03:48:01] <Ryan-Toast> Now for Campaigns.
381: [03:52:06] <Colin[pi]> I really want to have a go at reskinning the SS3 CMS some time
382: [03:52:22] <Ryan-Toast> Colin[pi]: I have a base if you want it
383: [03:54:04] <Ryan-Toast> Colin[pi]: Looks like this: http://i.imgur.com/YFAtQnM.jpg
384: [03:54:27] <Colin[pi]> ooh
385: [03:54:33] <Colin[pi]> looking good, dem icons
386: [03:54:55] <Colin[pi]> this is how my 2.4 CMS looks, I can't really do too much else with it: http://i.imgur.com/d1H8aTn.png
387: [03:55:04] <Ryan-Toast> Yeah I inverted the default ones, which would need to be done for the custom ones
388: [03:55:30] <Ryan-Toast> I never ahad to work with 2.4 :P
389: [03:57:29] <Colin[pi]> this is it with the skin turned off: http://i.imgur.com/M8tj5Sy.png
390: [03:58:31] <Ryan-Toast> Colin[pi]: Looks great
391: [03:58:36] <Ryan-Toast> 10/10
392: [03:58:42] <Colin[pi]> what, the original 2.4 skin?
393: [03:58:46] <Ryan-Toast> yeah /s
394: [03:58:49] <Colin[pi]> lol
395: [03:59:23] <Colin[pi]> all in all that skin took about a month of work to finish :\
396: [03:59:31] <Colin[pi]> on and off that is
397: [04:00:12] <Ryan-Toast> I haven’t touched mine in a while. I should update it to work off the default site colours
398: [04:00:18] * zagoodwin quit (Ping timeout: 240 seconds)
399: [04:00:28] <Stomach> man that could look horrible Ryan-Toast :D
400: [04:00:56] <Ryan-Toast> Stomach: It works off two variables atm, so as long as they complement it should be fine :P
401: [04:02:53] * travis-ci has joined #silverstripe
402: [04:02:53] <travis-ci> [travis-ci] silverstripe/silverstripe-framework#2413 (3.1 - e79e894 : Sean Harvey): The build is still failing.
403: [04:02:53] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-framework/compare/512c7140ccf6...e79e8949702d
404: [04:02:53] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-framework/builds/24156880
405: [04:02:53] * travis-ci has left #silverstripe
406: [04:03:34] <Stomach> my attempt at cms redesigns: http://stevie.co.nz/ss.jpg
407: [04:04:09] <Colin[pi]> nice
408: [04:06:45] <zippy__> RestfulService can parse the XML response (sorry no JSON support) returned from the web service.
409: [04:06:53] <zippy__> no json! wot!
410: [04:07:58] <zippy__> ping
411: [04:11:43] <antmas> Ryan-Toast: :O
412: [04:11:48] <antmas> Ryan-Toast: looking awesome
413: [04:11:59] <Ryan-Toast> antmas: chur
414: [04:15:00] * zippy__ quit (Quit: zippy__)
415: [04:18:24] <antmas> Ryan-Toast: dat base cms
416: [04:18:26] <antmas> I want it
417: [04:18:33] <Ryan-Toast> it’s in BP
418: [04:19:12] <antmas> oh yesh
419: [04:19:14] <antmas> it ish
420: [04:19:17] <antmas> I forgets
421: [04:19:26] <antmas> I've been at work since 6, can't think good
422: [04:19:26] <Ryan-Toast> gimme a second, and I’ll clean up the sass
423: [04:20:59] <antmas> Stomach: I like that look
424: [04:21:09] <antmas> also, Stevie.co.nz is the best domain
425: [04:21:49] <Stomach> lol
426: [04:21:53] <Stomach> thats my name!
427: [04:21:54] <Stomach> :P
428: [04:23:05] * Motoservo has joined #silverstripe
429: [04:23:22] <antmas> Stomach: http://media-cache-ec0.pinimg.com/236x/1f/16/f7/1f16f7f2f2a519e961769c60ace9311b.jpg
430: [04:23:25] * Motoservo_ quit (Read error: Connection reset by peer)
431: [04:23:46] <Stomach> hahaha
432: [04:24:42] <antmas> Tuna is the greatest thing on the internet
433: [04:26:04] * bridgetm has left #silverstripe
434: [04:26:51] <spronk0> o_O
435: [04:31:42] <antmas> http://pricespy.co.nz/list.php?l=124006&view=m
436: [04:32:12] <ss23> I'd get 2x of those HDDs so I could raid
437: [04:32:38] <antmas> ss23: the SSD or ?
438: [04:33:03] <antmas> I really don't know enough about SSDs, but that one seemed cheap :P
439: [04:34:10] <ss23> lol
440: [04:34:11] <ss23> Not the SSD
441: [04:34:21] <ss23> :P
442: [04:34:25] <ss23> idc about the SSDs
443: [04:35:27] <antmas> I'd just have the OS on there
444: [04:36:06] <antmas> I've never had a WD black fail on me before, so maybe no need for 2x (RAIDED)
445: [04:36:17] <spronk0> bro
446: [04:36:18] <spronk0> get more RAM
447: [04:36:25] <spronk0> 12GB not enough :p
448: [04:36:30] <antmas> spronk0: 16?
449: [04:36:33] <spronk0> also, is dual channel still a thing?
450: [04:36:47] <spronk0> i think it is, so you'll want even sticks
451: [04:36:54] <antmas> yeah 16 then
452: [04:37:16] * spronk0 wouldn't bother with raid, just backup to a green or similar
453: [04:37:54] <Giganaire> oh god this is horrible
454: [04:38:01] <Giganaire> i'm cleaning my keyboard
455: [04:38:10] <antmas> http://pricespy.co.nz/list.php?l=124006&view=m updated
456: [04:38:12] <Giganaire> and in the meantime using an HTPC keyboard
457: [04:38:23] <antmas> wait
458: [04:38:26] <Giganaire> everything is so wrong
459: [04:38:26] <antmas> forgot the RAM :P
460: [04:38:43] <spronk0> also
461: [04:38:45] <spronk0> what PSU do you have?
462: [04:39:07] <Giganaire> this does not a good keyboard for typing make: http://www.logitech.com/en-us/product/wireless-touch-keyboard-k400r
463: [04:39:12] <spronk0> HA
464: [04:39:15] <spronk0> indeed not
465: [04:39:17] * spronk0 has one of those for his htpc
466: [04:39:19] <antmas> updated :P
467: [04:39:29] <antmas> spronk0: corsair tx750
468: [04:39:34] <antmas> should be enough
469: [04:39:47] <spronk0> hmm, how old?
470: [04:40:01] <spronk0> nvm
471: [04:40:03] <antmas> spronk0: ~4 years
472: [04:40:05] <spronk0> its haswell compatible
473: [04:40:17] <spronk0> all good.
474: [04:40:23] <antmas> damn good PSu
475: [04:40:26] <antmas> PSU*
476: [04:40:29] <spronk0> i had an HX620 that whined with a haswell chip in low sleep mode
477: [04:40:38] <antmas> heh
478: [04:40:47] <spronk0> great psu, just haswell has ridiculous low voltage demands
479: [04:41:01] * spronk0 has an X-650 now
480: [04:41:09] <Ryan-Toast> antmas: you should be good https://github.com/Rhym/ss_boilerplate/tree/master/Boilerplate/css/cms
481: [04:41:24] <antmas> Ryan-Toast: thanks horse
482: [04:41:32] <antmas> will make use it of it within 2 weeks
483: [04:41:41] <antmas> right
484: [04:41:46] <antmas> off to pub
485: [04:41:53] <antmas> later :D (not drinking :()
486: [04:41:58] <spronk0> chow
487: [04:42:07] <antmas> ciao
488: [04:42:11] <ss23> you guys have chow there?
489: [04:42:11] * antmas quit (Quit: Page closed)
490: [04:42:15] <ss23> first burgerfuel, now chw?!
491: [04:42:25] <spronk0> whats chow?
492: [04:42:58] <ss23> A place for food!
493: [04:43:07] <ss23> Open to midnight each day!
494: [04:43:15] <ss23> http://www.chow.co.nz/
495: [04:44:11] <spronk0> interesting
496: [04:44:14] <spronk0> but no we don't
497: [04:44:22] <spronk0> what i really want is
498: [04:44:23] <spronk0> Sal's
499: [04:44:34] <Giganaire> i swear every wellingtonian i follow on twitter goes on and on about chows
500: [04:46:27] <ss23> lol
501: [04:46:50] <Giganaire> sals started delivery in hamilton this week (store opened a few weeks ago)
502: [04:47:10] <Giganaire> looked at delivery zone
503: [04:47:17] <Giganaire> guess which side of peachgrove rd i'm on: https://dl.dropboxusercontent.com/u/4618071/salsdelivery.png
504: [04:48:53] <spronk0> i'm sure they'd make an exception
505: [04:49:10] <Giganaire> probably
506: [04:49:30] <Giganaire> they likely just dont want to risk their drivers' lives by going into poet's corner
507: [04:50:04] <Colin[pi]> aw yiss, infrared foot massager
508: [04:50:14] <Colin[pi]> simon_w: you need one of these for your desk here
509: [04:59:42] * nickmolhoek quit (Quit: nickmolhoek)
510: [05:19:51] * Ryan-Toast quit (Quit: Ryan-Toast)
511: [05:23:17] <Colin[pi]> is there a way I can make a sitetree object have a different class in the tree? i.e. to highlight differently with css?
512: [05:23:46] <Colin[pi]> i.e. multiple pages of same type, but one has a boolean set to true, I want it to appear differently in the tree
513: [05:24:59] <Colin[pi]> ah CMSTreeClasses
514: [05:28:56] * SightUnseen has joined #silverstripe
515: [05:29:11] * SightUnseen has left #silverstripe
516: [05:34:48] * an_Eskimo quit (Ping timeout: 240 seconds)
517: [05:44:20] * UncleCheese quit (Quit: UncleCheese)
518: [06:16:48] <willagain> getExportFields
519: [06:17:00] <willagain> is there a magic trick to make it work?
520: [06:17:27] <willagain> its supposed to be for setting (oddly named) the fields to be included in the csv export
521: [06:17:37] <willagain> but it ignores me : (
522: [06:18:15] * Error404NotFound has joined #silverstripe
523: [06:25:07] <Colin[pi]> willagain: it uses summaryFields by default, does it work without defining getExportFields?
524: [06:25:56] <willagain> yep, exactly, it uses summary fields regardless of me
525: [06:26:23] <willagain> if i define getExportFields, it just pumps out the same csv.
526: [06:26:54] <willagain> wait wait.
527: [06:27:04] <willagain> its me being a moron. stand by
528: [06:27:22] <Colin[pi]> lol
529: [06:29:12] <willagain> no, wait. still doesn't work, even now i am putting the code in the right place
530: [06:29:31] <willagain> before i was putting it in the DataObject Class
531: [06:30:06] <willagain> now im putting it in ModelAdmin class where it is supposed to be, but still, its still ignoring me
532: [06:30:26] <willagain> i've even flushed =1
533: [06:34:34] <willagain> ah, no. dev build saves the day. every ss dev ever knows to do that. my bad *crawls into a hole*
534: [06:35:17] <Colin[pi]> willagain: haha
535: [06:35:25] <Colin[pi]> willagain: wait, you're putting it in ModelAdmin?
536: [06:35:32] <willagain> yup
537: [06:35:38] <Colin[pi]> the core class?
538: [06:35:58] <willagain> no the MyModel extends ModelAdmin thingy
539: [06:36:02] <Colin[pi]> oh good lol
540: [06:36:04] <willagain> well, class
541: [06:36:16] <willagain> yah - im not quite that dumb
542: [06:36:17] <Colin[pi]> but it should be in your dataobject class right?
543: [06:36:25] <willagain> no, model admin
544: [06:37:03] <Colin[pi]> oh yep I see now, to override the parent
545: [06:37:27] <willagain> yep. thanks for being here. you are an excellent rubber duck : )
546: [06:38:06] * Colin[pi] squeaks
547: [06:38:21] <willagain> ha
548: [06:39:13] * ss23 throws Colin[pi] into cold water
549: [06:39:17] <ss23> HAVE A BATH, DUCKY
550: [06:39:59] * Colin[pi] now has hard ducky nipples
551: [06:42:11] <ss23> ;_;
552: [06:42:11] <ss23> pls
553: [06:42:26] <Colin[pi]> but it has nothing to do with the cold water... huehuehuehue
554: [06:42:37] <ss23> lol
555: [06:55:36] <ss23> PHP Fatal error: Exception thrown without a stack frame in Unknown on line 0
556: [06:55:47] <ss23> Hello darkness, my old friend
557: [06:55:48] <ss23> :/
558: [06:59:44] * Error404NotFound quit (Ping timeout: 276 seconds)
559: [07:07:02] * anselmdk has joined #silverstripe
560: [07:13:36] <Colin[pi]> Unknown on line 0? dafuq?
561: [07:17:17] * Motoservo quit (Quit: Motoservo)
562: [07:17:27] <ss23> Common error tbh
563: [07:17:51] <ss23> Was intermitent this time though luckily, probably an error from the postgres disconnect I'm going to guess, for no good reason
564: [07:25:18] * willagain quit (Ping timeout: 240 seconds)
565: [07:31:47] * violetina has joined #silverstripe
566: [07:42:29] <Colin[pi]> common? never seen it b4 :\
567: [07:44:14] <ss23> You gotta write more PHP, yo!
568: [07:45:08] * stnvh has joined #silverstripe
569: [07:46:48] * stnvh quit (Client Quit)
570: [08:04:41] * kinglozzer has joined #silverstripe
571: [08:07:05] * stnvh has joined #silverstripe
572: [08:21:11] * UncleCheese has joined #silverstripe
573: [08:24:44] <Giganaire> 10:11 < Colin[pi]> Unknown on line 0? dafuq?
574: [08:24:59] <Giganaire> yep, PHP, where half of the errors are either on line 0 or line (last line + 1)
575: [08:37:29] <Colin[pi]> Giganaire: still dont think I've ever seen a line 0 one, my php must not be l33t enough
576: [08:38:33] * spronk2 has joined #silverstripe
577: [08:44:53] <Tanger> Why does it throw errors with reference to those line numbers?
578: [08:44:59] * micmania1 has joined #silverstripe
579: [08:45:07] <Tanger> If the error's not in the actual script, where's it being thrown?
580: [08:45:20] <Colin[pi]> Tanger: magical PHP fairy land
581: [08:45:45] <simon_w> Tanger, in an error handler
582: [08:46:04] <simon_w> The line+1 error is too many opening braces
583: [08:46:26] <Tanger> Yeah, that makes sense. So the 0 is the erro handler not reporting the line number properly?
584: [08:46:46] <Tanger> Or it is, it's just not in the scope of the class any more?
585: [08:47:07] <simon_w> Error handlers are called from outside of the stack
586: [08:48:06] <micmania1> ss23: you coming to the football?
587: [08:48:27] <micmania1> footballsoccer*
588: [08:51:02] * ARNHOE has joined #silverstripe
589: [08:51:39] * anselmdk quit (Quit: anselmdk)
590: [08:54:37] <ss23> lol
591: [08:54:40] <ss23> micmania1: I heard about this...
592: [08:54:50] <ss23> I will see
593: [08:54:59] <ss23> I'd rather work payed for other things for me than that, truth be told :P
594: [08:55:16] <micmania1> haha fair enough
595: [08:56:08] <Giganaire> ss23: sorry, only way to get your work to pay for your porn is to become an MP
596: [08:58:28] <ss23> lol
597: [09:22:42] <micmania1> http://pastie.org/private/9ob19weobpxuwu4ukapg4q - I left a message for the next dev on the job. Turns out that dev is me.
598: [09:23:17] <micmania1> Only done it last week
599: [09:23:31] <micmania1> MINIFIED!!!
600: [09:25:29] <Giganaire> lol
601: [09:25:46] <Giganaire> so... something mustve gone up the shit at northcomms
602: [09:26:06] * Tanger quit (Quit: Tanger)
603: [09:27:13] <Giganaire> for the last hour since i got home from the gym it's been a dispatcher i didn't recognise
604: [09:28:33] * Tanger has joined #silverstripe
605: [09:29:21] <Giganaire> just now "Centralcomms from Northcomms, can you give me a call on X?" then a bit later "Northcomms from Centralcomms, the channel is yours." "Centralcomms from Northcomms, still having issues here, can you continue dispatching for now?"
606: [09:29:52] * Bollig|DesignCty quit (Ping timeout: 265 seconds)
607: [09:30:29] <Giganaire> oh and just now "Centralcomms from Northcomms, at this stage we're having to reboot this machine to try and sort out a couple of issues"
608: [09:42:16] * simon_w|air has joined #silverstripe
609: [09:46:44] * anselmdk has joined #silverstripe
610: [10:39:43] * gelignite has joined #silverstripe
611: [10:40:08] * UncleCheese quit (Quit: UncleCheese)
612: [10:40:38] * simon_w|air quit (Quit: This computer has gone to sleep)
613: [10:41:19] * simon_w quit (Quit: This computer has gone to sleep)
614: [10:50:44] * spronk2 quit (Quit: spronk2)
615: [11:06:44] * spronk2 has joined #silverstripe
616: [11:16:21] * violetina quit (Ping timeout: 252 seconds)
617: [11:16:58] * violetina has joined #silverstripe
618: [11:22:52] * violetina quit (Ping timeout: 245 seconds)
619: [11:25:45] * Pymeetingsk has joined #silverstripe
620: [11:29:32] * violetina has joined #silverstripe
621: [11:30:45] * anselmdk quit (Quit: anselmdk)
622: [11:38:52] * anselmdk has joined #silverstripe
623: [11:41:17] * anselmdk quit (Client Quit)
624: [11:48:15] * bwaah_ has joined #silverstripe
625: [11:49:59] * bwaah_ quit (Client Quit)
626: [12:03:01] * UndefinedOffset has joined #silverstripe
627: [12:08:08] * Alfirin has joined #silverstripe
628: [12:09:24] <Alfirin> Hello. Is there a way to make pages inherit an user defined form from their parents, or have the same form exist in multiple pages?
629: [12:10:00] * desperate has joined #silverstripe
630: [12:10:14] <desperate> what's the procedure when you cannot flush the cache
631: [12:10:32] <desperate> I am attempting to flush but I get a screen telling me I am logged in
632: [12:10:43] <Pymeetingsk> fix the bit that's broken, then flush.
633: [12:10:51] <Pymeetingsk> it happens because of an error somewhere
634: [12:11:03] <Pymeetingsk> it's a bit of a pain in the arse unfortunately
635: [12:11:22] <Pymeetingsk> Alfirin: yep... well no, but you can do it.
636: [12:11:53] <Pymeetingsk> the easiest way is to put a has_one to UserDefinedForm, then select the page with the form you want from a dropdown
637: [12:12:37] <desperate> i added a simple has_any realition of type image
638: [12:12:42] <desperate> it cause my cms to crash
639: [12:12:43] <Pymeetingsk> use modelAsController::controller_for($this->UseFormFromMyChosenPage())
640: [12:12:45] <desperate> i removed the line
641: [12:12:51] <Pymeetingsk> Alfirin: ^
642: [12:12:55] <desperate> now I can't flush orrebuild
643: [12:13:11] <guzzlefry> Don't you have to be logged in for that?
644: [12:13:26] <Pymeetingsk> Alfirin: once you have the appropriate controller, call $thatcontroller->Form() and it will return your user form for you
645: [12:13:36] <guzzlefry> wait, desperate, is your environment set to "dev"?
646: [12:14:07] <Pymeetingsk> guzzlefry: no, it's error. He IS logged in.
647: [12:14:11] <Alfirin> Pymeetingsk, thanks, I'll try that
648: [12:14:16] <guzzlefry> oh
649: [12:14:21] <Pymeetingsk> well, hopefully
650: [12:14:29] <desperate> I think i removed the dev flag
651: [12:14:36] <guzzlefry> I misread. :P
652: [12:14:37] <Pymeetingsk> put it back on
653: [12:14:48] <Pymeetingsk> could be missing an error or something important
654: [12:15:07] <Pymeetingsk> desperate: don't has_many to image anyway, it's a bad idea.
655: [12:15:21] <Pymeetingsk> either many_many or create an intermediary object.
656: [12:15:40] <Pymeetingsk> ie GalleryPage has_,many GalleryImage
657: [12:15:58] <Pymeetingsk> GalleryImage has_one GalleryPage, has_one Image
658: [12:18:10] <Pymeetingsk> eg as an example desperate: https://github.com/frankmullenger/silverstripe-simplegallery/tree/master/code
659: [12:18:30] * svandragt has joined #silverstripe
660: [12:18:37] <Pymeetingsk> because Image is core, there's no has_one back to your page or whatever to make the has_many relation work.
661: [12:18:49] <Pymeetingsk> so use an intermediary
662: [12:18:55] <Pymeetingsk> generally best.
663: [12:19:06] <svandragt> Is this right? With a GridFieldConfig_RecordEditor and VIEW but no edit permissions, it's not possible to click and load up the record in view mode?
664: [12:19:10] <svandragt> 3.0
665: [12:19:29] <Pymeetingsk> well there is no view mode.
666: [12:19:31] <Pymeetingsk> afaik
667: [12:19:40] <Pymeetingsk> 'view' mode is edit mode.
668: [12:19:45] <Pymeetingsk> can't edit, so can't load.
669: [12:20:22] <svandragt> Pymeetingsk: open a record in edit mode and change /edit at the end of the url to view :)
670: [12:20:50] <svandragt> Pymeetingsk: http://site/admin/courses/Course/EditForm/field/Course/item/41/ItemEditForm/field/CourseMOAs/item/42/view works fine
671: [12:21:00] <Pymeetingsk> svandragt: yeah but when clicking a record on a gridfield I think it just loads edit, no?
672: [12:21:02] <Pymeetingsk> idk
673: [12:21:21] <svandragt> Pymeetingsk: ah I see what you mean now
674: [12:21:31] <Pymeetingsk> otherwise I'm not sure, gridfield is great, but it's also a labrynth of black box code :<
675: [12:21:34] <Pymeetingsk> to me.
676: [12:21:42] <svandragt> Pymeetingsk: yes that's probably it. need to add a view button
677: [12:21:53] <Pymeetingsk> svandragt: yeh, if that's your only issue.
678: [12:22:16] <svandragt> Pymeetingsk: for the moment :{
679: [12:22:20] <Pymeetingsk> svandragt: better idea is probably to hack the component code and make it load the appropriate interface to the permission
680: [12:22:26] <Pymeetingsk> then pull request it :P
681: [12:23:21] <svandragt> Pymeetingsk: :) labrynth of black box code
682: [12:24:12] <Pymeetingsk> yep :<
683: [12:24:21] <Pymeetingsk> I really need to learn it good and propers :<
684: [12:25:59] <desperate> Pymeetingsk: thanks.... will try that although my CMS is totally broken at the moment trying to get it back
685: [12:29:34] <desperate> i have two servers.. the site is mirrored
686: [12:29:43] <desperate> server 1 cms is ok
687: [12:29:49] <desperate> server 2 cms crashes
688: [12:29:55] <desperate> i am sure it is because I need to flush
689: [12:30:00] <desperate> but flush won't work
690: [12:31:12] <micmania1> desperate: do you have ssh access?
691: [12:33:25] <svandragt> Pymeetingsk: I've written this code that takes a list of relations and creates gridfields in tabs for them, including passing through validation now. I guess I should generalize it and built in permission checks
692: [12:33:50] <desperate> micmania1: yes
693: [12:34:05] <desperate> i created a silverstripe-cache folder
694: [12:34:15] <micmania1> have you checked the error log?
695: [12:34:17] <desperate> then tried a flush again and it seemed to work
696: [12:34:57] <desperate> and now I can access my cms
697: [12:34:59] <desperate> weird!
698: [12:35:18] <guzzlefry> oh
699: [12:35:31] <guzzlefry> desperate: creating that directory essentially flushed everything.
700: [12:36:29] <desperate> so why would the usual flush method not work
701: [12:36:33] <desperate> ?flush=all
702: [12:36:51] <guzzlefry> oh, that I don't know.
703: [12:37:57] <micmania1> desperate: error log?
704: [12:39:19] * stnvh quit ()
705: [12:40:05] <desperate> i'll take a look in a bit
706: [12:42:31] <Alfirin> Pymeetingsk, do you have time to hand-feed the solution to me? I don't want to break anything
707: [12:46:12] <Pymeetingsk> class MyPageThatWantsAFormIDefinedSomewhereElse extends Page { private static $has_one = array('PageWithFormOnIt' => 'UserDefinedForm'); public function getCMSFields() { $fields = parent::getCMSFields(); $fields->addFieldToTab('Root.Main', DropdownField::create('PageWithFormOnItID', 'Use the form defined on this page', UserDefinedForm::get()->map())); return $fields; } }
708: [12:46:45] <Alfirin> Thank you, sweetheart
709: [12:50:16] <Pymeetingsk> class MyPageThatWantsAFormIDefinedSomewhereElse_Controller extends Page_Controller { public function Form() { $page = $this->PageWithFormOnIt(); $form = null; if($page->exists()) { $controller = ModelAsController::controller_for($page); $form = $controller->Form(); } return $form; } }
710: [12:50:21] * violetina quit (Remote host closed the connection)
711: [12:51:13] <Pymeetingsk> Alfirin: from the top of my head, typed directly into IRC. I've not worked on SS for 6 months. You'll forgive me if it's not 100% correct, I'm sure.
712: [12:51:20] <Pymeetingsk> But you get the idea.
713: [12:52:13] <Alfirin> Well, your still lightyears ahead of me
714: [12:52:44] <Pymeetingsk> you're.
715: [12:53:12] <Alfirin> I was going to write "your skills are" but my hands missed the signal
716: [12:53:15] <Pymeetingsk> I don't have a still ;)
717: [12:53:40] <Pymeetingsk> :P
718: [12:55:27] <Alfirin> My brain tends to prefill a lot of what I do too effectively, so I often end up with two half-sentences mushed together to make nonsense
719: [12:55:32] <Alfirin> Which is why I'm not a coder
720: [12:55:39] <ss23> It's true, Pymeetingsk is really bad at most things he does
721: [12:55:42] <ss23> jk jk
722: [12:55:42] <ss23> <3
723: [12:55:43] <ss23> :D
724: [12:56:04] <ss23> Just going to bed, so thought I had to interject to something, considering most mornings I wake up to Pymeetingsk giving some comment like "SS@# LOVES DOCS" :P
725: [12:56:07] <ss23> Pymeetingsk: <3
726: [12:56:39] <svandragt> oh gridfield
727: [12:56:52] <svandragt> why dost thou be so complex :P
728: [12:57:13] <micmania1> ss23: is it true you didn't know how to click on a mac?
729: [12:57:40] <ss23> micmania1: IT WAS A FUCKING LAPTOP THAT HAD TAP TO CLICK TURNED OFF, AND I'VE NEVER USED ONE OF THE FUCKING LAPTOPS THAT YOU PHYSICALLY PRESS THE ENTIRE TOUCHPAD IN TO CLICK
730: [12:57:50] <ss23> I'm not going to just randomly press as hard as I can against random surfaces and hope it clicks!
731: [12:57:53] <ss23> :(
732: [12:57:54] <svandragt> gridfield config allows me to remove components for a whole gridfield, not per record :(
733: [12:57:55] * ss23 sobs
734: [12:57:57] <ss23> micmania1: It's true, but it's misleading...
735: [12:57:59] <micmania1> hahahahaha
736: [12:58:34] <ss23> I'm going to bed ;_;
737: [12:58:35] <ss23> GOODNIGHT
738: [12:58:37] * ss23 runs away crying
739: [12:58:50] <svandragt> that's called a button isn't it when you press againsta random surface and it clicks hehe
740: [12:58:57] <guzzlefry> ss23: it's 9am!
741: [12:59:04] <ss23> guzzlefry: SPEAK FOR YOURSELF, IT'S 1AM
742: [12:59:13] <Pymeetingsk> err, 2am you dope
743: [12:59:14] <guzzlefry> SPEAK FOR YOURSELF, THIS IS 'MERICA
744: [12:59:31] <Pymeetingsk> FEELS LIKE, LIKE I CAN'T SIT STILL
745: [12:59:49] * guzzlefry puts an extra two slices of cheese on his cheeseburger and glares at ss23.
746: [12:59:53] <guzzlefry> ...'merica... -_-
747: [12:59:55] <ss23> Pymeetingsk: 1am
748: [12:59:58] <Pymeetingsk> guzzlefry: .... 9am
749: [13:00:03] <Pymeetingsk> ss23: nope.
750: [13:00:12] <guzzlefry> yep, 9am
751: [13:00:13] <ss23> 1am!!!!!
752: [13:00:13] <Pymeetingsk> look again son.
753: [13:00:18] <ss23> Pymeetingsk: Look *where*?
754: [13:00:28] <guzzlefry> bro...I got a whole pack of Kraft Singles, don't try me.
755: [13:00:38] <Pymeetingsk> at the clock!
756: [13:00:45] <micmania1> Pymeetingsk: is 1am
757: [13:00:49] <micmania1> get with the times
758: [13:00:53] <Pymeetingsk> fuck, my clock in out :<
759: [13:00:56] <Pymeetingsk> is*
760: [13:01:01] <guzzlefry> Most people here are in New Zealand.
761: [13:01:01] <Pymeetingsk> it's only 2, not 3 :<
762: [13:01:06] <ss23> FUCK YOU IT'S 1AM
763: [13:01:07] <guzzlefry> I think...
764: [13:01:08] * ss23 runs away
765: [13:01:17] <Pymeetingsk> it's 1am, fine. geesh
766: [13:01:32] <ss23> :D
767: [13:01:33] <ss23> I WIN
768: [13:01:42] <Pymeetingsk> go to bed -.-
769: [13:01:53] <Pymeetingsk> my clock... how does it do it
770: [13:02:00] <Pymeetingsk> MAGNETS
771: [13:02:28] <ss23> I'm going
772: [13:02:30] * ss23 runs away
773: [13:02:34] <Pymeetingsk> ciao
774: [13:02:37] <Alfirin> Pymeetingsk, good news, it's working
775: [13:02:43] <Pymeetingsk> Alfirin: :>
776: [13:02:56] <Pymeetingsk> amazing
777: [13:03:22] <Pymeetingsk> live coding in a system I haven't used for 6+ months.
778: [13:03:35] <Pymeetingsk> NAILED IT
779: [13:03:35] <Alfirin> Maybe you're just awesome
780: [13:03:40] <Pymeetingsk> :D
781: [13:04:03] <Pymeetingsk> Yep, next time I see my assailants in the street I'm a just walk straight up and ask for the shit they stole back.
782: [13:05:18] <Alfirin> "Stand back, crooks, I know SS!"
783: [13:05:34] <svandragt> "no items found: page 1 of 19"
784: [13:06:01] <Pymeetingsk> xD
785: [13:06:19] <svandragt> the other 18 pages have no items either luckily
786: [13:06:25] <Pymeetingsk> svandragt: you sure that's not supposed to be "No." as in #, number
787: [13:06:32] <Pymeetingsk> haha
788: [13:06:39] <Pymeetingsk> classic
789: [13:06:49] <Pymeetingsk> are 19 pages the grand total sans filters?
790: [13:06:59] <svandragt> View 31–60 of 550 , no items found
791: [13:07:05] <svandragt> yeah
792: [13:07:18] * PapaBearNZ quit (Ping timeout: 240 seconds)
793: [13:07:23] <svandragt> 19 pages of items, if you have permissions to acknowledge they exist lol
794: [13:07:26] <Pymeetingsk> so it's forgetting the filters when it's getting the total for the page count :<
795: [13:07:38] <Pymeetingsk> mm
796: [13:07:39] <Pymeetingsk> I see
797: [13:07:40] <svandragt> Pymeetingsk: it's probably the order in which you specify them or something
798: [13:07:49] <Pymeetingsk> idk *shrug*
799: [13:08:07] * svandragt sacrifices a branch of herbs to the gridfield gods and moves on
800: [13:08:42] <Pymeetingsk> I've got a multi stage UI to design, where about 60 actions happen to each entry, and most of them can happen at any time.
801: [13:09:03] <Pymeetingsk> How to facilitate this in a UI, where the #1 complaint of the current system is "we don't like clicking buttons!
802: [13:09:04] <Pymeetingsk> "
803: [13:09:09] <svandragt> Pymeetingsk: that's lego for you
804: [13:09:19] <Pymeetingsk> lego?
805: [13:09:26] <svandragt> Pymeetingsk: drag and drop onto action zones haha
806: [13:09:35] <Pymeetingsk> haha
807: [13:09:37] <Pymeetingsk> worse!
808: [13:09:43] <svandragt> Pymeetingsk: commandline?
809: [13:09:52] <Pymeetingsk> haha
810: [13:09:59] <Pymeetingsk> fuck, these people don't know what a web browser is
811: [13:10:23] <Pymeetingsk> y' all ways on my mind girl
812: [13:10:29] <Pymeetingsk> doncha know that you're always
813: [13:10:40] <desperate> any ideas what is wrong with this: http://paste2.org/Bnh766OW
814: [13:10:42] <Pymeetingsk> I remember when, when I first met you I knew just what to do...
815: [13:10:57] <desperate> lines 24-29 crash my cms
816: [13:10:58] <Pymeetingsk> http://www.youtube.com/watch?v=3euc9pmst4M&list=PLDA7F2E1F0E633658&index=13
817: [13:11:10] <desperate> if i comment them out cms works
818: [13:11:54] <Pymeetingsk> desperate: logs!
819: [13:12:17] <Pymeetingsk> login form is a redirector type.
820: [13:12:21] <Pymeetingsk> as most ss forms are.
821: [13:12:28] <Pymeetingsk> got it right? redirect to /admin
822: [13:12:37] <Pymeetingsk> got it wrong? redirect to /Security/login
823: [13:13:04] <Pymeetingsk> got an error? Well that's not right, so redirect to /Security/login
824: [13:13:14] <svandragt> desperate: try that http://paste2.org/Bnh766OW#comment-1363913846
825: [13:13:16] <Pymeetingsk> thus you don't see any error that pops up.
826: [13:13:38] <Pymeetingsk> also desperate, never ever ?>
827: [13:13:45] <Pymeetingsk> that way lies headaches.
828: [13:14:00] <svandragt> desperate: that replaces line 17-29
829: [13:15:53] <Pymeetingsk> it's just arranging the same code.
830: [13:16:26] <svandragt> desperate: updated my answer
831: [13:17:00] <svandragt> Pymeetingsk: with understandable code :P
832: [13:17:02] <Pymeetingsk> $fields->addFieldToTab('Root.ShowCarousel', GridField::create('ShowCarouselImg', 'Title', $this->ShowCarouselImg(), GridFieldConfig_RelationEditor::create()->addComponent(new GridFieldManyRelationHandler()))
833: [13:17:04] <Pymeetingsk> same thing
834: [13:17:16] <Pymeetingsk> shouldn't make a difference svandragt.
835: [13:17:49] <Pymeetingsk> meeting time again
836: [13:24:01] <desperate> sorry goes was eating
837: [13:25:32] <desperate> Pymeetingsk: I only used the closing tabs so that the poste2.org was coloured coordinated... without it the aste is just black and white, thought it would be easier to read in colour?
838: [13:26:04] <Pymeetingsk> desperate: no, opening tag is what matters. Closing tag shouldn't make a difference.
839: [13:26:36] <Pymeetingsk> if you copy as a whole it should work. If not, paste2 is crap :<
840: [13:26:44] <Pymeetingsk> heh
841: [13:26:58] <Pymeetingsk> but that's cool.
842: [13:27:04] <Pymeetingsk> so long as it's not in your code.
843: [13:27:19] <Pymeetingsk> not that it really matters if it is... it's just much easier to end up in a 'wtf' situation :<
844: [13:28:03] <Pymeetingsk> if you're writing pure php, just as a rule never use it. It's for closing off php and outputting straight to browser (vary old school way of doing things)
845: [13:28:05] <Pymeetingsk> very*
846: [13:28:34] <desperate> no, it's not in my site code
847: [13:28:37] <desperate> just the example
848: [13:28:50] <desperate> trying the solution suggested
849: [13:31:26] <Pymeetingsk> it's not a solution, just a condesning
850: [13:31:29] <Pymeetingsk> well, mine is.
851: [13:31:45] <Pymeetingsk> same deal with svandragt's too. It's just reshuffled code.
852: [13:31:55] <Pymeetingsk> shoud give you the same result.
853: [13:32:05] <Pymeetingsk> syntactically equivalent.
854: [13:32:13] <desperate> yes it does
855: [13:32:15] <Pymeetingsk> err, functional;y*
856: [13:32:22] <Pymeetingsk> s/;/l/
857: [13:32:33] <desperate> i get a white screen when I select the tab
858: [13:36:20] <desperate> what should I do next, check the error log in logs?
859: [13:38:51] <micmania1> desperate: always check the error log first
860: [13:38:56] <desperate> if I flush successfully then I should be prompted for login for admin right?
861: [13:42:45] <desperate> my server is screwed up I think... it basically won't flush
862: [13:43:15] <desperate> the last entry in error.log is April 11th
863: [13:44:12] <Pymeetingsk> desperate: enable silvestripe logging
864: [13:44:21] <Pymeetingsk> it'll be a silverstripe error, not an apache error
865: [13:44:24] <Pymeetingsk> most likely
866: [13:44:40] <Pymeetingsk> that or put a die in before the redirect comes out so you can see the error (also put site in dev mode)
867: [13:47:02] * stnvh has joined #silverstripe
868: [13:50:17] <desperate> this right?
869: [13:50:18] <desperate> SS_Log::add_writer(new SS_LogFileWriter('/my/logfile/path'), SS_Log::WARN, '<=');
870: [13:55:46] <Pymeetingsk> probably
871: [13:55:57] <Pymeetingsk> admittedly it's one thing in SS I've never used.
872: [13:56:14] <Pymeetingsk> looks right enough.
873: [13:56:34] <desperate> this is nsane
874: [13:56:40] <Pymeetingsk> ?
875: [13:56:40] <desperate> suddenly the tab works
876: [13:56:44] <desperate> haven't changed anything
877: [13:56:53] <Pymeetingsk> read logs anyway
878: [13:56:53] <desperate> there are some major flush issues I think
879: [13:56:57] <Pymeetingsk> read logs anyway
880: [13:57:17] <Pymeetingsk> might be a warning that's no longer being thrown to the screen
881: [14:01:26] <desperate> ok i will check
882: [14:01:40] <desperate> the tab now opens but the relation manager is not present
883: [14:04:47] <desperate> ahh got it now
884: [14:06:19] * scpi has joined #silverstripe
885: [14:11:07] <desperate> when you use the relation manager on a gridfield should there be pagination
886: [14:11:19] <desperate> the relation is to images
887: [14:11:31] <desperate> I have 8 pages of images when I view files
888: [14:11:51] <desperate> on my tab for this relation I have images A-B
889: [14:12:00] <desperate> but there is no pagination
890: [14:12:20] <Pymeetingsk> probably should be, yeh
891: [14:12:40] <Pymeetingsk> but not until it needs it
892: [14:13:33] <Pymeetingsk> 8 pages of files, sure. But none of those are linked to your page, so it should be that none show.
893: [14:13:51] <Pymeetingsk> plus it should be usig intermediary objects, not images.
894: [14:14:01] <kinglozzer> this ^^
895: [14:14:13] <kinglozzer> Or just an uploadfield
896: [14:16:15] <Pymeetingsk> kinglozzer: is a has_many
897: [14:16:17] <desperate> really? so i have to make an object which has_one image
898: [14:16:31] <Pymeetingsk> desperate: yes, I told you this when you started on this endeavour
899: [14:16:53] <kinglozzer> Any reason it can't just be a many many? (cba to read up)
900: [14:17:09] <desperate> why the extra complication
901: [14:17:27] <desperate> i simply wish to associate a number of images with an object
902: [14:17:33] <Pymeetingsk> http://logs.simon.geek.nz/index.php?date=2014-05-02#log_1268367
903: [14:17:36] <kinglozzer> desperate: because a has_many image means image has_one object - which means that an image can only be used in one place
904: [14:17:38] <Pymeetingsk> http://logs.simon.geek.nz/index.php?date=2014-05-02#log_1268367
905: [14:17:38] <Pymeetingsk> http://logs.simon.geek.nz/index.php?date=2014-05-02#log_1268367
906: [14:17:39] <Pymeetingsk> http://logs.simon.geek.nz/index.php?date=2014-05-02#log_1268367
907: [14:17:39] <Pymeetingsk> http://logs.simon.geek.nz/index.php?date=2014-05-02#log_1268367
908: [14:17:39] <Pymeetingsk> http://logs.simon.geek.nz/index.php?date=2014-05-02#log_1268367
909: [14:17:39] <Pymeetingsk> http://logs.simon.geek.nz/index.php?date=2014-05-02#log_1268367
910: [14:17:39] <Pymeetingsk> http://logs.simon.geek.nz/index.php?date=2014-05-02#log_1268367
911: [14:17:40] <Pymeetingsk> http://logs.simon.geek.nz/index.php?date=2014-05-02#log_1268367
912: [14:17:40] <Pymeetingsk> http://logs.simon.geek.nz/index.php?date=2014-05-02#log_1268367
913: [14:17:41] <Pymeetingsk> http://logs.simon.geek.nz/index.php?date=2014-05-02#log_1268367
914: [14:17:45] <kinglozzer> :P
915: [14:17:47] <Pymeetingsk> k
916: [14:17:48] <Pymeetingsk> ?
917: [14:18:23] <desperate> yeah i followed what you said and made it many_many
918: [14:19:21] <kinglozzer> desperate: Good, now you can just use an UploadField. No need for a GridField
919: [14:19:47] <Pymeetingsk> ok, so then no issue :>
920: [14:19:55] <Pymeetingsk> you just can't has_many
921: [14:19:59] <desperate> hmm i'm lost now
922: [14:20:12] <desperate> i need the relation manager right
923: [14:20:15] <Pymeetingsk> nope
924: [14:20:18] <Pymeetingsk> just uploadfield
925: [14:20:23] <Pymeetingsk> that's what it's for :>
926: [14:20:23] <kinglozzer> desperate: Remove your GridField, make sure it's many_many to Image, add an UploadField instead of GridField
927: [14:20:28] <kinglozzer> done
928: [14:20:31] <Pymeetingsk> ^
929: [14:20:31] <Pymeetingsk> :)
930: [14:20:46] <Pymeetingsk> if you want exxtra fields, like description, etc.
931: [14:20:49] <desperate> can i keep the tab
932: [14:20:53] <Pymeetingsk> then yeah, intermediary object is best.
933: [14:20:58] <Pymeetingsk> desperate: of course.
934: [14:21:01] <Pymeetingsk> it's just another field.
935: [14:21:03] <kinglozzer> desperate: Yes
936: [14:21:09] <kinglozzer> Just add an UploadField to the tab instead
937: [14:23:51] <Pymeetingsk> of gridfield
938: [14:31:37] * gelignite quit (Quit: http://bit.ly/nkczDT)
939: [14:32:55] <desperate> ok that worked... easy!
940: [14:33:01] <desperate> i have so much to learn
941: [14:37:34] * jcwacky has joined #silverstripe
942: [14:37:40] <desperate> what the best approach to this problem...
943: [14:38:01] <desperate> i want to query two tables... usually I would do an sql join
944: [14:38:08] <desperate> if I am using get::
945: [14:38:32] <desperate> should I grab two objects and merge the two results into a single object and pass to my template?
946: [14:40:02] * onejamesbrowne has joined #silverstripe
947: [14:40:22] <kinglozzer> desperate: It's rare you ever need to manually join tables in SilverStripe. Are the two objects related (has_one/has_many/many_many)?
948: [14:40:57] <Alfirin> Pymeetingsk, I have need for your awesomeness again
949: [14:43:55] <Alfirin> I want the form to acknowledge its parent page, but so far I've only managed it to say its own name
950: [14:44:20] <Alfirin> and I haven't found a way to get grandparent's info anywhere
951: [14:44:21] <Pymeetingsk> hmm?
952: [14:45:40] <Alfirin> let me re phrase a bit clearer
953: [14:47:15] <Alfirin> in the email the userform sends me (from the form within a page that you gave me) to have info on from which page the form was sent
954: [14:47:46] <desperate> @kinglozzer
955: [14:47:52] <Pymeetingsk> Alfirin: hmm...
956: [14:47:56] <desperate> no the items are not related objects
957: [14:48:00] <Pymeetingsk> not really from the top of my head, sorry.
958: [14:48:13] <Pymeetingsk> Alfirin: you could try...
959: [14:48:25] <Alfirin> I made a field that's prepopulated with its parent's title, but ofc the field's parent is the form itself
960: [14:48:53] <Pymeetingsk> when you get the controller in the Form() method, adding a switch $controller->beingUsedAs = $this; or something like that
961: [14:49:02] <desperate> hmmm the upload field works but when I move off the tab and come back there is no way of seeing which images have been uploaded
962: [14:49:05] <Pymeetingsk> and then when you build the... nah that would require altering the userform :<
963: [14:49:08] <desperate> how do I remove the association
964: [14:49:12] <Pymeetingsk> hmm, nah not really sorry Alfirin
965: [14:49:14] <desperate> or know which images are associated
966: [14:49:54] <Alfirin> aww :( thanks anyway
967: [14:49:56] <Pymeetingsk> because you've loaded the form from another controller, it would submit directly to that other page.
968: [14:49:57] <kinglozzer> desperate: The images should still be there, can you paste your getCMSFields() somewhere?
969: [14:50:18] <Pymeetingsk> Alfirin: oh, oh, after getting the $form object, you could modify it to be more in line with the 'user' page
970: [14:50:19] * Error404NotFound has joined #silverstripe
971: [14:50:27] <Pymeetingsk> (ie the page that is using the form as it's own)
972: [14:50:45] <Pymeetingsk> using Form::setController or something like that if it exists
973: [14:50:56] <Pymeetingsk> (otherwise Form::setFormAction if not)
974: [14:51:26] <Pymeetingsk> then it'll go through your encapsulating controller, and you can perhaps modify the output.
975: [14:51:32] <desperate> $fields->addFieldToTab("Root.ShowCarousel", UploadField::create('ShowCarousel'));
976: [14:51:33] <Pymeetingsk> But only maybe, you'll have to look at userdefined form
977: [14:51:42] <Pymeetingsk> to see if you can get at what you need before the email flies away
978: [14:51:57] <kinglozzer> desperate: ShowCarousel is wrong
979: [14:52:17] <kinglozzer> desperate: If your many_many is called ShowCarouselImg, your field name should also be ShowCarouselImg
980: [14:52:26] <kinglozzer> (not the tab, the uploadfield)
981: [14:52:38] <Pymeetingsk> desperate: you can use BlahClass::get()->join()
982: [14:52:53] <Pymeetingsk> but you need to know physical table names, rather than object map references
983: [14:53:47] <desperate> so do the join on the sql?
984: [14:54:02] <desperate> rather than trying put two results together?
985: [14:54:43] <Pymeetingsk> probably faster.
986: [14:54:55] <Pymeetingsk> otherwise yeah, $list->merge($otherlist)
987: [14:55:12] <Pymeetingsk> depends on what you're doing
988: [14:55:36] <Pymeetingsk> a join usually gets extra info for a single record.
989: [14:55:44] <Pymeetingsk> sounds more like you're trying for a UNION
990: [14:55:49] <Pymeetingsk> of sorts.
991: [14:55:59] <Pymeetingsk> so then yeah, merge() is probably your better bet.
992: [14:56:04] <Pymeetingsk> but you asked how to join
993: [14:56:10] <Pymeetingsk> and so that's how.
994: [14:56:26] <micmania1> is it siesta time yet?
995: [14:56:26] <desperate> i have a carouel
996: [14:56:33] <desperate> I have a book dataobject
997: [14:56:52] <desperate> there is a field boolean which adds the book to carousel
998: [14:56:54] <kinglozzer> micmania1: Siesta time has been and gone! 2pm
999: [14:57:05] <desperate> but i also want to have othr items in the carousel
1000: [14:57:08] <micmania1> noooooooooooooooooooo!
1001: [14:57:16] <desperate> say for example a news item
1002: [14:57:18] <kinglozzer> desperate: Yeah Pymeetingsk is right, merge()
1003: [14:59:40] <Pymeetingsk> micmania1: sooooo siesta time
1004: [14:59:48] <Pymeetingsk> been fighting it for the last... 3 hours :<
1005: [14:59:56] <Pymeetingsk> shit, nearly 4
1006: [15:00:26] <kinglozzer> desperate: $books = Book::get()->filter('ShowInCarousel', 1); $news = News::get()->filter('ShowInCarousel', 1); $data = new ArrayList($books->toArray()); $data->merge($news);
1007: [15:01:10] <Pymeetingsk> desperate: no, carousels should many_many books.
1008: [15:01:19] <Pymeetingsk> there's no boolean as such
1009: [15:01:57] <Pymeetingsk> but if you want other things in there too, then yeah, you shoudln't really specify a relation.
1010: [15:02:00] * spronk2 quit (Quit: spronk2)
1011: [15:02:04] <Pymeetingsk> which makes your life harder.
1012: [15:02:14] <Pymeetingsk> but what kinglozzer said probably
1013: [15:02:17] <Pymeetingsk> and merge.
1014: [15:02:32] <desperate> my carousel isn't a dataobject
1015: [15:02:33] <Pymeetingsk> join won't do what you want, and neither will union.
1016: [15:02:50] <Pymeetingsk> desperate: then yeah, for sure. Just give it a list. However you build that list is up to you.
1017: [15:02:59] <desperate> cool thanks
1018: [15:03:05] <desperate> the upload works now
1019: [15:03:13] <desperate> when i return the images remain
1020: [15:03:18] <Pymeetingsk> though ideally list items should probably implement a carouselitem interface, or something
1021: [15:03:23] <Pymeetingsk> but yeh
1022: [15:03:42] <Pymeetingsk> thats just general good code, not much to do with SS specifically
1023: [15:10:18] <jcwacky> Is there any way to use Requirements::combine_files without it automatically inserting a link to the CSS in the template head?
1024: [15:11:48] <scpi> That's what Requirements is for, isn't it? What is it that you're trying to do?
1025: [15:13:07] * Error404NotFound quit (Quit: User guilty of hitting the Big Red X...)
1026: [15:14:50] <jcwacky> I’d like to use combine_files to just create the combined.css file, and then rather than adding a CSS link, I wish to simply insert all the combined CSS into the head. Sounds stupid I know, but I’m currently playing with Google PageSpeed, and for some reason that is the only way to get 100/100.
1027: [15:16:21] <jcwacky> See it in action here: www.e-rail.org.uk A SilverStripe site with 100/100 on PageSpeed. I’ve just manually pasted in the CSS for now though.
1028: [15:17:18] <jcwacky> It does strike me that that is too much CSS to inline, and that you should only really inline a small amount, but PageSpeed’s not complaiing! (Kind of wish it did!)
1029: [15:17:20] <desperate> Pymeetingsk: where is the relation of my images stored (many_many on my dataobject)
1030: [15:17:54] <Pymeetingsk> jcwacky: no, requirements combines the files and makes the output.
1031: [15:18:03] <Pymeetingsk> it's one action, not two (combine, then output)
1032: [15:18:08] <Pymeetingsk> iirc
1033: [15:18:28] <Pymeetingsk> desperate: ObjectName_RelationName
1034: [15:18:34] <Pymeetingsk> (table)
1035: [15:18:35] <jcwacky> Ok, I’ll have to conver the site to use Grunt or CodeKit to combine instead then. Cheers!
1036: [15:18:52] <Pymeetingsk> jcwacky: well...you might be able to separate the two actions
1037: [15:18:59] <Pymeetingsk> but you'd have to look into it.
1038: [15:19:13] <Pymeetingsk> ie the combiner call might be public. You could utilise it directly
1039: [15:20:14] <desperate> so if i want to test for the presence of related images, I can do:
1040: [15:20:16] <desperate> <% if $CarouselShowImg() %>
1041: [15:20:30] <Pymeetingsk> its not a call, it's template.
1042: [15:20:39] <Pymeetingsk> just <% if $CarouselShowImg) %>
1043: [15:20:43] <Pymeetingsk> err, -)
1044: [15:20:54] <Pymeetingsk> ie, no ()
1045: [15:23:15] * ARNHOE quit ()
1046: [15:34:02] * anselmdk has joined #silverstripe
1047: [15:36:25] * jenniferaslan has joined #silverstripe
1048: [15:46:07] <scpi> It seems silly to stick your entire CSS in the page, rather than linking to it, no mater what Page Speed says.
1049: [15:46:23] <scpi> It may speed up one page, but it will slow down every page after that.
1050: [15:50:43] <scpi> The linked file gets downloaded once, and then loaded from cache on subsequent pages
1051: [15:56:02] <svandragt> ^this
1052: [15:58:44] <Pymeetingsk> that^
1053: [15:58:57] <Pymeetingsk> jcwacky: ^^
1054: [15:59:03] <kinglozzer> definitely that ^^
1055: [15:59:14] <kinglozzer> Take pagespeed with a pinch of salt :P
1056: [15:59:25] <jcwacky> Yeh, that’s what I thought.
1057: [15:59:25] <Pymeetingsk> it's kinda the whole point of theinternet.
1058: [15:59:29] <Pymeetingsk> cache
1059: [15:59:37] <scpi> Page speed isn't bad
1060: [15:59:39] <Pymeetingsk> this is why we have DNS issues, and all that.
1061: [16:00:04] <scpi> But you need to apply some thought to the results and what they really mean
1062: [16:01:00] <scpi> You'd be better off finding a way to load CSS, images, and other static resources from a different, cookieless domain.
1063: [16:05:53] <kinglozzer> We're thinking of that for our own website rebuild ^^
1064: [16:06:09] <kinglozzer> Even just a subdomain pointing to the same vhost should work, right?
1065: [16:06:25] <Pymeetingsk> probably?
1066: [16:07:13] <scpi> yeah, because it's a different domain as far as the http request is concerned
1067: [16:07:27] <scpi> static.example.com vs. www.example.com
1068: [16:07:28] <Pymeetingsk> is that same or new origin?
1069: [16:07:36] <Pymeetingsk> man, fuck w's
1070: [16:07:39] <Pymeetingsk> :<
1071: [16:07:48] <Pymeetingsk> I've seen arguemnts both way sthough
1072: [16:08:09] <scpi> oh?
1073: [16:08:47] <Pymeetingsk> well yeah, they're usually 100% redundant and just retarded.
1074: [16:09:00] <Pymeetingsk> so you get derps going www.subdomain.domain.com OH IT DOESNT WORK
1075: [16:09:04] <micmania1> Pymeetingsk: definitely going for pipnts tomorrow?
1076: [16:09:09] <Pymeetingsk> micmania1: yeh, a few.
1077: [16:09:17] <micmania1> sweet. I'll leave my car at home
1078: [16:09:22] <Pymeetingsk> :>
1079: [16:09:31] <micmania1> sweet as* ;)
1080: [16:09:32] <scpi> you wouldn't ever send someone to static.example.com
1081: [16:09:46] <scpi> you'd only ever see that domain name if you view source
1082: [16:09:49] <Alfirin> Hey, what does ?stage=Stage do? One of my pages doesn't render properly without it
1083: [16:09:53] <Pymeetingsk> yeah but just www in general is an obsolete idea.
1084: [16:09:57] <scpi> well sure
1085: [16:10:03] <Pymeetingsk> but then I've heard arguments for it that it's a security thing or something
1086: [16:10:10] <scpi> fine then. example.com and static.example.com
1087: [16:10:15] <kinglozzer> Alfirin: Forces the CMS to show the 'draft' content
1088: [16:10:15] <Pymeetingsk> www.blah is more secure than blah
1089: [16:10:18] <Pymeetingsk> or something stuid
1090: [16:10:22] <Pymeetingsk> stupid
1091: [16:10:23] <Pymeetingsk> not sure
1092: [16:10:24] <scpi> that seems lame
1093: [16:10:27] <Pymeetingsk> don't care enough
1094: [16:10:40] <Pymeetingsk> just hate www.herpafuckingderp.domain.com
1095: [16:10:42] <micmania1> Can't you set cookies for *.domain.com?
1096: [16:10:58] <Pymeetingsk> and then even more when people type that into the google search box instead of address bar
1097: [16:11:12] <Alfirin> kinglozzer, well that makes no sense to me, I mean regards to the template issue
1098: [16:11:16] <Pymeetingsk> almost as stupid as cookies law.
1099: [16:11:23] <Pymeetingsk> OH HAY WE USE COOKIES
1100: [16:11:31] <Pymeetingsk> OMG NOOOOOOOOO WORST WEBSITE IN THE WORLD
1101: [16:11:31] <scpi> anyway, my point was that you can decrease overhead for the user by moving that stuff out of the CMS
1102: [16:11:35] <Pymeetingsk> say all users suddenly
1103: [16:12:00] <Pymeetingsk> I mean, it's not like the whole interet has worked like that for 15+ years now
1104: [16:12:06] <Pymeetingsk> and falls apart without them.
1105: [16:12:08] <kinglozzer> Pymeetingsk: That law doesn't even apply any more apprently
1106: [16:12:14] <kinglozzer> Was overturned or something
1107: [16:12:21] <kinglozzer> Or was 'clarified'
1108: [16:12:33] <Pymeetingsk> kinglozzer: it was an EU law anyway. Just be an NZ company hosting in NZ and you're sweet as.
1109: [16:12:43] * kinglozzer moves
1110: [16:12:45] <Pymeetingsk> same deal for any yank cloud services
1111: [16:12:54] <Pymeetingsk> kinglozzer: well... yeah, you could.
1112: [16:12:57] <kinglozzer> :P
1113: [16:13:04] <Pymeetingsk> we have our own issues too though.
1114: [16:13:14] <Pymeetingsk> mostly storms in a teacup, we don't have any UKIP types.
1115: [16:13:42] <Pymeetingsk> with supporters who don't know the meaning of the word 'biggot'
1116: [16:13:50] <Pymeetingsk> fuck that picture cracked me up yesterday right
1117: [16:14:21] <Pymeetingsk> "the UK's history has been based all around immigration" - "FUCKUP YOU BIGGOT"
1118: [16:14:23] <Pymeetingsk> hahahahaha
1119: [16:14:23] <kinglozzer> Hahaha yeah
1120: [16:14:24] <scpi> I don't know the meaning of that word either. Is it anything like "bigot"? :)
1121: [16:14:35] <kinglozzer> OHHHHH
1122: [16:14:37] <kinglozzer> :P
1123: [16:14:37] <Pymeetingsk> scpi: shutup you racist
1124: [16:14:46] <kinglozzer> Pymeetingsk: You're voting UKIP now?!
1125: [16:14:51] <scpi> YOU CAN'T TELL ME WHAT TO DO YOU'RE NOT MY REAL DAD!
1126: [16:14:56] <Pymeetingsk> xD
1127: [16:15:11] <Pymeetingsk> kinglozzer: I don't get to vote, I'm a fucking theifing immigrant come here to lay waste to your country.
1128: [16:15:21] <Pymeetingsk> LIKE YOU DID TO MINE JUST 100 YEARS AGO
1129: [16:15:27] <Pymeetingsk> xD
1130: [16:15:32] <kinglozzer> BASTARD GET OUT, SCUM!
1131: [16:15:44] <kinglozzer> TAKING OUR WEB DEVELOPMENT JOBS
1132: [16:16:10] <kinglozzer> micmania1 is stealing one in retaliation though
1133: [16:16:26] <micmania1> yeah! Fuck the system!
1134: [16:16:29] <desperate> guys, my relation name is CarouselShowImg....
1135: [16:16:30] <Pymeetingsk> not until I've got all your land, established a booming economy, leveraged you for cheap labour, sent you in as sacrifical troops in a war, then I'll get mad when you want to move to my country.
1136: [16:16:38] <Pymeetingsk> even though you'll technically be mine.
1137: [16:16:42] <desperate> so the filename is CarouselShowImg.Filename
1138: [16:16:44] <desperate> right?
1139: [16:16:46] <desperate> $
1140: [16:16:53] <Pymeetingsk> no £
1141: [16:17:03] <Pymeetingsk> £allTheThings
1142: [16:17:23] <micmania1> Pymeetingsk: i'm going to fence off the south island and make it my little bitch country
1143: [16:17:33] <micmania1> I'll be the king
1144: [16:17:41] <kinglozzer> desperate: You want to loop
1145: [16:17:45] <micmania1> and queen if i choose. depends what day it is.
1146: [16:17:54] <Pymeetingsk> xD micmania1
1147: [16:17:55] <kinglozzer> <% loop CarouselShowImg %> $Filename <% end_loop %>
1148: [16:18:11] <Pymeetingsk> kinglozzer: no I'll not get out, I'm here to crush your labour market.
1149: [16:18:21] <kinglozzer> And ruin the NHS
1150: [16:18:30] <desperate> ah.. i did the loop but I was also using the relationname within the loop
1151: [16:18:31] <kinglozzer> And ban ham from Subway
1152: [16:18:38] <Pymeetingsk> You know, because all those chaps like the folks that mugged me are perfectly suitable for the job.
1153: [16:18:52] <kinglozzer> Pymeetingsk: They're definitely UKIP voters
1154: [16:18:53] <kinglozzer> :P
1155: [16:19:10] <scpi> I feel bad for poor desperate who just wants to get some work done...
1156: [16:19:17] <Pymeetingsk> kinglozzer: ha, yeah funny thing about the NHS right... I wouldn't have had to use it at all if the justice system actually f'n worked!
1157: [16:19:28] <Pymeetingsk> scpi: yeah well that's true.
1158: [16:20:08] <Pymeetingsk> so I think I saw my assailants on Monday.
1159: [16:20:14] <Pymeetingsk> out walking their dog, big smiles.
1160: [16:20:19] <Pymeetingsk> just loving life.
1161: [16:20:35] <Pymeetingsk> I deeply regret not approaching and not asking for my things back.
1162: [16:20:49] <Pymeetingsk> I wasn't sure if it was them, but am now pretty sure.
1163: [16:21:37] <Pymeetingsk> angry.
1164: [16:21:41] <Pymeetingsk> anyway
1165: [16:21:51] <Pymeetingsk> code that doesnt work, wtf man.
1166: [16:21:55] <Pymeetingsk> what's up with that.
1167: [16:21:58] * Pymeetingsk gets mad
1168: [16:24:33] <Alfirin> let's be mad together
1169: [16:25:33] <guzzlefry> u mad bro?
1170: [16:25:57] <Pymeetingsk> heapsmadas
1171: [16:26:08] <guzzlefry> An IDE with a debugger was the greatest investment to my sanity.
1172: [16:28:18] <Pymeetingsk> does it debug why your MySQL query IF returns false when it should be true?
1173: [16:28:35] <kinglozzer> Pymeetingsk: It just tells you not to use MySQL
1174: [16:28:53] <kinglozzer> Speaking of which, I should really take a proper look at some other db drivers
1175: [16:29:20] <kinglozzer> I have postgre installed, not a clue how it works/how to use it
1176: [16:29:25] <Pymeetingsk> PgSQL, it's the ONLY choice (for open source)
1177: [16:29:28] <kinglozzer> Only installed it for SS unit tests :P
1178: [16:29:43] <Pymeetingsk> well it uses SQL compliant queries
1179: [16:29:52] <Pymeetingsk> where MySQL is not SQL compliant
1180: [16:30:02] <Pymeetingsk> and it's ACID complaint, where MySQL is not.
1181: [16:30:06] <Pymeetingsk> but other than that... it's about the same
1182: [16:30:10] <Alfirin> why won't this stupid page render?
1183: [16:30:16] <guzzlefry> wat
1184: [16:30:19] <Pymeetingsk> until you get into advanced shit, like defining your own types, etc.
1185: [16:30:22] * svandragt quit (Ping timeout: 245 seconds)
1186: [16:30:22] <guzzlefry> MySQL is ACID compliant.
1187: [16:30:24] <Pymeetingsk> or so I hear.
1188: [16:30:27] <Pymeetingsk> fuckoff it's not.
1189: [16:30:27] <kinglozzer> Pymeetingsk: Just need a gui for it any I'm away (far too lazy for cli)
1190: [16:30:38] <guzzlefry> well, I should say Innodb is.
1191: [16:30:45] <Pymeetingsk> maybe.
1192: [16:30:54] <kinglozzer> Anyway
1193: [16:30:57] <Pymeetingsk> but that sacrifices other things
1194: [16:30:57] <kinglozzer> home
1195: [16:31:00] <Pymeetingsk> mm
1196: [16:31:09] <Pymeetingsk> kinglozzer: pomm
1197: [16:31:11] <Pymeetingsk> project
1198: [16:31:12] <scpi> Alfirin: maybe you hurt its feelings by calling it stupid
1199: [16:31:19] <kinglozzer> Pymeetingsk: pomm?
1200: [16:31:23] <Pymeetingsk> mm
1201: [16:31:27] <Pymeetingsk> pomm-project.org iirc
1202: [16:31:38] <Pymeetingsk> seems cool.
1203: [16:31:40] <Alfirin> scpi, probably, I've called it a lot of things lately
1204: [16:31:53] <kinglozzer> Pymeetingsk: ooo, looks nice
1205: [16:32:03] <Pymeetingsk> it's not an ORM, it's nicer
1206: [16:32:10] <Pymeetingsk> or smething like that
1207: [16:32:16] <kinglozzer> bb all <3
1208: [16:32:19] * kinglozzer quit ()
1209: [16:32:19] <Pymeetingsk> ciao
1210: [16:32:52] <Pymeetingsk> guzzlefry: PgSQL is faster as well.
1211: [16:33:01] <Pymeetingsk> despite people claiming otherwise.
1212: [16:33:13] <Pymeetingsk> and scales, despite people thinking MySQL does, they're wrong.
1213: [16:33:16] * stnvh quit ()
1214: [16:33:42] <guzzlefry> I'm a fan of PosgreSQL, but saying MySQL isn't ACID compliant may be wrong, and thus silly. :P
1215: [16:33:53] <scpi> Alfirin: what seems to be the issue?
1216: [16:34:25] <guzzlefry> Pymeetingsk: What was it about posgres that messed up benchmarks?
1217: [16:34:39] <guzzlefry> something about it not optimizing for < a certain number of rows iirc...
1218: [16:34:43] <Pymeetingsk> idk
1219: [16:34:53] <Pymeetingsk> just don't use MySQL is all there is to it.
1220: [16:35:35] <guzzlefry> Did you try running the query manually?
1221: [16:38:23] <Pymeetingsk> many times
1222: [16:38:28] <Pymeetingsk> issue with my join
1223: [16:38:29] <Pymeetingsk> found it
1224: [16:38:37] <Pymeetingsk> subquery where
1225: [16:38:40] <Alfirin> scpi, one page doesn't render properly, its parent doesn't render at all, and when I try to look at them in preview live mode, it boots me out of the page entirely
1226: [16:38:43] <Pymeetingsk> user hadn't selected box to make it show
1227: [16:39:07] <scpi> nothing in your php error logs?
1228: [16:39:38] <scpi> I assume you've done the dev/build/flush dance already
1229: [16:40:36] <guzzlefry> oh heh
1230: [16:41:00] <guzzlefry> I hit a bug with MySQL, it was dropping random products in my paginated product catalog.
1231: [16:41:07] <guzzlefry> Switched to MariaDB and that fixed it. ;)
1232: [16:43:16] <Alfirin> scpi, yes, and there's only three warnings in php log
1233: [16:43:31] <Pymeetingsk> bai
1234: [16:43:35] * Pymeetingsk quit (Quit: Page closed)
1235: [16:48:02] <scpi> can you put the code up on pastie? maybe somebody can spot the problem that way.
1236: [16:48:53] <Alfirin> just the template? 'cus I'm using the blogger module
1237: [16:49:39] <Alfirin> http://i.imgur.com/YTB7UU8.png what it looks like vs what it should http://i.imgur.com/IPa1Up0.png
1238: [16:51:42] * Motoservo has joined #silverstripe
1239: [16:54:26] <scpi> ah, so it's not seeing its parent at all, and just falling back to a default
1240: [16:55:04] <Alfirin> yeah, I'd forgive it if it fell back go regular page
1241: [16:55:31] <scpi> I had this problem once and it was something silly
1242: [16:55:38] <scpi> can't remember exactly what it was though
1243: [16:55:47] <Alfirin> :(
1244: [16:57:50] <scpi> So you've got a BlogEntry.ss in your template's Layout folder to override the template in the module, yes?
1245: [16:58:35] <Alfirin> I tried that, but it did nothing
1246: [16:58:47] <scpi> So what are you doing instead?
1247: [16:59:41] <desperate> Alfirin: Is the ss templlate not bein picked up?
1248: [16:59:57] <Alfirin> I downloaded a template folder that belonged to the original blog module
1249: [17:00:06] <Alfirin> it worked fine for a few weeks, until now
1250: [17:00:09] <scpi> "downloaded"?
1251: [17:00:21] <Alfirin> desperate, yes and it's not falling back to anything
1252: [17:00:34] <desperate> I think I had this issue way back
1253: [17:00:44] <desperate> check that the page_controller is set
1254: [17:00:47] <scpi> what do you mean you downloaded a template folder?
1255: [17:00:54] <Alfirin> scpi, yeah the module didn't come with its own templates, so it offered a link to those who were too lazy to do it themselves
1256: [17:00:55] <desperate> at the bottom of your .php page
1257: [17:01:09] <scpi> where did you get this module?
1258: [17:01:37] <Alfirin> from ss add-ons list, where else?
1259: [17:01:53] <Alfirin> I used the standard blog module before, but was told to swap to blogger
1260: [17:01:57] <Alfirin> and it worked fine
1261: [17:02:21] <scpi> yes, but which one?
1262: [17:02:47] * ec8or_ quit (Remote host closed the connection)
1263: [17:03:29] <scpi> the one from micmania1?
1264: [17:03:34] <jenniferaslan> Anybody here ever used the subsites module?
1265: [17:03:36] <Alfirin> yeah, thats the one I have now
1266: [17:03:55] <Alfirin> and I had this before it http://addons.silverstripe.org/add-ons/silverstripe/blog
1267: [17:03:59] <scpi> I have zero experience with that one, but I've seen him in here pretty regularly
1268: [17:05:25] <Alfirin> yeah I've talked to him quite often
1269: [17:06:07] <scpi> So it was working and now it's not...
1270: [17:06:12] <scpi> What did you change?
1271: [17:06:41] * scpi quit (Quit: be excellent to each other)
1272: [17:07:11] <Alfirin> well I've changed a lot of things, but the only thing blog related was that I tried to get it to sort posts by author by copying the categories widget
1273: [17:07:19] <Alfirin> it went tits up, and I undid everything
1274: [17:07:27] <Alfirin> I even reinstalled the blog since then
1275: [17:07:56] <jenniferaslan> Maybe the latest version of the module is no longer compatible with the templates you got from the other blog module.
1276: [17:08:22] <jenniferaslan> better make sure the ClassNames match
1277: [17:08:48] <jenniferaslan> Like in the regular blog module they are BlogHolder and BlogEntry. Perhaps in the blogger module they have different names.
1278: [17:08:55] <Alfirin> alright I'll check, but shouldn't it then generate some sort of an error?
1279: [17:09:14] <jenniferaslan> nope, because it's set up to fall back to the default
1280: [17:09:17] * anselmdk quit (Quit: anselmdk)
1281: [17:11:00] <Alfirin> nothing's changed, the blog module is the same version as originally
1282: [17:12:19] <jenniferaslan> And the ClassNames match?
1283: [17:13:55] <Alfirin> yeah, everything seems to be in order
1284: [17:17:14] <Alfirin> the parent is in even worse condition http://i.imgur.com/i2WS1K2.png
1285: [17:18:22] <Alfirin> Well I'lòl be, If I create a new page of the same page type, it works just fine
1286: [17:18:37] * babak quit (Quit: Connection closed for inactivity)
1287: [17:39:30] <Alfirin> I take that back, it works for a while, then not anymore
1288: [17:40:37] <Alfirin> ok, I know this is going to sound really weird, but when I rename the page into "news" it stops working
1289: [17:40:49] <Alfirin> but if I change it back to "new blog" it works fine
1290: [17:41:04] * robert_ quit (Read error: Connection reset by peer)
1291: [17:45:56] * robert_ has joined #silverstripe
1292: [17:46:20] * robert_ is now known as Guest8042
1293: [17:47:59] * Guest8042 quit (Changing host)
1294: [17:48:00] * Guest8042 has joined #silverstripe
1295: [17:48:06] * scpi has joined #silverstripe
1296: [17:49:33] * Guest8042 is now known as robert_
1297: [18:11:23] * Pyromanik has joined #silverstripe
1298: [18:12:31] <Alfirin> hey pyromanik
1299: [18:12:42] <Pyromanik> hi
1300: [18:12:59] <Pyromanik> Alfirin, pro tip: press pyr then <tab>
1301: [18:13:25] <jcwacky> Any masters of .htacces about?
1302: [18:13:34] <Alfirin> neat
1303: [18:13:38] * onejamesbrowne quit (Remote host closed the connection)
1304: [18:13:39] <jcwacky> *.htaccess (obviously)
1305: [18:14:41] <jcwacky> i’m trying to work out how to exlcude my dev domain from the SilverStripe Static Publisher .htaccess rules: http://spdr.me/4M71
1306: [18:29:37] <Alfirin> Pyromanik: you weren't here, but the weirdest thing happened to me
1307: [18:30:02] <Alfirin> if my blog's url segment is either blog or news, the template doesn't render properly
1308: [18:30:08] <Alfirin> if it's anything else, it works perfectly
1309: [18:34:02] <Pyromanik> Alfirin, it should work if it's 'blog', that's the default!
1310: [18:34:37] <Pyromanik> jcwacky, deny from <ip> or something like that I think
1311: [18:36:52] <jcwacky> I would have thought adding RewriteCond %{HTTP_HOST} !^devdomain.\com$ [NC] to each of the first 3 groups would have done it, but it doesn’t.
1312: [18:38:14] * WilsonS has joined #silverstripe
1313: [18:38:25] <Pyromanik> jcwacky,well the \ is on the wrong side of the .
1314: [18:39:07] <jcwacky> Sorry, yeh, just a typo, doesn’t work using \. either.
1315: [18:39:11] <Pyromanik> but otherwise I dunno yeh
1316: [18:39:14] <Pyromanik> sorry
1317: [18:39:24] <Pyromanik> I figured it was probably a typo :>
1318: [18:39:40] <WilsonS> Hi everyone. Is it possible to use the 'Filter' column in ModelAdmin when the summaryfields all use custom getters?
1319: [18:39:50] <Pyromanik> no
1320: [18:40:34] <Pyromanik> not by default at least. If you do some serious work on it it may, but that sounds like a can of worms to me.
1321: [18:40:48] <WilsonS> Ok, dang. Thanks for the quick reply
1322: [18:41:22] <Pyromanik> well filters are query related. If you're not using queries, then it can't filter.
1323: [18:41:33] <Pyromanik> orm queries that is.
1324: [18:41:38] <WilsonS> Ah, I see
1325: [18:42:01] <Pyromanik> all scaffolded stuff is orm related, generally
1326: [18:43:03] * SMaction has joined #silverstripe
1327: [18:52:01] <Alfirin> this url segment thing is ridiculous
1328: [19:05:49] <WilsonS> Hey guys. In your opinion, what's the best way, in the CMS, to administer a relationship where a Member has many_many Somethings and needs to be able to order the Somethings. I've gone down two roads, first with $many_many_extraFields on my MemberDecorator. It's technically correct in the DB but I couldn't get the extra fields or ordering in the Admin. Second I created a 'joiner' object MemberSomething which worked as well ex
1329: [19:05:58] <WilsonS> to filter by member.
1330: [19:11:53] <scpi> Alfirin: have you tried calling it 'blahg'? :)
1331: [19:12:14] * Alfirin_ has joined #silverstripe
1332: [19:12:25] <Alfirin_> gosh, I almost rudely rage quit this thing
1333: [19:12:39] <scpi> Does the name maybe conflict with something else in the site tree?
1334: [19:12:42] <Alfirin_> thanks to everyone who helped me today, trust me to be back tomorrow
1335: [19:12:44] <Alfirin_> night!
1336: [19:13:48] * Alfirin quit (Ping timeout: 240 seconds)
1337: [19:15:18] * desperate quit (Ping timeout: 240 seconds)
1338: [19:16:48] * Alfirin_ quit (Ping timeout: 240 seconds)
1339: [19:28:50] <Pyromanik> WilsonS, extraFields is correct way.
1340: [19:29:31] <Pyromanik> install a module like gridfield extra bits or whatever it's called from ajshort and use that to set your sorts.
1341: [19:32:01] <WilsonS> Ah, thanks. I'll check that out. Much appreciated.
1342: [19:34:10] * SightUnseen has joined #silverstripe
1343: [19:34:42] * SightUnseen has left #silverstripe
1344: [19:49:39] <jenniferaslan> Hi all. I'm looking for some help on the subsites module and how inheritance works for CSS files.
1345: [19:50:52] <jenniferaslan> This one: http://addons.silverstripe.org/add-ons/silverstripe/subsites
1346: [19:56:38] * gelignite has joined #silverstripe
1347: [20:05:36] <Pyromanik> huh?
1348: [20:05:48] <Pyromanik> inheritance with css/
1349: [20:05:49] <Pyromanik> ?
1350: [20:06:10] <jenniferaslan> Yes, I have four subsites created in my CMS and they each have a theme in the themes folder of the site files.
1351: [20:06:26] <Pyromanik> ok, and?
1352: [20:06:44] <jenniferaslan> All the themes have the same basic layout, so most of the templating and CSS is done in the /site folder and then I override those with files in the themes where necessary.
1353: [20:07:09] <jenniferaslan> I want them all to use the same editor.css file so that I can just edit it in one place.
1354: [20:07:17] <jenniferaslan> I put the editor.css in /site/css/
1355: [20:07:42] <jenniferaslan> But the CMS doesn't seem to be using that one for the editor.
1356: [20:07:55] <Pyromanik> ok, site folder is preferred over themes
1357: [20:08:00] * Ryan-Toast has joined #silverstripe
1358: [20:08:03] <Pyromanik> generally
1359: [20:08:09] <jenniferaslan> That's what I thought.
1360: [20:08:13] <jenniferaslan> But it's not working
1361: [20:08:15] <Pyromanik> although that's to do with templates, not css
1362: [20:08:32] <Pyromanik> css is required with <% require %> commands
1363: [20:08:36] <Ryan-Toast> God dammit, I grabbed my girlfriend’s Kindle instead of mine.
1364: [20:08:49] <jenniferaslan> Well the other css files in /site that are used by the front-end are working correctly. It's just the editor that's not getting it.
1365: [20:08:59] <Pyromanik> so it doesn't really have a heirarchy other than what you determine
1366: [20:09:10] <jenniferaslan> All the themes used to have editor.css in them and they had a class I wanted to remove and two I wanted to add.
1367: [20:09:31] <Pyromanik> hmm yeah I see the issue.
1368: [20:09:32] <jenniferaslan> I removed those files and all options disappeared from the Styles dropdown of the HTML editor in the CMS.
1369: [20:09:49] <jenniferaslan> I put them back with the changes I wanted and saw the old options in the dropdown.
1370: [20:09:52] <Pyromanik> well, easiest way to fix this is just have @include in each editor.css in the themes
1371: [20:10:05] <Pyromanik> then include your singular site based css
1372: [20:10:16] <jenniferaslan> Okay, I can try that.
1373: [20:10:17] <Pyromanik> same deal with typography I guess.
1374: [20:10:41] <Ryan-Toast> jenniferaslan: I add my styles to a normal css file then add them to the cms dropdown with a config file, because it’s really touchy most of the time using the editor.css - https://github.com/Rhym/ss_boilerplate/blob/master/Boilerplate/code/Modules/Shortcodes/_config.php
1375: [20:10:41] <jenniferaslan> I just don't know how to clear out the old style sheet from wherever it's being stored in the temp files or manifest or whatever.
1376: [20:10:46] <Pyromanik> otherwise I'm not certain on the logic the cms uses to pull the editor.css, it may only check the chosen theme
1377: [20:11:00] <Pyromanik> it isn't, it's firefox being shit with caching.
1378: [20:11:09] <Pyromanik> tinymce and firefox don't get on too well.
1379: [20:11:19] <Pyromanik> ditto with favicons
1380: [20:11:21] <Ryan-Toast> Pyromanik: Tiny mce is awful, that’s why :P
1381: [20:11:27] <Pyromanik> yeah well.
1382: [20:11:29] <jenniferaslan> I cleared Firefox history and quit the browser and dev/build?flush and everything
1383: [20:11:33] <jenniferaslan> Nothing helps.
1384: [20:11:40] <Pyromanik> jenniferaslan, I know.
1385: [20:11:43] <Pyromanik> use opera.
1386: [20:11:44] <Ryan-Toast> Pyromanik: I like using the config because you can specify blocks, and merging etc
1387: [20:11:51] <Pyromanik> oh wait, that's just chrome now...
1388: [20:11:53] <Pyromanik> use chrome I guess.
1389: [20:11:54] <jenniferaslan> I figured out how to flush favicons in Firefox
1390: [20:12:03] <Ryan-Toast> jenniferaslan: Make sure you don’t fluch on the build page
1391: [20:12:05] <Pyromanik> yeah you have to visit them directly
1392: [20:12:09] <Pyromanik> then ctrl+f5
1393: [20:12:21] <jenniferaslan> I'm on a mac
1394: [20:12:22] <Pyromanik> Ryan-Toast, makes no difference anymore
1395: [20:12:31] <Ryan-Toast> Pyro: really?
1396: [20:12:35] <Pyromanik> jenniferaslan, ah, whatever force refresh is on mac
1397: [20:12:36] <Ryan-Toast> when did that change?
1398: [20:12:39] <jenniferaslan> Got a sql lite add-on for Firefox that lets me deleted them from its database
1399: [20:12:44] <Pyromanik> Ryan-Toast, yeah that was some serious legacy.
1400: [20:12:48] <Pyromanik> Ryan-Toast, 3.1.0 I think
1401: [20:12:56] <Pyromanik> mabye even 3.0.something
1402: [20:13:05] <Ryan-Toast> Pyromanik: I remember it in 3.1.1 I hink
1403: [20:13:21] <Pyromanik> jenniferaslan, I'm not sure what it is with firefox and the styles in tinymce.
1404: [20:13:23] * UndefinedOffset quit (Quit: Leaving.)
1405: [20:13:23] <Pyromanik> it's weird.
1406: [20:13:32] <Pyromanik> it comes right eventually, but takes too long for a dev.
1407: [20:13:42] <Pyromanik> then othertimes it coms right instantly, which is messed up.
1408: [20:13:48] <Pyromanik> just use chrome.
1409: [20:13:55] <Pyromanik> or safari, since you're on a mac
1410: [20:14:40] <jenniferaslan> I have all three of those browsers, I just like Firefox best
1411: [20:14:53] <jenniferaslan> And I think my clients will be using Firefox
1412: [20:15:29] <Pyromanik> yeah well if the style sheet never changes, it's no big deal
1413: [20:15:35] <Pyromanik> and it does update eventually
1414: [20:15:40] <Pyromanik> just not as fast as a dev would like
1415: [20:15:43] <jenniferaslan> yeah
1416: [20:15:50] <jenniferaslan> Once I get it nailed down, it won't change.
1417: [20:15:51] <Pyromanik> I wish I knew the answer
1418: [20:15:59] <Pyromanik> but I don't :<
1419: [20:16:28] <jenniferaslan> Isn't Chrome a webkit browser?
1420: [20:16:44] <Ryan-Toast> jenniferaslan: Just to be sure you’re doing a?flush=all, right?
1421: [20:17:11] * antmas has joined #silverstripe
1422: [20:17:26] <antmas> mornin all
1423: [20:17:36] <Stomach> hey hey
1424: [20:17:38] <Ryan-Toast> antmas: hey
1425: [20:17:39] <jenniferaslan> I tried the ?flush=all on the admin
1426: [20:17:42] <jenniferaslan> no dice.
1427: [20:17:49] <Ryan-Toast> antmas: Turns out I may be going to Nelson for a wedding.
1428: [20:17:58] <antmas> Ryan-Toast: nice!
1429: [20:18:00] <antmas> when?
1430: [20:18:06] <Ryan-Toast> antmas: Umm, June something
1431: [20:18:23] <antmas> Sweet, might have to catch up for a beer or something
1432: [20:18:30] <Ryan-Toast> antmas: Sounds good.
1433: [20:18:43] <jenniferaslan> Pyromanik: you meant flush=all on admin or somewhere else?
1434: [20:19:19] <Ryan-Toast> jenniferaslan: What are you styling?
1435: [20:20:30] <jenniferaslan> Ryan-Toast: I am trying to get changes I made to editor.css in /site to actually work in the CMS in subsites.
1436: [20:21:16] <Ryan-Toast> jenniferaslan: And you can’t put it in your theme?
1437: [20:21:44] <jenniferaslan> Well, I am trying to do what Pyromanik suggested and import the one from /site into the ones in the themes.
1438: [20:22:10] <antmas> Ryan-Toast: P.S. bring burger fuel down with you
1439: [20:22:12] <jenniferaslan> But when I do that, the changes I have made are not showing. There's some crazying caching somewhere that is still showing whatever was in there before I started.
1440: [20:23:01] <Ryan-Toast> jenniferaslan: I suppose if you get desperate you can include a css file using the LeftAndMain extra_requirements_css
1441: [20:23:45] <jenniferaslan> Oh man! I just restarted Firefox and some major interface changes just happened. >:(
1442: [20:24:16] <jenniferaslan> Looks more like Chrome now.
1443: [20:24:36] <Ryan-Toast> jenniferaslan: One of us, one of us
1444: [20:24:41] <jenniferaslan> But, JOY OF JOYS, my styles are in the dropdown now!
1445: [20:24:56] * Ryan-Toast hands up
1446: [20:25:02] <jenniferaslan> w00t!
1447: [20:25:16] <antmas> \o/
1448: [20:25:24] <Ryan-Toast> Pyromanik: Is there a security function that runs every so often in the cms?
1449: [20:26:18] <guzzlefry> There's a ping.
1450: [20:26:39] <guzzlefry> I think that's just to keep you logged in though.
1451: [20:26:42] * an_Eskimo has joined #silverstripe
1452: [20:27:33] <Ryan-Toast> guzzlefry: Ah, because I have a Security extension that adds a css file to style the login page etc, and it loads into the cms after a minute or so and moves shit around, which is annoying.
1453: [20:28:07] <antmas> Can anyone see why this might cause an invalid argument for foreach error? http://www.sspaste.com/paste/show/5362ab1ee76a3
1454: [20:28:13] <antmas> I ge the right output from it
1455: [20:28:15] <antmas> get*
1456: [20:29:01] <Ryan-Toast> antmas: try new ArrayList(); ?
1457: [20:29:13] <antmas> Ryan-Toast: k will do
1458: [20:29:24] <Ryan-Toast> and new array data
1459: [20:30:25] <antmas> Ryan-Toast: so $rows = ArrayList::create(); becomes $rows = ArrayList();?
1460: [20:30:57] <Ryan-Toast> new arraylist
1461: [20:31:09] <antmas> :P
1462: [20:31:10] <antmas> ofc
1463: [20:32:18] <antmas> and to loop over the array values, you would use $RowHeaderGoesHere yeah?
1464: [20:32:25] <antmas> given that it's from json
1465: [20:32:59] <Ryan-Toast> antmas: I think arraydata has to be an accosiative array
1466: [20:33:55] <Ryan-Toast> so if you want the whole object push like array(‘foo’=>$rowData)
1467: [20:35:12] <Ryan-Toast> antmas: example - http://pastebin.com/GiLwm1Av
1468: [20:35:29] <antmas> :O
1469: [20:35:33] <antmas> Ryan-Toast: nice, thanks
1470: [20:35:39] <Ryan-Toast> np
1471: [20:36:00] <antmas> UncleCheese was helping me this week and I was driving him nuts as I suck with arrays in php
1472: [20:36:01] <antmas> :P
1473: [20:36:14] <Ryan-Toast> you’d be used to lists.
1474: [20:36:21] <antmas> this ^
1475: [20:36:26] <Ryan-Toast> Arrays in php are different to every other language.
1476: [20:36:35] <Ryan-Toast> more of a dynamic type.
1477: [20:36:45] <Ryan-Toast> array all the things!
1478: [20:37:05] <Stomach> they are just more liberal
1479: [20:37:48] <Stomach> its because of the weak typing
1480: [20:38:08] <Stomach> anything can be anything, so it can definitely go in anywhere!
1481: [20:38:20] <antmas> off to meeting, brb
1482: [20:38:21] <Ryan-Toast> Stomach: Just like my mrs.
1483: [20:38:42] <Stomach> I like a strongly typed woman myself
1484: [20:39:52] * nickmolhoek has joined #silverstripe
1485: [20:41:19] <scpi> Does anyone else see "antmas" and think "ant christmas"?
1486: [20:44:27] * FrozenFire quit (Quit: There's no place like ~)
1487: [20:50:46] <scpi> ...just me then?
1488: [20:52:07] * FrozenFire has joined #silverstripe
1489: [20:53:07] <Stomach> just you :P
1490: [20:53:51] <jenniferaslan> Brand new version of Firefox. Just crashed. Rats.
1491: [20:58:46] <Pyromanik> I hear the new version is bad.
1492: [20:59:13] <Pyromanik> Ryan-Toast, they're not really arrays.
1493: [20:59:28] <Pyromanik> hash maps, just with numeric keys when not keyed
1494: [20:59:48] <Pyromanik> antmas, too much python?
1495: [21:00:36] <Pyromanik> [08:08] <Ryan-Toast> God dammit, I grabbed my girlfriend
1496: [21:00:41] <Pyromanik> did she not appreciate it?
1497: [21:00:51] <Ryan-Toast> Pyromanik: girlfriend’s kindle :P
1498: [21:00:54] <Pyromanik> were you in public or something?
1499: [21:00:59] <Pyromanik> :P
1500: [21:01:24] <Ryan-Toast> Never letting her pick a restaurant again, set me back $250 last night.
1501: [21:02:13] <Stomach> jesus
1502: [21:02:28] <Stomach> I took mine out last night before First Thursdays and spent $80 and was upset
1503: [21:03:06] <Ryan-Toast> Stomach: where did you go?
1504: [21:03:48] <Stomach> japanese place on k-road
1505: [21:04:04] <Ryan-Toast> Stomach: I went to a Japanese place in Ponsomby
1506: [21:04:11] <Stomach> and all is explained
1507: [21:04:11] <Ryan-Toast> Ponsonby
1508: [21:04:12] <Stomach> lol
1509: [21:04:25] <Stomach> ponsonby = 4x price? :D
1510: [21:04:41] <Ryan-Toast> The food was really good.
1511: [21:04:50] <Ryan-Toast> It was all Crayfish sashimi and biz
1512: [21:07:25] <Ryan-Toast> Netbeans right now: http://i.imgur.com/OWmo7FR.png
1513: [21:12:27] <jenniferaslan> Are all you guys in New Zealand?
1514: [21:12:46] * r3v3rb has joined #silverstripe
1515: [21:14:15] * jcwacky quit (Quit: jcwacky)
1516: [21:14:29] <r3v3rb> Hi guys I need to send a csv string to an array using the same key as value - so I do array_combine - I then need to push this as the items in a DropDownMenuField - how can I map the array - should I wrap it as an ArrayList first?
1517: [21:17:38] <Ryan-Toast> jenniferaslan: Pretty much, SS head offices are in Wellington. Some of use are just devs around the place.
1518: [21:17:57] <Ryan-Toast> us**
1519: [21:18:03] <r3v3rb> being an idiot don't worry i fixed it
1520: [21:18:15] * UncleCheese has joined #silverstripe
1521: [21:19:23] <r3v3rb> hhmmmm, not quite the array is still giving me 0 => Value, 1 => Value 2 etc
1522: [21:19:36] <r3v3rb> not Value => Value, Value 2 => Value 2
1523: [21:19:52] <scpi> I'm not in NZ. Which is too bad, I hear it's nice there.
1524: [21:21:05] <jenniferaslan> I'm in Washington State, USA
1525: [21:21:20] <jenniferaslan> It's still Wednesday here.
1526: [21:21:34] <guzzlefry> thursday? :P
1527: [21:21:52] <scpi> PA here, still wednesday but almost quittin' time.
1528: [21:21:59] <r3v3rb> Thursday here
1529: [21:22:03] <r3v3rb> nearly Fri
1530: [21:22:10] <guzzlefry> wait...I'm east coast U.S.
1531: [21:22:12] <scpi> Wow! What's it like in the future?
1532: [21:22:14] <guzzlefry> and my clock says Thursday
1533: [21:22:21] <scpi> Oh wait
1534: [21:22:22] * guzzlefry checks to make sure he's not crazy. :P
1535: [21:22:25] <scpi> yeah, thursday
1536: [21:22:26] <scpi> that
1537: [21:22:27] <r3v3rb> scpi <- I already know the fixes to your bugs
1538: [21:22:37] <scpi> they all kind of blur together
1539: [21:23:11] <scpi> r3v3rb: it's like you're a wizard
1540: [21:23:14] <r3v3rb> come on guys need to get an array into a dropdown with key and value the same
1541: [21:24:57] <r3v3rb> array is k=>v already with the same key as value - when I run that through an arraylist I get 0=>Value1, 1=>value2 instead of value1=>value1 etc etc
1542: [21:24:58] <jenniferaslan> guzzlefry: yes, Thursday. Sorry. Yesterday hardly seemed like it happened because I was in a 9-hour CMS training.
1543: [21:25:35] <jenniferaslan> Very complex site we were teaching our clients how to use.
1544: [21:25:49] <scpi> oh, training the client
1545: [21:25:54] <jenniferaslan> yep
1546: [21:25:55] <scpi> sounds exhausting
1547: [21:26:05] <jenniferaslan> yeah, I am feeling kind-of beat up today.
1548: [21:26:19] <jenniferaslan> It's one of my duties around here. Usually they only take a couple of hours.
1549: [21:27:35] <jenniferaslan> It wasn't a horrible day or anything and we had Thai lunch with the clients. But it was pretty tiring.
1550: [21:29:39] <scpi> r3v3rb: wait, I think I know this one
1551: [21:29:50] <r3v3rb> you do cool
1552: [21:30:30] <scpi> because I think you're looking at the index of the array element, rather than the key
1553: [21:30:58] <r3v3rb> ok i got this:$sector = str_getcsv($this->SectorDropDown, ',');
1554: [21:30:58] <r3v3rb> $result = array_combine($sector, $sector);
1555: [21:30:58] <r3v3rb> $ob = ArrayList::create($result);
1556: [21:31:20] <r3v3rb> so $ob I was hoping would be k=>v but its an indexed array
1557: [21:33:33] <antmas> back
1558: [21:33:44] <scpi> Merry Antmas!
1559: [21:33:56] <antmas> oh crap
1560: [21:33:59] <antmas> another meeting
1561: [21:34:00] <antmas> bai
1562: [21:34:02] <antmas> :P
1563: [21:34:58] <r3v3rb> poop, time to sleep on this one
1564: [21:35:16] <r3v3rb> night all
1565: [21:35:18] * r3v3rb quit (Quit: Textual IRC Client: www.textualapp.com)
1566: [21:36:39] * scpi quit (Quit: be excellent to each other)
1567: [21:37:19] <Ryan-Toast> antmas: Progress - http://gfycat.com/NeedyGlisteningBadger
1568: [21:40:23] <jordanmk> hey guys
1569: [21:40:33] <jordanmk> is there any way to set an arbitrary attribute for an element in SS 2.4?
1570: [21:40:45] <jordanmk> i know in 3.0 you can do $element->setAttribute()
1571: [21:40:59] <Ryan-Toast> $field->setAttribute(‘’foo), ‘bar'
1572: [21:41:04] <jordanmk> that works in 2.4?
1573: [21:41:09] <Ryan-Toast> Shrug :P
1574: [21:41:11] <Ryan-Toast> maybe
1575: [21:41:34] <Ryan-Toast> hmm, irc made my formatting weird there, but you get the picture.
1576: [21:41:51] <jordanmk> yeah i know what you're referring to, but that seems to be something introduced in SS 3
1577: [21:42:02] <Ryan-Toast> Oh, sorry duno then
1578: [21:42:06] <jordanmk> can't find any equivalent in 2.4, guess i'll have to do it in JS
1579: [21:43:47] <jenniferaslan> What kind of attribute is it you want to add? HTML or CSS or what?
1580: [21:45:26] <Pyromanik> element?
1581: [21:45:30] <Pyromanik> define 'element'>
1582: [21:45:52] * Liquide has joined #silverstripe
1583: [21:47:07] <Pyromanik> jordanmk.
1584: [21:47:37] <jordanmk> an input in a form
1585: [21:47:49] <jordanmk> i want to set the 'disabled' attribute of a form element
1586: [21:47:50] <jordanmk> in SS 2.4
1587: [21:48:03] <jenniferaslan> I would use jQuery.
1588: [21:48:41] <jordanmk> only way i can think of to do it is to do $input->addExtraClass('disabled'), then in JS, go through all the elements with that class and set the disabled attribute for htem
1589: [21:49:25] <Pyromanik> jordanmk, use the read only transformation.
1590: [21:49:48] <Stomach> disabled is different from readonly
1591: [21:49:58] <Pyromanik> say formfield too, there are no 'elements' in ss.
1592: [21:50:00] <Pyromanik> only html :P
1593: [21:50:28] <jordanmk> true :P
1594: [21:50:38] <jordanmk> what do you mean use the read only transformation
1595: [21:50:46] <Pyromanik> I mean read the docs
1596: [21:50:52] <Pyromanik> slash api
1597: [21:51:06] <Pyromanik> they're there to help you!
1598: [21:51:50] <jordanmk> ah yeah just remembered that disabled inputs don't get submitted
1599: [21:51:54] <jordanmk> not what i want!
1600: [21:53:04] <Pyromanik> performReadonlyTransformation
1601: [21:53:19] <jordanmk> but it's for a select, and select's don't have a readonly attribute. guess i'll have to do a disabled input after all, then a duplicate hidden input which has the same value
1602: [21:53:24] <Pyromanik> well then, what you need is a hiddenfield
1603: [21:53:56] <Pyromanik> all form fields have a read only state
1604: [21:54:13] <Pyromanik> an attribute is something in an element :P
1605: [21:55:26] <jordanmk> hmm, alright i'll give that a try
1606: [21:55:54] <Pyromanik> http://api.silverstripe.org/2.4/class-DropdownField.html#_performReadonlyTransformation
1607: [21:56:08] <Pyromanik> although I've had mixed success, I think it's more because I misunderstand it.
1608: [21:56:21] <Pyromanik> if it doesn't work, you'll have to subclass!
1609: [21:58:23] <jordanmk> the performReadOnlyTransformation doesn't actually seem to be doing anything at all
1610: [21:58:41] <jordanmk> doesn't seem to have an effect on TextFields or DropDownFields :S
1611: [21:59:47] <jordanmk> on the plus side, i found a setDisabled() method, so i don't have to do it in JS after all
1612: [22:02:36] * bridgetm has joined #silverstripe
1613: [22:02:54] <Pyromanik> yeah
1614: [22:03:06] <Pyromanik> they return new fields, you need to replace the current one in the FieldSet
1615: [22:03:08] <Pyromanik> or something
1616: [22:03:10] <Pyromanik> dunno
1617: [22:03:13] <Pyromanik> mixed results as I say
1618: [22:03:41] <Pyromanik> I know it's supposed ot be read only, but I dunno if that's to be reflected in the UI or just the form doesn't store the value, or what
1619: [22:03:49] <Pyromanik> anyway
1620: [22:03:51] <Pyromanik> gg
1621: [22:05:12] <Ryan-Toast> | Quit: HydraIRC
1622: [22:05:16] <Ryan-Toast> hail hydra
1623: [22:05:58] <jordanmk> haha
1624: [22:06:52] * joelpittet has joined #silverstripe
1625: [22:11:18] * WilsonS quit (Ping timeout: 240 seconds)
1626: [22:17:03] <Ryan-Toast> A readonlyfield with an empty name won’t be sent to $data, right?
1627: [22:18:01] <antmas> Ryan-Toast: awwwwwwwww yiss
1628: [22:20:04] <Ryan-Toast> antmas: so it doesn't?
1629: [22:20:29] * simon_w has joined #silverstripe
1630: [22:21:14] <antmas> Ryan-Toast: I was referrring to the newsletter module
1631: [22:21:19] <antmas> looking good
1632: [22:21:27] <Ryan-Toast> antmas: Oh, right :P Thanks
1633: [22:21:39] <Ryan-Toast> Making the creation of campaigns function atm.
1634: [22:21:53] <antmas> Ryan-Toast: that function for the array data
1635: [22:22:00] <antmas> Ryan-Toast: what would my return now look like?
1636: [22:22:12] <Ryan-Toast> antmas: would be a SS_List
1637: [22:22:40] <antmas> Ryan-Toast: http://www.sspaste.com/paste/show/5362c5f958631 this is what I now have
1638: [22:23:32] <Ryan-Toast> merges was just a field from my json.
1639: [22:23:37] <antmas> Ryan-Toast: I know
1640: [22:23:42] <Ryan-Toast> oh, you have it too?
1641: [22:23:47] <simon_w> antmas, Syntax error!
1642: [22:24:04] <antmas> simon_w: the comma?
1643: [22:24:08] <antmas> :P
1644: [22:24:15] <simon_w> The lack of a closing ) for the array :p
1645: [22:24:32] <simon_w> And constructor
1646: [22:24:34] <simon_w> And push
1647: [22:24:38] <antmas> :O
1648: [22:25:10] <Ryan-Toast> parentheses nooooob
1649: [22:27:28] <antmas> Ryan-Toast: so, if merges is a JSON field for you, what is [FNAME] and [LNAME] in that case?
1650: [22:27:45] <Ryan-Toast> merges is an array
1651: [22:28:16] <Ryan-Toast> [‘foo’][‘’bar] would be value in an accociative array
1652: [22:28:28] <antmas> oh right
1653: [22:32:47] * babak has joined #silverstripe
1654: [22:32:56] * WilsonS has joined #silverstripe
1655: [22:33:38] <antmas> Ryan-Toast: whats your template format for getting those fields?
1656: [22:34:04] <Ryan-Toast> Sending them to a gridfield
1657: [22:34:16] <Ryan-Toast> you can just loop them in a template though
1658: [22:34:21] <Ryan-Toast> if you return the datalist
1659: [22:34:37] <guzzlefry> hm
1660: [22:34:53] <guzzlefry> Is there any live SilverStripe demo site that I can run ?showqueries on?
1661: [22:37:12] <simon_w> demo.silverstripe.org
1662: [22:37:16] <simon_w> Also needs ?isDev=1
1663: [22:37:18] <Ryan-Toast> guzzlefry: http://webdough.co.nz/~boilerpl/?showqueries
1664: [22:37:25] <Ryan-Toast> let me know when you’re done
1665: [22:37:31] <Ryan-Toast> so I can turn off dev mode
1666: [22:38:48] <UncleCheese> What does the word "punter" mean in NZ?
1667: [22:39:01] <antmas> Ryan-Toast: nice, working again
1668: [22:39:02] <Ryan-Toast> UncleCheese: average bloke
1669: [22:39:05] <antmas> UncleCheese: customer usually
1670: [22:39:11] <ss23> "a person who gambles, places a bet, or makes a risky investment."
1671: [22:39:11] <antmas> ^^ or that
1672: [22:39:12] <UncleCheese> really? huh
1673: [22:39:21] <ss23> I always hear it in the gamgling context
1674: [22:39:23] <ss23> gambling
1675: [22:39:24] <UncleCheese> that's not what i expected
1676: [22:39:30] <UncleCheese> oh it's a gambling thing?
1677: [22:39:35] <UncleCheese> because i hear it a lot on sports radio
1678: [22:39:40] <ss23> yeah
1679: [22:39:46] <ss23> punters, odds, gambling
1680: [22:39:48] <ss23> all go together
1681: [22:39:57] <UncleCheese> is that legal here?
1682: [22:40:42] <antmas> I usually use 'punter' when talking about a typical customer
1683: [22:41:06] <UncleCheese> so weird
1684: [22:41:46] <Stomach> no, you
1685: [22:42:00] <Stomach> crazy 'muricans
1686: [22:42:06] <antmas> UncleCheese: if you don't really know kiwi colloquialisms then sports radio will be tough to listen to :P
1687: [22:42:10] <guzzlefry> Ryan-Toast: thanks
1688: [22:42:15] <guzzlefry> am done
1689: [22:42:15] <Ryan-Toast> guzzlefry: np
1690: [22:42:28] <UncleCheese> yeah, i listen to sports radio as an exercise
1691: [22:42:54] <UncleCheese> i think what's most impressive is that they spend half the time worshipping the American sports model
1692: [22:43:58] <antmas> we seem to worship a lot of American models besides sports
1693: [22:49:58] <antmas> bah
1694: [22:52:21] <Ryan-Toast> what’s the licence that people can’t use your shit for commercial gain?
1695: [22:52:55] <antmas> errr
1696: [22:53:07] * antmas shrugs
1697: [22:54:12] <antmas> Ryan-Toast: creative commons?
1698: [22:54:42] <antmas> I always forget
1699: [22:54:48] <antmas> but this is a good article http://www.smashingmagazine.com/2011/06/14/understanding-copyright-and-licenses/
1700: [22:55:57] <antmas> another meeting :(
1701: [23:02:44] * PapaBearNZ has joined #silverstripe
1702: [23:03:32] <PapaBearNZ> Silly question - but if I'm creating a form from within a GridField_ActionProvider - what do I put as the $controller field in the form constructor? eg new MyForm (???, "MyForm")
1703: [23:04:09] <ss23> Ah, GridField you beast
1704: [23:05:17] <PapaBearNZ> ss23: indeed!
1705: [23:13:04] <simon_w> PapaBearNZ, have a look at how GridFieldDetailForm does it
1706: [23:15:05] * simon_w really can't be bothered working today, especially with TradeMe's API
1707: [23:15:46] <ss23> lol
1708: [23:15:57] <ss23> Be glad, simon_w. Back in my day it was uploading FTP files
1709: [23:16:00] <ss23> uh
1710: [23:16:02] <ss23> Uploading files over FTP
1711: [23:16:18] <simon_w> Oh, we've got another "API" to deal with that requires that
1712: [23:16:41] <ss23> Fun fact: If you list ~500k items on Trademe and set them all to end at exactly the same second, Trademe will freak the fuck out and make you change it :D
1713: [23:21:26] <simon_w> Fun fact: if you build a script to log into Xero and scrape their data, then have one of your directors tell them about it, they give you pre-release access to the API for that data
1714: [23:21:32] <simon_w> Also, the Xero login form is nasty
1715: [23:42:19] <antmas> awesome
1716: [23:42:27] <antmas> 11:42 and I have finished with meetings
1717: [23:42:32] <antmas> time to do 'work'
1718: [23:42:43] <ajmitch> 11:42? sounds like beer o'clock
1719: [23:43:30] <ajmitch> at least it seems like a better option that trying to scrape some data from an admin section of a site
1720: [23:44:23] <antmas> dat feeling when you close off a job that has been sitting for 6+ months
1721: [23:44:26] <antmas> mmmmmmmm
1722: [23:45:16] * Colin[pi]_Mac has joined #silverstripe
1723: [23:45:27] <Colin[pi]_Mac> morning all :D
1724: [23:45:33] <antmas> Colin[pi]_Mac: Mac?
1725: [23:45:38] <antmas> Colin[pi]_Mac: also, moin moin
1726: [23:45:43] <ajmitch> hi
1727: [23:45:50] <Colin[pi]_Mac> yep on the mbp at the cafe, waiting for a client
1728: [23:46:21] <antmas> Colin[pi]_Mac: make sure you kiss them on site
1729: [23:46:26] <antmas> Colin[pi]_Mac: get them 'ready'
1730: [23:46:31] <antmas> sight*
1731: [23:46:46] <Colin[pi]_Mac> yes they respond to confidence
1732: [23:46:56] <antmas> :D
1733: [23:47:38] <Colin[pi]_Mac> btw small funny, when ironing my shirt for this meeting, my son says "Is it hot?" and "What does it do?"
1734: [23:47:42] <Colin[pi]_Mac> must not iron very often lol
1735: [23:47:55] <antmas> lol
1736: [23:48:09] <antmas> Colin[pi]_Mac: potential client? or a demo?
1737: [23:48:13] <Colin[pi]_Mac> what is this magical clothes flattening device??
1738: [23:48:17] <Ryan-Toast> What’s the field that holds “”published?
1739: [23:48:18] <Colin[pi]_Mac> potential
1740: [23:48:46] <Colin[pi]_Mac> Ryan-Toast: SiteTree ?
1741: [23:48:57] <Ryan-Toast> Colin[pi]_Mac: What’s the field though?
1742: [23:49:10] <Colin[pi]_Mac> oh, um look in SiteTree :P
1743: [23:49:16] <Ryan-Toast> I have :p
1744: [23:49:23] <Colin[pi]_Mac> :o
1745: [23:50:00] <spronk0> heh
1746: [23:52:42] <Colin[pi]_Mac> Ryan-Toast: wait I might be thinking of the Status field in SiteTree
1747: [23:52:50] <Colin[pi]_Mac> (i.e. Status=Published)
1748: [23:53:18] <Ryan-Toast> but siteTree doesn’t have a status row :/
1749: [23:54:20] <Stomach> SiteTree_Live holds the live rows
1750: [23:54:26] <Colin[pi]_Mac> ah I'm looking at a 2.4 db, prolly changed in 3.x
1751: [23:54:36] <Ryan-Toast> So just by doing a get() it will query the live versions?
1752: [23:54:38] <Stomach> if they aren't in there, then they aren't live
1753: [23:54:48] * WilsonS quit (Ping timeout: 240 seconds)
1754: [23:54:50] <Stomach> if you're in live mode yes
1755: [23:54:58] <Colin[pi]_Mac> Ryan-Toast: depends on the mode you're in
1756: [23:55:01] <Stomach> (which you usually are unless logged in and have appended ?stage)
1757: [23:55:26] <Stomach> you can do Versioned::reading_stage('Live'); before the get to make sure if you want to
1758: [23:55:30] <Ryan-Toast> Stomach: sweet, cheers guys.
1759: [23:55:38] <Stomach> just make sure to set it back to what ever else it was before if you do that
1760: [23:56:58] <Colin[pi]_Mac> versioning still does my head in sometimes
1761: [23:57:12] <Stomach> its easy
1762: [23:57:13] <Colin[pi]_Mac> especially when doing programmatic writes to stage and publishing
1763: [23:57:25] <Stomach> haha, yeah
1764: [23:57:31] <Stomach> sometimes that makes me rage out really hard
1765: [23:57:44] <Stomach> then I go find an example from 4 projects ago and its okay again
1766: [23:57:47] <Colin[pi]_Mac> yeah conceptually it's easy but I always do it wrong with the saving sitetree objects from code
1767: [23:57:56] <Colin[pi]_Mac> WHY IS IT NOT SHO... OH
1768: [23:58:28] <Colin[pi]_Mac> mm coffee
1769: [23:59:13] <Colin[pi]_Mac> k meeting time, BAI
1770: [23:59:19] * Colin[pi]_Mac quit (Quit: Textual IRC Client: www.textualapp.com)

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