#silverstripe IRC Log

IRC log for 11 January 2016

All timestamps are in UTC.

1: [00:01:38] * micmania1 has joined #silverstripe
2: [00:09:58] * wifiPatty has joined #silverstripe
3: [00:12:45] <DanaeNZ_> Do Email templates not like CheckboxSetFields?
4: [00:15:05] * Stomach has joined #silverstripe
5: [00:20:43] <wifiPatty> DanaeNZ_: email templates hate everything
6: [00:20:54] <DanaeNZ_> pooo
7: [00:20:59] <DanaeNZ_> i meant boooo
8: [00:21:01] <DanaeNZ_> but that works too
9: [00:30:50] * Phlunk3 has joined #silverstripe
10: [00:36:20] <DanaeNZ_> omfggg it was because a variable was called "Customise"
11: [00:36:26] <DanaeNZ_> i suppose that makes sense
12: [00:36:43] <wifiPatty> a var named 'customise'?
13: [00:36:49] <wifiPatty> that makes my teeth hurt
14: [00:37:08] * BrewNaked has joined #silverstripe
15: [00:37:09] <DanaeNZ_> not a var var
16: [00:37:12] <DanaeNZ_> a field name
17: [00:37:26] <DanaeNZ_> i changed it to CustomiseOptions
18: [00:37:58] <wifiPatty> oh right
19: [00:41:24] * BrewNaked quit (Ping timeout: 245 seconds)
20: [00:47:20] * wifiPatty quit (Quit: Page closed)
21: [00:49:04] * Tanger has joined #silverstripe
22: [01:02:15] <spronk> so uh
23: [01:02:24] <spronk> why the fuck is the community showcase now on silverstipe.com
24: [01:02:32] <spronk> and listings have no details about the people that made them?
25: [01:02:48] <spronk> cc ss23
26: [01:02:54] <ss23> um
27: [01:02:55] <ss23> idk
28: [01:02:58] <ss23> i dont run it!!!
29: [01:03:03] <spronk> http://www.silverstripe.com/what-we-do/success-stories/listing/franklin-party-hire for example
30: [01:03:06] <spronk> FIX IT
31: [01:03:54] <spronk> vs http://www.silverstripe.org/community/showcase/listing/franklin-party-hire
32: [01:04:13] <ss23> I DONT DO IT
33: [01:04:13] <ss23> ;_;
34: [01:04:20] <spronk> YELL AT SOMEONE WHO DOES :p
35: [01:04:24] <ss23> :(
36: [01:04:25] <ss23> I'm not at work
37: [01:04:31] <ss23> I'm in NYC atm
38: [01:04:35] <spronk> wtf man
39: [01:04:38] <spronk> what you over ther efor?
40: [01:04:51] <ss23> lol
41: [01:04:54] <ss23> holiaday
42: [01:04:55] <ss23> :D
43: [01:05:00] <spronk> noiec ;D
44: [01:33:37] <ss-helper> Re: SilverStipe UserHelp card sort discussion - https://groups.google.com/d/msg/silverstripe-dev/XU40-UKcD8M/UrO-YiKvAAAJ
45: [01:33:37] <ss-helper> Re: Userguide vs. user-guide - https://groups.google.com/d/msg/silverstripe-dev/GrSOZZPgEIk/Ghk9R9muAAAJ
46: [01:41:53] * joelpittet has joined #silverstripe
47: [01:44:36] <Stomach> first day ewwwwwwwwww arggggggghhhhh etc
48: [01:44:43] * spronk quit (Quit: I may need a longer sleep timer...)
49: [01:46:20] * joelpittet quit (Ping timeout: 246 seconds)
50: [01:47:24] * spronk has joined #silverstripe
51: [01:48:37] <ss-helper> Re: Userguide vs. user-guide - https://groups.google.com/d/msg/silverstripe-dev/GrSOZZPgEIk/MyxIjQWwAAAJ
52: [01:53:08] <ss-helper> SilverStripe - Prevent HTML Bookmarks from returning to homepage - http://stackoverflow.com/questions/34712983/silverstripe-prevent-html-bookmarks-from-returning-to-homepage
53: [01:57:52] <spronk> lolstomach
54: [01:59:08] <Zauberfisch> Stomach: Haha, I love your commitment to you new years resolution
55: [01:59:20] <Zauberfisch> 15 days :D
56: [01:59:48] <Stomach> another resolution was to be more realistic
57: [02:00:42] <Zauberfisch> :D
58: [02:01:22] <Stomach> its working out well so far
59: [02:01:43] <Stomach> its weird being back and work and having to stop yourself from saying what you're thinking though
60: [02:13:13] * Stomach quit (Quit: zzz)
61: [02:13:38] * Stomach has joined #silverstripe
62: [02:18:38] <ss-helper> Re: [silverstripe-dev] Re: Userguide vs. user-guide - https://groups.google.com/d/msg/silverstripe-dev/GrSOZZPgEIk/q2ZVNA2xAAAJ
63: [02:24:35] <helenclarko> Stomach: so dont buy loto tickets, because winning lotto is unrealistic. That kind of thing?
64: [02:25:19] <Stomach> that certainly fits :P
65: [02:26:00] <Stomach> although I've never bought those
66: [02:26:25] * BrewNaked has joined #silverstripe
67: [02:31:13] * BrewNaked quit (Ping timeout: 265 seconds)
68: [03:29:53] * helenclarko quit (Quit: Ain't no lie, baby bye bye bye.)
69: [03:37:37] * spronk quit (Quit: I may need a longer sleep timer...)
70: [03:37:44] <nontgor> framework test code coverage https://codecov.io/github/gordonbanderson/silverstripe-framework?ref=f78d75159a3060a3b98e102982f262ef09156044
71: [03:42:45] * joelpittet has joined #silverstripe
72: [03:43:14] * Stomach quit (Ping timeout: 265 seconds)
73: [03:47:15] * Phlunk3 quit (Quit: Leaving)
74: [03:47:44] * joelpittet quit (Ping timeout: 272 seconds)
75: [04:03:41] <ss-helper> Re: [silverstripe-dev] Re: Userguide vs. user-guide - https://groups.google.com/d/msg/silverstripe-dev/GrSOZZPgEIk/gUClEiK3AAAJ
76: [04:03:41] <ss-helper> Re: [silverstripe-dev] Re: Userguide vs. user-guide - https://groups.google.com/d/msg/silverstripe-dev/GrSOZZPgEIk/HatVKry2AAAJ
77: [04:09:31] * Stomach has joined #silverstripe
78: [04:15:07] * BrewNaked has joined #silverstripe
79: [04:18:42] <ss-helper> Re: [silverstripe-dev] Re: SilverStipe UserHelp card sort discussion - https://groups.google.com/d/msg/silverstripe-dev/XU40-UKcD8M/cEzNVf63AAAJ
80: [04:20:20] * BrewNaked quit (Ping timeout: 276 seconds)
81: [04:22:43] * spronk has joined #silverstripe
82: [04:33:01] <Stomach> nontgor - thats disappointing
83: [04:36:42] <nontgor> Stomach: Assuming I've got the test set up correct on Travis then yip it is. See https://github.com/gordonbanderson/silverstripe-framework/blob/TESTEVAL/.travis.yml - looks though I don't need 23 (!) parallel runs as some test directories are short time wise. Will combine for speed and try again
84: [05:02:09] * Stomach quit (Quit: zzz)
85: [05:43:39] * joelpittet has joined #silverstripe
86: [05:44:48] * DanaeNZ_ quit (Remote host closed the connection)
87: [05:45:29] * micmania1 quit (Quit: micmania1)
88: [05:48:06] * joelpittet quit (Ping timeout: 240 seconds)
89: [06:00:23] * Stomach has joined #silverstripe
90: [06:04:11] * BrewNaked has joined #silverstripe
91: [06:04:33] * r_hector has joined #silverstripe
92: [06:06:08] * spronk quit (Quit: I may need a longer sleep timer...)
93: [06:08:30] * BrewNaked quit (Ping timeout: 250 seconds)
94: [06:11:52] * micmania1 has joined #silverstripe
95: [06:18:35] * micmania2 has joined #silverstripe
96: [06:18:40] * micmania1 quit (Ping timeout: 256 seconds)
97: [06:18:40] * micmania2 is now known as micmania1
98: [06:24:23] * Liquide quit ()
99: [06:32:15] * spronk has joined #silverstripe
100: [06:37:23] * Stomach quit (Quit: zzz)
101: [06:39:23] * Stomach has joined #silverstripe
102: [06:40:23] * micmania1 quit (Quit: micmania1)
103: [07:01:33] * wmk has joined #silverstripe
104: [07:09:11] * Stomach quit (Ping timeout: 264 seconds)
105: [07:11:19] * Stomach has joined #silverstripe
106: [07:12:10] * Mike123 has joined #silverstripe
107: [07:28:11] * Kingy[a] is now known as Kingy
108: [07:28:57] <Kingy> Hey ya'll
109: [07:29:17] <Kingy> would someone be able to have a nosy at this http://www.sspaste.com/paste/show/5693596e8f17a and tell me why Gallery shows up but Subsite doesn't ??
110: [07:30:15] <Kingy> (ignoring the fact there is a missing , after Gallery)
111: [07:31:07] * Eliseth has joined #silverstripe
112: [07:33:30] * DanaeNZ has joined #silverstripe
113: [07:37:35] * DanaeNZ quit (Ping timeout: 240 seconds)
114: [07:44:33] * joelpittet has joined #silverstripe
115: [07:46:58] <wmk> Kingy, that's a page?
116: [07:47:02] <wmk> you have Subsites module running?
117: [07:47:38] <wmk> maybe subsite's extension is overwriting the field on that page (and putting in settings tab afaik)
118: [07:48:56] * joelpittet quit (Ping timeout: 246 seconds)
119: [07:53:01] * BrewNaked has joined #silverstripe
120: [07:56:32] * Sentro has joined #silverstripe
121: [07:57:16] * BrewNaked quit (Ping timeout: 250 seconds)
122: [07:57:56] <Sentro> Hi SilverStripe. Is there a way for gridfield to customise the records showing from the link existing component?
123: [08:04:09] <Eliseth> Morning o/
124: [08:06:58] <Sentro> here’s my code structure http://www.sspaste.com/paste/show/56936288efbfa
125: [08:13:35] <wmk> Sentro, define "customise"
126: [08:13:46] <wmk> you mean the columns the gridfield should show?
127: [08:13:48] <wmk> Eliseth, morning
128: [08:16:05] <Kingy> wmk: Not a page
129: [08:16:19] <Kingy> DO
130: [08:16:28] <wmk> so subsite extension is not applied to that DO?
131: [08:17:25] <Kingy> hmm
132: [08:18:36] <wmk> i guess something else is removing it afterwards?
133: [08:18:40] <wmk> !debug Kingy
134: [08:18:40] <ss-helper> 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/
135: [08:18:57] <Sentro> wmk: sorry, should filter not customise. You know the auto complete field link existing above the gridfield?
136: [08:20:15] <wmk> Sentro, from your example you need also DailyActivity has_one Challeng
137: [08:21:04] <Sentro> wmk: yes sorry, I missed that.
138: [08:21:17] <wmk> Sentro, you mean the "link to existing" search box? or the columns shown in the grid?
139: [08:21:21] <wmk> missed it in your paste?
140: [08:21:28] <Sentro> the search box.
141: [08:21:47] <wmk> try to define $searchable_fields for that box
142: [08:21:53] <wmk> and $summary_fields for the columns shown
143: [08:22:50] <Sentro> wmk: no , what I meant is https://dl.dropboxusercontent.com/u/38600598/Screen%20Shot%202016-01-11%20at%204.22.10%20PM.png
144: [08:23:06] <wmk> yup
145: [08:23:31] <wmk> Sentro, see https://docs.silverstripe.org/en/3.2/developer_guides/model/scaffolding/#searchable-fields
146: [08:24:05] <Sentro> right now it gets all the daily activities . but I need is to get only daily activities set in certain challenge
147: [08:25:36] <Sentro> so when I start typing there it also gets the daily activities set on other challenges.
148: [08:26:03] <wmk> Sentro, https://github.com/silverstripe/silverstripe-framework/blob/3/forms/gridfield/GridFieldAddExistingAutocompleter.php#L42
149: [08:26:32] <wmk> !paste Sentro
150: [08:26:32] <ss-helper> Sentro: 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.
151: [08:26:41] <wmk> well, how's that field now generated?
152: [08:26:54] <wmk> without your actual code i can just guess
153: [08:27:08] <wmk> (and provide a bunch of links for your self study)
154: [08:31:10] <Kingy> wmk figured it out, was something I had played around with previously which was messing with it :)
155: [08:31:11] <Kingy> ty
156: [08:31:19] <wmk> Kingy, np
157: [08:31:43] <wmk> when exporting a DataObject as json - where can i define custom fields?
158: [08:31:54] <wmk> e.g. a getter Method that should also be exported?
159: [08:33:13] <Sentro> wmk: I managed to solve it by getting the autocompleter field and set searchList
160: [08:33:51] <wmk> Sentro, yup. getting the config and modify it is a good way if the default config doesn't fit your needs
161: [08:34:05] <wmk> some other devs always make the grid config totally manually...
162: [08:34:18] <Sentro> absolutely. thanks wmk
163: [08:34:24] <wmk> fine
164: [08:35:30] * Sentro quit (Quit: Sentro)
165: [08:38:09] * spronk quit (Quit: I may need a longer sleep timer...)
166: [08:56:30] * Foren6 has joined #silverstripe
167: [08:56:31] <ss-helper> Foren6: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
168: [08:57:53] <Foren6> hey
169: [08:58:39] <Foren6> is there a way to "send" all url requests to same action of a controller?
170: [08:59:14] <Foren6> ie - I pointed url segment to a controller, but I want same action to be called no matter how many params are in url
171: [09:03:51] * micmania1 has joined #silverstripe
172: [09:08:02] * kinglozzer has joined #silverstripe
173: [09:08:29] <Foren6> anyone?
174: [09:09:14] * sealan has joined #silverstripe
175: [09:12:25] * sealan quit (Client Quit)
176: [09:18:32] * swaiba has joined #silverstripe
177: [09:22:57] * DanaeNZ has joined #silverstripe
178: [09:25:31] * MarkGuin_ has joined #silverstripe
179: [09:27:06] * DanaeNZ quit (Ping timeout: 240 seconds)
180: [09:31:43] <wmk> Foren6, you could use $url_handlers
181: [09:31:59] <Foren6> wmk: tried that
182: [09:32:03] <wmk> but there is no "wildcard" for actions anymore for security reasons
183: [09:32:08] <Foren6> but cannot make it work with unknown number of params
184: [09:32:10] <wmk> well, you could re-invent the wildcard
185: [09:32:39] <wmk> Foren6, unknown number of params sounds like a bad idea to me
186: [09:32:51] <Foren6> SEO-friendly search?
187: [09:33:15] <wmk> another glue string instead of / ?
188: [09:33:53] <Foren6> nope
189: [09:33:59] <wmk> so now you have e.g. /search/param1/foo/param2/bar/param3/baz/.../param-n/blafasel/ ?
190: [09:34:14] <Foren6> exactly
191: [09:34:33] <wmk> and - what doesn't work?
192: [09:34:49] <Foren6> page 404 if I don't supply enough params in url_handlers
193: [09:35:00] <Foren6> *it shows 404
194: [09:35:17] <wmk> that's bad ;)
195: [09:35:31] <Foren6> and it looks kind of stupid to put this in url_handlers
196: [09:35:50] <wmk> well, you might make an url_handler with enough params
197: [09:35:57] <wmk> though that doesn't look elegant
198: [09:35:58] <Foren6> '$p1/$v1/$p2/$v2/$p3/$v3/$p4/$v4/...' => "listing"
199: [09:37:19] <Foren6> do you have an idea what should be overriden to reinvent wildcard?
200: [09:37:26] <Foren6> just for this ctrl
201: [09:37:39] <Foren6> handleAction? handleRequest?
202: [09:37:53] <wmk> are you on 3.1 or 3.2 ?
203: [09:38:03] <Foren6> 3.2
204: [09:38:38] <wmk> but as you mention it - this special behaviour could be placed in handle_action
205: [09:38:51] <wmk> just call parent::handle_action and if it's a 404 place your own logic
206: [09:40:39] <Foren6> I do have public function handleAction($request, $action)
207: [09:40:47] <Foren6> but it looks like it's not called at all
208: [09:41:44] * BrewNaked has joined #silverstripe
209: [09:45:23] * joelpittet has joined #silverstripe
210: [09:45:59] * BrewNaked quit (Ping timeout: 245 seconds)
211: [09:47:27] <leomeloxp> Morning folks. I'm having an issue with SS2.4 where when a payment integration site we're using redirects the user back to /<Page Name>/<method name> no Requirements is pulled. Anyone has any suggestions on how to debug this? I already check HTTP headers, POST vars and the lot and if I try to mimic (using Chrome's Dev Tools to Copy request as Curl) in the command line Requirements works. Sadly upgrading
212: [09:47:29] <leomeloxp> to 3.x is not an option for this one just yet.
213: [09:50:32] * joelpittet quit (Ping timeout: 276 seconds)
214: [09:53:27] <MarkGuin_> leomeloxp - ouch. that doesn't sound like a fun problem for a monday morning.
215: [09:54:33] <leomeloxp> MarkGuin_: If it makes you feel any better. I've actually ran into this one last Friday at 4:50pm. But yeah, I'm out of ideas on how to SOLVE this one
216: [09:55:32] <MarkGuin_> If you reload the page in the browser does it then load the requirements the second time?
217: [09:55:45] <leomeloxp> Yup
218: [09:56:22] <leomeloxp> And since it's a refresh it also keeps all post vars and headers (right?) which makes it even stranger.
219: [09:56:48] <MarkGuin_> yeah, i would think so
220: [09:57:11] <leomeloxp> It seems that redirecting back to /<page name> works (Requirements runs fine) so I'm looking into how much trouble would it be to migrate the method to index()
221: [09:57:38] <wmk> leomeloxp, WHERE are requirements set?
222: [09:57:50] <wmk> in index() or in init() ? or in template?
223: [09:58:47] <leomeloxp> They are set on Page.php, then at the end of my BookingPage::completeBooking method I do ...renderWith(array('BookingPage_completeBooking','Page');
224: [09:58:50] * Azure quit (Read error: Connection reset by peer)
225: [09:59:04] <leomeloxp> And I believe they are on Page::init()
226: [09:59:49] * Azure has joined #silverstripe
227: [10:03:15] <leomeloxp> I did debug whether or not when the other site redirects to my method SS enters BookingPage::init (which references the parent's init) and Page::init and it does enter them. It's just requirements that doesn't add its stuff to the rendered markup
228: [10:03:27] <MarkGuin_> Have you looked at the response headers at all? I'm wondering if it's trying to send the requirements as X-Require headers like it does with ajax requests in the cms or something.
229: [10:03:58] <leomeloxp> I tried looking a little bit into Requirements' core code but got nothing yet.
230: [10:04:32] <leomeloxp> MarkGuin_: I didn't look for any X-Require headers, but I did compare it with a normal page render and they have the same headers.
231: [10:05:42] <MarkGuin_> wow. that's pretty bizarre
232: [10:06:28] <leomeloxp> MarkGuin_: It definitely is... I spent quite some time on Friday trying to at least dig some sense out of this issue, but came empty handed XD'
233: [10:07:50] <leomeloxp> Worst thing is, I have an implementation of the same payment system redirecting to a method on a 3.2 site and it works fine. So whatever is broken on 2.4 was fixed somewhere since then
234: [10:08:26] <MarkGuin_> Man, if you can get it to work with index() I'd go that way.
235: [10:08:53] <leomeloxp> Problem is, from 2.4 to 3.2 there has probably been a significant amount of changes on how templates are rendered and or Requirements. So no point in comparing them
236: [10:09:21] <leomeloxp> Yeah, I think I'll just do that... Save myself the frustration on this beautiful Monday morning XDDD
237: [10:12:15] * Stomach quit (Quit: zzz)
238: [10:22:37] * Foren6 quit (Ping timeout: 252 seconds)
239: [10:35:06] * otterpocket has joined #silverstripe
240: [10:35:22] <otterpocket> Can I find a diagram of the Silverstripe Object Model anywhere?
241: [10:36:15] <swaiba> otterpocket -> https://github.com/froog/SilverGraph
242: [10:36:54] <otterpocket> Is there not a graphic of the framework model anywhere ?
243: [10:49:42] <swaiba> not that I know of or I'd have linked to that otterpocket :)
244: [10:50:00] <swaiba> of course this one has the advantage of also including your customised code
245: [10:51:13] <swaiba> https://silverstripe.uservoice.com/forums/251266-new-features/suggestions/11378949-use-https-github-com-froog-silvergraph-to-keep-a
246: [10:51:28] <swaiba> ^^^^otterpocket feel free to vote for this :)
247: [10:55:48] <otterpocket> Cool, I often use it
248: [10:59:27] * r3v3rb has joined #silverstripe
249: [10:59:35] <swaiba> hey r3v3rb
250: [10:59:36] <r3v3rb> guten tag
251: [10:59:43] <r3v3rb> swaiba: coffee in hand :)
252: [10:59:44] <swaiba> ja vol
253: [11:00:01] * MarkGuin_ quit (Remote host closed the connection)
254: [11:00:27] <r3v3rb> das ist gut ja?
255: [11:01:17] * Kingy is now known as Kingy[a]
256: [11:02:29] * Kingy[a] is now known as Kingy
257: [11:04:56] <wmk> kaffee ist immer gut r3v3rb
258: [11:10:49] * micmania1 quit (Quit: micmania1)
259: [11:18:02] * r3v3rb wants silversphere’s casa-laguna theme :D
260: [11:19:30] <r3v3rb> where is spheresilver/silversphere?
261: [11:23:05] * MarkGuin_ has joined #silverstripe
262: [11:27:41] <swaiba> r3v3rb on a plane to NZ isn't it?
263: [11:28:09] <wmk> afaik. or waiting for the train
264: [11:28:37] <wmk> eh. flight
265: [11:30:47] * BrewNaked has joined #silverstripe
266: [11:34:46] * BrewNaked quit (Ping timeout: 240 seconds)
267: [11:36:33] <r3v3rb> wmk: :D
268: [11:37:25] * slievr quit (Ping timeout: 252 seconds)
269: [11:46:21] * joelpittet has joined #silverstripe
270: [11:50:55] * joelpittet quit (Ping timeout: 265 seconds)
271: [12:10:03] * r_hector quit (Remote host closed the connection)
272: [12:18:21] <nontgor> kinglozzer: I remember you asking about what unit test coverage was for the framework. Assuming I have got the Travis setup correct, it's only 35% https://codecov.io/github/gordonbanderson/silverstripe-framework?ref=f78d75159a3060a3b98e102982f262ef09156044
273: [12:19:15] <nontgor> kinglozzer: Will run overnight on my laptop away from Travis to generate a clover coverage report locally in order to verify
274: [12:24:27] <kinglozzer> nontgor: Cool, I saw your issue on framework about the @covers tags too
275: [12:49:15] * Tanger quit (Quit: sleep())
276: [12:50:08] * Tanger has joined #silverstripe
277: [13:00:23] * DanaeNZ has joined #silverstripe
278: [13:04:56] * DanaeNZ quit (Ping timeout: 255 seconds)
279: [13:11:34] * Tanger quit (Quit: sleep())
280: [13:12:23] * Tanger has joined #silverstripe
281: [13:19:40] * BrewNaked has joined #silverstripe
282: [13:23:52] * r3v3rb quit (Quit: r3v3rb)
283: [13:24:12] * BrewNaked quit (Ping timeout: 265 seconds)
284: [13:26:20] * kinglozzer quit (Ping timeout: 276 seconds)
285: [13:30:35] * kinglozzer has joined #silverstripe
286: [13:33:54] * UndefinedOffset has joined #silverstripe
287: [13:47:12] * joelpittet has joined #silverstripe
288: [13:50:48] * cloph_away is now known as cloph
289: [13:51:44] * joelpittet quit (Ping timeout: 250 seconds)
290: [14:07:57] <Eliseth> Is there a way in template <% loop %> to do something each Xth iteration?
291: [14:12:30] <swaiba> Eliseth sure <% if $MultipleOf(3) %> for example
292: [14:12:35] <swaiba> more on https://docs.silverstripe.org/en/3.2/developer_guides/templates/syntax/
293: [14:13:24] <Eliseth> Awesome, thanks!
294: [14:29:58] <otterpocket> Hi, What type of Field do I need to add to getCmsFields to edit the has_many's on the page
295: [14:30:24] <Eliseth> hm. I have <% with $myObject %><% loop $Something %>$Up.Title<% end_loop %><% end_with %> $Up.Title should display Title from myObject within the loop, correct? (because it's not...) $Title outside the loop displays correctly
296: [14:34:28] <swaiba> otterpocket a grid field
297: [14:36:15] <swaiba> Eliseth disagree
298: [14:36:35] <swaiba> because your object is the current context, so the context above is whatever it is within
299: [14:36:41] <otterpocket> swaiba, new GridField('Offers', 'All offers', Offer::get()) ?
300: [14:36:56] <swaiba> looping fields doesn't mean you've moved context
301: [14:37:02] <Eliseth> Isn't current context $Something?
302: [14:37:13] <swaiba> is that an "object"?
303: [14:37:17] <Eliseth> Yes
304: [14:37:45] <swaiba> ok, well I can see why it isn't working theoretically :) but as I'm not 100% sure I'll leave it there
305: [14:37:58] <swaiba> otterpocket coudln't be sure I'd suggest you check the docs
306: [14:38:33] <otterpocket> swaiba, That gives me a gridfield but I cant click through to the record
307: [14:38:35] <Eliseth> I'm looping over images within the object
308: [14:39:32] <Eliseth> But need the object title from within the loop
309: [14:40:25] <swaiba> both otterpocket and Eliseth I don't know sorry
310: [14:41:34] * Tanger quit (Quit: sleep())
311: [14:42:16] <Eliseth> $Top.myObject.Title works... ugly, but well
312: [14:42:28] * Tanger has joined #silverstripe
313: [14:57:00] * wmk quit (Ping timeout: 265 seconds)
314: [15:08:33] * BrewNaked has joined #silverstripe
315: [15:10:04] <nontgor> Eliseth: One techinque I use is to add the extra properties in the controller, you need to create a new ArrayList, append items from a DataList and add likes of $thing->MyProperty='MyValue' given some predefined condition
316: [15:10:42] <nontgor> Eliseth: Reading back looks like you need the Title of object which ought to be available
317: [15:11:09] <Eliseth> Yes, exactly, that's what I thought... it _should_ be available. It just isn't
318: [15:11:24] <Eliseth> Almost as if $Up is being ignored altogether
319: [15:12:22] * TRB143 quit (Ping timeout: 272 seconds)
320: [15:12:24] <nontgor> Likes of $Up.Title or $Top.Title also generates a new database query each time, at least it did with 3.1
321: [15:12:42] <nontgor> as it can only be cached in the context of the loop iteration
322: [15:13:02] * BrewNaked quit (Ping timeout: 256 seconds)
323: [15:13:35] <Eliseth> In that case using $Up.Title or $Top.myObject.Title makes no difference in terms of serverload
324: [15:14:55] <nontgor> Eliseth: If you add the property in the controller as described then this does not happen
325: [15:15:54] * Gfactor has joined #silverstripe
326: [15:17:06] <Gfactor> hi guys, does anyone know of a replacement fro generic view module? Or better still a ReadMe on frontend CRUD?
327: [15:18:19] <nontgor> Eliseth: Untested and typed off the top of my head but should give you an idea of what I mean http://www.sspaste.com/paste/show/5693c7838c632 - use <% loop $ImagesWithTitles %> and within the loop the page title will be available as $PageTitle
328: [15:19:05] <ss-helper> Re: SilverStipe UserHelp card sort discussion - https://groups.google.com/d/msg/silverstripe-dev/XU40-UKcD8M/R-hyKeXbAAAJ
329: [15:19:35] <Eliseth> Ahh, I see what you mean now
330: [15:21:07] <swaiba> nontgor / Eliseth I also like this pre creating the objects first... it actaully can be much more effiecnt too as silverstripe will get everything in your object and build a full dataobject for everything
331: [15:21:39] <swaiba> so better to prepare your data and then pass that to the template
332: [15:21:54] <Eliseth> I never did that before, but will sure try it out
333: [15:22:15] <swaiba> Gfactor nothing has come up to rival generic views yet that I've seen... If I've missed it I'd like to know too!
334: [15:23:00] * wmk has joined #silverstripe
335: [15:23:47] <Gfactor> swaiba well, generic views is no longer available on silverstripe
336: [15:24:45] <swaiba> well Gfactor it was always ingos personal module... https://github.com/chillu/silverstripe-genericviews
337: [15:25:24] <Gfactor> sawiba have you tested it on 3.1?
338: [15:27:54] <wmk> Gfactor, crud?
339: [15:28:25] <wmk> https://github.com/burnbright/silverstripe-listeditor looks also nice
340: [15:28:37] <Gfactor> wmk yes crud, for frontend
341: [15:29:04] <wmk> didn't test listeditor yet, but it looks like built for this job
342: [15:36:27] <swaiba> ooooo nice one wmk!
343: [15:38:34] <kinglozzer> nontgor: $Up and $Top don't generate duplicate queries, they just hop one level up the "stack" of items, perhaps it was a 2.4 thing?
344: [15:39:17] <nontgor> kinlglozzer: Will double check
345: [15:41:45] <kinglozzer> Eliseth: With your $Up.Title issue, did you have any dots in your <% loop $Foo %>? The reason I ask is that if you have <% loop $Foo %> you can use $Up.Title, but if you have <% loop $Foo.Limit(5) %> you need to do $Up.Up.Title (one $Up for each "." in the loop statement)
346: [15:42:46] <kinglozzer> https://github.com/silverstripe/silverstripe-framework/issues/4015
347: [15:42:52] <Eliseth> Ahhhhh
348: [15:43:34] <kinglozzer> It's a bit of a strange one... :P
349: [15:44:37] <Eliseth> I would _never_ have found that out...
350: [15:44:48] <Eliseth> $Up.Up.Up.Title did the trick >.<
351: [15:44:53] <Eliseth> Because: $Foo.Sort().Limit()
352: [15:48:05] * joelpittet has joined #silverstripe
353: [15:49:17] * mrguits has joined #silverstripe
354: [15:49:42] <mrguits> anyone know how to set required on a FileAttachmentField (dropzone)
355: [15:50:13] <kinglozzer> Eliseth: Yeah it took me many hours when I first found it :/ it's really hard to fix though :(
356: [15:53:04] * joelpittet quit (Ping timeout: 265 seconds)
357: [15:54:15] * wmk quit (Ping timeout: 240 seconds)
358: [16:04:10] * Mike123 quit (Ping timeout: 252 seconds)
359: [16:12:31] <mrguits> anyone know how to set required on a FileAttachmentField (dropzone)
360: [16:20:05] * joelpittet has joined #silverstripe
361: [16:20:30] <Gfactor> mrguits create getValicator() function and pass your fields in the RequiredFields class
362: [16:24:32] <mrguits> getValidator?
363: [16:25:02] <Gfactor> yes getValidator()
364: [16:30:16] <mrguits> public function getValidator() { return new RequiredFields(array( 'grades' )); ) does not work on FileAttachmentField (dropzone)
365: [16:31:09] <mrguits> well the form does not submit but there is no error message
366: [16:36:33] <Gfactor> why not use UploadField? I think it has the same feature that FileAttachmentField has (drag & drop)
367: [16:36:54] * nontgor quit (Ping timeout: 256 seconds)
368: [16:37:47] * DanaeNZ has joined #silverstripe
369: [16:38:32] <mrguits> Gfactor, no there are other reasons, but thanks
370: [16:39:05] <Gfactor> mrguits ok
371: [16:39:37] * muskie9 has joined #silverstripe
372: [16:42:20] * Eliseth quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
373: [16:42:22] * DanaeNZ quit (Ping timeout: 265 seconds)
374: [16:49:13] * Tanger quit (Quit: sleep())
375: [16:49:15] * nontgor has joined #silverstripe
376: [16:50:04] * Tanger has joined #silverstripe
377: [16:53:23] * BrewNaked has joined #silverstripe
378: [17:09:39] * wmk has joined #silverstripe
379: [17:11:34] * Tanger quit (Quit: sleep())
380: [17:12:27] * Tanger has joined #silverstripe
381: [17:25:11] * otterpocket quit (Quit: Leaving)
382: [17:26:05] * kinglozzer quit ()
383: [17:26:21] * swaiba quit (Remote host closed the connection)
384: [17:30:50] * Tanger quit (Quit: sleep())
385: [17:31:40] * Tanger has joined #silverstripe
386: [17:33:48] * mrguits quit (Ping timeout: 252 seconds)
387: [17:37:37] * TRB143 has joined #silverstripe
388: [17:46:46] * MarkGuin_ quit (Remote host closed the connection)
389: [18:03:32] * gelignite has joined #silverstripe
390: [18:05:17] * Stomach has joined #silverstripe
391: [18:27:14] * DanaeNZ has joined #silverstripe
392: [18:31:59] * DanaeNZ quit (Ping timeout: 264 seconds)
393: [18:34:19] * Stomach quit (Quit: zzz)
394: [18:36:07] * Kingy has left #silverstripe
395: [18:42:39] * ApologiesForTheD has joined #silverstripe
396: [18:42:40] <ss-helper> ApologiesForTheD: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
397: [18:46:58] * ApologiesForTheD quit (Ping timeout: 252 seconds)
398: [18:46:58] * Tanger quit (Quit: sleep())
399: [18:47:50] * Tanger has joined #silverstripe
400: [18:49:12] * Tanger quit (Client Quit)
401: [18:50:05] * Tanger has joined #silverstripe
402: [18:57:24] * Stomach has joined #silverstripe
403: [19:05:18] <BrewNaked> Happy [AM|PM] all.
404: [19:09:29] <Stomach> good morning
405: [19:25:04] <BrewNaked> I'm looking to intercept a field in a LeftandMain form before being saved in the CMS, but can't figure out how to get form fields. I have a DataObject that is being saved and have a onBeforeSave() firing, but can't figure out how to get at the form elements from within the onBeforeSave(). Help?
406: [19:26:28] * helenclarko has joined #silverstripe
407: [19:26:58] * Stomach quit (Quit: zzz)
408: [19:27:04] * ajmitch_ is now known as ajmitch
409: [19:27:57] <muskie9> BrewNaked, why not use onBeforeWrite() on the DataObject instead?
410: [19:28:09] <muskie9> you would be calling $this->FieldName
411: [19:28:23] <BrewNaked> Sorry... onBeforeWrite... not onBeforeSave. You're right.
412: [19:29:08] <muskie9> BrewNaked are you just looking to get the value of the form field?
413: [19:29:09] <BrewNaked> There's a custom field being added to the form via LiteralField::create()... and it's not showing up via $this->FieldName in the onBeforeWrite().
414: [19:29:23] <muskie9> ah
415: [19:29:58] <muskie9> I don't think I've every tried to get a value from a literal field in the cms
416: [19:30:26] * Stomach has joined #silverstripe
417: [19:31:58] * Tanger quit (Quit: sleep())
418: [19:32:48] * Tanger has joined #silverstripe
419: [19:38:17] <Stomach> BrewNaked - what is the field called? it should be on the object, i.e. $this->MyFieldName
420: [19:41:06] * DimiStripe has joined #silverstripe
421: [19:46:38] * Tanger quit (Quit: sleep())
422: [19:47:04] <BrewNaked> So the basic gist here... I'm using a 3rd-party image resizing/zooming handler for an image in a CMS form. So the DataObject in question has a has_one called 'Thumbnail' of type 'Image'... but it gets pulled from the form via $fields->removeByName('Thumbnail') and replaced with LiteralField::create(' ... <input name="ThumbnailImage" ... ')
423: [19:47:35] * MarkGuin_ has joined #silverstripe
424: [19:47:57] <BrewNaked> Trying to access $this->ThumbnailImage in the onBeforeWrite() function yields null regardless of the contents of the form's ThumbnailImage field.
425: [19:51:00] <BrewNaked> So in the onBeforeWrite(), the object is aware of the $this->ThumbnailID that is associated with its has_one, but I can't seem to get any reference to the form response containing anything from the "ThumbnailImage" field.
426: [20:00:55] * MarkGuin_ quit (Ping timeout: 240 seconds)
427: [20:02:05] * dollardad has joined #silverstripe
428: [20:05:11] <wmk> BrewNaked, onAfterWrite() is no option for you?
429: [20:14:54] * micmania1 has joined #silverstripe
430: [20:21:12] <BrewNaked> I'm not seeing anything in the onAfterWrite() either.
431: [20:22:34] <wmk> !paste BrewNaked
432: [20:22:34] <ss-helper> BrewNaked: 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.
433: [20:23:08] <BrewNaked> Sure thing... one moment.
434: [20:23:29] * dollardad quit (Quit: dollardad)
435: [20:28:44] <BrewNaked> Here's the object's basic form... http://kopy.io/Vmuhv
436: [20:28:53] * MarkGuin_ has joined #silverstripe
437: [20:30:31] <wmk> BrewNaked, how about Debug::show($this->ThumbnailImage() ); ??
438: [20:30:44] <wmk> with paranthesis, cause it's a getter method to get the has_one relation?
439: [20:31:13] <wmk> parenthesis
440: [20:31:32] <BrewNaked> ...trying.
441: [20:32:06] <wmk> you used them in Link() when accessing $this->TeamPage()
442: [20:32:19] * dollardad has joined #silverstripe
443: [20:32:52] <wmk> MarkGuin_, ☺/
444: [20:32:55] * MarkGuin_ quit (Ping timeout: 240 seconds)
445: [20:33:03] <Stomach> LOL
446: [20:33:07] <wmk> k
447: [20:33:10] <Stomach> :D
448: [20:33:13] <BrewNaked> ERROR [User Error]: Uncaught Exception: Object->__call(): the method 'thumbnailimage' does not exist on 'Bio'
449: [20:33:13] <BrewNaked> IN POST /admin/pages/edit/EditForm/field/Bios/item/2/ItemEditForm
450: [20:33:13] <BrewNaked> Line 739 in /Users/brett/Projects/ss32/kh/framework/core/Object.php
451: [20:33:53] <wmk> BrewNaked, hmm, that's correct
452: [20:34:00] <wmk> but where do you get it from?
453: [20:34:06] <wmk> i see has_one Thumbnail or Image
454: [20:34:09] <wmk> but not...
455: [20:34:49] <Stomach> try: Controller::curr()->getRequest()->postVar('ThumbnailImage'); maybe
456: [20:35:25] <wmk> Stomach, yup, but that won't save into a has_one relation. better would be to create a ThumbnailCropper field
457: [20:36:37] * dollardad quit (Client Quit)
458: [20:38:13] * dollardad has joined #silverstripe
459: [20:45:10] <BrewNaked> Controller::curr()->getRequest() gets me what I'm looking for, thanks. But now I'm up against the fact that the form created in the CMS doesn't have multipart/form-data set since I've removed the upload fields.
460: [20:47:49] <BrewNaked> Thanks for the assist!
461: [20:49:15] <Stomach> no worries BrewNaked :)
462: [20:49:16] * DanaeNZ has joined #silverstripe
463: [20:53:39] * joelpittet quit (Remote host closed the connection)
464: [21:01:01] * dollardad_ has joined #silverstripe
465: [21:01:02] <ss-helper> dollardad_: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
466: [21:02:24] * dollardad quit (Ping timeout: 265 seconds)
467: [21:02:25] * dollardad_ is now known as dollardad
468: [21:04:17] <ss-helper> RFC: State Management - https://groups.google.com/d/msg/silverstripe-dev/p7-gsJhpugg/mKaEsKPuAAAJ
469: [21:04:46] <DanaeNZ> Bowie on the radio today ;___;
470: [21:11:15] <DanaeNZ> where is irogue these days? Still on holiday?
471: [21:17:57] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
472: [21:25:10] * Gfactor quit (Ping timeout: 245 seconds)
473: [21:25:38] * Gfactor has joined #silverstripe
474: [21:35:23] * spronk has joined #silverstripe
475: [21:47:26] * Gfactor quit (Ping timeout: 240 seconds)
476: [21:48:04] <micmania1> DanaeNZ: he’s about somewhere
477: [21:51:13] * wmk quit (Ping timeout: 265 seconds)
478: [21:53:12] * TRB143 quit (Quit: No Ping reply in 180 seconds.)
479: [21:55:23] * TRB143 has joined #silverstripe
480: [21:57:01] * UndefinedOffset quit (Quit: Leaving.)
481: [21:58:22] * MarkGuin_ has joined #silverstripe
482: [22:02:13] * MarkGuin_ quit (Remote host closed the connection)
483: [22:04:55] * joelpittet has joined #silverstripe
484: [22:09:38] * Stomach quit (Ping timeout: 250 seconds)
485: [23:02:10] * hlepmeh has joined #silverstripe
486: [23:02:10] <ss-helper> hlepmeh: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
487: [23:02:37] <hlepmeh> Hey all - How can I access the submit button of a Form
488: [23:02:46] <hlepmeh> I want to be able to addExtraClasses()
489: [23:03:43] <hlepmeh> oh duh got it
490: [23:03:44] <hlepmeh> ;)
491: [23:03:48] <hlepmeh> thanks anyway
492: [23:04:58] * Stomach has joined #silverstripe
493: [23:08:12] * hlepmeh quit (Ping timeout: 252 seconds)
494: [23:08:22] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
495: [23:10:37] * DanaeNZ quit (Remote host closed the connection)
496: [23:11:05] * DanaeNZ has joined #silverstripe

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