#silverstripe IRC Log

IRC log for 20 October 2016

All timestamps are in UTC.

1: [00:06:33] * micmania1 quit (Quit: micmania1)
2: [00:12:27] * micmania1 has joined #silverstripe
3: [00:12:57] * sminnee_ quit (Quit: sminnee_)
4: [00:14:36] * sminnee_ has joined #silverstripe
5: [00:28:12] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
6: [00:29:45] * sminnee_ quit (Quit: sminnee_)
7: [00:46:57] * micmania1 quit (Quit: micmania1)
8: [00:59:11] * sminnee_ has joined #silverstripe
9: [00:59:56] * micmania1 has joined #silverstripe
10: [01:14:00] * micmania1 quit (Quit: micmania1)
11: [01:20:03] * micmania1 has joined #silverstripe
12: [01:33:34] * sminnee_ quit (Quit: sminnee_)
13: [01:58:26] * DanaeNZ coughs
14: [02:34:04] <Hailwood> So, what's the running example of a custom login form for SS?
15: [02:34:23] <Hailwood> I don't just mean a Security_login.ss template, I want a new instance of the login form that lives at /login
16: [02:35:02] <DanaeNZ> Hailwood: I vaguely recall doing this
17: [02:35:06] <DanaeNZ> Probably badly
18: [02:35:21] <DanaeNZ> I think the general gist is make a new subclass of MemberLoginForm
19: [02:35:38] <DanaeNZ> then overwrite the LoginForm or whatever it is method
20: [02:35:41] <DanaeNZ> Can't remember tbh
21: [02:35:49] <Hailwood> I was wondering if it's MemberLoginForm or just LoginForm that you subclass
22: [02:37:17] <Hailwood> Actually the main thing I was wondering is if we can conditionally redirect to this page on an authentication failure instead of Security?
23: [02:37:47] <micmania1> Hailwood: Security.login_url config option
24: [02:39:06] <Hailwood> micmania1: Yeah, but can we do it conditionally? Basically I don't really want to have
25: [02:39:42] <Hailwood> to update the config option just before I throw the exception each time I want to redirect to my custom one rather than the default.
26: [02:40:09] <micmania1> Hailwood: why would you update it each time? Just set it in YAML once
27: [02:40:55] <Hailwood> Context here - frontend "members" section - If the user say tries to access /admin then they should hit the standard login form, but if they try to access /members-area and aren't logged in, or any action they aren't authorized to do in the members area then they should be fired off to the custom login form
28: [03:03:31] * sminnee_ has joined #silverstripe
29: [03:11:57] <Hailwood> Is there an "OnAfterLogin" event or similar?
30: [03:14:05] <Hailwood> found it memberLoggedIn
31: [03:26:43] * janneklouman-- has joined #silverstripe
32: [03:31:24] * janneklouman-- quit (Ping timeout: 260 seconds)
33: [03:31:38] * cheddam quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
34: [03:37:33] * cheddam has joined #silverstripe
35: [03:40:57] * Dig quit (Quit: Leaving)
36: [03:43:58] * sminnee_ quit (Quit: sminnee_)
37: [03:45:39] * micmania1 quit (Quit: micmania1)
38: [03:50:30] * micmania1 has joined #silverstripe
39: [03:56:04] * Hailwood quit (Quit: Konversation terminated!)
40: [04:05:15] * micmania1 quit (Quit: micmania1)
41: [04:14:11] * adrexia quit (Quit: My Mac has gone to sleep. ZZZzzz…)
42: [04:17:34] * janneklouman-- has joined #silverstripe
43: [04:22:12] * janneklouman-- quit (Ping timeout: 256 seconds)
44: [04:25:20] * DanaeNZ quit (Quit: TIME TO FEED)
45: [04:40:50] * sminnee_ has joined #silverstripe
46: [05:13:29] * sminnee_ quit (Ping timeout: 260 seconds)
47: [05:21:12] * Stomach quit (Ping timeout: 250 seconds)
48: [05:35:21] * wmk has joined #silverstripe
49: [05:37:05] * Shrike_Finland has joined #silverstripe
50: [05:52:36] * spronk quit (Quit: I may need a longer sleep timer...)
51: [06:17:15] * cheddam quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
52: [06:36:40] * Shrike_Finland quit (Quit: Leaving.)
53: [06:45:42] * Shrike_Finland has joined #silverstripe
54: [06:50:07] * Shrike_Finland quit (Client Quit)
55: [06:55:38] * lerni has joined #silverstripe
56: [06:58:30] <wmk> hmm, how can i disable partial caching on dev?
57: [06:59:12] <wmk> SS_Cache::set_cache_lifetime('any', -1, 100); doesn't seem to work...
58: [07:00:21] * Bollig|DesignCty has joined #silverstripe
59: [07:01:14] <Bollig|DesignCty> Anyone familar with silverstripe ecommerce/payment enough to recommend the best approach to have a different credit card fee for Amex and Visa/Mastercard?
60: [07:05:36] * cupcake quit (Quit: Page closed)
61: [07:05:51] * cupcake has joined #silverstripe
62: [07:16:50] * darianno has joined #silverstripe
63: [07:26:42] * cheddam has joined #silverstripe
64: [07:30:53] * cheddam quit (Ping timeout: 245 seconds)
65: [07:31:26] * cheddam has joined #silverstripe
66: [07:32:30] * janneklouman-- has joined #silverstripe
67: [07:32:31] * pweh has joined #silverstripe
68: [07:37:16] * janneklouman-- quit (Ping timeout: 250 seconds)
69: [07:50:03] * WilsonG has joined #silverstripe
70: [07:50:03] <ss-helper> WilsonG: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
71: [07:52:39] <WilsonG> Hi, is there clean way to extend HtmlEditorField.js file? For example, changing the captions rendered html?
72: [07:52:39] * DimiStripe quit (Quit: DimiStripe)
73: [07:58:40] * Frans_Amsterdam has joined #silverstripe
74: [08:00:37] <Frans_Amsterdam> Hi there, I like to make use of short urls. Any advice how to approach this?
75: [08:03:24] * zippy has joined #silverstripe
76: [08:04:20] * kinglozzer has joined #silverstripe
77: [08:04:30] <Bollig|DesignCty> WilsonG: you should be able to block the include by extending LeftAndMain and/or HTMLEditorField and then include your own edited version
78: [08:04:45] <Bollig|DesignCty> Frans_Amsterdam: what do you mean by short URLs?
79: [08:06:20] <Frans_Amsterdam> Bollig|DesignCty, I make use of a share button to publish on Twitter. So I would like to shorten the url of the page I like to share.
80: [08:07:07] * janneklouman-- has joined #silverstripe
81: [08:07:47] <Bollig|DesignCty> Doesn’t twitter automatically rewrite urls to t.co?
82: [08:08:38] <WilsonG> thx Bollig
83: [08:09:09] <Bollig|DesignCty> np
84: [08:12:22] <wmk> WilsonG, there was a boilerplate for tinymce configuration, let me search the link
85: [08:12:55] <wmk> https://github.com/jonom/silverstripe-tinytidy <- WilsonG
86: [08:13:35] <wmk> Frans_Amsterdam, urls just of pages?
87: [08:14:24] <wmk> you yould convert the current PageID to hex and use as param. Then make a controller that redirects to the page and create a route to this controller.
88: [08:14:46] <wmk> e.g. domain.com/tiny/ff -> will redirect to page ID 255
89: [08:14:57] <wmk> just an idea
90: [08:15:28] <wmk> you could also create a short hash onAfterWrite and save to the page.
91: [08:15:50] <wmk> If you can map a tiny url to a page it's simple.
92: [08:16:23] <WilsonG> hmm i'll take a look
93: [08:20:22] * swaiba has joined #silverstripe
94: [08:22:00] <Frans_Amsterdam> wmk I like that appoach
95: [08:22:16] <wmk> you could use something else than hex...
96: [08:23:16] <wmk> Frans_Amsterdam, http://php.net/manual/en/function.base-convert.php
97: [08:27:01] <wmk> BTW: anyone interested in a good javascript book? https://www.indiegogo.com/projects/functional-light-javascript-book/x/15253398
98: [08:27:29] <zippy> Frans_Amsterdam: wmk you could hash the id (it makes small hashes) http://hashids.org/php/
99: [08:28:01] <WilsonG> wmk -> is it worth it?
100: [08:28:12] <wmk> zippy, yes, if you need params
101: [08:28:20] * Mike123 has joined #silverstripe
102: [08:28:34] <zippy> wmk: just instead of converting it to hex
103: [08:28:36] <wmk> WilsonG, the book? I guess so. I started reading the other stuff of ydkjs, very well written.
104: [08:28:38] <zippy> that hashids only works on numbers
105: [08:29:14] <wmk> and the next stretch goal is: get all other books of that series, too...
106: [08:30:03] <wmk> zippy, good idea
107: [08:32:28] <zippy> !debug ss-helper
108: [08:32:28] <ss-helper> 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/
109: [08:32:31] <zippy> :P
110: [08:32:38] <wmk> lol
111: [08:32:59] <wmk> Frans_Amsterdam, if it works, please opensource the module ;)
112: [08:33:20] * Bollig|DesignCty quit (Ping timeout: 250 seconds)
113: [08:33:51] <Frans_Amsterdam> wmk I will do that. Start ....
114: [08:41:12] <WilsonG> wmk, js is evolving too fast, you start reading a book, and on half you understand that it is outdated :D
115: [08:41:36] <wmk> WilsonG, js does not evolve that fast
116: [08:41:49] <wmk> all the libs and frameworks do.
117: [08:42:14] <wmk> but a good general understanding of js / fp is good
118: [08:42:20] <wmk> imho
119: [08:45:28] <WilsonG> agree
120: [08:45:45] <wmk> WilsonG, afaik all his books are on github, free for personal use
121: [08:46:11] <wmk> even that functional one...
122: [08:47:10] <WilsonG> https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f#.xr69w5oan this article made me smile
123: [08:47:19] <wmk> yup
124: [08:49:08] <WilsonG> I follow some of the trending js framework groups in facebook and I have feeling that every week there is a new framework/lib is made ;D
125: [08:54:30] <zippy> yerp
126: [09:20:50] <leomeloxp> A counter argument to that funny JS post: http://www.macwright.org/2016/10/04/everything-is-fine-with-javascript.html ;)
127: [09:42:52] * pweh quit (Ping timeout: 260 seconds)
128: [09:48:16] * ss32noob has joined #silverstripe
129: [10:04:37] * cheddam_ has joined #silverstripe
130: [10:06:05] * cheddam quit (Ping timeout: 244 seconds)
131: [10:07:06] * Shrike_Finland has joined #silverstripe
132: [10:07:22] * DimiStripe has joined #silverstripe
133: [10:46:48] <zippy> Anyone used the Hasoneedit module with the siteconfig?
134: [10:46:55] <zippy> The updateform doesn't seem to be getting hooked...
135: [10:47:18] * cupcake quit (Quit: Page closed)
136: [10:47:32] * cupcake has joined #silverstripe
137: [10:50:30] <cupcake> wmk swaiba
138: [10:51:40] <wmk> cupcake, ☺/ wassup?
139: [10:52:01] <swaiba> ola cupcake
140: [10:52:02] <wmk> zippy, good question... only used it with other DOs yet
141: [10:52:13] <cupcake> same old same old :)
142: [10:52:18] <cupcake> how are you guys?
143: [10:52:30] <swaiba> another day, another set of problems
144: [10:52:30] <zippy> yea, the updateEditForm method in the extension is not running...
145: [10:52:39] <cupcake> haha swaiba totally agree :)
146: [10:53:29] <wmk> zippy, maybe SiteConfig isn'T calling it?
147: [10:53:36] <zippy> yea..
148: [10:53:41] <zippy> https://github.com/stevie-mayhew/hasoneedit#using-with-your-own-form I think it has something to do with that
149: [10:53:57] <wmk> i just wonder why code on another project works... or where this data in template is coming from... Recoursive Search doesn't show me anything
150: [10:54:12] <zippy> so I will add it to SiteConfigLeftAndMain
151: [10:55:07] <wmk> aah... found it... who didn't remove this unused code?
152: [10:55:11] * wmk looks in a mirror
153: [10:58:33] <cupcake> wmk swaiba question: i have tabs on a page and within the second page i have a form, on submit i have some validaton however when validation fails it redirects me to the first tab and not the second tab where the form is ... any idea how i can set a specific url to be redirected to if validation fails?
154: [10:58:46] <zippy> yeap, adding the extension sgn_hasoneedit_UpdateFormExtension to SiteConfigLeftAndMain seems to do the trick
155: [10:59:06] <wmk> zippy, cool.
156: [10:59:24] <swaiba> i think that is a platform issue I raised long ago cupcake
157: [10:59:42] <cupcake> aha
158: [10:59:42] <swaiba> TBH I'd hope it's fixe and I don't recall it recently, what version are we talking?
159: [10:59:42] <wmk> swaiba, isn't there a cookie for the current tab?
160: [11:00:06] <wmk> in the past when you've been in a tab and went to antother page you were also in this tab
161: [11:00:08] <wmk> iirc
162: [11:00:25] * Shrike_Finland quit (Quit: Leaving.)
163: [11:01:30] <cupcake> 3.1 swaiba
164: [11:06:34] <swaiba> maybe try v3.4.1 cupcake ?
165: [11:07:22] <cupcake> yeh i can but this is a messy site which got handovered it might break quite some stuff :) but i can try
166: [11:09:40] <swaiba> if it works on new install then you know it's fixed
167: [11:09:50] <swaiba> then search the pull requests to see what fixed it
168: [11:10:01] <cupcake> yep thanks swaiba
169: [11:10:31] <kinglozzer> cupcake: On Page, or DataObject?
170: [11:10:36] <kinglozzer> This may be related: https://github.com/silverstripe/silverstripe-framework/pull/5412
171: [11:11:08] <kinglozzer> It says DataObject, but I think it'll apply to pages too as they use the same tabset api
172: [11:11:28] <cupcake> its not backend though
173: [11:11:47] <kinglozzer> Ohhh, I see
174: [11:11:52] <cupcake> jquery tabs
175: [11:11:55] <cupcake> front end
176: [11:12:03] <kinglozzer> Yeah you'll need to implement that yourself if it's frontend
177: [11:12:08] <cupcake> yeh
178: [11:12:15] <cupcake> will investigate
179: [11:12:35] <kinglozzer> You could copy that approach though maybe
180: [11:15:53] * pweh has joined #silverstripe
181: [11:19:01] * ss32noob quit (Ping timeout: 260 seconds)
182: [11:25:42] * Shrike_Finland has joined #silverstripe
183: [11:42:30] <lerni> leomeloxp: great article
184: [11:47:51] <wmk> yup
185: [11:51:50] * ss32noob has joined #silverstripe
186: [11:51:54] <ss32noob> lol cupcake for the messy site :D
187: [11:52:17] <ss32noob> you fix something, you break another thing
188: [11:52:17] <ss32noob> :P
189: [11:52:50] <cupcake> ss32noob i think u need some good luck :D
190: [11:52:56] <swaiba> http://i.imgur.com/YOmDuDV.jpg
191: [11:53:23] <cupcake> haha swaiba
192: [11:53:26] <wmk> swaiba, oh, i guess you need a big package of nails..?
193: [11:53:44] <cupcake> a nail in my knee please haha
194: [11:53:51] <swaiba> wmk I'll take 99 please, no wait, make that 127...
195: [11:54:23] <wmk> ;)
196: [11:54:57] <ss32noob> cupcake, you have to pray before you start to open your IDE and change something in the code
197: [11:55:10] <swaiba> or have units tests...
198: [11:59:16] * Mike123 quit (Ping timeout: 260 seconds)
199: [12:21:14] * UndefinedOffset has joined #silverstripe
200: [12:38:17] * pweh quit (Read error: Connection reset by peer)
201: [12:48:26] * zippy quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
202: [12:49:36] * darianno quit (Ping timeout: 260 seconds)
203: [12:53:05] * zippy has joined #silverstripe
204: [12:53:08] * zippy quit (Client Quit)
205: [12:57:28] * cheddam_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
206: [13:01:52] * micmania1 has joined #silverstripe
207: [13:06:11] * micmania1 quit (Ping timeout: 250 seconds)
208: [13:28:47] * arnhoe has joined #silverstripe
209: [13:29:24] <arnhoe> kinglozzer: Any idea why multiselectfield is not showing any entries while their are plently available? Does it only work with DataObjects not Page?
210: [13:30:27] <kinglozzer> arnhoe: It does work with pages too
211: [13:30:48] <kinglozzer> Can you paste your code somewhere?
212: [13:31:45] * r3v3rb has joined #silverstripe
213: [13:31:48] <r3v3rb> hello
214: [13:31:55] <kinglozzer> \o r3v3rb
215: [13:32:25] <arnhoe> http://www.sspaste.com/paste/show/5808c7562b0a9
216: [13:32:37] <r3v3rb> kinglozzer, how can I remove the 'save' 'save and close' and delete buttons on a record? is it getEditForm for each dataobject?
217: [13:32:40] <arnhoe> and added many_many on ProductPage
218: [13:33:10] <r3v3rb> nope CMSActions()
219: [13:34:02] <kinglozzer> arnhoe: Try changing your many_many_extraFields to 'SortOrder' instead of 'Sort'
220: [13:34:14] <kinglozzer> IIRC, 'Sort' conflicts with the default 'Sort' column on SiteTree
221: [13:34:27] <arnhoe> oke, and I need to change the holder to ProductPages
222: [13:34:30] <arnhoe> I see
223: [13:34:32] <kinglozzer> r3v3rb: Implement canEdit/canDelete?
224: [13:34:57] <r3v3rb> kinglozzer, i have those so yeh I could
225: [13:35:00] <kinglozzer> You can alter the edit form directly if you need to r3v3rb
226: [13:35:03] <r3v3rb> its just for one member
227: [13:35:39] <arnhoe> kinglozzer: still empty (after dev/build obv)
228: [13:36:08] <kinglozzer> r3v3rb: https://gist.github.com/kinglozzer/8c14cfd1108ad27380f7
229: [13:36:24] <kinglozzer> Something like that might work
230: [13:37:23] <r3v3rb> kinglozzer, that's for the gridfield though no? not the individual DO
231: [13:37:45] <kinglozzer> arnhoe: I can't spot anything wrong with your example, I'd suggest debugging MultiSelectField::__construct() to find out why the "source" is empty
232: [13:38:02] <arnhoe> oke, will do
233: [13:38:03] <r3v3rb> im doing http://hastebin.com/himetezeva.php
234: [13:38:03] <kinglozzer> r3v3rb: The 'itemeditform' is the form to edit an individual DataObject
235: [13:38:16] <lerni> I'm try to get all DataObjects that have the FluentExtension. Looping over array_keys(SS_ClassLoader::instance()->getManifest()->getClasses()) and than ClassInfo::class_name($Class) fails with CliDebugView since it requires PHPUnit. Any Ideas for an other/better approach?
236: [13:38:17] <r3v3rb> gotcha kinglozzer
237: [13:38:20] <kinglozzer> So once you're in that callback, you're editing the form
238: [13:38:53] <kinglozzer> r3v3rb: So you could do if ($form->getRecord()->Name == 'admin')
239: [13:39:02] <kinglozzer> Or email, even
240: [13:39:03] * Shrike_Finland quit (Quit: Leaving.)
241: [13:39:43] <r3v3rb> kinglozzer, lemme try that
242: [13:39:55] <kinglozzer> lerni: ClassInfo::subclassesFor('DataObject'); ?
243: [13:40:10] <r3v3rb> could do with being an extension too, so i can throw it on all DO's that require idiot proofing
244: [13:42:14] <lerni> kinglozzer: mhh don't know why I just missed that - yes, works thank you!
245: [13:42:55] <lerni> now I'll go with hasExtension
246: [13:45:06] * wmk quit (Quit: Leaving)
247: [13:45:08] <r3v3rb> kinglozzer, gist != working $self use of undefined etc
248: [13:45:20] <kinglozzer> yeah I spotted that r3v3rb, you can just remove it
249: [13:45:27] <kinglozzer> The use ($self) bit
250: [13:45:29] <r3v3rb> :P
251: [13:45:45] <kinglozzer> It's only a PHP 5.3 hack anyway ($self = $this; as you can't use $this inside closures)
252: [13:45:52] <kinglozzer> or 5.4, can't remember
253: [13:46:14] <r3v3rb> sure.
254: [13:47:17] <r3v3rb> time to debug, makes no difference to Actions form
255: [13:48:40] <r3v3rb> hmm, fields returning null from getComponent
256: [13:53:24] <kinglozzer> r3v3rb: Hm?
257: [13:53:35] <kinglozzer> Confuzzled
258: [13:54:05] <r3v3rb> me too
259: [13:54:26] <r3v3rb> gridfield returns data, detailsform is there but no fields are returned
260: [13:55:00] <kinglozzer> r3v3rb: No fields are returned inside the callback?
261: [13:55:07] <kinglozzer> $form->Fields() ?
262: [13:55:56] <r3v3rb> $form->Actions() no...
263: [13:56:44] <r3v3rb> never gets into it as $detailsform contains no fields
264: [13:57:09] <r3v3rb> so nothing to pass into setItemEditFormCallback
265: [13:57:18] <kinglozzer> r3v3rb: Eh? Paste me up
266: [13:58:23] <r3v3rb> hastbin.com/oduzabocif.php
267: [13:58:34] <r3v3rb> hastebin.com/oduzabocif.php
268: [13:58:35] <r3v3rb> even
269: [13:59:58] * arnhoe quit ()
270: [14:00:50] <kinglozzer> r3v3rb: So you mean $form->Fields()->dataFieldByName('Category'); is empty?
271: [14:09:36] <r3v3rb> no that has the fields
272: [14:09:58] * terryapodaca has joined #silverstripe
273: [14:10:28] <terryapodaca> Hey everyone o/
274: [14:10:40] * cupcake quit (Quit: Page closed)
275: [14:10:56] * cupcake has joined #silverstripe
276: [14:11:04] <terryapodaca> I know this is doable, and I have done this before, but I need the same or similar functionality as the Redirector Page (type)
277: [14:11:40] <terryapodaca> where the person using the CMS can select either a page on the site or an have the text box switch for an external site.
278: [14:11:59] <r3v3rb> bbiam
279: [14:11:59] <terryapodaca> I just can't remember where I did that...
280: [14:13:16] <kinglozzer> terryapodaca: This? https://www.bigfork.co.uk/takeaway/a-beginners-introduction-to-using-entwine-in-silverstripe :D
281: [14:13:23] <kinglozzer> https://github.com/kinglozzer/ss-entwine-tut/tree/3.2
282: [14:15:35] <terryapodaca> I believe that is is kinglozzer!
283: [14:15:36] <terryapodaca> thanks
284: [14:29:44] <r3v3rb> kinglozzer, I could do with a react one
285: [14:32:28] * muskie9 has joined #silverstripe
286: [14:33:35] <r3v3rb> muskie9, :)
287: [14:33:43] <muskie9> r3v3rb o/
288: [14:34:29] <r3v3rb> \o
289: [14:38:12] <r3v3rb> kinglozzer, $gridfield = $form->Fields()->dataFieldByName() returns the gridfield
290: [14:40:13] <kinglozzer> yep r3v3rb
291: [14:40:59] <slievr> wooo react
292: [14:42:22] <r3v3rb> $detailform = template: GridFieldDetailForm, name: DetailForm, fields: null, validator: null, itemEditFormCallback: this: cannot get property, closure: cannot get property
293: [14:42:36] <r3v3rb> slievr, react to this - entwine foreva!
294: [14:43:27] <kinglozzer> r3v3rb: I don't understand
295: [14:43:40] <kinglozzer> You're getting a "cannot get property" error?
296: [14:43:46] <r3v3rb> i am
297: [14:44:05] <kinglozzer> When you run it? Or is that xdebug or something?
298: [14:44:10] <r3v3rb> xdebug
299: [14:44:23] <kinglozzer> Right, screw xdebug :P
300: [14:44:27] <kinglozzer> What happens when you run it?
301: [14:44:32] <r3v3rb> running it just returns the page with all form fields
302: [14:45:10] <kinglozzer> Yeah, but it should've removed the "save" action ?
303: [14:45:27] <r3v3rb> is it because the permission check takes place after the editform so the actiosn get reinstated
304: [14:45:34] <r3v3rb> no save button is still there
305: [14:45:58] <kinglozzer> r3v3rb: I'm pretty sure the callback is called after
306: [14:46:01] <kinglozzer> How about 'action_doSave' ?
307: [14:46:18] <kinglozzer> I think they're all prefixed with do
308: [14:47:00] <r3v3rb> not save, action_doSaveAndClose action_do_Delete
309: [14:47:34] <r3v3rb> doSaveAndQuit even
310: [14:47:36] <kinglozzer> Oh boy, you're running betterbuttons? didn't know that :P
311: [14:47:55] <kinglozzer> Yeah idk what those action names are ><
312: [14:48:54] <kinglozzer> Right, you're correct - betterbuttons adds those *after* the callback is called. Sorry, didn't realise you were using it :P
313: [14:49:20] <r3v3rb> doh!
314: [14:49:30] <kinglozzer> You can add your own extension hook that calls updateItemEditForm() and removes them after betterbuttons has added them? https://github.com/unclecheese/silverstripe-gridfield-betterbuttons/blob/master/code/extensions/GridFieldBetterButtonsItemRequest.php#L87
315: [14:49:35] <r3v3rb> kinglozzer, i can override getBetterButtonsActions
316: [14:49:40] <kinglozzer> Oh, nice
317: [14:59:12] <r3v3rb> hmm, not quite so easy - there appears to be no apparent way to remove the buggers!
318: [15:02:06] * UndefinedOffset quit (Quit: Leaving.)
319: [15:02:14] * WilsonG has left #silverstripe
320: [15:08:05] <r3v3rb> damn it - i only used better buttons to create a nice download pdf option in the records
321: [15:08:16] <r3v3rb> now it's biting me in the bum!
322: [15:16:27] * UndefinedOffset has joined #silverstripe
323: [15:25:31] * Frans_Amsterdam quit (Quit: Textual IRC Client: www.textualapp.com)
324: [15:39:15] <slievr> r3v3rb: You a diehard entwine fan?
325: [15:56:32] * lerni quit (Remote host closed the connection)
326: [15:56:58] * lerni has joined #silverstripe
327: [15:59:21] * samsam has joined #silverstripe
328: [16:01:35] * lerni quit (Ping timeout: 256 seconds)
329: [16:01:52] * lerni has joined #silverstripe
330: [16:02:31] * ss32noob quit (Ping timeout: 260 seconds)
331: [16:06:15] * lerni quit (Ping timeout: 252 seconds)
332: [16:13:01] * samsam quit (Ping timeout: 260 seconds)
333: [16:25:59] * alias__ has joined #silverstripe
334: [16:26:01] <alias__> *alias
335: [16:27:57] <alias__> HI to all, i have a datObject which i loop to return its elements into the template. How to loop and return only the first element? Like in <% loop ImagesP %><img src="$Photo.URL"><% end_loop %> How to return the first images of the Photo has_many images?
336: [16:29:56] <kinglozzer> <% with ImagesP.First %><img src="$URL" /><% end_with %> ? alias__
337: [16:32:00] * kinglozzer quit ()
338: [16:33:06] <r3v3rb> sdli
339: [16:33:21] <r3v3rb> slievr, not really - but i just built a large product using it
340: [16:38:18] <alias__> kinglozzer: sounds good. Will try that tonight. That should return the first image of the array (has_many)?
341: [16:45:00] <muskie9> alias__ the first object of the has_many so you can access it's $Photo.URL
342: [16:52:12] <alias__> muski9: i must add that my dataObject has two items: one has_one $Text and one has_many $Photo. I want to return the first images of $Photo. Thanks!
343: [16:55:28] * janneklouman-- quit (Ping timeout: 245 seconds)
344: [17:06:10] <muskie9> ya, a has_one to Photo would just be $Photo.URL in his example rather than $URL
345: [17:06:17] <muskie9> I think
346: [17:09:54] <alias__> muskie9: the $Photo object is within a has_many, as i can have as many pictures i want in a project. But for the menu, i need only the first image of the has_many $Photo
347: [17:11:56] * lerni has joined #silverstripe
348: [17:22:23] * lerni quit ()
349: [17:43:45] * r3v3rb quit (Quit: Leaving)
350: [17:46:37] * UndefinedOffset quit (Quit: Leaving.)
351: [18:03:37] * janneklouman-- has joined #silverstripe
352: [18:06:44] * janneklouman-- quit (Read error: Connection reset by peer)
353: [18:25:56] * janneklouman-- has joined #silverstripe
354: [18:28:16] * UndefinedOffset has joined #silverstripe
355: [18:46:12] * regina_ has joined #silverstripe
356: [18:46:12] <ss-helper> regina_: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
357: [18:47:13] <regina_> Hello, does anyone know how I could use permissions to disallow access for content authors to anything except their own pages?
358: [18:54:32] * Stomach has joined #silverstripe
359: [18:55:23] <muskie9> regina_ there is an older, unsupported module (might not work with 3.x) that added this sort of permissions... might be a good reference and to see how it was once done: https://github.com/silverstripe-archive/silverstripe-peruseraccess
360: [18:56:56] <Zauberfisch> regina_: muskie9: shouldn't that be pretty straight forward? Just save an OwnerID to each page (the ID of the member who created it) and then:
361: [18:58:15] <Zauberfisch> public function canEdit($member = null) { if (is_null($member)) { $member = Member::current_user(); } return $member && $member->ID == $this->OwnerID; }
362: [18:58:42] <Zauberfisch> or rather:
363: [18:58:44] <Zauberfisch> public function canEdit($member = null) { if (is_null($member)) { $member = Member::current_user(); } return $member && $member->ID == $this->OwnerID && parent::canEdit($member); }
364: [19:03:36] * micmania1 has joined #silverstripe
365: [19:04:51] <muskie9> Zauberfisch yup
366: [19:05:37] * gelignite has joined #silverstripe
367: [19:08:10] * micmania1 quit (Ping timeout: 250 seconds)
368: [19:12:41] <regina_> Thanks Zauberfisch, yeah I guess I'll roll one.
369: [19:13:06] <regina_> I'll also have to write some rules for admins and editors.
370: [19:13:15] <regina_> It's a pity that module didn't get moved to 3.
371: [19:30:35] <alias__> kinglozzer: can you confirm? the $Photo object is within a has_many, as i can have as many pictures i want in a project. But for the menu, i need only the first image of the has_many $Photo. So will <% with ImagesP.First %><img src="$URL" /><% end_with %> work? Thaks
372: [19:36:57] * janneklouman-- quit (Read error: Connection reset by peer)
373: [19:42:43] * janneklouman-- has joined #silverstripe
374: [19:51:00] <alias__> kinglozzer: or any other?
375: [19:57:05] * regina_ quit (Quit: Page closed)
376: [20:00:31] * Stomach quit (Quit: bye)
377: [20:02:40] * Stomach has joined #silverstripe
378: [20:14:54] * Stomach quit (Ping timeout: 250 seconds)
379: [20:24:59] * sminnee_ has joined #silverstripe
380: [20:29:44] * UndefinedOffset quit (Quit: Leaving.)
381: [20:36:14] * Stomach has joined #silverstripe
382: [20:46:46] * regina_ has joined #silverstripe
383: [20:48:19] <regina_> Thanks Zaub! That helped a lot.
384: [20:48:31] <regina_> I have another twister.
385: [20:49:00] <regina_> I'm using https://github.com/ajshort/silverstripe-memberprofiles/ and the show command for a profile uses a member ID.
386: [20:49:16] <regina_> As opposed to say.. a firstname.
387: [20:54:11] * regina_ quit (Ping timeout: 260 seconds)
388: [20:55:06] * Stomach quit (Quit: zzz)
389: [20:55:21] * Anytech has joined #silverstripe
390: [20:57:49] * Stomach has joined #silverstripe
391: [20:58:06] * alias__ quit (Quit: Page closed)
392: [21:00:40] <ss-helper> VOTE: php-intl as a SilverStripe 4 dependency - https://groups.google.com/d/msg/silverstripe-dev/pjLGqmfeifo/lYviY_zaBgAJ
393: [21:07:15] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
394: [21:07:27] * Stomach quit (Quit: zzz)
395: [21:11:12] * janneklouman-- quit (Ping timeout: 260 seconds)
396: [21:11:34] * micmania1 has joined #silverstripe
397: [21:22:38] * janneklouman-- has joined #silverstripe
398: [21:29:22] * Stomach has joined #silverstripe
399: [21:37:21] * Anytech quit (Ping timeout: 260 seconds)
400: [21:48:14] * micmania1 quit (Quit: micmania1)
401: [21:52:37] * sminnee_ quit (Ping timeout: 260 seconds)
402: [21:52:44] * cheddam has joined #silverstripe
403: [21:57:22] * micmania1 has joined #silverstripe
404: [22:04:01] * spronk has joined #silverstripe
405: [22:04:09] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
406: [22:19:58] * samsam has joined #silverstripe
407: [22:26:09] * DanaeNZ has joined #silverstripe
408: [22:26:12] * Phlunk3 has joined #silverstripe
409: [22:28:10] <DanaeNZ> Anyone have any "Call to a member function comparisonClause() on null" when viewing the staging url of their site (?stage=Stage)
410: [22:28:31] <DanaeNZ> It seems to be a recent development on any sites here that I haven't set up myself
411: [22:28:35] <DanaeNZ> which might be a clue
412: [22:32:22] <DanaeNZ> Appears to be throwing this error when it gets the DB connection
413: [22:32:33] <DanaeNZ> Right here: framework/search/filters/ExactMatchFilter.php:34
414: [22:37:16] <DanaeNZ> It isn't listing any current DB connections. This is only in "live" mode
415: [22:38:14] * janneklouman-- quit (Read error: Connection reset by peer)
416: [22:38:36] * samsam quit (Ping timeout: 260 seconds)
417: [22:42:57] * Stomach quit (Quit: zzz)
418: [22:44:01] * janneklouman-- has joined #silverstripe
419: [22:47:28] * Stomach has joined #silverstripe
420: [22:51:16] <DanaeNZ> nvm it was a thirdparty module
421: [22:51:32] <ss23> yay solved!
422: [22:51:36] <ss23> Together, us on IRC can solve anything
423: [22:51:36] <ss23> :)
424: [22:52:01] <DanaeNZ> lmao
425: [22:55:06] * Phlunk3 quit (Remote host closed the connection)
426: [22:56:45] * sminnee_ has joined #silverstripe
427: [23:00:02] * ss-helper quit (Remote host closed the connection)
428: [23:00:18] * ss-helper has joined #silverstripe
429: [23:09:43] * Azure|dc is now known as Azure
430: [23:10:34] * micmania1 quit (Quit: micmania1)
431: [23:24:54] * sminnee_ quit (Quit: sminnee_)
432: [23:29:15] * DimiStripe quit (Read error: Connection reset by peer)
433: [23:29:28] * DimiStripe has joined #silverstripe
434: [23:36:53] * Stomach quit (Quit: zzz)
435: [23:51:57] * sminnee_ has joined #silverstripe

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