#silverstripe IRC Log

IRC log for 20 April 2016

All timestamps are in UTC.

1: [00:00:15] * ss-helper has joined #silverstripe
2: [00:01:50] * BrewNaked quit (Remote host closed the connection)
3: [00:10:26] * adrexia quit (Quit: My Mac has gone to sleep. ZZZzzz…)
4: [00:14:10] * muskie9 quit (Remote host closed the connection)
5: [00:14:44] * muskie9 has joined #silverstripe
6: [00:17:40] <muskie9> EasyCo you could probably check the current theme and adjust fields in getCMSFields or only allow page types to be created based on the current theme in a canCreate() method... but I'm not sure how well all that would work in the long run (if the cms user switches between themes often)
7: [00:19:06] * novaweb has joined #silverstripe
8: [00:25:06] <EasyCo> muskie9: Yeah, that's what I was thinking. The second way of doing it will be less messy
9: [00:29:27] <muskie9> for sure
10: [00:37:57] * novaweb quit (Remote host closed the connection)
11: [00:39:21] * adrexia has joined #silverstripe
12: [00:52:52] * micmania1 quit (Quit: micmania1)
13: [00:59:05] * muskie9 quit (Quit: My Mac has gone to sleep. ZZZzzz…)
14: [01:02:39] * micmania1 has joined #silverstripe
15: [01:02:58] * robbiea quit (Remote host closed the connection)
16: [01:13:00] * muskie9 has joined #silverstripe
17: [01:17:06] * robbiea has joined #silverstripe
18: [01:20:04] * Tanger has joined #silverstripe
19: [01:21:18] * mahfuz quit (Ping timeout: 250 seconds)
20: [01:27:58] * micmania1 quit (Quit: micmania1)
21: [01:39:44] * micmania1 has joined #silverstripe
22: [01:41:25] * robbiea quit (Remote host closed the connection)
23: [01:46:43] * jules0x has joined #silverstripe
24: [01:50:41] * BrewNaked has joined #silverstripe
25: [01:55:15] * BrewNaked quit (Ping timeout: 250 seconds)
26: [02:04:07] * robbiea has joined #silverstripe
27: [02:07:11] <robbiea> can I set a default "limit" for the restfulserver addon?
28: [02:25:37] <jules0x> Github doesnt allow folders right? I mean, repo's will all end up at the root of your account...
29: [02:26:12] <jules0x> if I have 10 related repo's and the rest are misc, is there a way to group these other than by name?
30: [02:27:08] <robbiea> nope, not at this point
31: [02:30:41] * slievr__ has joined #silverstripe
32: [02:30:47] * slievr__ quit (Read error: Connection reset by peer)
33: [02:32:02] <jules0x> ok good
34: [03:02:50] * micmania1 quit (Quit: micmania1)
35: [03:09:05] * Stomach_ quit (Quit: zzz)
36: [03:15:59] * micmania1 has joined #silverstripe
37: [03:20:00] * Stomach has joined #silverstripe
38: [03:22:53] * Stomach quit (Client Quit)
39: [03:28:16] <xyphoid_> anyone using the root domain cname feature SS note here:
40: [03:28:22] <xyphoid_> http://docs.platform.silverstripe.com/migration/domains/
41: [03:28:27] <xyphoid_> is it cname flattening?
42: [03:39:31] * BrewNaked has joined #silverstripe
43: [03:44:35] * BrewNaked quit (Ping timeout: 276 seconds)
44: [03:54:08] * Stomach has joined #silverstripe
45: [04:00:07] <ss-helper> Re: [silverstripe-dev] Looking for a replacement FIG rep - https://groups.google.com/d/msg/silverstripe-dev/mj5GlYJ2Pco/34BpbSIBAQAJ
46: [04:02:15] * ^pH has joined #silverstripe
47: [04:03:42] * robbiea quit (Remote host closed the connection)
48: [04:06:12] * robbiea has joined #silverstripe
49: [04:08:33] * DimiStripe quit (Read error: Connection reset by peer)
50: [04:08:46] * DimiStripe has joined #silverstripe
51: [04:13:32] * Stomach quit (Quit: zzz)
52: [04:15:07] <ss-helper> Re: [silverstripe-dev] Looking for a replacement FIG rep - https://groups.google.com/d/msg/silverstripe-dev/mj5GlYJ2Pco/IoRF_o0BAQAJ
53: [04:15:08] <ss-helper> Re: [silverstripe-dev] Looking for a replacement FIG rep - https://groups.google.com/d/msg/silverstripe-dev/mj5GlYJ2Pco/XwG6WD0BAQAJ
54: [04:18:37] * novaweb has joined #silverstripe
55: [04:20:00] * novaweb_ has joined #silverstripe
56: [04:20:12] <jules0x> its aliive
57: [04:20:42] * novaweb quit (Read error: Connection reset by peer)
58: [04:21:10] * jules0x quit (Quit: Leaving)
59: [04:22:45] * Stomach has joined #silverstripe
60: [04:28:22] * Admonish has joined #silverstripe
61: [04:30:08] <ss-helper> Re: [silverstripe-dev] Looking for a replacement FIG rep - https://groups.google.com/d/msg/silverstripe-dev/mj5GlYJ2Pco/Qu6gysMCAQAJ
62: [04:44:21] <Admonish> I know I have asked this before lol but does anyone know "How you add new tabs to modelAdmin without using the managed models array?"
63: [04:45:53] <Admonish> I have tried to used insertBefore() to insert an instance of Tab into the modelAdmin. The problem is, the name of the tabs don't seem to align with that of the models so I have no idea what the tabs are named (and therefor cannot insert another tab brofre one of them)
64: [04:46:52] <Admonish> So I either a) need someone to to tell my how the tab field names are made or b) need a new solution
65: [04:50:35] <Admonish> But alas, who knows the hidden things of silverstripe
66: [05:06:17] <Admonish> So I found this in a modelAdmin code comment
67: [05:06:26] <Admonish> !paste
68: [05:06:27] <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.
69: [05:06:29] <Admonish> 1257 // if($form->Fields()->hasTabset()) {
70: [05:06:32] <Admonish> 1258 // $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet');
71: [05:06:34] <Admonish> 1259 // }
72: [05:06:39] <Admonish> 1257 // if($form->Fields()->hasTabset()) {
73: [05:06:42] <Admonish> 1258 // $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet');
74: [05:06:44] <Admonish> 1259 // }
75: [05:07:42] <Admonish> The description was : "Set this if you want to split up tabs into a separate header row"
76: [05:07:52] * robbiea quit (Ping timeout: 252 seconds)
77: [05:08:39] <Admonish> When I used this code directly in my modelAdmin I didn't get any errors but nothing changed
78: [05:09:53] <Admonish> So I tried using the above code plus a addFieldsToTab('Root',array(...)); but this also had seemingly no effect
79: [05:13:45] * novaweb_ quit (Remote host closed the connection)
80: [05:15:06] <Admonish> Is there a way to get all esisting tabs in a tabset?
81: [05:16:35] <Admonish> existing*
82: [05:20:34] <Admonish> Either everyone is stumped, no one is reading the IRC chat, or everyone is AFK XD
83: [05:24:08] * muskie9 quit (Quit: My Mac has gone to sleep. ZZZzzz…)
84: [05:28:25] * BrewNaked has joined #silverstripe
85: [05:33:07] * BrewNaked quit (Ping timeout: 260 seconds)
86: [05:36:42] <Admonish> Is it possible to create a DataObject with no $db array deffined?
87: [05:37:38] <Admonish> That way I could technically user managed_models to add my extra tabs
88: [05:37:46] <Admonish> Its ugly though
89: [05:41:36] * ^pH quit (Ping timeout: 240 seconds)
90: [05:44:00] * Stomach quit (Ping timeout: 276 seconds)
91: [05:48:53] * Sh4d03 has joined #silverstripe
92: [05:48:53] <ss-helper> Sh4d03: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
93: [05:50:56] <Sh4d03> Hi guys, wondering if I can get some help. I've inherited a SilverStripe site (never used SS before). Apparently this site has had some history. A previous host became difficult and the site was moved to another host. Errors occurred on the transfer but the website functioned so everybody moved on. Switch to now, the site owner has tried to hit "create new post" in the CMS for the first time and it just loads a blank wh
94: [05:50:56] <Sh4d03> ite page.
95: [05:51:22] <Sh4d03> The version files are all blank, so I don't even know what version I'm using.
96: [05:53:34] <Sh4d03> By trying to load the new post page in the cms backend with isDev=1 I found an error pertaining to is_readable and open_basedir. I commented out suggested lines in Loader.php. As per this page (http://www.silverstripe.org/community/forums/installing-silverstripe/show/20224)
97: [05:54:09] <Sh4d03> That seemed to fix the relevant error, but I now get...
98: [05:54:15] <Sh4d03> [User Error] Uncaught LogicException: filter can't be called on an UnsavedRelationList.
99: [05:54:18] <Sh4d03> GET /admin/blog/BlogArticle/EditForm/field/BlogArticle/item/new?flush=1&flushtoken=541f31ab76b1f8e246b391d5b9b3bee3
100: [05:54:31] * willr quit (Quit: willr)
101: [05:55:18] <Sh4d03> So I'm trying to determine the best way forward. I hear of people starting with a fresh install, but I don't know where to start. I have a *nix / hosting background (hence being called in to help) but zero knowledge of SS
102: [06:02:49] * micmania1 quit (Quit: micmania1)
103: [06:03:18] * adrexia quit (Quit: My Mac has gone to sleep. ZZZzzz…)
104: [06:07:05] <Admonish> Hey there Sh4d03 welcome to the IRC. Unfortunitly at this time most of the members listed in the chat room seem to be unresponsive or AFK.
105: [06:07:34] <Sh4d03> That's ok. I'm going to be stepping AFK soon as well. I'll just stay logged in and see what people can share.
106: [06:07:55] <Admonish> np, I hope you get an answer :D
107: [06:31:33] * marvanni has joined #silverstripe
108: [06:37:32] * wmk has joined #silverstripe
109: [06:37:38] <Admonish> marvanni I have been battling with that adding tabws to modelAdmins issue and I was wondering if its possible to create a dataobject with no $db array. this way I could technically use the managed_models array to add in my extra tabs
110: [06:38:37] <Tanger> Admonish: Hey man, have you tried $this->getManagedModelTabs() in modeladmin>
111: [06:38:46] <marvanni> you could try to extend ViewableData
112: [06:38:50] <marvanni> ^ or that
113: [06:39:10] <marvanni> I guess Tangers idea should work
114: [06:39:31] <Admonish> Tanger yes I have. The weird thing is, the tab classes show up as the model names even though the gridfields are already named that
115: [06:39:35] <Tanger> Only if the array is passed by reference
116: [06:39:44] <Admonish> Is it possible to have to fields named the same thing?
117: [06:39:56] <Admonish> two*
118: [06:40:16] <Admonish> or perhaps tabs are not considered form fields?
119: [06:43:09] <Tanger> Problem is getManagedModels doesn’t pass that SS_List in by reference
120: [06:43:13] <Tanger> So there’s no way to set it
121: [06:43:25] <Tanger> You could possibly overwrite the method on your class
122: [06:43:41] <Tanger> But I’m not sure if that’d work
123: [06:45:48] <Tanger> Admonish: The gridfields are the forms, but the tabset that handles the tabs is separate. In the ModelAdmin, it looks like they work in conjunction, but separate
124: [06:46:20] <Tanger> So yeah, you could have two because they’re not in the same list and fieldByName would only look up either the forms
125: [06:46:35] * spronk quit (Quit: I may need a longer sleep timer...)
126: [06:47:46] <Tanger> Actually Admonish, pretty sure you can override it with protected function getManagedModelTabs( ) { }
127: [06:48:17] <Admonish> Would i have to do that in an extension?
128: [06:48:32] <Tanger> Nah, I just used it on my subclass
129: [06:49:02] <Tanger> I’d probably then use that and override getList() to populate the list with stuff, and getEditForm to give it a GridField
130: [06:55:38] * arnhoe has joined #silverstripe
131: [07:12:26] <Admonish> Tanger
132: [07:12:34] <Tanger> Sup
133: [07:13:00] <marvanni> This is the minimal I had to do to make it work
134: [07:13:00] <marvanni> http://sspaste.com/paste/show/57172bea05b38
135: [07:13:50] <Admonish> Tanger lol sorry I hit enter instead of tab. Any way, would I still be able to use the managed_models array with the getManagerModelsTabs? Or is it a one or the other thing
136: [07:14:37] <Tanger> As soon as you’re in the getManagedModelsTabs function, call $tabs = parent::getManagedModelsTabs()
137: [07:14:47] <Tanger> That should start you off with the default tabs for your managed models
138: [07:15:02] <marvanni> A little bit hacky, and you might want to return return $inst->renderWith('SomeTemplate'); to customize the data in MyViewableData
139: [07:17:17] * BrewNaked has joined #silverstripe
140: [07:18:08] <Admonish> marvanni it looks like someone did something similar to your approach here: http://www.silverstripe.org/community/forums/customising-the-cms/show/43073
141: [07:18:30] <marvanni> A little improvement : http://sspaste.com/paste/show/57172d320d62b
142: [07:19:08] <marvanni> yes
143: [07:19:15] <Admonish> Thank you both for your help
144: [07:19:32] <marvanni> I would prefer to extend ViewableData since it gived you more power with templates
145: [07:19:36] * spronk has joined #silverstripe
146: [07:19:43] <marvanni> and DataObject extends ViewableData
147: [07:19:51] <Admonish> Right
148: [07:20:05] <marvanni> This is just a quick example, there might be better ways.
149: [07:20:50] <Admonish> marvanni now in light of what Tanger said about the getManagerModelsTabs would you still suggest I extend the ViewableData
150: [07:21:01] <marvanni> yes
151: [07:21:20] <marvanni> Yo do want to display something on that tab right?
152: [07:21:33] * BrewNaked quit (Ping timeout: 250 seconds)
153: [07:21:34] <marvanni> a Chart or Iframe or whatever
154: [07:21:38] <Admonish> marvanni Yes I want to display a grid on that tab
155: [07:21:42] <Admonish> yes
156: [07:21:44] <marvanni> grifield?
157: [07:22:12] <marvanni> GridField requires a DataObject as wel
158: [07:22:41] <Admonish> marvanni yes.Basically I am going to be having two tabs that create gridfields with data from one model. But the data will be filtered in two different ways
159: [07:22:58] <marvanni> hm
160: [07:23:02] <Admonish> not sure if im making sense :(
161: [07:23:22] * jbrungar quit (Ping timeout: 260 seconds)
162: [07:23:29] <marvanni> hm
163: [07:23:51] * robbiea has joined #silverstripe
164: [07:24:29] <marvanni> ahy not add a MyCustomGridFieldButton that filters the data
165: [07:25:05] <Admonish> Well basically the two grids will not only be filtered differently but also will have different features
166: [07:25:23] * jbrungar has joined #silverstripe
167: [07:25:29] <marvanni> then you have 1 tab for one dataobject and SwitchDataObjectSelectionButton extends GridFieldButton
168: [07:25:40] <marvanni> hm, then my apporach is not gonna work
169: [07:26:10] <marvanni> unless you add the getEditForm so it gets a custom set of your DataObject List
170: [07:26:47] <marvanni> This is a very old approach of using GridField with external data
171: [07:26:48] <marvanni> https://github.com/axyr/silverstripe-externaldata
172: [07:27:55] <Admonish> marvanni The whole idea is to have two groups with permissions to the modelAdmin. Depending on what group the user is in, tabs will display different data. So my questions thus far have been about the new tabs
173: [07:28:27] <marvanni> why not create 2 model admins, 1 for each group
174: [07:28:43] <marvanni> wich both will extend your BaseAdmin
175: [07:28:48] <Admonish> I suppose I could do that
176: [07:29:06] <Admonish> It would be allot easier wouldnt it
177: [07:30:04] * robbiea quit (Remote host closed the connection)
178: [07:30:33] <Admonish> Could they share the same url? That way I could send a user to a url and depending on what group that user is in, it would display the modelAdmin for that group
179: [07:31:00] <Admonish> marvanni if that makes any sense
180: [07:33:25] * marvanni quit (Ping timeout: 268 seconds)
181: [07:33:59] * marvanni has joined #silverstripe
182: [07:34:53] <marvanni> sometimes you better keep it simple untill you know more about the inner workings of gridfield and modeladmin
183: [07:35:24] <marvanni> modeladmin is pretty straight forward, but gridfield is a little bit harder to customize
184: [07:36:44] <Admonish> Was that answer in regards to this question? 'Could they share the same url? That way I could send a user to a url and depending on what group that user is in, it would display the modelAdmin for that group'
185: [07:37:10] <Admonish> Lol its 1:36am here. A bit tired
186: [07:41:09] <Admonish> marvanni Well im going to go to bed now. I will try to sort all this out tommorow. But I want to thank you so much for your amazing help
187: [07:41:21] <Admonish> Tanger Thank you as well for all your help
188: [07:41:44] <Tanger> Admonish: No worries mate, glad you could make some progress :D
189: [07:42:07] <Admonish> Night everyone or I guess good morning (-_-)
190: [07:42:27] * Admonish quit (Quit: Has left the building)
191: [07:44:04] * Admonish has joined #silverstripe
192: [07:44:27] <Admonish> Tanger Oh, and one more thing. Where can I find information on getManagerModelsTabs?
193: [07:45:12] <Tanger> Admonish: http://api.silverstripe.org/3.3/class-ModelAdmin.html and http://api.silverstripe.org/3.3/source-class-ModelAdmin.html#226-246
194: [07:45:14] <Tanger> All I got :P
195: [07:45:42] <Admonish> Tanger Thank you :D. Night
196: [07:45:55] * Admonish quit (Client Quit)
197: [07:51:44] * Stomach has joined #silverstripe
198: [07:54:07] <wmk> hey Stomach
199: [08:02:33] * swaiba has joined #silverstripe
200: [08:09:04] * robbiea has joined #silverstripe
201: [08:11:59] * Agilix_ has joined #silverstripe
202: [08:18:55] * willr has joined #silverstripe
203: [08:19:51] <Agilix_> Morning all o/
204: [08:20:20] <Agilix_> quick question: If I have a has_one on a model. How do I define the value to show in the dropdown?
205: [08:22:35] <wmk> Agilix_, did you look at the DropdownField API docs? there is an example for that
206: [08:22:59] <wmk> http://api.silverstripe.org/3.3/class-DropdownField.html
207: [08:23:29] <Agilix_> Ah I just found the same, thx :)
208: [08:23:39] <wmk> ;)
209: [08:32:33] * spronk quit (Quit: I may need a longer sleep timer...)
210: [08:35:34] * robbiea quit (Remote host closed the connection)
211: [08:37:09] * willr quit (Quit: willr)
212: [08:40:34] * Stomach quit (Quit: zzz)
213: [08:42:57] * robbiea has joined #silverstripe
214: [08:43:45] <Tanger> This sure is frustrating. If I output a variable in my template, it outputs a solid 1 for true. However, it won’t work with an <% if %> statement...
215: [08:46:21] * agent44 has joined #silverstripe
216: [08:50:20] * robbiea quit (Remote host closed the connection)
217: [08:51:33] <wmk> Tanger, ?
218: [08:51:43] <wmk> variable Boolean from DB?
219: [08:52:22] <wmk> Tanger, http://api.silverstripe.org/3.3/class-Boolean.html#_Nice might help
220: [08:52:35] <Tanger> <% if $GridRender %>Something<% end_if %><% if $GridRender %>Something Else<% end_if %>
221: [08:52:39] <Tanger> That’s my code
222: [08:52:43] <Tanger> The first one renders
223: [08:52:47] <Tanger> The second one does not
224: [08:53:02] <Tanger> It’s not being cast as a Boolean, but it is returning as a true
225: [08:53:03] <wmk> does $GridRender change in between?
226: [08:53:06] <Tanger> I’ll look into that
227: [08:53:12] <Tanger> Nah, they’re on the same template next to each other
228: [08:53:15] <wmk> !debug Tanger
229: [08:53:15] <ss-helper> Tanger: Maybe it's time to start xdebug and see whats going on... check out http://docs.silverstripe.org/en/developer_guides/debugging/ and http://xdebug.org/docs/
230: [08:53:16] * Stomach has joined #silverstripe
231: [08:54:49] <wmk> Tanger, maybe flushing helps... or double check the template for typos
232: [08:55:05] * kinglozzer has joined #silverstripe
233: [08:55:53] <Tanger> wmk: yeah, it was a nested if that was “<% if $PrevLink $>”… I need sleep lol
234: [08:55:55] <Tanger> Thanks wmk
235: [08:57:03] * wmk hands a cup of hot cappuccino to Tanger
236: [08:59:10] <Agilix_> Anyone see why my Flow filter will not filter :p It displays but does nothing when changed: https://gist.github.com/Agilix/ffb401b02fea8a71789a21ae34dd3687
237: [09:01:29] <wmk> Agilix_, and Flow has_many MagnewsAction ?
238: [09:02:30] <wmk> can you also paste the Flow class?
239: [09:03:03] * Stomach quit (Quit: zzz)
240: [09:04:16] <Agilix_> wmk: yes, updated the gist: https://gist.github.com/Agilix/ffb401b02fea8a71789a21ae34dd3687
241: [09:05:18] <wmk> Agilix_, i'd make a Title() method on Flow that returns the value you want to show, then filter on the ID.. the Dropdown should be automatically generated with ID and Title
242: [09:05:33] <wmk> Title() or getTitle() ...
243: [09:06:03] <Agilix_> k, I'll try that. Should I then remove the scaffold overwrite?
244: [09:06:08] * BrewNaked has joined #silverstripe
245: [09:10:51] * BrewNaked quit (Ping timeout: 268 seconds)
246: [09:13:49] * Tanger quit (Quit: Tanger)
247: [09:18:06] * jcwacky_ has joined #silverstripe
248: [09:18:13] * jcwacky_ has left #silverstripe
249: [09:36:58] * jcwacky has joined #silverstripe
250: [09:37:01] * jcwacky has left #silverstripe
251: [09:57:22] * robbiea has joined #silverstripe
252: [10:01:25] * robbiea quit (Remote host closed the connection)
253: [10:13:01] <Agilix_> K, I need some feedback on how to handle the situation. I have 2 calls that I need to make to a rest service. So atm I have 2 functions, each for a specific call. Now the info in the call can vary based on the flow we're in.
254: [10:13:48] <Agilix_> Now it doesn't feel write to write a long list of params in the function and constantly do if check to see wether they're set to add to the request body.
255: [10:13:51] <Agilix_> Any ideas?
256: [10:14:05] * agent44 quit (Ping timeout: 250 seconds)
257: [10:16:19] * robbiea has joined #silverstripe
258: [10:20:38] * qlex has joined #silverstripe
259: [10:20:47] * qlex says hi
260: [10:21:13] <qlex> i'm desperatly chasing DesignerX - i know that he didn't show up here, but does anyone have any contact with him ?
261: [10:21:20] <qlex> sent him an email - no response
262: [10:33:49] * agent44 has joined #silverstripe
263: [10:47:28] * robbiea quit (Remote host closed the connection)
264: [10:51:24] * robbiea has joined #silverstripe
265: [10:52:52] * robbiea quit (Remote host closed the connection)
266: [10:55:05] * BrewNaked has joined #silverstripe
267: [10:56:24] <marvanni> any sake bash experience online?
268: [10:59:33] * BrewNaked quit (Ping timeout: 240 seconds)
269: [11:15:11] * r3v3rb has joined #silverstripe
270: [11:15:16] <ss-helper> Re: Security and Login functionality for SS4 - https://groups.google.com/d/msg/silverstripe-dev/308k1-RP-4M/LH2GSV8YAQAJ
271: [11:15:16] <ss-helper> Re: [silverstripe-dev] Looking for a replacement FIG rep - https://groups.google.com/d/msg/silverstripe-dev/mj5GlYJ2Pco/Z-DUBS4YAQAJ
272: [11:15:18] <r3v3rb> purrrrrpppp
273: [11:22:41] <r3v3rb> why does my class pdt extends page_controller not ‘see’ any of the session:: variables or $this->requestParams etc etc
274: [11:23:44] <marvanni> code?
275: [11:27:23] <r3v3rb> marvanni: theres nothing to show! its the same as every other class in the system that works?!?!
276: [11:27:25] <r3v3rb> hahah
277: [11:27:56] <marvanni> you get the session and request vars in your other controllers?
278: [11:30:17] <ss-helper> Re: PHP/Silverstripe IDE Survey : What IDE do you use for SS work ? - https://groups.google.com/d/msg/silverstripe-dev/bozY5hh9g4c/YXKdTOcYAQAJ
279: [11:31:48] <r3v3rb> marvanni: yes, even in this one just not one particular session variable even though I can ‘see’ that its set in xdebug
280: [11:49:03] <r3v3rb> arghh: the method 'requestparams' does not exist on 'pdt' class pdt extends controller <<< WTF $this->requestParams() falling over
281: [11:50:17] <r3v3rb> $this->request() <<< ‘request’ does not exist too
282: [11:58:47] * Eliseth has joined #silverstripe
283: [12:05:37] <swaiba> r3v3rb even if you are sure, maybe paste it...
284: [12:08:40] <Eliseth> Hiya \o/
285: [12:09:54] <Eliseth> I have a a DB field MyDecimal => 'Decimal(19,8)'
286: [12:11:51] <Eliseth> But when I put in 5.50 in admin it says it's not a number
287: [12:12:04] <Eliseth> It will only accept integers in the field it seems
288: [12:13:59] <r3v3rb> swaiba: will do
289: [12:15:18] <ss-helper> Re: Security and Login functionality for SS4 - https://groups.google.com/d/msg/silverstripe-dev/308k1-RP-4M/QlLqDwYcAQAJ
290: [12:16:29] <r3v3rb> sspaste.com/paste/show/5717730225626 swaiba
291: [12:17:18] <r3v3rb> i just added the url_handlers the site works without them when calling /pdt normally
292: [12:18:31] <swaiba> yeah ok, I don't see any problem there...
293: [12:18:41] <r3v3rb> its bizarre
294: [12:19:48] * UndefinedOffset has joined #silverstripe
295: [12:21:27] <r3v3rb> doh! $this->request-> not $this->request() - lmao
296: [12:21:45] <r3v3rb> its an object not a methodMr R3v3rb!
297: [12:23:54] <marvanni> yes or $this->getRequest()
298: [12:24:47] <marvanni> you could also do function index(SS_HTTPRequest $request) {$request->param(‘ID’)}
299: [12:24:55] <marvanni> this works for controller actions
300: [12:25:42] <marvanni> form a FormAction you need to set SS_HTTPRequest $request = null, because the same method gets called from templates
301: [12:29:59] <r3v3rb> marvanni: yep. i was having a ‘senior’ moment
302: [12:30:18] <ss-helper> Re: Security and Login functionality for SS4 - https://groups.google.com/d/msg/silverstripe-dev/308k1-RP-4M/hLYZDi4cAQAJ
303: [12:32:04] <Eliseth> When I put 5.50 it says it's invalid, because not a number. When I put 5,50 it accepts the value, but DB will write as 0 (because: comma)
304: [12:36:01] <marvanni> Eliseth, yes. and you are right, its stupid. On top of my head it has to do Zend Locale formatting
305: [12:36:14] <Eliseth> Ugh... Zend again....
306: [12:36:19] <marvanni> yup
307: [12:37:16] <r3v3rb> has anyone tried adding jquery for custom functionality to the modeladmin?
308: [12:37:56] <Eliseth> So, using the (default) NumericField isn't a good idea then...
309: [12:38:24] <Agilix_> Eliseth: There is a thread about it here: https://github.com/silverstripe/silverstripe-framework/issues/2161 Maybe the solution is in there? :)
310: [12:39:24] <Eliseth> Thanks Agilix_ I couldn't find that myself, weird, I'll check it out!
311: [12:39:35] <r3v3rb> :D Hooray! Just finished the final stage of a payment gateway for multiple product types for a charity
312: [12:39:47] <marvanni> or change the set_locale(LC_NUMERIC, ‘somelocale’) that accepts dots for decimals
313: [12:40:33] <Eliseth> I wouldn't mind doing that, as long as it's for the admin only
314: [12:43:56] * BrewNaked has joined #silverstripe
315: [12:48:13] * BrewNaked quit (Ping timeout: 252 seconds)
316: [12:54:49] <swaiba> r3v3rb nice one
317: [12:55:05] <r3v3rb> swaiba: it was interesting
318: [12:55:14] <r3v3rb> never sold trees before!
319: [12:55:16] <swaiba> which gateway?
320: [13:07:40] * qlex1 has joined #silverstripe
321: [13:09:05] * qlex quit (Ping timeout: 250 seconds)
322: [13:10:29] <Eliseth> Is there an easy way to set_locale for admin only?
323: [13:27:13] <swaiba> Eliseth probably in a decorator test for the user group of the member and then use the setlocale function
324: [13:30:42] * ^pH has joined #silverstripe
325: [13:35:22] * g4b01 has joined #silverstripe
326: [13:35:26] <g4b01> hi all
327: [13:36:29] <Eliseth> hey g4b01
328: [13:37:49] <g4b01> which function should I override in order to process data coming from getCMSFields before they's saved?
329: [13:38:15] <swaiba> g4b01 onBeforeWrite
330: [13:39:02] <g4b01> swaiba: nope, I've to process some custom field I've added in getCMSField
331: [13:39:32] <g4b01> that are not part of the DataObject
332: [13:39:33] <swaiba> yeah, unless you have something else to clarify
333: [13:39:37] <swaiba> my answer is still g4b01 onBeforeWrite
334: [13:40:19] <g4b01> If I add a field like
335: [13:40:20] <Agilix_> g4b01: those will be available in the onBeforeWrite as well :)
336: [13:41:10] <g4b01> $test = new DropdownField('TestID', 'Test', $somethings_array);
337: [13:41:35] <g4b01> how can I access the TestID value from inside onBeforeWrite?
338: [13:42:02] * qlex1 quit (Quit: Leaving.)
339: [13:42:24] <swaiba> g4b01 $this->TestID
340: [13:42:59] <g4b01> it's accessible also if TestID is not in $db nor in $has_one?
341: [13:43:39] <g4b01> it would be wonderful :)
342: [13:43:40] <swaiba> g4b01 I'm so tempted to say no, based on my sarcastic nature... but for the thrid time YES :)
343: [13:43:41] <marvanni> its in the $_POST[‘TestID’]
344: [13:44:14] <marvanni> is it as a var ? hm
345: [13:47:16] <g4b01> wow swaiba, you're right
346: [13:47:38] <g4b01> :P
347: [13:47:55] <swaiba> g4b01 it happens from time to time
348: [13:48:40] <g4b01> eheh
349: [13:53:06] * qlex has joined #silverstripe
350: [13:54:41] * qlex quit (Client Quit)
351: [13:56:06] * muskie9 has joined #silverstripe
352: [13:58:56] * qlex has joined #silverstripe
353: [13:59:57] <r3v3rb> anyone know how to make a custom summary field searchable in modeladmin - I’m sure I read about it somwhere
354: [14:01:40] <muskie9> r3v3rb the best I can remember is a getMyValue(), MyValue() and $casting for the value... or something like that... otherwise overriding the methods that build the search fields and results in your model admin class
355: [14:02:17] <r3v3rb> ok, muskie9 I’ll do some searching later
356: [14:02:17] <swaiba> r3v3rb don't think casting works for this
357: [14:02:44] <swaiba> I think you'll need to write your custom value to the db fields and write it in onbeforewrite
358: [14:02:53] <swaiba> as the sorting works on db queires
359: [14:03:33] <r3v3rb> no I’m sure it was some highfalutin stuff to do with gridfields and such stuff
360: [14:04:41] <swaiba> r3v3rb if so I'm interested fro a report back - either way it might be my next blog post
361: [14:04:49] <r3v3rb> ;)
362: [14:05:05] <r3v3rb> not sure where mine went - in to the dustbin of strip.es :(
363: [14:06:52] <g4b01> r3v3rb: do you want to search into the gridfield, or through the filter box?
364: [14:07:00] <r3v3rb> either or
365: [14:07:19] * qlex has left #silverstripe
366: [14:07:44] <g4b01> for searching into the filter box you can play with getSearchContext() and getList()
367: [14:08:04] <r3v3rb> g4b01: yep, that’s what I had read about
368: [14:09:03] <marvanni> is there already a clean way for LEFT JOIN ManyMany_Table HAVING COUNT > 0 with the orm?
369: [14:09:13] <g4b01> here you are a raw example from a project of mine:
370: [14:09:14] <g4b01> http://pastebin.com/KXezmC9X
371: [14:09:15] <marvanni> or should i start again with the new SQLQuery
372: [14:09:36] <g4b01> sorry marvanni, it was for r3v3rb
373: [14:09:38] <g4b01> :)
374: [14:10:04] <marvanni> no problem, you can post the example for my question right now ;)
375: [14:10:07] <g4b01> I always fight with JOIN in SilverStripe :P
376: [14:10:20] <r3v3rb> g4b01: it’s all italian to me ;)
377: [14:11:06] <g4b01> ehehe, are you also from Italy?
378: [14:11:18] <marvanni> oef nice one : https://docs.silverstripe.org/en/results/?q=SQLSelect&Versions=3.3&action_results=Search
379: [14:11:58] <g4b01> nice :D
380: [14:13:17] <g4b01> r3v3rb: in getSearchContext you add some new input box - it's important that the names are q[something]
381: [14:13:37] <r3v3rb> okay is that inherent to silverstripe then?
382: [14:13:51] <g4b01> yes
383: [14:14:09] <g4b01> then in getList you override the list of DO displayed into the GridField
384: [14:14:14] <r3v3rb> okay I’ll remember to kep that in mind
385: [14:14:32] <r3v3rb> something to play with later tonight on a personal project
386: [14:14:36] <g4b01> in accordion with the request var
387: [14:14:44] <g4b01> yep
388: [14:14:51] <g4b01> good luck :)
389: [14:19:45] <swaiba> marvanni - AFAIK no there is no having clause implemented in silverstripe, I'd do a straight DB::Query
390: [14:20:08] <marvanni> SQLSelect has addHaving
391: [14:20:19] <swaiba> damn, sorry r3v3rb I thought it was SORTING, not SERACHING!
392: [14:20:25] * muskie9__ has joined #silverstripe
393: [14:20:26] <swaiba> yeah that works without waht I said
394: [14:20:38] <swaiba> marvanni ah cool
395: [14:21:09] * muskie9 quit (Ping timeout: 246 seconds)
396: [14:21:46] <r3v3rb> swaiba: no searching, sorting is trickier!
397: [14:29:32] <marvanni> it sucks to make up queries like this
398: [14:29:33] <marvanni> http://sspaste.com/paste/show/5717923324719
399: [14:32:46] * BrewNaked has joined #silverstripe
400: [14:37:22] * BrewNaked quit (Ping timeout: 260 seconds)
401: [14:37:59] <swaiba> marvanni yeah, as I said I'd use DB::Query as at least the query looks tidy, personal choice tho
402: [14:38:17] <r3v3rb> swaiba: me too
403: [14:54:16] * ^pH quit (Ping timeout: 240 seconds)
404: [14:58:49] * cloph_away is now known as clophh
405: [14:59:14] * clophh is now known as cloph
406: [15:00:00] <wmk> r3v3rb, ☺/
407: [15:00:44] <r3v3rb> hey wmk \O/
408: [15:07:33] * agent44 quit (Ping timeout: 276 seconds)
409: [15:15:12] * agent44 has joined #silverstripe
410: [15:18:05] * arnhoe quit ()
411: [15:28:46] * UndefinedOffset quit (Quit: Leaving.)
412: [15:30:39] * g4b01 quit (Quit: Leaving.)
413: [15:34:43] <r3v3rb> routing question, can I route ‘’ to a 404 page?
414: [15:35:09] <r3v3rb> I suppose I could just create a controller to do it though ;)
415: [15:36:00] <muskie9__> r3v3rb in a controller you can just return $this->httpError(404);
416: [15:36:09] * muskie9__ is now known as muskie9
417: [15:36:56] <r3v3rb> muskie9__: yep, so “ “: “NoWhereController” NoWhereController public function index() { $this->httpError(404); } :D
418: [15:40:34] * Eliseth quit (Ping timeout: 240 seconds)
419: [15:43:21] * BrewNaked has joined #silverstripe
420: [15:51:20] <wmk> why do you have a route with a space...?
421: [16:00:24] <ss-helper> Re: Security and Login functionality for SS4 - https://groups.google.com/d/msg/silverstripe-dev/308k1-RP-4M/q95BKOYnAQAJ
422: [16:01:13] * UndefinedOffset has joined #silverstripe
423: [16:07:03] <vanny> has anyone else having this issue, in Chrome with 3.3 I am spammed with success messages down the right hand side
424: [16:07:48] <wmk> vanny, yes. just with https..?
425: [16:08:08] <vanny> it is https site
426: [16:08:41] <wmk> vanny, https://github.com/silverstripe/silverstripe-framework/issues/5281
427: [16:09:39] <vanny> thanks, I've gotta learn to become a better google searcher, I look for answer and can't find them and you guys just go band there it is
428: [16:09:42] <vanny> bang*
429: [16:15:18] <ss-helper> Update content after selecting date from dropdown using PHP and jQuery - http://stackoverflow.com/questions/36749229/update-content-after-selecting-date-from-dropdown-using-php-and-jquery
430: [16:16:34] * Agilix_ quit (Ping timeout: 250 seconds)
431: [16:18:46] <wmk> vanny, we had it on a project last month and i noticed the issue.
432: [16:19:24] <vanny> I normally use firefox, was just multi browsing and scared the life out of me there was 8 on the screen
433: [16:22:16] * kinglozzer quit ()
434: [16:23:01] <BrewNaked> Happy [Wednes|Thurs]day everyone.
435: [16:23:15] <wmk> well, chrome users may be pampered by success..?
436: [16:23:30] <wmk> omg - half of the week is over!
437: [16:23:59] <BrewNaked> Pessimistic, but accurate assessment.
438: [16:25:28] <BrewNaked> I'd rather consider it "Just three more days until people stop looking at me funny when I start drinking beer at 1pm".
439: [16:30:18] <ss-helper> Silver Stripe dataObject and multipage form - http://stackoverflow.com/questions/36749677/silver-stripe-dataobject-and-multipage-form
440: [16:31:34] <BrewNaked> If I have a DataObject (SearchTerm) that has a $has_one = "ParentSearchTerm" and a $has_many = "ChildrenSearchTerms", what would be the best way to perform a single action at the very end of all add/edit/delete actions from within the CMS?
441: [16:32:36] * vanny quit (Ping timeout: 250 seconds)
442: [16:33:08] <BrewNaked> There's a 3rd-party server that needs to get a reconfiguration request after any of these search terms are added/updated/deleted, but if I have related SearchTerm objects via the has_one and has_many relationships, I don't want to be performing that configuration action for *every* SearchTerm that gets updated.
443: [16:33:18] <r3v3rb> time to go
444: [16:33:21] <r3v3rb> back later
445: [16:33:44] * r3v3rb has left #silverstripe
446: [16:35:04] <BrewNaked> Is there a way, within the DataObject's onAfterWrite and onAfterDelete functions to check whether or not the current instance of the DataObject was the one on which the add/edit/delete action is being performed?
447: [16:35:39] * swaiba quit (Remote host closed the connection)
448: [16:43:19] <wmk> BrewNaked, unless it's a nudist beer at 1pm...
449: [16:44:25] <BrewNaked> Corporate America is just so prude about things like that... shame.
450: [16:45:13] <marvanni> “Is there a way, within the DataObject's onAfterWrite and onAfterDelete functions to check whether or not the current instance of the DataObject was the one on which the add/edit/delete action is being performed?”
451: [16:45:18] <marvanni> aint that always true?
452: [16:47:50] <BrewNaked> As I understand it... if I create SearchTerm "B" and include SearchTerm "A" as its "ParentSearchTerm", then there is an onAfterWrite performed on both SearchTerm "A" (whose has_many "ChildrenSearchTerms" now includes "B") and SearchTerm "B" (who has SearchTerm "A" as its "ParentSearchTerm").
453: [16:48:25] <BrewNaked> But I only want the configuration action to happen within the onAfterWrite on the newly-created SearchTerm "B" object.
454: [16:49:03] <BrewNaked> How do I have the onAfterWrite for the SearchTerm "A" know to *not* fire the configuration action?
455: [16:49:55] <marvanni> you want to check if ($this->ClassName != ‘AOrB’) {//do somethingornot}
456: [16:50:19] <marvanni> as it is a dataobject
457: [16:50:42] <BrewNaked> But they're both the same kind of dataobject, both "SearchTerm".
458: [16:51:32] * DimiStripe quit (Ping timeout: 260 seconds)
459: [16:51:33] <marvanni> ah ok
460: [16:51:55] <marvanni> So only the first write needs to send an update to a search server right?
461: [16:52:24] <BrewNaked> The write needs to be complete so that the configuration is looking at all of the most recent updates.
462: [16:53:08] <BrewNaked> But yes... only the write operation on the first object.
463: [16:53:20] <BrewNaked> After the write, but only the one.
464: [16:53:55] <marvanni> SearchTerm::$staticVarServerIsNotifiedForUpdate = false;
465: [16:54:07] <marvanni> onAfterwrite() {SearchTerm::$staticVarServerIsNotifiedForUpdate = true;}
466: [16:54:34] <marvanni> if(SearchTerm::$staticVarServerIsNotifiedForUpdate !== true) {//notify server}
467: [16:55:27] <marvanni> And you need to use ClassName::static not self::static that wont work
468: [16:56:31] <marvanni> check this where I store already parsed extensions
469: [16:56:32] <marvanni> https://github.com/axyr/silverstripe-ideannotator/blob/1.0.4/code/Extensions/Annotatable.php
470: [16:56:36] <marvanni> same idea
471: [16:57:00] <marvanni> https://github.com/axyr/silverstripe-ideannotator/blob/1.0.4/code/Extensions/Annotatable.php#L91-L94
472: [16:57:37] <BrewNaked> So the static boolean would persist throughout the edit process... ahh... will give that a try. Thanks. Haven't done it that way.
473: [16:58:19] * wmk quit (Ping timeout: 260 seconds)
474: [16:59:34] <marvanni> same like Requirements::javscript(); there is always only 1 instance of Requirements
475: [17:00:08] <marvanni> you not using new Object when calling Object::static_access_method();
476: [17:03:05] * jcwacky_ has joined #silverstripe
477: [17:03:35] * agent44 quit (Quit: zzz)
478: [17:04:40] * x4j5 has joined #silverstripe
479: [17:12:44] <marvanni> Not tested, but I would start with something like this
480: [17:12:45] <marvanni> http://sspaste.com/paste/show/5717b87101c3f
481: [17:13:59] <marvanni> that means it will notify only once during a request
482: [17:19:04] * x4j5 quit (Ping timeout: 240 seconds)
483: [17:27:08] <BrewNaked> marvanni: OK... slight modification to your original concept, but it completely works.
484: [17:27:24] <marvanni> code?
485: [17:28:13] <BrewNaked> As it turns out, since I need it to happen on the very last onAfterWrite, I had to create a static count value that counts up as the onBeforeWrite functions are called and only after it gets back down to 0 from decrementing onAfterWrite calls, does the final update action get sent.
486: [17:31:20] <BrewNaked> http://sspaste.com/paste/show/5717bce178457
487: [17:31:22] <marvanni> hm. wy nod create a cron job that checks for changed data and runs once an hour or somthing
488: [17:32:03] <BrewNaked> That was going to be the backup option.
489: [17:32:12] <marvanni> and i would put that logix in a sperate class. dataobjects tend to get very bloaty
490: [17:32:21] <marvanni> it would be my first option ;)
491: [17:33:52] <BrewNaked> Thanks for pointing me at the Object::static $var option...
492: [17:43:25] * ^pH has joined #silverstripe
493: [18:01:29] * gelignite has joined #silverstripe
494: [18:03:02] * robbiea has joined #silverstripe
495: [18:07:46] * robbiea quit (Ping timeout: 252 seconds)
496: [18:08:31] <marvanni> any one using phpstorm?
497: [18:10:59] * DimiStripe has joined #silverstripe
498: [18:22:39] * willr has joined #silverstripe
499: [18:22:39] * willr quit (Client Quit)
500: [18:22:46] <BrewNaked> marvanni: Yep.
501: [18:32:41] * Stomach has joined #silverstripe
502: [18:35:20] <marvanni> do you if it it possible to run a cli command by keyboard shortcut
503: [18:35:35] <marvanni> like dev/build?flush=all
504: [18:36:05] <marvanni> I get sick of reloading those dev/build tabs while developing
505: [18:39:49] * Stomach quit (Quit: zzz)
506: [18:54:41] * wmk has joined #silverstripe
507: [18:57:45] <BrewNaked> I haven't done it, but seems like it'd be something that could save some time.
508: [18:58:05] <BrewNaked> Maybe this might get you somewhere... then use sake? https://confluence.jetbrains.com/display/PhpStorm/Using+the+PhpStorm+built-in+SSH+terminal+and+remote+SSH+external+tools
509: [18:58:54] * wmk quit (Ping timeout: 244 seconds)
510: [19:12:04] * DimiStripe quit (Quit: DimiStripe)
511: [19:18:06] <marvanni> sake is only dev/build the cli cache not the browser cache
512: [19:18:16] * ^pH quit (Ping timeout: 240 seconds)
513: [19:18:23] <marvanni> probably due to different php versions on osx with mamp
514: [19:30:26] * muskie9 quit (Read error: Connection reset by peer)
515: [19:31:18] * muskie9 has joined #silverstripe
516: [19:35:04] * Stomach has joined #silverstripe
517: [19:51:26] * robbiea has joined #silverstripe
518: [19:56:07] * robbiea quit (Ping timeout: 252 seconds)
519: [19:59:57] * TRB143 has joined #silverstripe
520: [19:59:59] * TRB143 quit (Remote host closed the connection)
521: [20:00:09] * marvanni quit (Quit: marvanni)
522: [20:01:06] * TRB143 has joined #silverstripe
523: [20:29:43] * UndefinedOffset quit (Quit: Leaving.)
524: [20:32:00] * robbiea has joined #silverstripe
525: [20:39:34] * Stomach_ has joined #silverstripe
526: [20:42:29] * Stomach quit (Ping timeout: 276 seconds)
527: [20:47:04] <robbiea> Morning - do the SS unit tests *always* create a database then leave it there when it's finished? Seems very messy, and would be much tidier if it cleaned up afterwards.
528: [20:56:22] * adrexia has joined #silverstripe
529: [20:59:24] * robbiea quit (Remote host closed the connection)
530: [21:05:50] * robbiea has joined #silverstripe
531: [21:23:06] * Stomach_ quit (Quit: zzz)
532: [21:24:01] * Stomach has joined #silverstripe
533: [21:29:08] * micmania1 has joined #silverstripe
534: [21:29:24] * jcwacky_ quit (Read error: Connection reset by peer)
535: [21:31:19] * jcwacky has joined #silverstripe
536: [21:40:45] * robbiea quit (Remote host closed the connection)
537: [21:41:04] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
538: [21:41:28] * Stomach quit (Quit: bye)
539: [21:43:08] * Sh4d03_ has joined #silverstripe
540: [21:43:09] <ss-helper> Sh4d03_: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
541: [21:43:09] * Sh4d03 quit (Read error: Connection reset by peer)
542: [21:55:11] * ^pH has joined #silverstripe
543: [22:04:56] * robbiea has joined #silverstripe
544: [22:10:24] * micmania1 quit (Quit: micmania1)
545: [22:15:58] * micmania1 has joined #silverstripe
546: [22:36:39] * Admonish has joined #silverstripe
547: [22:53:12] * robbiea quit (Remote host closed the connection)
548: [23:14:42] * spronk has joined #silverstripe
549: [23:24:16] * robbiea has joined #silverstripe
550: [23:41:56] <MichalKleiner> heya, what is the preferred way of creating new objects in SS, e.g. textfield.. would it be new TextField() or TextField::create() ?
551: [23:42:16] <MichalKleiner> I think one was preferred because of dependency injection and mocking..
552: [23:42:24] <MichalKleiner> and it feels like the static one.. but not sure
553: [23:42:49] <muskie9> MichalKleiner I think it's ::create()
554: [23:52:36] * BrewNaked quit (Remote host closed the connection)
555: [23:56:51] * adrexia quit (Quit: My Mac has gone to sleep. ZZZzzz…)

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