#silverstripe IRC Log

IRC log for 11 August 2016

All timestamps are in UTC.

1: [00:00:02] * ss-helper quit (Remote host closed the connection)
2: [00:00:16] * ss-helper has joined #silverstripe
3: [00:11:30] * Nightjar quit (Ping timeout: 265 seconds)
4: [00:28:56] * micmania1 quit (Quit: micmania1)
5: [00:36:15] * UncleCheese quit (Ping timeout: 276 seconds)
6: [00:45:03] <ss-helper> Re: [silverstripe-dev] Re: is there any code for extracting private statics - https://groups.google.com/d/msg/silverstripe-dev/_kcqw09oLI4/buE5cIO3BwAJ
7: [00:50:00] * spronk has joined #silverstripe
8: [00:50:51] * Stomach quit (Read error: Connection reset by peer)
9: [00:51:27] * Stomach has joined #silverstripe
10: [00:57:23] <spronk> ughh
11: [00:57:26] * spronk sends PNGs
12: [00:57:43] <spronk> "can you send it to me in a PDF? I can't download these and send them on"
13: [00:58:03] <spronk> LEARN HOW COMPUTER
14: [00:58:21] <Hailwood> It's like "Hi, can you please update the DNS records, here's a PNG of the new settings.
15: [00:58:25] <spronk> lawl
16: [00:58:26] <spronk> yeah
17: [00:58:34] <Hailwood> Every.god.damn.time.
18: [00:58:50] <Hailwood> And then they cry if their email goes down because of a typo ha
19: [01:01:17] <spronk> yeah
20: [01:04:32] * micmania1 has joined #silverstripe
21: [01:09:51] * Stomach quit (Read error: Connection reset by peer)
22: [01:10:29] * Azure quit (Quit: My Mac has gone to sleep. ZZZzzz…)
23: [01:10:31] * Stomach has joined #silverstripe
24: [01:15:47] * Azure has joined #silverstripe
25: [01:17:43] * Stomach quit (Ping timeout: 265 seconds)
26: [01:20:04] * Stomach has joined #silverstripe
27: [01:29:10] <DanaeNZ> mmmmm there is home baking here
28: [01:29:19] * DanaeNZ noms on a biscuit
29: [01:29:19] <spronk> nommmm
30: [01:29:31] <DanaeNZ> I don't even need to go get lunch
31: [01:29:34] <DanaeNZ> just eat baking
32: [01:29:38] <DanaeNZ> sounds healthy
33: [01:30:42] <spronk> :D
34: [01:30:45] <spronk> sounds fine
35: [01:30:48] * spronk gives his approval
36: [01:39:17] * Kolin_ has joined #silverstripe
37: [01:39:17] * Kolin_ quit (Client Quit)
38: [01:44:37] * Stomach quit (Quit: zzz)
39: [01:46:35] * metaspike has joined #silverstripe
40: [01:48:58] <metaspike> cannot get errors to show properly, all I get is that little black popup in the cms and nothing when using SS_Log, or with error_reporting(E_ALL), dev mode set with SS_ENVIRONMENT_TYPE / with the director, although full debugging options set in php.ini I get no debug info for error or reason there is no debug info and flags like isDev etc do nothing as well...
41: [01:49:10] <metaspike> ugh :[
42: [01:50:23] <metaspike> i've debugged dozens of languages and cms environments, and honestly this is proving the most difficult because it's about as clear as mud exactly what is going wrong.
43: [01:51:32] <metaspike> or what needs to be set for some concise error messages - sometimes they display if I have the page on ?flush for some reason.
44: [01:54:50] <DanaeNZ> metaspike: have you looked at the Network tab in the browser?
45: [01:55:03] <DanaeNZ> It will show whatever the little black box is trying to show you
46: [01:55:14] <DanaeNZ> just click on the request that makes the error
47: [01:56:57] <metaspike> hey that's cool :) that will do for now thanks...
48: [02:03:01] * Nightjar has joined #silverstripe
49: [02:46:19] * Stomach has joined #silverstripe
50: [03:15:07] <ss-helper> Re: [silverstripe-dev] Re: is there any code for extracting private statics - https://groups.google.com/d/msg/silverstripe-dev/_kcqw09oLI4/XTv8CZe_BwAJ
51: [03:27:43] * spronk quit (Quit: I may need a longer sleep timer...)
52: [03:30:53] * adrexia_ quit (Quit: My Mac has gone to sleep. ZZZzzz…)
53: [03:46:46] * micmania1 quit (Quit: micmania1)
54: [03:49:51] * cloph quit (Ping timeout: 250 seconds)
55: [03:49:59] * micmania1 has joined #silverstripe
56: [03:54:48] * cloph_away has joined #silverstripe
57: [04:11:08] * Stomach quit (Quit: zzz)
58: [04:23:55] * spronk has joined #silverstripe
59: [04:27:04] * Azure quit (Ping timeout: 240 seconds)
60: [04:27:47] * Azure has joined #silverstripe
61: [04:33:58] * adrexia_ has joined #silverstripe
62: [04:34:53] * adrexia_ quit (Client Quit)
63: [04:45:07] <ss-helper> PayPal going live - Silverstripe omnipay - http://stackoverflow.com/questions/38887397/paypal-going-live-silverstripe-omnipay
64: [04:47:37] * Admonish has joined #silverstripe
65: [04:50:42] <Admonish> Hey guys, So I am looking into different modules that will allow me to create a RESTful API easier. So far I have come accross four modules and only two am I really considering (those being silverstripe-restfulapi and silverstripe-restfulserver) and I was wondering if anyone has used either or even both of these and could give me some advice
66: [04:54:22] <Kingy> morning
67: [04:56:44] <Admonish> Good morning to you as well
68: [04:57:33] <Admonish> Its about 11pm here, but I imagine over there its bright and early
69: [05:00:08] <Admonish> Has anyone here used colymba's silverstripe-restfulapi addon? And if so, would you recommend others use it for RESTful API development
70: [05:02:15] <Admonish> Oh and another thing. Im still running SS 3.1 on my sites as when I tried to upgrade to 3.3 a while back I found that many of the addons no longer worked. Can someone please tell me if that is still the case?
71: [05:22:50] <Kingy> Admonish: 8am where I am :)
72: [05:23:21] <Kingy> Admonish: We're running the API addon here, works pretty well for us, so yep I can reccomend it
73: [05:24:59] <Admonish> Kingy Is there anything I should be aware of from the start before diving in and using that module? Are there any issues or bugs that you are aware of that I might have to watch out for?
74: [05:25:41] <Admonish> Kingy 8am that must put you somewhere in europe im guessing?
75: [05:27:03] <spronk> fuck douglas crockford for thinking json shouldn't allow comments.
76: [05:30:17] <Admonish> :o
77: [05:33:08] <Admonish> It is pretty annoying
78: [05:40:10] * Nightjar quit (Ping timeout: 265 seconds)
79: [05:43:41] * Zauberfisch_ has joined #silverstripe
80: [05:48:39] * Zauberfisch quit (Ping timeout: 250 seconds)
81: [05:48:39] * Firesphere quit (Ping timeout: 250 seconds)
82: [05:49:02] * Zauberfisch_ is now known as Zauberfisch
83: [05:49:11] * Firesphere has joined #silverstripe
84: [05:49:20] * DanaeNZ quit (Quit: TIME TO FEED)
85: [05:52:03] * micmania1 quit (Quit: micmania1)
86: [06:25:03] * micmania1 has joined #silverstripe
87: [06:37:45] * micmania1 quit (Quit: micmania1)
88: [06:44:08] * spronk quit (Quit: I may need a longer sleep timer...)
89: [06:44:47] * micmania1 has joined #silverstripe
90: [06:45:05] * lerni has joined #silverstripe
91: [07:00:09] <ss-helper> Add JS page to SilverStripe [closed] - http://stackoverflow.com/questions/38665586/add-js-page-to-silverstripe
92: [07:03:55] <Kingy> Admonish: Sorry my notifications aren't set up properly. Ideally you'd try it in a test environment first to make sure it does what you want, but we've had a pretty seemless integration with it. No major gotchas or anything that I noticed. Takes a bit of tinkering
93: [07:09:26] <Admonish> Kingy That sounds good :D The less gotchas the better
94: [07:09:32] <Admonish> Thanks for the help
95: [07:09:54] <Kingy> No problem
96: [07:11:35] * arnhoe has joined #silverstripe
97: [07:22:04] <Admonish> Well its 1 20 am here
98: [07:22:08] <Admonish> Im gonna go to bed
99: [07:22:24] <Admonish> happy coding yall
100: [07:22:44] * Admonish quit (Quit: Going offline, see ya! (www.adiirc.com))
101: [07:54:17] * deschebbs has joined #silverstripe
102: [07:54:38] * kinglozzer has joined #silverstripe
103: [07:56:50] * micmania1 quit (Quit: micmania1)
104: [07:58:04] * Misagh90 has joined #silverstripe
105: [07:58:05] <ss-helper> Misagh90: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
106: [07:58:15] * swaiba has joined #silverstripe
107: [08:05:28] * keroberos has joined #silverstripe
108: [08:07:25] * kerozene quit (Ping timeout: 252 seconds)
109: [08:09:30] <Misagh90> Hi, Is there any snippet code or module to generate Tracking ID for every Submissions has finished on Silverstripe Userforms?!?
110: [08:12:50] * micmania1 has joined #silverstripe
111: [08:13:35] <swaiba> Misagh90 - how about you hash the ID of the submission?
112: [08:16:22] <Misagh90> i'm not a developer and i don't know how to do this
113: [08:17:06] <Misagh90> how to call even ID of the submission
114: [08:17:53] <swaiba> Misagh90 well I'm not here to teach you how to be a developer lol
115: [08:17:55] <Misagh90> in front, end after sending the submission
116: [08:18:20] <Kingy> swaiba: :D
117: [08:18:38] <swaiba> start at the beginning and work your way through... http://www.silverstripe.org/learn/lessons/
118: [08:19:05] <Misagh90> i know how to call a page ID
119: [08:19:32] <swaiba> then you just need to apply that to the databojects in the user form module
120: [08:19:45] <swaiba> and build a controller to get that
121: [08:20:49] <Kingy> DB::getGeneratedID($table);
122: [08:22:12] <swaiba> Kingy i get that, but surely not... you'd not like to risk two completing at same times
123: [08:22:30] <Misagh90> ok, i'm going to try it
124: [08:22:58] <swaiba> best case is to ensure the session is getting the form just submitted
125: [08:24:02] * pweh has joined #silverstripe
126: [08:27:45] * brasileric has joined #silverstripe
127: [08:28:39] <brasileric> good morni
128: [08:29:42] <brasileric> is there a built in way to hide some page types or single pages from breadcrumbs?
129: [08:30:46] * agent44 has joined #silverstripe
130: [08:36:08] * Nightjar has joined #silverstripe
131: [08:37:57] <Misagh90> brasileric, make an BreadcrumbsTemplate.ss in your templates an then use <% if ClassName = $Classname %>
132: [08:40:56] * Nightjar quit (Ping timeout: 265 seconds)
133: [08:43:01] * pweh is now known as pwumble
134: [08:43:36] <brasileric> okay, thanks Misagh90
135: [08:46:53] * pweh has joined #silverstripe
136: [08:47:34] * pwumble quit (Ping timeout: 252 seconds)
137: [08:51:26] * adrexia quit (Ping timeout: 240 seconds)
138: [08:51:49] * Mike123 has joined #silverstripe
139: [08:55:34] * Misagh90 quit (Ping timeout: 250 seconds)
140: [08:58:45] <Mike123> hey guys
141: [08:59:03] <Mike123> how i can make my /home URLSegment different ?
142: [09:00:12] <ss-helper> Show filter-form in Silverstripe's ModelAdmin by default - http://stackoverflow.com/questions/38891694/show-filter-form-in-silverstripes-modeladmin-by-default
143: [09:00:12] <Mike123> i mean i dont want to have /home as Home url segment, when i enter the website like www.web.com i need so that my custom page would open
144: [09:28:45] * hewp has joined #silverstripe
145: [09:29:22] * pweh quit (Ping timeout: 252 seconds)
146: [10:06:22] * agent44 quit (Quit: zzz)
147: [10:07:49] * agent44 has joined #silverstripe
148: [10:14:55] * spronka has joined #silverstripe
149: [10:21:32] * Mike123 quit (Quit: Page closed)
150: [10:23:27] * micmania1 quit (Quit: micmania1)
151: [10:45:26] * agent44 quit (Quit: zzz)
152: [10:47:11] * agent44 has joined #silverstripe
153: [11:09:47] * janneklouman-- has joined #silverstripe
154: [11:13:52] * hewp quit (Ping timeout: 252 seconds)
155: [11:15:14] <ss-helper> SilverStripe Subsite module delete all related data on subsite deletion - http://stackoverflow.com/questions/38894813/silverstripe-subsite-module-delete-all-related-data-on-subsite-deletion
156: [11:15:18] * pweh has joined #silverstripe
157: [11:16:04] * spronka quit (Quit: My Mac has gone to sleep. ZZZzzz…)
158: [11:34:21] * gamma quit (Quit: WeeChat 1.5)
159: [11:39:54] * agent44 quit (Ping timeout: 276 seconds)
160: [11:40:59] * gamma has joined #silverstripe
161: [11:57:21] * janneklo1man-- has joined #silverstripe
162: [12:00:33] * janneklouman-- quit (Ping timeout: 265 seconds)
163: [12:01:31] <swaiba> can you describe the various "folder names" in the silverstripe-cache
164: [12:02:14] <swaiba> if public broswer the site it makes a folder of "xxx"
165: [12:04:31] * marvanni has joined #silverstripe
166: [12:18:28] * pweh quit (Read error: Connection reset by peer)
167: [12:26:07] * UndefinedOffset has joined #silverstripe
168: [12:34:02] * agent44 has joined #silverstripe
169: [12:41:52] * muskie9 has joined #silverstripe
170: [12:54:35] <kinglozzer> swaiba: Hmm? Those are user's aren't they?
171: [12:54:50] <kinglozzer> i.e. user accounts on the server
172: [13:04:32] * janneklo1man-- quit (Ping timeout: 240 seconds)
173: [13:04:56] * janneklouman-- has joined #silverstripe
174: [13:26:35] * elgabbu quit (*.net *.split)
175: [13:36:41] * kinglozzer quit (Read error: Connection reset by peer)
176: [13:36:49] * kinglozzer has joined #silverstripe
177: [14:03:23] * UndefinedOffset quit (Quit: Leaving.)
178: [14:19:46] * UndefinedOffset has joined #silverstripe
179: [14:25:00] * agent44 quit (Ping timeout: 276 seconds)
180: [14:26:34] * agent44 has joined #silverstripe
181: [14:40:43] * arnhoe quit ()
182: [14:41:39] * elgabbu has joined #silverstripe
183: [14:42:03] <elgabbu> hi, what is the best way to programatically change the page type of a page?
184: [14:44:05] <muskie9> elgabbu I would recommend digging into sitetree and other cms classes to see how they do it... depending on the differences between the page types, you'd need to account for migrating data to prevent it from being lost (if fields/relations are in a different table)
185: [14:50:13] * arnhoe has joined #silverstripe
186: [14:59:02] <swaiba> elgabbu I reckon it would be, change the class name, save, save to stage and then publish stage to live
187: [14:59:19] <swaiba> obviously also adding any new required data for the diffrent page type
188: [15:12:08] * lerni quit ()
189: [15:13:09] * arnhoe quit ()
190: [15:34:13] * deschebbs quit (Quit: Konversation terminated!)
191: [15:47:36] * vanny has joined #silverstripe
192: [15:48:43] <vanny> hi all, quick question about something I can't get my head around and I don't know why
193: [15:49:56] <vanny> how can I get a dataobject and I know it is unique, but return it so I can just use that one item. eg $groupon = GroupOn::get()->filter(array('Code' => $data['GroupOnCode']));
194: [15:50:36] <vanny> I know that will return one item, but to get details I have to loop over it, or then do a ->ById again once I know the record number
195: [15:50:59] <muskie9> vanny ->first()
196: [15:51:28] <vanny> so I could do $groupon->first()->Used
197: [15:51:40] <muskie9> yup
198: [15:51:47] <muskie9> or GroupOn::get()->filter(array('Code' => $data['GroupOnCode']))->first()->Used
199: [15:51:49] <muskie9> all in one line
200: [15:52:11] <vanny> ok cool, I need to reference i few more times, but that help heaps
201: [15:53:07] * adrexia has joined #silverstripe
202: [15:53:14] <vanny> how are you anyway muskie, I haven't been online much, so much work on
203: [15:53:47] <muskie9> same here... in the middle of moving and work's been picking up... so ready for things to slow down lol
204: [15:54:17] <vanny> i always say, im taking next two weeks off but never get a chance too. Problem is my hobbies are getting neglected
205: [15:54:42] <muskie9> gotta make time for the hobbies, or they're not hobbies ;P
206: [15:55:04] <vanny> mine is expensive, thinking about paying someone to do it for me.
207: [15:55:10] <muskie9> lol
208: [15:55:36] <vanny> then i'll just need money to put gas in it :P
209: [15:56:08] <kinglozzer> vanny: Automotive?
210: [15:56:24] <vanny> yep. 69 Fairlane Convertible
211: [15:56:44] <kinglozzer> I just got screwed by BMW for my car...
212: [15:56:45] <kinglozzer> Nice!
213: [15:56:58] <kinglozzer> New clutch + flywheel, £3100 D:
214: [15:57:09] <vanny> wow. Thats like 5K US
215: [15:57:29] <kinglozzer> Yup, the infamous "M tax" :(
216: [15:57:37] <swaiba> vanny isn't it worse than that now with brexit
217: [15:58:24] <vanny> that might be true
218: [15:58:40] <vanny> i just want to turn octanes into noise
219: [15:58:52] <vanny> wake up the neighborhood
220: [15:59:46] <kinglozzer> vanny: V8 noise?
221: [15:59:49] <kinglozzer> :D
222: [16:00:10] <kinglozzer> I really want to buy a project car
223: [16:00:17] <kinglozzer> But I know I'd neglect it :P
224: [16:00:24] <vanny> yep. it is all stock right now, but i have plans, but they outweight my budget.
225: [16:00:36] <vanny> it is also reasonable rare, only 2500 made
226: [16:00:46] <vanny> so parts are a little harder to find
227: [16:02:39] <swaiba> I don't have a car ATM, I'm hoping next car I buy is electric
228: [16:02:53] <swaiba> and they don't make any sound at "I've heard"
229: [16:03:18] <kinglozzer> swaiba: Tesla?
230: [16:03:24] <vanny> as soon as they work out how to charge an electric car in 3 minutes, it will be the end. so much more power than the gasoline
231: [16:03:29] <swaiba> with ludacrious mode :)
232: [16:03:42] <vanny> there are a few teslas in my neighborhood, nextdoor had a nissan leaf
233: [16:04:19] <vanny> unfortunately, it couldn't make the round trip to their office and back (74 miles) without a charge during the day, its range was 70 :P
234: [16:04:33] <swaiba> yeah thats why I'm still waiting
235: [16:04:44] <swaiba> TBH I'd also want the full auto pilot too
236: [16:06:35] <kinglozzer> I'm still a long way off trusting that sort of technology with my life :P
237: [16:06:45] <vanny> not me, I see how often computers crash :P
238: [16:10:02] * janneklouman-- quit (Ping timeout: 258 seconds)
239: [16:10:37] * gelignite has joined #silverstripe
240: [16:25:50] <swaiba> yeah i know, doesn't stop me wanting it
241: [16:26:14] <swaiba> so I'll wait for ages, I don't even internet bank cos I don't trust banks and web devs lol
242: [16:27:26] * deschebbs has joined #silverstripe
243: [16:31:58] <kinglozzer> Gotta run, off on my holidays :D
244: [16:32:03] <kinglozzer> c'yall in a week or so <3
245: [16:32:03] * kinglozzer quit ()
246: [16:34:08] * swaiba quit (Remote host closed the connection)
247: [16:44:20] * deschebbs quit (Quit: Konversation terminated!)
248: [17:01:16] * brasileric quit (Remote host closed the connection)
249: [17:09:26] * agent44 quit (Quit: zzz)
250: [17:27:12] <AlphaCactus> Anyone got a nifty way to tell if an object is newly created in onAfterWrite
251: [17:27:59] <muskie9> if($this->Created == $this->LastEdited) ???
252: [17:28:14] <muskie9> not sure if those are exactly the same upon creation
253: [17:28:59] <AlphaCactus> hmm, good idea. It does appear they are identical in many cases
254: [17:38:18] * DimiStripe quit (Quit: DimiStripe)
255: [18:00:46] * vanny quit (Quit: Page closed)
256: [18:00:53] * metaspike quit (Ping timeout: 244 seconds)
257: [18:01:27] * DimiStripe has joined #silverstripe
258: [18:34:05] * marvanni quit (Quit: marvanni)
259: [18:36:19] * marvanni has joined #silverstripe
260: [19:25:18] * Nightjar has joined #silverstripe
261: [19:29:38] * Stomach has joined #silverstripe
262: [19:35:59] <Nightjar> !seen antmas
263: [19:35:59] <ss-helper> Nightjar: I last saw antmas 1 month ago
264: [19:35:59] <Audlex> Nightjar: I last saw antmas quiting 6wks 1day 15hrs 47mins 17secs ago with the message Quit: Page closed
265: [19:36:26] <Nightjar> welp, ok then.
266: [19:43:58] * muskie9 quit (Quit: My Mac has gone to sleep. ZZZzzz…)
267: [19:48:30] * DimiStripe quit (Quit: DimiStripe)
268: [19:49:21] * darjusIT has joined #silverstripe
269: [19:50:43] <darjusIT> Hi all is it posible to make own login page with custom design, and in that page controller use some function doLogin if is any?
270: [19:53:37] * muskie9 has joined #silverstripe
271: [19:55:13] <muskie9> is there a list if irc ! commands?
272: [19:55:15] <muskie9> !commands
273: [19:55:28] <muskie9> !allthecommands
274: [20:00:29] <darjusIT> Hi all is it posible to make own login page with custom design, and in that page controller use some function doLogin if is any?
275: [20:07:12] <Nightjar> !help
276: [20:07:12] <ss-helper> Please provide the version, full error message and relevant code. You can put the code in http://kopy.io/ or http://www.sspaste.com/ or https://gist.github.com/ and paste the link here.
277: [20:07:22] <Nightjar> darjusIT, yes.
278: [20:07:27] <Nightjar> of course :)
279: [20:07:36] <Nightjar> but, log in to what?
280: [20:07:45] * muskie9 quit (Ping timeout: 265 seconds)
281: [20:07:54] * UndefinedOffset quit (Quit: Leaving.)
282: [20:08:02] <Nightjar> if log in to SilverStripe, then just make a template for Layout/Security_login.ss
283: [20:08:06] <darjusIT> Nightjar login page I mean, maybe have example online?
284: [20:08:14] <darjusIT> nop
285: [20:08:25] * cloph_away is now known as cloph
286: [20:08:37] <Nightjar> darjusIT, how do you mean doLogin then?
287: [20:08:55] <darjusIT> I what also own function login in page controler so after login regiresct to diffrent url depending on user group
288: [20:10:20] <Nightjar> darjusIT, so, still logging into SilverStripe then?
289: [20:12:09] <darjusIT> yes, but having own url not /security/login but /users/login and in page function if logged in made redirect to specific page depending on user group
290: [20:14:42] <Nightjar> darjusIT, it's always Security/login
291: [20:14:53] <Nightjar> Security/login isn't specific to the CMS.
292: [20:15:09] <Nightjar> You can change the routing afterwards (after the logging in is done) to direct the user somewhere else
293: [20:16:08] <Nightjar> darjusIT, the Forum module has an example I believe
294: [20:16:33] <darjusIT> I think, I will try to take login function from framework and put it to controller of my page and this can help me to have link /users/login
295: [20:29:00] * Stomach quit (Quit: zzz)
296: [20:39:39] * Nightjar quit (Ping timeout: 265 seconds)
297: [20:50:47] * Nightjar has joined #silverstripe
298: [20:50:58] <Nightjar> darjusIT, that's... not wise.
299: [20:51:21] <darjusIT> I mena I will not take it out just copy
300: [20:52:17] <Nightjar> that's, arguably worse.
301: [20:52:17] * muskie9 has joined #silverstripe
302: [20:52:22] <darjusIT> my clients wants different links for login for example admin can use Security/login but users should use /users/login
303: [20:52:31] <Nightjar> that's, silly.
304: [20:52:46] <Nightjar> tell your client that they're wrong xD
305: [20:53:14] <Nightjar> darjusIT, in this case though, just make another route rule in the yaml config, and it's job done. No code copy needed.
306: [20:53:21] <Nightjar> No extra controller, etc.
307: [20:53:28] <darjusIT> for example this module has it own login url https://github.com/silverstripe-australia/silverstripe-memberprofiles
308: [20:53:40] <Nightjar> No, it uses the same login.
309: [20:53:44] <Nightjar> They all use the same log in.
310: [20:54:27] <Nightjar> Security/login is the login. They all use it.
311: [20:54:50] <Nightjar> just set a different ?BackURL=<your url encoded link here>
312: [20:55:33] <Nightjar> which is usually set via either security settings on a page, or in code via canView, or such.
313: [20:56:05] <Nightjar> darjusIT, in any case, if the URL is of the utmost importance (for some bizarre reason), then you can simply set a route.
314: [20:56:51] <Nightjar> https://docs.silverstripe.org/en/3.4/developer_guides/controllers/routing/
315: [20:56:58] <Nightjar> Director:
316: [20:57:01] <Nightjar> rules:
317: [20:57:38] <Nightjar> 'users//$Action': 'Security'
318: [20:57:44] <Nightjar> or something like that
319: [20:58:52] <Nightjar> copying the code will lead to hurt. It's not a simple function. You would also miss out on any and ALL security updates that affect that section of code.
320: [20:59:00] <Nightjar> So it's a security risk also.
321: [20:59:15] <Nightjar> not to mention incurring technical debt at an alarming rate.
322: [20:59:26] <Nightjar> I strongly recommend against it.
323: [21:00:15] <Nightjar> For simply changing the URL I suggest the route method, for example. It solves the problem :)
324: [21:03:42] <darjusIT> and after success login regirection by user groups where I can put?
325: [21:04:13] <Nightjar> Depends on ?BackURL
326: [21:04:30] <Nightjar> Security puts you wherever it points at.
327: [21:05:00] <darjusIT> so that thing put in form hidden?
328: [21:05:01] <Nightjar> Or maybe there's a default if it's not set, but I don't recall.
329: [21:05:13] <Nightjar> usually it's a get parameter on the URL.
330: [21:05:23] <Nightjar> but I think it might be able to be in the session too
331: [21:06:04] <darjusIT> hmm ok thx for tips
332: [21:06:21] <Nightjar> http://api.silverstripe.org/3.3/class-Security.html#_login
333: [21:07:04] <Nightjar> Security is quite configurable darjusIT - you just have to spend a bit of time to figure it out because the docs aren't all that good.
334: [21:08:32] <darjusIT> yeah, docs are lacking good examples, before Silverstripe I developed sites in codeigniter, that docs were awsome.
335: [21:08:42] <Nightjar> eg. you can change the form it uses. Eg. default is: http://api.silverstripe.org/3.3/class-MemberLoginForm.html
336: [21:09:03] <Nightjar> darjusIT, the docs were... alright, but code igniter itself is... horrible.
337: [21:09:09] <Nightjar> terrible even.
338: [21:09:33] <darjusIT> yes that why I came to Silverstripe
339: [21:09:39] <Nightjar> :)
340: [21:09:41] <Nightjar> I'm glad.
341: [21:10:00] <Nightjar> You're in Lithuania right?
342: [21:10:58] <darjusIT> I tried codeigniter, cakephp, fealphp, zend but framework side I like Silver for its simple and straight forward
343: [21:11:07] <darjusIT> yes I am Lithuanian
344: [21:12:04] <Nightjar> If you can, you should try and get to the SilverStripe EU conference. This year it will be in Slovenia, in the Ljubljana castle :)
345: [21:12:30] <Nightjar> You can meet lots of great people and learn heaps about SilverStripe :)
346: [21:13:40] <Nightjar> darjusIT, here is the way to direct a user to a default page without using ?BackURL
347: [21:13:41] <Nightjar> http://api.silverstripe.org/3.3/source-class-MemberLoginForm.html#227
348: [21:13:57] <Nightjar> you can set it via yaml
349: [21:14:06] <Nightjar> Security:
350: [21:14:17] <Nightjar> default_login_dest: 'link'
351: [21:14:56] <darjusIT> I will be next year, this its not possible sadly
352: [21:15:06] <Nightjar> That way if someone isn't trying to get to eg. /admin they'll always go to that page (unless ?BackURL is set - so still be sure to protect pages appropriately)
353: [21:15:25] <Nightjar> darjusIT, I understand. I have been the last 2 years but will not be able to this year either :(
354: [21:16:53] <darjusIT> I need to make redirection by user group client/broker/company all will have totaly diffrent interfaces
355: [21:20:20] <Nightjar> darjusIT, you can put that logic in the controller
356: [21:20:30] <Nightjar> ideally you want one controller
357: [21:20:47] <Nightjar> that will detect user type and either show relevant information, or redirect to the correct page.
358: [21:21:12] <darjusIT> you mean controller whitch redirect so sertain link?
359: [21:21:48] <darjusIT> it probably best idea for now :)
360: [21:21:50] <Nightjar> well if you set the default login dest, then that page can show different information based on what kind of user is viewing it.
361: [21:22:54] <Nightjar> eg. my-account/ could show ither client account info, broker account info, or company account info.
362: [21:23:56] <Nightjar> but if the URL is a major focus, then it could also redirect eg. brokers/$thatBroker, clients/$thatClient, companies/$companyName
363: [21:24:22] <darjusIT> One other thing I wantend to know about dataobjects in silvestripe if I have extra public function in databoject, when I making list in table of that dataobject rows, is every row loads all functions in dataobject even I dont call them?
364: [21:24:38] <Nightjar> where the variable is the name of that member's client/broker/company name
365: [21:24:58] <Nightjar> darjusIT, they're objects, so they're accessible, yes.
366: [21:25:41] <Nightjar> but in terms of memory occupation (not that you should worry about that with a high level script language), I believe the methods are loaded once and referred to by each object of that type.
367: [21:26:27] <darjusIT> so If I use orm to put data to rows in table then all extra functions will be loaded and will take more time to make sql, so its better to use raw SQL and execute it so it would not load extra functions?
368: [21:27:11] <Nightjar> in code igniter a returned object is (by default) nothing more than a keyed array.
369: [21:27:44] <Nightjar> so there is only ever information. You could change that so it'd make objects from that info, sure. But in SilverStripe a DataObject is an Object. Always.
370: [21:28:05] <Nightjar> No. It is not better to use raw SQL.
371: [21:29:00] <Nightjar> If you use a form you're generally creating a single object. Saving it is when it gets written. Functions are not written to a database, they're defined on the object.
372: [21:29:28] <darjusIT> because I have one project where are 500k rows in table I am paginating 25 on page and usig cache and orm but still its take about 11s to execute simple filter, I have putted all indexes by that fields but still sql execution on orm is long.
373: [21:29:42] <Nightjar> You don't need to (and shouldn't) worry about this, as functions are truely first class in PHP. They're not values, they're functions.
374: [21:30:21] <muskie9> darjusIT the orm also protects you from things that you'd otherwise have to account for in your queries
375: [21:30:29] <Nightjar> darjusIT, sounds like a slow query, or you're creating more queries than you think by accessing related objects on that dataobject.
376: [21:30:35] <Nightjar> for display in the table.
377: [21:31:18] <darjusIT> is any function on orm that prints raw query that orm is generating?
378: [21:31:20] <Nightjar> darjusIT, You can't really say one way or the other without doing a proper profile/debug.
379: [21:31:36] <Nightjar> darjusIT, ->sql()
380: [21:31:49] <darjusIT> cool thx I will use that
381: [21:33:02] <muskie9> also by adding ?showqueries=1 to a url I believe
382: [21:33:40] <Nightjar> darjusIT, ^ That is a far better idea actually, because it will show you how MANY queries you are doing.
383: [21:34:04] <darjusIT> nice
384: [21:34:05] <Nightjar> I think it's more likely you're accidentally performing some more complex things than you think (it's easy via ORM)
385: [21:34:06] <darjusIT> thx
386: [21:34:07] <darjusIT> :)
387: [21:34:31] <Nightjar> darjusIT, https://docs.silverstripe.org/en/3.4/developer_guides/debugging/url_variable_tools/
388: [21:34:36] <Nightjar> helps with debugging :)
389: [21:35:06] * marvanni quit (Ping timeout: 250 seconds)
390: [21:35:12] <darjusIT> thx
391: [21:35:32] * marvanni has joined #silverstripe
392: [21:39:54] * lietzmk has joined #silverstripe
393: [21:44:50] <lietzmk> Can someone please help me with looping through a field list in a template http://pastebin.com/kf3vHc6x
394: [21:45:30] * DanaeNZ has joined #silverstripe
395: [21:47:20] <DanaeNZ> ah, disco fever fridays
396: [21:47:26] <DanaeNZ> gg work playlist
397: [21:47:50] <lietzmk> Hi DanaeNZ
398: [21:47:58] <DanaeNZ> lietzmk: o/
399: [21:49:06] <muskie9> lietzmk you have to return a form with your field list: return Form::create($this, 'YourFormMethod', $fields, $actions = FieldList::create());
400: [21:49:55] <muskie9> then in your layout/template it's $YourFormMethod
401: [21:51:14] <Kingy> ss23 round?
402: [21:51:47] <Nightjar> Kingy, wouldn't count on it. Although he's been early recently It's still before 10am.
403: [21:51:58] <Kingy> lol
404: [21:52:00] <Kingy> almost 1am here
405: [21:52:03] <Kingy> waittttting
406: [21:52:03] <Nightjar> also no, he's not in channel.
407: [21:52:13] <Nightjar> lietzmk, dafuq u try'n do?
408: [21:52:25] <Kingy> look at our test site
409: [21:52:27] <Nightjar> (context plox)\
410: [21:52:41] <Nightjar> Kingy, huh what?
411: [21:52:46] <Kingy> silverstripe hosts our sites
412: [21:52:50] <lietzmk> muskie9, the FieldList is part of a form, should I paste the whole function?
413: [21:52:50] <Kingy> test site is shitttty lol
414: [21:52:53] <Nightjar> please expand.
415: [21:53:10] <Nightjar> lietzmk, no, just explain what it is you're attempting to do first please.
416: [21:53:16] <Nightjar> code is a bit useless without context ;)
417: [21:53:33] <Nightjar> Kingy, welp, which site?
418: [21:53:46] <Kingy> hold on, I think it's responding now
419: [21:53:50] <Nightjar> ...
420: [21:53:52] <Kingy> yeah seems to be going again lol
421: [21:54:03] <lietzmk> I'm trying to import an excel sheet. I don't know how many columns I have to match
422: [21:54:05] <Nightjar> ... did you wait for your deploy to finish?
423: [21:54:19] <lietzmk> so I add a drop down field for each column
424: [21:54:51] <muskie9> lietzmk in a model admin or in a front-end controller
425: [21:55:06] <lietzmk> its in the front-end
426: [21:55:10] <muskie9> ah
427: [21:55:19] <Nightjar> Kingy, so all good?
428: [21:57:06] <lietzmk> <% loop $fields %> seems to work, But I don't know how to display the current dropdown
429: [21:57:08] <Nightjar> Kingy, also, you're in the middle east?
430: [21:57:15] <Kingy> yep all good
431: [21:57:17] <Kingy> and yeah i am
432: [21:57:29] <Nightjar> And SilverStripe host your site?
433: [21:57:34] <Nightjar> o.0
434: [21:59:04] * micmania1 has joined #silverstripe
435: [21:59:21] * marvanni quit (Quit: marvanni)
436: [22:00:17] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
437: [22:01:22] <Kingy> Nightjar: I'm working for an NZ company
438: [22:01:34] <Kingy> My partner got a job over here so I'm working remotely
439: [22:01:39] <Kingy> coz IT rules!
440: [22:13:54] * Nightjar quit (Ping timeout: 265 seconds)
441: [22:18:08] <lietzmk> it was $Me that I was looking for <% loop fields %>$Me<% end_loop %>
442: [22:40:35] * Nightjar has joined #silverstripe
443: [22:42:00] * muskie9 has joined #silverstripe
444: [22:45:27] <Nightjar> Kingy, ah right, you're that guy. Bahrain right?
445: [22:45:36] <Kingy> haha that guy
446: [22:45:39] <Kingy> yes Bahrain
447: [22:46:30] <Nightjar> Kingy, you used to work with antmas was it?
448: [22:47:40] <Kingy> Nah, met him though
449: [22:47:57] <Nightjar> Is he still at TDC, do you know?
450: [22:48:30] <Kingy> Wouldn't have a clue. I haven't chatted to anyone in a long time
451: [22:48:39] <Kingy> I'm usually well asleep by the time ya'll get online
452: [22:49:31] <Nightjar> True. Who are you working for, from so far away?
453: [22:52:07] <Kingy> NZX
454: [23:00:56] <Nightjar> like... the stock exchange?
455: [23:01:08] <Nightjar> exports?
456: [23:01:19] <Nightjar> :<
457: [23:04:01] * lietzmk quit (Quit: Leaving)
458: [23:05:45] <Kingy> Nightjar: stock exchange yeah
459: [23:05:58] <Nightjar> :o really? wows
460: [23:06:17] <Kingy> I was working as a dev-ops analyst for the actual exchange, but then the Agri side of things opened up a web dev position which I got
461: [23:06:28] <Nightjar> oic
462: [23:06:36] <Nightjar> agri side of stock exchange... dafuq :<
463: [23:06:37] * pixelboy has joined #silverstripe
464: [23:06:45] <Kingy> haha yeah
465: [23:06:58] <Nightjar> That makes like... so little sense to me I just don't even.
466: [23:07:57] <pixelboy> hey guys, how does one make a frond end file upload ? i tried creating the simple UploadField::create('File) but it seems to bring the ss cms type of file upload, I just want a simple file upload that i can then save to an object
467: [23:08:00] <Nightjar> Kingy, are they on silvertripe platform?
468: [23:08:13] <Nightjar> silverstripe platform* d:
469: [23:08:33] <Nightjar> pixelboy, filefield
470: [23:08:41] <Nightjar> try ^
471: [23:09:13] <pixelboy> Nightjar, jackpot danke :D
472: [23:09:28] <Kingy> NZX acquired a company called Newsroom years ago. Not entirely sure why, but they did
473: [23:09:28] <Nightjar> You're welcome :)
474: [23:09:46] <Kingy> and yeah Silverstripe developed the site originally
475: [23:09:50] <Kingy> before they took me on
476: [23:10:14] <Nightjar> Kingy, I'm also confused as to why NZX (which I'm assuming _isn't_ a private company) acquired a... what seems like private company.
477: [23:11:01] <Nightjar> Kingy, so apparently NOT on platform, make them be on platform.
478: [23:14:29] <Kingy> NZX is private
479: [23:15:29] <Kingy> but yeah
480: [23:15:37] <Kingy> we're probably 90% going to Platform
481: [23:15:44] <Kingy> the old hosting can no longer handle us apparently
482: [23:15:47] <Kingy> so we're kinda being forced :D
483: [23:17:04] * muskie9 quit (Ping timeout: 240 seconds)
484: [23:19:00] <Nightjar> Kingy, so it's a private company in charge or foreign exchange, which is a public matter? IDGI. Everything about your employer confuses me, lol.
485: [23:19:26] <Nightjar> Like how they can get into such "can't handle us I guess we have to" situation. Things should never get that far :<
486: [23:21:03] <Kingy> Well technically all we do is give people a platform to trade on. Companies who list have to provide certain information, as does NZX
487: [23:21:26] <Kingy> and we're basically looked after by the financial markets authority
488: [23:21:38] <Kingy> who could shut us down if they wanted
489: [23:23:49] <pixelboy> hey guys, if you have a form in the front end, how do you pass that file to be saved to the cms in a data object. Apparently calling $enquiry = new SaveEnquiry($data); saved all the text and email but not the file
490: [23:24:04] <pixelboy> in the data object i did define an 'file-
491: [23:24:15] <pixelboy> 'file'=>'file' has one
492: [23:24:23] <pixelboy> and added it to the cms as well
493: [23:24:54] <pixelboy> as a FileField::create('File'), (tho i'd like for something people in the cms can't edit, just download)
494: [23:25:06] <pixelboy> but the file in the frond end is not uploaded
495: [23:32:48] <darjusIT> if you are making simple upload field like in html5 browser input type. then you must make upload function yourself, If you will use Upload field that silverstripe provides you need to add some js files to frontend template
496: [23:34:45] <pixelboy> darjusIT, curently the functions look like this http://pastebin.com/eTtveEpR
497: [23:35:08] <pixelboy> darjusIT, shouldn't the $enquiry = new CustomOrder($data) pass the file as well ?
498: [23:36:57] <darjusIT> nop it would not pass
499: [23:37:57] <pixelboy> darjusIT, so i need to create a function to upload that file to the CustomOrder data object ?
500: [23:38:09] <darjusIT> yes
501: [23:38:31] <darjusIT> or use dropzone module
502: [23:38:48] <pixelboy> darjusIT, dam :)) no idea how that function would do it, thx for the info tho :)
503: [23:38:50] <darjusIT> for better styling
504: [23:39:29] <pixelboy> darjusIT, didn't know about that, i'll have to look into it
505: [23:40:41] <pixelboy> darjusIT, woundn't i need the file upload function for the object with dropzone as well? or does dropzone handle that somehow ?
506: [23:40:58] <Nightjar> pixelboy, name it right?
507: [23:41:11] <darjusIT> I had same issues 1. I tied make own upload function 2. for me is better to use dropdzone or if design requires simple input type field design I using default file upload field adding some js fields but removing silverstripe csm styling from that field
508: [23:41:15] <Nightjar> if it's the same as the fieldname, and the field is a has_one type, try fieldnameID
509: [23:41:37] <Nightjar> also, use $form->saveInto($thatDataObject)
510: [23:42:18] <Nightjar> also, use like $form->saveInto($thing = DataThing::create()); $thing->write();
511: [23:42:21] <darjusIT> dropzone auto uploads file and on submit gives file ID that stores in database
512: [23:42:38] <Nightjar> Yeah darjusIT, but he's not using UploadField.
513: [23:42:59] <Nightjar> And Dropzone sounds pretty much exactly what UploadField does
514: [23:43:20] <pixelboy> Nightjar, i'm using FileField, here's the classes http://pastebin.com/eTtveEpR
515: [23:43:26] <darjusIT> yes + nice styling + multiple files
516: [23:43:48] <Nightjar> darjusIT, UploadField does multiple files, and is stylable.
517: [23:43:53] <darjusIT> I never used file field
518: [23:44:30] <pixelboy> darjusIT, yea the reason i went for that is i wanted something workable for now fast
519: [23:44:32] <Nightjar> pixelboy, it's recommended to use ::create() when the class extends from Object (instead of new <class>)
520: [23:45:15] <pixelboy> Nightjar, are you talking about class CustomOrder extends DataObject ?
521: [23:45:28] <Nightjar> pixelboy, also, don't CustomOrder::create($data)
522: [23:45:29] <darjusIT> this can help you http://www.silverstripe.org/community/forums/form-questions/show/22062
523: [23:45:42] <Nightjar> instead try CustomOrder::create()->update($data)
524: [23:46:06] <Nightjar> but in this case you should be doing $form->saveInto($enquiry = CustomOrder::create());
525: [23:47:16] <pixelboy> i'm getting lost in all the suggestions :)) since i'm newb in exp
526: [23:47:38] <Nightjar> pixelboy, also, as a small tip: you can on CustomOrder do private static $defaults = ['DateSubmitted' => 'now'] - although in this particular use case (setting it when you create it on form submit) I don't see any difference to using the 'Created' field which exists on every DataObject by defaul.
527: [23:47:55] <pixelboy> Nightjar, so you're saying rather than $enquiry = new CustomOrder($data); go for $form->saveInto($enquiry = CustomOrder::create());
528: [23:48:12] <Nightjar> pixelboy, wait... what version of silverstripe are you using?
529: [23:48:19] <pixelboy> Nightjar, 3.4
530: [23:48:27] <Nightjar> pixelboy, all those statics should be private.
531: [23:48:40] <Nightjar> private static $db, etc.
532: [23:48:57] <pixelboy> Nightjar, got it easy to fix :D
533: [23:49:47] <Nightjar> and yes, go for $form->saveInto($enquiry = CustomOrder::create()); instead of the line 32 which reads $enquiry = new CustomOrder($data);
534: [23:50:04] <darjusIT> another good tutorial about frontend files is this http://www.ssbits.com/tutorials/2012/s-new-post-78/ old but if you know some SS you can easy remake it to 3.4
535: [23:50:06] <Nightjar> see if that works. Should do.
536: [23:51:26] <pixelboy> Nightjar, yep that worked for saving the data
537: [23:51:33] <pixelboy> Nightjar, file is still not saving
538: [23:52:12] <pixelboy> Nightjar, guessing darjusIT advice is right and i need a separate method for saving the file to the dataobject
539: [23:52:13] * micmania1 quit (Quit: micmania1)
540: [23:52:42] <darjusIT> 'DateSubmitted'=> 'Text' I would preffer SS_datetime
541: [23:53:15] <pixelboy> darjusIT, what's the advantage of using ss_datetime ?
542: [23:53:52] <pixelboy> darjusIT, the databoject once submitted can't be edited from the cms, it's just recorded
543: [23:54:35] <darjusIT> if you have some fitler that runs like SQL query not php
544: [23:55:10] <darjusIT> in first link can be that you are looking for
545: [23:55:31] <pixelboy> darjusIT, yep looking at it now
546: [23:55:36] * metaspike has joined #silverstripe
547: [23:56:02] <darjusIT> ok is 3AM
548: [23:56:10] <darjusIT> I am going sleep :)
549: [23:56:13] <darjusIT> bye
550: [23:56:22] <pixelboy> darjusIT, night dude, thx for the help
551: [23:56:42] <darjusIT> no problem have fun dev time
552: [23:56:48] * darjusIT quit (Quit: Leaving)
553: [23:58:52] <Nightjar> pixelboy, because then it's actually a date, not just a random piece of text.
554: [23:58:53] * micmania1 has joined #silverstripe
555: [23:59:30] <Nightjar> pixelboy, try renaming the ID of the form field to FileID

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