#silverstripe IRC Log

IRC log for 5 November 2015

All timestamps are in UTC.

1: [00:03:06] * saysora quit (Ping timeout: 246 seconds)
2: [00:04:22] <zippy> ah...
3: [00:04:30] <zippy> you can alway get the current controller..
4: [00:06:29] <ss-helper> Re: [silverstripe-dev] Re: Extended PSR-2 Recommentation - https://groups.google.com/d/msg/silverstripe-dev/_ebPef7HgKQ/UcdCRY3CAgAJ
5: [00:08:02] <DanaeNZ> zippy: oh like Controller::curr()
6: [00:08:06] <DanaeNZ> oop oh yeah
7: [00:16:42] <antmas> omg https://www.youtube.com/watch?v=5O3b6QwgFeg
8: [00:21:08] * zippy quit (Quit: Textual IRC Client: www.textualapp.com)
9: [00:33:53] * UncleCheese has joined #silverstripe
10: [00:42:02] * Colin[pi] has joined #silverstripe
11: [00:42:11] <Colin[pi]> damn this internet!
12: [00:43:43] * antmas shakes fist
13: [00:43:49] <antmas> o/"
14: [00:53:27] <terryapodaca> never see simon_w on here anymore
15: [00:54:16] <Colin[pi]> terryapodaca: yeah he... he doesn't come on IRC any more
16: [00:54:51] * DanaeNZ quit (Remote host closed the connection)
17: [00:56:08] <terryapodaca> different job?
18: [00:56:38] <Colin[pi]> terryapodaca: he disagreed with the direction SS was going, and walked away, in a nutshell
19: [00:57:32] <terryapodaca> welp
20: [01:00:21] <jules0x> argh
21: [01:00:22] * Colin[pi] quit (Read error: Connection reset by peer)
22: [01:01:59] * Colin[pi] has joined #silverstripe
23: [01:02:34] * Colin[crapintern has joined #silverstripe
24: [01:02:34] <ss-helper> Colin[crapintern: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
25: [01:02:55] * Colin[crapintern is now known as Colin[shittynet]
26: [01:06:07] <jules0x> how you show a HTMLText without tags in $summary_fields ? I'm not liking the <p>Things</p>
27: [01:06:32] * Colin[pi] quit (Ping timeout: 265 seconds)
28: [01:06:38] * DanaeNZ has joined #silverstripe
29: [01:06:52] <Colin[shittynet]> DanaeNZ: o/
30: [01:08:08] <terryapodaca> I know I asked this earlier, but never got a response...does anyone know how to get individual fields for a template in the UserDefinedForm module?
31: [01:08:51] <terryapodaca> the main email template loops $Fields
32: [01:08:53] <jules0x> ahh dot notation. right.
33: [01:15:21] * Azure quit (Quit: My Mac has gone to sleep. ZZZzzz…)
34: [01:18:19] * Azure has joined #silverstripe
35: [01:19:49] * DanaeNZ quit (Remote host closed the connection)
36: [01:24:56] * Colin[shittynet] quit (Read error: Connection reset by peer)
37: [01:31:57] * DanaeNZ has joined #silverstripe
38: [01:35:28] * Colin[shittynet] has joined #silverstripe
39: [01:35:55] * Azure quit (Quit: Oops.)
40: [01:36:13] * zippy has joined #silverstripe
41: [01:37:12] * Azure has joined #silverstripe
42: [01:44:00] <antmas> <Colin[pi]> terryapodaca: he disagreed with the direction SS was going, and walked away, in a nutshell
43: [01:44:21] <antmas> and called us all a bunch of entitled jerks in the process and shut all his repos down lol
44: [01:44:25] <antmas> that was epic
45: [01:44:41] <helenclarko> simonw?
46: [01:44:55] <antmas> yeah
47: [01:45:25] <helenclarko> who was telling me that he had added a message to the logs site for awhile.
48: [01:45:55] <helenclarko> Something like "This page is often visited by entitled jerks"
49: [01:47:27] <antmas> ^^^ that was simon lol
50: [01:47:32] <terryapodaca> wasn't simon_w pushing the use of some kind of framework that Facebook built or was building?
51: [01:47:54] <antmas> terryapodaca: in my eyes he got upset because he wasn't being listened to
52: [01:48:05] * DanaeNZ quit (Remote host closed the connection)
53: [01:48:08] <antmas> or getting 'recognition' for helping people in IRC
54: [01:48:26] <terryapodaca> IIRC, he was a good coder, but lacked the people skills
55: [01:48:32] <antmas> terryapodaca: and yeah he had a hand in building Hack
56: [01:48:43] <antmas> afaik
57: [01:49:33] <zippy> he's a good guy and helped me and many people lots. Thats my 2c.
58: [01:49:49] <antmas> he did
59: [01:49:54] <terryapodaca> zippy: that's what I said originally, he helped me A LOT
60: [01:49:59] <antmas> but was also an asshole to a lot of people
61: [01:50:20] * DanaeNZ has joined #silverstripe
62: [01:51:26] <antmas> maybe saying 'asshole' was a bit much, but they way he handled his exit and language toward SS was attrocious
63: [01:54:20] * Tanger has joined #silverstripe
64: [01:54:42] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
65: [02:07:29] <helenclarko> lol, upgrading old mac test laptop from 10.5 to 10.11. Just hit the "How do I update this thing!". No app store, so had to find my snow leopard install discs. I havent heard the DVD drive spin up on this thing I years.
66: [02:20:31] * antmas quit (Quit: Page closed)
67: [02:26:44] * joelpitt_ quit (Remote host closed the connection)
68: [02:31:00] * glenn-bautista quit (Quit: Leaving.)
69: [02:36:02] * glenn-bautista has joined #silverstripe
70: [02:43:51] * micmania1 quit (Quit: micmania1)
71: [02:46:39] * micmania1 has joined #silverstripe
72: [02:52:49] * UncleCheese has joined #silverstripe
73: [03:17:12] <zippy> Stomach: nmmm
74: [03:19:21] * zippy quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
75: [03:24:35] * Stomach quit (Quit: zzz)
76: [03:30:14] * jules0x quit (Quit: Leaving)
77: [03:36:56] * ccburns has joined #silverstripe
78: [03:41:30] * joelpittet has joined #silverstripe
79: [03:42:34] <ccburns> Hey guys - if I have a page that is password protected but I want a particular method that isn’t protected is there a way to do this… i.e. http://domain.com/annualplanner is the protected page but then I want the user to be able to subscribe to an ical calendar http://domainname.com.annualplanner/ical/1527dsnbdib (random string to know what user it is)
80: [03:43:12] <ccburns> Just wondering if I can “unpassword” protect the ical() method
81: [04:00:16] * helenclarko quit (Quit: Ain't no lie, baby bye bye bye.)
82: [04:00:27] * Jakx quit (Quit: Leaving)
83: [04:00:57] * hailwood quit (Remote host closed the connection)
84: [04:12:21] * micmania1 quit (Quit: micmania1)
85: [04:15:11] * Stomach has joined #silverstripe
86: [04:20:10] * r_hector has joined #silverstripe
87: [04:21:56] <terryapodaca> grrrrrrr
88: [04:22:11] <terryapodaca> mind is burning
89: [04:32:04] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
90: [04:37:39] * Stomach quit (Quit: zzz)
91: [04:45:15] * ccburns quit (Quit: ccburns)
92: [04:48:18] * glenn-bautista quit (Quit: Leaving.)
93: [04:50:00] * Stomach has joined #silverstripe
94: [05:23:39] * ccburns has joined #silverstripe
95: [05:34:01] * r_hector quit (Remote host closed the connection)
96: [05:38:52] * Stomach quit (Quit: zzz)
97: [05:45:19] * terryapodaca quit (Quit: time for another nap...)
98: [05:56:47] * terryapodaca has joined #silverstripe
99: [05:57:38] * terryapodaca bang head
100: [06:32:11] * CodeTrap has joined #silverstripe
101: [06:32:47] <ccburns> terryapodaca: I assume something isn’t going right for you ATM ;)
102: [06:33:07] <terryapodaca> You could say that
103: [06:33:23] <terryapodaca> I was also testing some of these IRC commands
104: [06:33:42] * Stomach has joined #silverstripe
105: [06:34:38] <terryapodaca> like I didn't know it was good etiquiette
106: [06:34:53] <terryapodaca> to "/quit" with a message
107: [06:35:36] * CodeTrap quit (Client Quit)
108: [06:37:03] <terryapodaca> ccburns: but the SilverStripe issue I can't figure out is how to get individual fields in an email template...but specifically for the UserDefinedForms module
109: [06:39:24] * cupcake quit (Ping timeout: 246 seconds)
110: [06:41:58] <ccburns> terryapodaca: I’m not much help on this kind of stuff as it’s always just trial and error for me… Is it a scope issue?
111: [06:42:17] <terryapodaca> yeah, I believe it is a scope thing
112: [06:42:52] <terryapodaca> the default template does: <% loop Fields %><% if Title %>$Title<% else %>$Name<% end_if %>
113: [06:43:10] <terryapodaca> but I don't want to list every single field in the email
114: [06:43:15] <terryapodaca> I want to hand pick each field
115: [06:44:20] <terryapodaca> or at the very least, I can hand code the labels, but I need to get the correct $FormattedValue that's in that same loop
116: [06:45:57] <terryapodaca> Usually situations like this, you can simply $Fields.fieldnameortitle or something like that
117: [06:51:48] <ss-helper> Fw: new message - https://groups.google.com/d/msg/silverstripe-dev/GPJIkqRzpPI/1nqTPG7YAgAJ
118: [06:59:26] * joelpittet quit ()
119: [07:00:11] * zippy has joined #silverstripe
120: [07:00:42] * zippy quit (Client Quit)
121: [07:07:38] * DanaeNZ quit (Remote host closed the connection)
122: [07:08:14] * DanaeNZ has joined #silverstripe
123: [07:10:29] * darjusIT has joined #silverstripe
124: [07:10:33] * Colin[shittynet] quit (Read error: Connection reset by peer)
125: [07:12:10] * DanaeNZ quit (Ping timeout: 240 seconds)
126: [07:12:45] * ccburns has left #silverstripe
127: [07:13:24] <ss-helper> How to find out which version of Silverstripe a site is using, looking at the source code? - http://stackoverflow.com/questions/25615039/how-to-find-out-which-version-of-silverstripe-a-site-is-using-looking-at-the-so
128: [07:19:20] * Copperis has joined #silverstripe
129: [07:28:07] * Eliseth has joined #silverstripe
130: [07:30:02] <Eliseth> Morning o/
131: [07:30:11] <terryapodaca> o/
132: [07:42:21] * wmk has joined #silverstripe
133: [07:53:41] * arnhoe has joined #silverstripe
134: [08:06:53] <ss-helper> AW: [silverstripe-dev] Re: Extended PSR-2 Recommentation - https://groups.google.com/d/msg/silverstripe-dev/_ebPef7HgKQ/gzu1t3HcAgAJ
135: [08:44:15] * R\w\C has joined #silverstripe
136: [08:58:19] * Mike123 has joined #silverstripe
137: [09:06:02] * kinglozzer has joined #silverstripe
138: [09:08:10] * sw12 has joined #silverstripe
139: [09:08:10] <ss-helper> sw12: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
140: [09:12:18] * the_sandman has joined #silverstripe
141: [09:13:24] * sw12 quit (Ping timeout: 246 seconds)
142: [09:27:02] * Stomach quit (Quit: zzz)
143: [09:36:22] * stnvh has joined #silverstripe
144: [09:36:59] <ss-helper> Re: [silverstripe-dev] Re: Extended PSR-2 Recommentation - https://groups.google.com/d/msg/silverstripe-dev/_ebPef7HgKQ/BXyslqDhAgAJ
145: [09:38:09] * Stomach has joined #silverstripe
146: [09:39:39] * Colin[shittynet] has joined #silverstripe
147: [09:47:35] * Tanger quit (Quit: sleep())
148: [09:55:38] * Stomach quit (Quit: zzz)
149: [09:59:18] * R\w\C quit (Quit: Textual IRC Client: www.textualapp.com)
150: [10:01:15] * DimiStripe_alt has joined #silverstripe
151: [10:02:39] * DimiStripe quit (Ping timeout: 240 seconds)
152: [10:02:39] * DimiStripe_alt is now known as DimiStripe
153: [10:05:41] * Otterpocket has joined #silverstripe
154: [10:06:13] <Otterpocket> kinglozzer, is there a way to mock an ajax request with get() in FunctionalTest ?
155: [10:11:42] <kinglozzer> Otterpocket: You can pass headers to it
156: [10:12:11] <kinglozzer> So it’d be an X-Requested-With: XMLHttpRequest header
157: [10:12:47] <kinglozzer> $this->get($url, null, array('X-Requested-With' => 'XMLHttpRequest')); I think
158: [10:15:33] <Otterpocket> sorry I meat post
159: [10:15:44] <Otterpocket> mean*
160: [10:16:03] * Mike123 quit (Ping timeout: 246 seconds)
161: [10:16:06] <Otterpocket> pass it in the headers array?
162: [10:16:58] <Otterpocket> ahh yes that works
163: [10:22:01] <ss-helper> Re: [silverstripe-dev] Re: Extended PSR-2 Recommentation - https://groups.google.com/d/msg/silverstripe-dev/_ebPef7HgKQ/gkB2gbjjAgAJ
164: [10:27:41] * nontgor quit (Ping timeout: 265 seconds)
165: [10:40:31] * nontgor has joined #silverstripe
166: [10:44:03] <wmk> kinglozzer, wise words in your mail on dev list...
167: [10:45:31] * DanaeNZ has joined #silverstripe
168: [10:49:58] * DanaeNZ quit (Ping timeout: 260 seconds)
169: [10:56:40] * MarkGuinn has joined #silverstripe
170: [11:00:30] * Mike123 has joined #silverstripe
171: [11:01:25] * NETim has joined #silverstripe
172: [11:01:53] <NETim> Morning, What is the best way to access form data in an onbeforewrite for a dataobject?
173: [11:05:43] <MarkGuinn> You can always access $_POST and $_GET but that's not great practice.
174: [11:06:18] <MarkGuinn> only your controller should know about the form
175: [11:08:54] <NETim> MarkGuinn, yeah, the only issue is that because I've added fields in an extension they aren't accessible in the objects onbeforewrite.
176: [11:12:17] <MarkGuinn> database fields or form fields?
177: [11:15:14] <NETim> either.
178: [11:15:37] <NETim> I've extended member to add a couple of extra fields and want to check the value of one of them.
179: [11:16:37] <kinglozzer> NETim: The database fields should be accessible in onBeforeWrite
180: [11:17:11] <NETim> kinglozzer, I thought that, but $this->fieldName and $this->owner->fieldName both come back blank
181: [11:17:42] <NETim> Oddly, they don't even show up if I print the object.
182: [11:18:18] <MarkGuinn> It sounds like the extension is not actually being added and/or you didn't dev/build
183: [11:18:30] <NETim> If only.
184: [11:18:47] <NETim> The updateCMSFields is having an effect, and the fields have been built in the DB.
185: [11:21:21] * Parker1090 has joined #silverstripe
186: [11:22:49] <Parker1090> Hi all. I'm after a bit of help with the lumberjack add-on. I've used it for blog pages, but it seems be replacing the form on the security tab too, which in turn won't allow me to add any new users. Any help appreciated!
187: [11:24:07] <Parker1090> The error I receive is an internal server error, with this message in the logs: "AH01215: PHP Catchable fatal error: Argument 1 passed to GridFieldSiteTreeAddNewButton::getAllowedChildren() must be an instance of SiteTree, null given, called in ./silverstripe-lumberjack-1.1/code/forms/gridfield/GridFieldSiteTreeAddNewButton.php on line 38 and defined in ./silverstripe-lumberjack-1.1/code/forms/gridfield/GridFieldSiteTreeAdd
188: [11:26:35] <NETim> Odder, it's there if I'm editing the record, but not when I'm creating it...
189: [11:28:47] <MarkGuinn> NETim - that's really strange. I've never seen that before.
190: [11:29:09] <NETim> It's also a tad frustrating.
191: [11:35:33] <Parker1090> Anyone with any suggestions on my error?
192: [11:35:37] * Liquide has joined #silverstripe
193: [11:37:07] <NETim> Parker1090, what are you trying to achieve with lumberjack?
194: [11:37:44] <Parker1090> I just want to add a new user. I've installed it, along side the blog module, but for some reason it seems to try to handle the Security parts of the backend rather than a normal gridfield
195: [11:38:06] <Parker1090> I haven't attempted to add anything new, or use it with anything other than the blog
196: [11:38:20] <NETim> I've used it with blog before, but it hasn't hijacked the member form before.
197: [11:38:45] <Parker1090> I'm not sure why it would have done it?
198: [11:38:59] <NETim> Are you using the blog module that uses lumberjack?
199: [11:39:08] <NETim> Or have you added lumberjack yourself?
200: [11:39:27] <Parker1090> I've installed them both separately
201: [11:39:59] <NETim> hm... not hugely familiar with it but it sounds like a config issue.
202: [11:41:30] <Parker1090> I can't add any new users at the moment, which is a little bit frustrating =/
203: [11:43:48] <NETim> I ment lumberjack config. Do you need to tell it what objects to manage?
204: [11:49:13] <Parker1090> Not sure. As I said, all I've done is install it, installed the blog (which all works fine), gone to add a new user and this happened ><
205: [11:53:10] <Parker1090> Apparently not just me! https://www.silverstripe.org/community/forums/all-other-modules/show/104785
206: [12:25:10] * Colin[shittynet] quit (Read error: Connection reset by peer)
207: [12:39:46] <wmk> NETim, onbeforewrite... did you look how hasoneedit module handles writing in the has_one relation?
208: [12:40:20] * sealan has joined #silverstripe
209: [12:42:33] <wmk> Parker1090, did you file an issue on github / lumberjack ?
210: [12:46:09] <Parker1090> Yes
211: [12:46:44] <wmk> fine ;)
212: [12:47:01] <wmk> BTW: any translatable experts around?
213: [12:48:10] <wmk> if i have two translations / sites for en_GB and en_US, is there a way to share translated content for both?
214: [12:50:45] * NETim_ has joined #silverstripe
215: [12:52:50] * NETim quit (Ping timeout: 250 seconds)
216: [12:57:20] * the_sandman quit (Read error: Connection reset by peer)
217: [13:07:11] <ss-helper> Re: [silverstripe-dev] Re: Extended PSR-2 Recommentation - https://groups.google.com/d/msg/silverstripe-dev/_ebPef7HgKQ/qB2ZxfrsAgAJ
218: [13:10:21] * Mike123 quit (Ping timeout: 246 seconds)
219: [13:11:40] * Parker1090 quit (Quit: Page closed)
220: [13:15:51] * UndefinedOffset has joined #silverstripe
221: [13:21:07] * Mike123 has joined #silverstripe
222: [13:21:23] <MarkGuinn> anyone know a really easy way to set a default filter state on ModelAdmin?
223: [13:36:38] <Mike123> MarkGuinn, if i understood u right, you want to make managed model to be sorted in some way yes ?
224: [13:36:39] <NETim_> wmk,the problem is with fields on a member.
225: [13:37:33] <Mike123> if so...then just add $default_sort = ['SortField ASC'] to the DO that is managed in ModelAdmin
226: [13:37:33] <MarkGuinn> Mike123 - A modeladmin has filters in a sidebar on the left. I just need a way to set the state of those filters by default.
227: [13:37:44] <Mike123> ooooooh
228: [13:38:06] <Mike123> well that's tricky :/ sorry dont't know this
229: [13:38:10] <MarkGuinn> Mike123 - wmk had a great solution though by simply overriding the SearchForm method
230: [13:39:34] <NETim_> MarkGuinn, http://www.silverstripe.org/au/community/forums/data-model-questions/show/23766
231: [13:39:49] <NETim_> Involves rebuilding the search fields list, but should work.
232: [13:41:13] <MarkGuinn> Thanks, NETim. This looks like a very similar approach to wmk's.
233: [13:42:43] <NETim_> no problem. Hope it solves the issue.
234: [13:51:00] <Mike123> is there a way to make nested optionsetfields ?
235: [13:51:22] <Mike123> i mean...i need to have 2 groups which will have sub fields...
236: [14:07:46] <wmk> so why is this userswitcher not working on nginx?
237: [14:12:13] <wmk> argh, /userswitcher/UserSwitcherFormHTML?userswitchercms=1 isn't working while /userswitcher/UserSwitcherFormHTML/?userswitchercms=1 works... WTF?
238: [14:12:23] <wmk> (note the slash before the get param)
239: [14:15:36] * nontgor quit (Read error: Connection reset by peer)
240: [14:16:24] * UndefinedOffset quit (Quit: Leaving.)
241: [14:24:18] * gordon has joined #silverstripe
242: [14:24:42] * sealan quit (Remote host closed the connection)
243: [14:24:42] * gordon is now known as Guest26952
244: [14:25:08] * sealan has joined #silverstripe
245: [14:42:32] * muskie9 has joined #silverstripe
246: [14:42:35] * ss-helper quit (Ping timeout: 250 seconds)
247: [14:42:45] * elgabbu quit (Ping timeout: 246 seconds)
248: [14:42:45] * slievr quit (Ping timeout: 246 seconds)
249: [14:43:54] * _longines quit (Ping timeout: 255 seconds)
250: [14:44:20] * Guest26952 is now known as nontgor
251: [14:46:03] * ec8or_ quit (Ping timeout: 250 seconds)
252: [14:46:38] * ec8or has joined #silverstripe
253: [14:47:18] * _longines has joined #silverstripe
254: [14:48:31] * ss-helper has joined #silverstripe
255: [14:53:08] * kbtjuh has joined #silverstripe
256: [15:17:17] <kbtjuh> hi, how can i create frienly url for a dataobject as page? now the url is by ID: /projects/show/2
257: [15:17:25] <kbtjuh> someone has an example of doing this?
258: [15:17:35] <kbtjuh> like the title of a project?
259: [15:19:16] <kinglozzer> kbtjuh: Take a look at https://github.com/NightJar/ssrigging-slug
260: [15:22:16] * darjusIT quit (Quit: Leaving)
261: [15:23:53] <wmk> kinglozzer, yup. slug is the way to go.
262: [15:52:35] * slievr has joined #silverstripe
263: [16:00:09] * UndefinedOffset has joined #silverstripe
264: [16:02:35] * krofek__ quit (Ping timeout: 264 seconds)
265: [16:04:18] * Mike123 quit (Ping timeout: 246 seconds)
266: [16:07:21] <ss-helper> Re: [silverstripe-dev] Fw: new message - https://groups.google.com/d/msg/silverstripe-dev/GPJIkqRzpPI/6S7bj8L2AgAJ
267: [16:16:21] * cupcake has joined #silverstripe
268: [16:16:28] <cupcake> ola 0/
269: [16:17:11] <cupcake> i have issue with UploadField when i attach a photo through the option 'From Files' and click save the photo does not save to the dataobject even if in the headers the photo id is present
270: [16:17:13] <cupcake> any ideas??
271: [16:19:27] <kinglozzer> cupcake: What's your UploadField named?
272: [16:20:16] * joelpittet has joined #silverstripe
273: [16:23:04] <cupcake> $liveUpdatePhotoUploadField = UploadField::create( 'Photo', 'Photo' )
274: [16:23:14] <cupcake> Photo is a has_one
275: [16:23:47] <cupcake> in the post i have this
276: [16:23:49] <cupcake> Photo[Files][]:76019
277: [16:23:56] <cupcake> the id is there but not saved
278: [16:24:38] <kinglozzer> cupcake: $has_one = array('Photo' => 'Image'); ?
279: [16:24:56] <cupcake> $has_one = array('Photo' => 'Photo');
280: [16:25:10] <cupcake> Photo extends ImageAsset (our custom class) which then extends Image
281: [16:25:37] <kinglozzer> Hmm, that could be your issue...
282: [16:25:48] <cupcake> i.e.?
283: [16:25:58] <kinglozzer> Is the file you're picking in 'From Files' a 'Photo'? Or is it an 'Image'?
284: [16:26:04] <kinglozzer> (class name)
285: [16:26:08] <cupcake> aa
286: [16:26:09] <kinglozzer> (if you look in the database)
287: [16:26:16] <kinglozzer> You might need to re-upload it
288: [16:26:19] <cupcake> ImageAsset
289: [16:26:22] <cupcake> so thats why
290: [16:26:24] <kinglozzer> Which is why extending image is usually a bad idea ;)
291: [16:26:29] <cupcake> it does not match with the relationship
292: [16:26:34] <kinglozzer> Yeah that's it ^^
293: [16:26:37] <cupcake> aha
294: [16:26:53] <cupcake> thanks :)
295: [16:31:52] * arnhoe quit ()
296: [16:32:03] <cupcake> kinglozzer is there a workaround maybe?
297: [16:32:09] <cupcake> hackish workaround
298: [16:32:11] <cupcake> to save it?
299: [16:33:02] <kinglozzer> cupcake: I don't think so, I think it'll always be rejected... I think you'll have to download the image and re-upload it
300: [16:37:55] <Otterpocket> is there a good way to do find_or_create or find_or_new in ss?
301: [16:40:20] <kinglozzer> Otterpocket: You mean a DataObject? I don't think so, I always just do if (!$obj->exists) { $obj = new MyDataObject(); } or something
302: [16:42:07] * wmk quit (Ping timeout: 268 seconds)
303: [16:45:21] * Eliseth quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
304: [16:53:15] * DimiStripe quit (Remote host closed the connection)
305: [16:53:20] * DimiStripe_alt has joined #silverstripe
306: [16:53:58] * ajmitch_ has joined #silverstripe
307: [16:55:43] * DimiStripe_alt is now known as DimiStripe
308: [16:55:58] * liori_ has joined #silverstripe
309: [16:55:58] <ss-helper> liori_: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
310: [17:01:42] <kbtjuh> how can i install this module via composer?
311: [17:01:47] <kbtjuh> whats the link?
312: [17:02:24] <kbtjuh> https://github.com/NightJar/ssrigging-slug
313: [17:03:46] <kinglozzer> kbtjuh: composer require nightjar/ss-slug
314: [17:04:38] <kbtjuh> thanks man
315: [17:04:51] * UndefinedOffset quit (*.net *.split)
316: [17:04:53] * ajmitch quit (*.net *.split)
317: [17:04:54] * liori quit (*.net *.split)
318: [17:08:25] * UndefinedOffset has joined #silverstripe
319: [17:17:48] * kinglozzer quit ()
320: [17:21:08] * stnvh quit (Quit: quit)
321: [17:23:25] * liori_ is now known as liori
322: [17:24:40] * CodeTrap has joined #silverstripe
323: [17:32:44] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
324: [17:32:57] * Otterpocket quit (Quit: Leaving)
325: [17:35:03] * muskie9 has joined #silverstripe
326: [17:37:20] * kbtjuh quit (Quit: Page closed)
327: [17:44:16] * sealan quit (Remote host closed the connection)
328: [17:52:16] * CodeTrap quit (Quit: CodeTrap)
329: [17:55:34] * sealan has joined #silverstripe
330: [17:59:40] * Stomach has joined #silverstripe
331: [18:27:34] * Stomach quit (Quit: zzz)
332: [19:05:03] * sealan quit (Remote host closed the connection)
333: [19:08:16] * Stomach has joined #silverstripe
334: [19:26:46] * Stomach quit (Quit: zzz)
335: [19:27:23] * antmas has joined #silverstripe
336: [19:29:19] * Stomach has joined #silverstripe
337: [19:34:06] * NewGuy has joined #silverstripe
338: [19:34:07] <ss-helper> NewGuy: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
339: [19:34:16] * UndefinedOffset quit (Disconnected by services)
340: [19:34:16] * UndefinedOffset1 has joined #silverstripe
341: [19:35:58] <antmas> happy friday everyone
342: [19:36:04] <antmas> unless it's thursday :P
343: [19:39:15] <Stomach> HAPPY FRIDAY ANTMAS
344: [19:39:17] <NewGuy> Hi SS people, I am learning the CMS/framework, and I am following Uncle Cheese' lessons. I am using the Currency datatype, and Currency fieldtype in a ModelAdmin, I wish to change the currency symbol. I've looked around, through the API documentation and found an option that can be put in the config.yml file. I've put "Currency:{Newline indentation here}currency_symbol: 'DKK'" in the mysite/_config/config.yml file, AND flushed. H
345: [19:39:44] <NewGuy> Happy friday :D
346: [19:39:59] * antmas_ has joined #silverstripe
347: [19:41:38] <NewGuy> It is probably a very basic error. But i hope you guys can help me :-)
348: [19:42:21] * antmas quit (Ping timeout: 246 seconds)
349: [19:42:56] * antmas_ is now known as antmas
350: [19:44:44] * UndefinedOffset1 is now known as UndefinedOffset
351: [19:45:09] * helenclarko has joined #silverstripe
352: [19:49:39] * Copperis quit (Ping timeout: 240 seconds)
353: [19:52:28] * Copperis has joined #silverstripe
354: [19:58:23] <helenclarko> Morning o/
355: [20:01:26] <NewGuy> morning :)
356: [20:01:39] <antmas> le morning
357: [20:03:21] <NewGuy> Let me know if i can borrow anybody's time. I am struggling abit with the Currency thing :)
358: [20:03:50] <antmas> NewGuy: don't need to ask to ask, just ask :D
359: [20:03:54] <helenclarko> Actually need help this morning... So have subsites setup and working, but dont want path "subsite.domain.com" I want domain.com/subsite. BUT HOW?
360: [20:04:29] <NewGuy> I did earlier guess you were dc'ed antmas :D To avoid spam ill try and paste the question in a private message :)
361: [20:05:22] <NewGuy> I am now realising i dont know how to pm haha
362: [20:06:14] <helenclarko> /pm antmas
363: [20:06:22] <helenclarko> nope that didnt work
364: [20:06:46] <helenclarko> !notes chickenbutt
365: [20:06:47] <ss-helper> https://github.com/ss-irc/notes/wiki/chickenbutt
366: [20:06:51] <antmas> LOL
367: [20:06:56] <helenclarko> Nope that didnt work either!
368: [20:07:21] <antmas> NewGuy: ask in the main channel here, much more likely someone else will be able to help :P
369: [20:07:29] * glenn-bautista has joined #silverstripe
370: [20:07:50] <muskie9> NewGuy !paste
371: [20:07:56] <muskie9> can you paste your config.yml
372: [20:08:02] * micmania1 has joined #silverstripe
373: [20:08:09] <muskie9> did I spell that wrong?
374: [20:08:31] <muskie9> !paste
375: [20:08:32] <ss-helper> Please paste your code using something like http://kopy.io/ or http://www.sspaste.com/ or https://gist.github.com/ and then paste the link here.
376: [20:08:35] <muskie9> there we go
377: [20:08:59] <NewGuy> Hmm i've looked into my question again. Ill rephrase it abit :) 2 sec
378: [20:11:07] <helenclarko> muskie9: Is it !paste NewGuy
379: [20:11:22] <NewGuy> So i changed the currency symbol of a datatype currency via config.yml. It is working hurray. But only on the frontend. In the backend it still shows "$" in my Currencyfield.
380: [20:11:28] <muskie9> helenclarko ya, the paste cmd has to be first
381: [20:12:23] <helenclarko> NewGuy: is this with a shop module?
382: [20:12:26] <muskie9> NewGuy looks like the field doesn't access that config: http://api.silverstripe.org/3.2/source-class-CurrencyField.html#20
383: [20:13:02] <NewGuy> It is not a shop module no. It is core i believe. I am following Uncle cheese' lessons.
384: [20:13:47] <muskie9> I think that field needs to be updated to access the config set by the DB field... not sure if that'd be a bugfix or enhancement
385: [20:13:57] <NewGuy> Oh so the $ is hardcoded.
386: [20:14:02] <muskie9> ya
387: [20:15:01] <NewGuy> For any non-dollar using contries this just adds confusion i would guess. Maybe either have it look through the config, or remove the symbol all together. Maybe? :)
388: [20:15:09] <helenclarko> NewGuy: Solution here -> http://www.silverstripe.org/community/forums/data-model-questions/show/20939
389: [20:15:16] <helenclarko> last post
390: [20:15:38] <helenclarko> New class extending CurrencyField.
391: [20:16:14] <NewGuy> Oh. Is it core?
392: [20:16:17] <muskie9> I might do a pr for that... seems like an easy enough fix to run it off the config system
393: [20:16:51] <helenclarko> muskie9: Yeah, looks like a nice solution
394: [20:17:21] <NewGuy> Oh nvm stupid question
395: [20:17:22] <muskie9> guessing 3 branch rather than 3.2?
396: [20:18:01] <NewGuy> Nice one Helen!
397: [20:18:24] <antmas> :D
398: [20:18:26] <antmas> all gravy?
399: [20:18:53] <helenclarko> Guess the only pain is going and changing all the currencyFields to LocalCurrencyField
400: [20:19:17] <helenclarko> NewGuy: No problem!
401: [20:19:21] <muskie9> helenclarko just use the injector
402: [20:19:29] <NewGuy> Ill use that. Furthermore here is somewhat a noob question. My country's currency symbol doesn't not appear before the value of the currency. It appears after. So the format goes: 199 DKK instead of $ 199. Is there an easy option to set this in the config, that i have missed?
403: [20:19:37] <helenclarko> muskie9: right, or that :)
404: [20:21:32] <helenclarko> NewGuy: what is line of code you use to display it?
405: [20:21:41] <NewGuy> .Nice
406: [20:23:00] <NewGuy> ex: $Price.Nice in the template file
407: [20:24:23] <helenclarko> NewGuy: THat should be everything.
408: [20:25:33] <NewGuy> Im not sure what you mean Helen
409: [20:27:23] <NewGuy> Is there a way to change it so the currency_symbol is displayed after the currency value?
410: [20:27:47] * sealan has joined #silverstripe
411: [20:29:11] <helenclarko> Oh, you want the symbol after the value?
412: [20:29:16] <NewGuy> Yes :-)
413: [20:30:16] <helenclarko> you could extend currency and add a variation of .Nice()
414: [20:32:11] <NewGuy> Hmm. I will try that :-) I am new to SS though so that seems abit of a task. Since we have the option to change the symbol in config.yml maybe we should be able to change the symbol position. Could be an interesting feature request for the next version :-)
415: [20:35:31] <helenclarko> NewGuy: Something like this maybe. http://pastebin.com/5McgJ1fH
416: [20:37:35] <helenclarko> muskie9: would that work without adding anything into _config.php to say that it is an extension?
417: [20:37:37] <ss-helper> Re: [silverstripe-dev] Re: Module scaffolding - https://groups.google.com/d/msg/silverstripe-dev/ZCKj-mBWv9Q/NLoWhngFAwAJ
418: [20:39:56] <helenclarko> Okay, I'm asking this again... So have subsites setup and working, but dont want path "subsite.domain.com" I want domain.com/subsite. BUT HOW?
419: [20:40:07] <muskie9> if it's overriding currency you'd need to use the injector to tell SS to use the overriding class iirc
420: [20:40:45] <muskie9> helenclarko I wish I had an answer to your question, I've never run a subsite on a non-subdomain
421: [20:40:49] * micmania1 quit (Quit: micmania1)
422: [20:40:51] <helenclarko> muskie9: not overriding as such, just extending/adding to.
423: [20:41:16] <muskie9> ah, then I think it wouldn't extend Currency, but rather DataExtension or Extension
424: [20:41:26] <muskie9> I've never applied anything to a DB field type
425: [20:41:57] <helenclarko> Yea, I've never really added to core fieldtypes.
426: [20:41:59] <NewGuy> Hmm Helen i tried pasting the class into mysite/code. And called $Price.SymbolNice in the template but it doesn't look like that worked hmm.
427: [20:42:39] <muskie9> NewGuy try having it extend DataExtension, then apply it in your config.yml
428: [20:43:08] <helenclarko> muskie9: thats was my next idea haha.
429: [20:43:34] <muskie9> it's taking me longer to spin up a dev env for this pr than it is to actually apply the code ;P
430: [20:45:27] <NewGuy> Muskie9: That returns an error on pageload after flush. Returns this error: "Uncaught ReflectionException: Class CurrencySymbol.php does not exist"
431: [20:45:43] <helenclarko> NewGuy: change "Class CurrencySymbol extend Currency" to "Class CurrencySymbol extends DataExtension"
432: [20:45:50] <muskie9> ^
433: [20:46:04] <helenclarko> then...
434: [20:46:27] <helenclarko> Add the extension to your config.yml
435: [20:46:39] <helenclarko> Ill have code for that in a min lol
436: [20:46:58] <NewGuy> Hmm i believe i have done that
437: [20:47:11] <NewGuy> i also flushed after changing the config
438: [20:49:13] <helenclarko> NewGuy: I hope this is correct. http://pastebin.com/4z3PqVvi
439: [20:49:34] <helenclarko> Add that to your mysite/-config/-config.yml file
440: [20:50:02] <helenclarko> oops mysite/_config/_config.yml
441: [20:50:38] <helenclarko> if that doesnt work, its harder to extend core files than I thought.
442: [20:51:24] <helenclarko> also /dev/build?flush=1
443: [20:51:25] <NewGuy> I am stupid. I accidently made a typo in config.yml. However now it loads the page. But it doesn't load anything where i in the template put $Price.SymbolNice
444: [20:52:00] * DanaeNZ has joined #silverstripe
445: [20:52:42] * MarkGuinn quit (Quit: My Mac has gone to sleep. ZZZzzz…)
446: [20:52:45] <NewGuy> So the method doesn't seem to be working. Unless i am using it wrong ?
447: [20:53:18] <helenclarko> did you dev/build?flush=1
448: [20:54:10] <NewGuy> Yes i did
449: [20:54:19] <helenclarko> can you paste up your files?
450: [20:54:28] <helenclarko> !paste NewGuy
451: [20:54:28] <ss-helper> NewGuy: Please paste your code using something like http://kopy.io/ or http://www.sspaste.com/ or https://gist.github.com/ and then paste the link here.
452: [20:54:35] <muskie9> so this needs updating to utilize the config's currency symbol: !preg_match('/^\s*(\-?\$?|\$\-?)?(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?\s*$/', $this->value)
453: [20:54:50] * muskie9 needs to brush up on his regex
454: [20:57:25] <helenclarko> muskie9: I suck at regex. I had a plugin which sat in my FF toolbar to tell me my internet usage. It would use regex on a usage page to pull the data allowence. I had to modify it this year as 2degrees took out snap. hell of a job!
455: [20:57:59] <muskie9> helenclarko I found this to be a very useful tool: https://regex101.com/
456: [20:58:02] <NewGuy> Here you go: https://gist.github.com/anonymous/a7585676620a082a6a48
457: [20:58:18] <helenclarko> Then I went unlimited and the plugin isnt needed anymore haha
458: [20:58:43] <muskie9> NewGuy you need to apply the CurrencySymbol to Currency, not SiteConfig
459: [20:59:55] <NewGuy> siteconfig? You mean the CurrencySymbol should extend Currency not DataExtension? or ?
460: [21:00:14] <NewGuy> Oh wait
461: [21:00:25] <NewGuy> i thought all data extensions should be under SiteConfig in yml file?
462: [21:00:52] <muskie9> NewGuy https://gist.github.com/anonymous/a7585676620a082a6a48#gistcomment-1614242
463: [21:01:21] <muskie9> extensions can be applied to any class other than DataExtension and Extension iirc
464: [21:01:54] <muskie9> so this worked apparently: !preg_match("/^\s*(\-?$currencySymbol?|$currencySymbol\-?)?(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?\s*$/", $this->value)
465: [21:02:10] <muskie9> assuming $currencySymbol is set with the config's setting
466: [21:02:14] <NewGuy> Ahh that makes alot of sense! I must have misudnerstood that part in the Lesson. Now it is making alot more sense.
467: [21:03:04] <NewGuy> One thing though hellen. It tells me there is an error "Undefined property: CurrencySymbol::$value Line 4 in mysite/code/CurrencySymbol.php"
468: [21:03:17] <NewGuy> Helen* sorry
469: [21:03:38] * sealan quit (Remote host closed the connection)
470: [21:04:52] <helenclarko> NewGuy: hmm
471: [21:05:07] <helenclarko> you're on ss 3.2?
472: [21:05:12] <helenclarko> has this changed
473: [21:05:26] <NewGuy> I am
474: [21:05:34] <NewGuy> Would you like a gist of the trace?
475: [21:12:02] * ajmitch_ is now known as ajmitch
476: [21:12:22] * micmania1 has joined #silverstripe
477: [21:17:13] * sealan has joined #silverstripe
478: [21:18:35] <helenclarko> NewGuy: I dont understand. That should be be all you need to do. It sould get its value from price right. Dev/build?flush=1
479: [21:18:39] <NewGuy> Hmm. I dont get why it is giving that error. One would assume the scope is Currency
480: [21:18:49] <helenclarko> NewGuy: I dunno, kinda lost for ideas now.
481: [21:20:41] <NewGuy> Just did Dev/build?flush=1 didn't help. Hmm it is odd. Do you want the Trace of the error or?
482: [21:20:59] <helenclarko> yea
483: [21:21:53] <NewGuy> https://gist.github.com/anonymous/69cb8adf01ba57696276 Here you go. But i dont want to take up all your time. :-)
484: [21:22:39] <ss-helper> Re: [silverstripe-dev] Re: Extended PSR-2 Recommentation - https://groups.google.com/d/msg/silverstripe-dev/_ebPef7HgKQ/WTQ_ty4IAwAJ
485: [21:23:46] * krofek has joined #silverstripe
486: [21:27:40] * UndefinedOffset quit (Quit: Leaving.)
487: [21:28:31] * zippy has joined #silverstripe
488: [21:28:37] <zippy> omg. You can't access purchase orders via the Xero API atm.... wwttfff
489: [21:29:33] <helenclarko> NewGuy: Does your code look like what muskie9 put up? https://gist.github.com/anonymous/a7585676620a082a6a48#gistcomment-1614242
490: [21:29:55] <NewGuy> Yes 100%
491: [21:31:34] <antmas> bleep bloop
492: [21:33:16] <helenclarko> can you paste up your files?
493: [21:33:20] <helenclarko> !paste
494: [21:33:20] <ss-helper> Please paste your code using something like http://kopy.io/ or http://www.sspaste.com/ or https://gist.github.com/ and then paste the link here.
495: [21:33:57] <NewGuy> which files would you like? The config, the template, and the extension i presume?
496: [21:34:35] <antmas> Stomach I found a band you may dig
497: [21:34:53] <Stomach> oooo
498: [21:34:53] <Stomach> who
499: [21:35:03] <muskie9> helenclarko NewGuy https://github.com/silverstripe/silverstripe-framework/pull/4747
500: [21:35:11] <antmas> Stomach: Graveyard - awesome blues stuff
501: [21:35:39] <antmas> Stomach: https://www.youtube.com/watch?v=HqVGfMcRNhY
502: [21:35:43] * Copperis quit (Quit: Leaving)
503: [21:35:54] <Stomach> lets see :D
504: [21:36:05] <Stomach> I've been listening to lots of Dr John this week
505: [21:36:14] <NewGuy> Nice muskie9 ! :D
506: [21:36:29] <muskie9> seemed to work when I tested it ;P
507: [21:36:48] <antmas> Stomach: I'll check out DRJ
508: [21:36:48] <NewGuy> Cool! Hopefully it will be in next release :D
509: [21:36:57] <NewGuy> Helen which files would you like me to paste? :)
510: [21:37:10] <Stomach> hes great :D
511: [21:37:15] <helenclarko> NewGuy: yea .ss, .yml and .php for extension
512: [21:39:02] <NewGuy> helen here you go https://gist.github.com/anonymous/93f32a0d3f003f348fd4
513: [21:40:33] * sealan quit (Remote host closed the connection)
514: [21:45:02] <helenclarko> NewGuy: so $PricePerNight gives you a currency if you use $PricePerNight.Nice?
515: [21:45:27] <helenclarko> and you are using one-ring template.
516: [21:45:47] <NewGuy> Yes and yes
517: [21:45:53] <helenclarko> just making sure I am looking at the right thing.
518: [21:46:24] <NewGuy> Ofc :-)
519: [21:46:59] <helenclarko> NewGuy: okay, I'll give it a go shortly and check it. then I'll let you know what I find.
520: [21:47:29] <NewGuy> Thanks alot helen! :-)
521: [21:48:02] * sealan has joined #silverstripe
522: [21:49:19] * zippy quit (Quit: Textual IRC Client: www.textualapp.com)
523: [21:55:25] * Colin[pi] has joined #silverstripe
524: [21:56:33] <Colin[pi]> goooooood morning #SS
525: [21:57:19] <antmas> Colin[pi]: harro o/
526: [21:57:36] <NewGuy> Hello :)
527: [21:59:43] <muskie9> o/
528: [22:00:17] <antmas> FRIDAY :D
529: [22:00:57] <NewGuy> Not yet! EST :P
530: [22:01:42] <antmas> :P
531: [22:02:28] <muskie9> CST here, but I have vaca tomorrow, so sudo-fri for me!
532: [22:02:43] * sealan quit (Remote host closed the connection)
533: [22:02:50] <antmas> sudo XD
534: [22:02:59] <NewGuy> :P
535: [22:03:10] * sealan has joined #silverstripe
536: [22:06:15] * helenclarko quit (Read error: Connection reset by peer)
537: [22:06:32] * helenclarko has joined #silverstripe
538: [22:17:41] * hailwood has joined #silverstripe
539: [22:19:06] <DanaeNZ> I'm wondering how one would go about expiring a member from a group after a year
540: [22:19:17] <DanaeNZ> or even just deactivating them
541: [22:19:23] <DanaeNZ> there's gotta be a module for that
542: [22:19:45] * spekulatius quit (Ping timeout: 246 seconds)
543: [22:22:10] <muskie9> DanaeNZ sounds like a cron that checks the date the member was created... if it's past a year, remove from group... or something like that
544: [22:22:15] <hailwood> Hey Folks, does SS 3.2 have anything in place for multiple has_many relations to the same dataobject, where the dataobject doesn't know how many relations it may belong to?
545: [22:22:16] * spekulatius has joined #silverstripe
546: [22:22:38] <DanaeNZ> muskie9: yeah that's kinda what i was thinking. Maybe with some custom fields so the admins can set expiration
547: [22:22:56] <muskie9> exactly
548: [22:23:27] <muskie9> hailwood I'm not sure that's possible as the has_many relation is actually recorded on the reciprocating has_one of the related object
549: [22:23:41] <muskie9> so you have to spec the has_one
550: [22:24:03] <helenclarko> NewGuy: Sorted it!
551: [22:24:09] <NewGuy> !
552: [22:24:10] <muskie9> but you should be able to have multiple has_many relations to the same object
553: [22:24:24] <NewGuy> Spill the good Helen! :D
554: [22:25:15] <helenclarko> NewGuy: The linking is all off. hold on, I'll paste the fix.
555: [22:25:54] <hailwood> muskie9, I was thinking of doing it as one relation, but then setup n getters on the owner along the lines of return function TableOneRows(){ return $this->TableRows()->filter('table', 1); }
556: [22:26:05] <helenclarko> http://pastebin.com/srdBWu3q
557: [22:26:13] <helenclarko> NewGuy: http://pastebin.com/srdBWu3q
558: [22:26:20] <helenclarko> That should be it.
559: [22:26:35] <hailwood> muskie9, which should work, but I'm not sure how I would get the gridfield to automatically set the correct value for table?
560: [22:26:37] <muskie9> helenclarko that ->owner
561: [22:26:43] <NewGuy> omg
562: [22:27:24] <NewGuy> owner lol
563: [22:27:26] <muskie9> hailwood that's an interesting way to do it, not 100% sure how you'd set the values then
564: [22:27:34] <helenclarko> Yup, thats how you need to link on dataextension.
565: [22:27:56] <helenclarko> muskie9: Felt so stupid when it all clicked lol
566: [22:28:16] <muskie9> that's why this is my prof pic for everything: http://puu.sh/laMuZ/93fb19b363.png
567: [22:28:25] <muskie9> ^ not chickbutt
568: [22:28:51] <helenclarko> oh god I feel like that.
569: [22:29:06] <NewGuy> Helen. I'm still getting an error though.
570: [22:29:16] <muskie9> NewGuy dev/build and flush
571: [22:29:22] <NewGuy> Did
572: [22:29:25] <NewGuy> New error
573: [22:29:44] <NewGuy> Line 4. [NOTICE] A NON WELL FORMED NUMERIC VALUE ENCOUNTERED
574: [22:30:36] <hailwood> So my new question to anyone: How can I get a gridfield to set a specific value on all dataobjects created through it's GridFieldAddNewButton()?
575: [22:31:22] <muskie9> hailwood $default_values or onBeforeWrite on the dataobject?
576: [22:31:30] <helenclarko> NewGuy: but... we have just moved code. Its not like we have cut anything up. WTF
577: [22:31:57] <hailwood> muskie9, issue being the dataobject itself doesn't know what that value should be
578: [22:32:03] <muskie9> NewGuy helenclarko would it be number_format(abs($this->owner->value), 2) .$this->owner->config()->currency_symbol; ?
579: [22:32:04] <NewGuy> helenclarko i assume its a php error, saying that number_format doesn't accept the symbol
580: [22:32:36] <muskie9> I might be missing a ) in that
581: [22:33:13] <helenclarko> hmmm, guess I didnt think of that.
582: [22:33:23] * glenn-bautista quit (Quit: Leaving.)
583: [22:34:26] <helenclarko> ah, yea. thats probably it.
584: [22:34:31] <muskie9> hailwood could you hook into http://api.silverstripe.org/3.2/source-class-DataObject.html#1133-1171 with a DataExtension to set the value dynamically?
585: [22:35:55] <NewGuy> It was it
586: [22:36:08] <muskie9> nice NewGuy
587: [22:36:13] <NewGuy> changed line4 to be this now: $val = number_format(abs($this->owner->value), 2). $this->owner->config()->currency_symbol;
588: [22:36:27] <NewGuy> So concat the symbol outsite the number_format
589: [22:36:37] * Azure quit (Quit: Oops.)
590: [22:36:39] <helenclarko> Awesome! thanks muskie9, feel pretty stupid now.
591: [22:37:14] <muskie9> I've never used that number_format()... checked the php manual, so not like I really knew exactly what it was
592: [22:38:02] <NewGuy> Hey you guys. Thanks alot for the help :-) Gotta say, SS community is pretty awesome. I'm switching all my future websites to be using SS. :-)
593: [22:38:15] <antmas> ohhh a new minion :D
594: [22:38:20] <NewGuy> :D
595: [22:38:37] <helenclarko> BANANA!
596: [22:38:44] <muskie9> cheers NewGuy
597: [22:38:58] <NewGuy> Hey thx alot helen, you spent alot of time on this :-)
598: [22:39:23] <helenclarko> NewGuy: Any time. No probs.
599: [22:39:30] <hailwood> I note that when I am adding a new item I am on http://.../admin/pages/edit/EditForm/field/TableOneGridField/item/new - Am I able to get a hold of the TableOneGridField somehow?
600: [22:39:41] <antmas> old aunty helen eh?
601: [22:40:06] <helenclarko> antmas: For the greater good!
602: [22:40:09] <NewGuy> Anyway I'm off. Ill probably see you all later :)! ITs near midnight here, work tomorrow
603: [22:40:18] <antmas> NewGuy: later dude
604: [22:40:24] <NewGuy> Later!
605: [22:40:26] <helenclarko> NewGuy: o/
606: [22:40:28] * NewGuy quit (Quit: Page closed)
607: [22:40:45] <muskie9> hailwood there's gotta be a way, not sure how though unfortunately
608: [22:42:15] * Colin[pi] quit (Ping timeout: 255 seconds)
609: [22:44:01] <hailwood> If I could work out how the new dataobject knows what page it is being related to I could hook into that, but I just cannot work it out
610: [22:44:13] * Colin[pi] has joined #silverstripe
611: [22:44:27] <Colin[pi]> internet 😠
612: [22:44:39] <helenclarko> muskie9: Well, what we just did with NewGuy has fixed hardcoded core code I had in place. Was feeling pretty guilty that I had modified core code, but didnt have the time to fix it. 2 birds 1 stone on a Friday!
613: [22:45:05] <muskie9> not bad!
614: [22:45:32] <helenclarko> muskie9: No it was terribad, not so much now though.
615: [22:47:11] <muskie9> hailwood I've used Session::get('CMSMain.currentPage') to get the current page ID in the past
616: [22:47:47] <muskie9> then you could query SiteTree::get()->byID($pageID)
617: [22:47:51] <hailwood> muskie9, Yeah I just found I can use Controller::curr()->currentPage() to get the page, so now I should be able to get the relation from that..
618: [22:48:04] <muskie9> that works too
619: [22:50:31] * glenn-bautista has joined #silverstripe
620: [22:52:43] <ss-helper> Re: [silverstripe-dev] Re: Module scaffolding - https://groups.google.com/d/msg/silverstripe-dev/ZCKj-mBWv9Q/VzGTvHsMAwAJ
621: [22:53:14] <antmas> I have a floaty under my contact lense :|
622: [22:53:33] <hailwood> muskie9, This works, but feels so dirty.. public function populateDefaults() {
623: [22:53:33] <hailwood> $controller = Controller::curr();
624: [22:53:33] <hailwood> $this->Table = $controller->config()->get('tables')[$controller->getURLParams()['OtherID']];
625: [22:53:33] <hailwood> }
626: [22:53:35] <hailwood> crap
627: [22:53:40] <hailwood> https://gist.github.com/hailwood/3d17a8f4c77602203210
628: [22:54:04] <hailwood> chrome is failing to copy links from the url bar correctly atm :/
629: [22:54:42] <hailwood> whoops, that should be Controller::curr()->currentPage()
630: [22:58:06] * Azure has joined #silverstripe
631: [22:58:42] * Stomach quit (Quit: zzz)
632: [23:00:28] * Stomach has joined #silverstripe
633: [23:04:57] * micmania1 quit (Quit: micmania1)
634: [23:13:36] * micmania1 has joined #silverstripe
635: [23:16:06] <muskie9> hailwood sorry, was afk, nice you got it working!
636: [23:16:37] <muskie9> well, dinner time
637: [23:16:41] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
638: [23:26:38] * sealan quit (Remote host closed the connection)
639: [23:40:48] * Stomach quit (Quit: zzz)
640: [23:41:00] * EasyCo quit (Ping timeout: 264 seconds)
641: [23:42:25] * EasyCo has joined #silverstripe
642: [23:57:28] * Stomach has joined #silverstripe

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