#silverstripe IRC Log

IRC log for 4 July 2016

All timestamps are in UTC.

1: [00:00:01] * ss-helper quit (Remote host closed the connection)
2: [00:00:18] * ss-helper has joined #silverstripe
3: [00:06:30] <DanaeNZ> could be some issue with core? Javascript errors in core are tricky indeed
4: [00:07:54] <sould> Possibly. The form isn't exactly vanilla though. I'm using the memberprofiles extension, and inserting the field via class MemberExtension extends DataExtension { .. }
5: [00:08:47] <sould> I switched it to a FileField, but when I try to upload something the image wont stick. So strange. Now it really feels like a folder permissions error, but i just checked that haha.
6: [00:09:38] * micmania1 has joined #silverstripe
7: [00:09:47] * Stomach quit (Quit: zzz)
8: [00:10:59] <DanaeNZ> Do normal UploadFields work fine?
9: [00:11:31] <DanaeNZ> like, not in the extension
10: [00:11:51] * Stomach has joined #silverstripe
11: [00:12:48] <pippy> sould: when you set the file, does the ID get updated
12: [00:13:05] <pippy> you can check this by opening up the console and using jquery to select the value of the input field
13: [00:20:58] <sould> @DanaeNZ Will check that.
14: [00:21:06] <sould> @Pippy, not sure what you mean by ID?
15: [00:23:28] * phorloop quit (Quit: My laptop go to sleep. ZZZzzz…)
16: [00:24:06] * janneklouman-- has joined #silverstripe
17: [00:28:58] <pippy> if you've got a has_one relationship, the file or image will be stored as an ID
18: [00:29:30] * janneklouman-- quit (Ping timeout: 276 seconds)
19: [00:29:43] <pippy> it sounds like your file is being uploaded fine, but it's not setting the ID on the page/ dataobject correctly
20: [00:29:57] <pippy> it could be that the name is weird, or there's some other javascript issue
21: [00:30:06] <pippy> (name of the field that is)
22: [00:30:35] <pippy> you could try something like static $has_one = array('SomethingDifferent' => 'Image');
23: [00:30:56] <pippy> and then upload something, and use the console with something like jQuery('[name=SomethingDifferent]').val();
24: [00:30:59] <pippy> after you upload
25: [00:36:34] * spekulatius2 quit (Quit: Leaving)
26: [00:38:38] <pippy> https://packagist.org/packages/otago/subsites-domains
27: [00:47:03] <sould> Yeah, the image is definitely being uploaded fine. Looking at my assets folder, it appears when I upload.
28: [00:47:31] <sould> I've named the field Avatar, however I can't seem to find [name=avatar] in my HTML
29: [00:47:37] <sould> Closest I found was Avatar[Uploads][]
30: [00:49:29] <sould> Which when queried for its value comes up with "C:\fakepath\image-name.jpg"
31: [00:51:12] <pippy> That's very weird
32: [00:51:26] * DarjusIT quit (Read error: Connection reset by peer)
33: [00:51:28] <pippy> you're uploading in the CMS, not the controller right?
34: [00:52:01] <pippy> and you're not doing anything weird like overriding the upload location?
35: [00:52:47] <DanaeNZ> oh, if it's member profiles - I think that has a file field on the frontend?
36: [00:53:57] <sould> I'm uploading as if i were a user visiting the site (via the frontend, not the CMS)
37: [00:54:12] <sould> And nope. not overriding anything to my knowledge (unless the extension is)
38: [00:55:10] <pippy> ah that explains a lot, you'll need a controller to handle the file upload
39: [00:55:38] <sould> @DanaeNZ, Not sure what you mean. It looks like this on the frontend http://imgur.com/M1Ig1Xq
40: [00:56:41] <sould> @Pippy a controller?
41: [00:56:46] <pippy> sould: I have a few poorly written examples of how to handle a file upload on the front end
42: [00:57:02] <pippy> yeah, SilverStripe by default doesn't allow anyone to upload files
43: [00:57:44] <sould> Oh, i see
44: [00:58:12] <sould> If you have links to those examples i'd be really grateful :)
45: [00:58:31] <pippy> I wrote a quick hack the other day that lets you use the default CMS upload controller, but that will only work if you're logged in and have permission in the cms to upload files
46: [00:58:41] <pippy> i'll find something that will let any member upload a file
47: [00:59:21] <sould> sweet, cheers!
48: [00:59:47] <sould> Although, the hack might work too. The user will only be able to upload an avatar after logging in.
49: [01:05:12] * janneklouman-- has joined #silverstripe
50: [01:05:23] <pippy> sould: Here's the hack that uses the default upload controller
51: [01:05:24] <pippy> http://www.sspaste.com/paste/show/5779b63dd14ec
52: [01:05:39] <pippy> you'll have to specify the form when you create the upload field
53: [01:06:14] <pippy> I'll also give you an example of a controller that allows anyone to upload files, and you can customise it as you want
54: [01:06:38] <pippy> though it was written by some contractors, and when silverstripe audited it they were'nt very impressed by the code
55: [01:06:53] <pippy> so i'd recommend just looking at it to see how it's dome
56: [01:06:57] <pippy> *done
57: [01:09:55] * janneklouman-- quit (Ping timeout: 252 seconds)
58: [01:12:44] * sould quit (Ping timeout: 250 seconds)
59: [01:20:04] * sould has joined #silverstripe
60: [01:21:27] <sould> @pippy: I seem to have disconnected, do you still have that link for the controller that allows anyone to upload files?
61: [01:23:42] <DanaeNZ> sould: http://www.sspaste.com/paste/show/5779b63dd14ec
62: [01:25:04] <sould> Cheers DanaeNZ
63: [01:37:17] * micmania1 quit (Quit: micmania1)
64: [01:37:43] * micmania1 has joined #silverstripe
65: [01:41:23] <Hailwood> Er... Anyone come across an issue where silverstripe is removing all form tags?
66: [01:45:14] <ss-helper> Re: [silverstripe-dev] Docs not updated to 3.4 - https://groups.google.com/d/msg/silverstripe-dev/9e4CZjAzrRw/ipGxY_sWBQAJ
67: [01:45:14] <ss-helper> Re: On safari for 2 months - https://groups.google.com/d/msg/silverstripe-dev/IgcXxKcmF0g/wZMMJ3sWBQAJ
68: [01:46:14] * janneklouman-- has joined #silverstripe
69: [01:47:13] * Hailwood quit (Remote host closed the connection)
70: [01:51:34] * janneklouman-- quit (Ping timeout: 272 seconds)
71: [02:00:04] <ss-helper> Silverstripe: Front-end User Upload Directory - http://stackoverflow.com/questions/38175939/silverstripe-front-end-user-upload-directory
72: [02:04:24] <sould> Goddamnit, haha.
73: [02:05:06] <sould> The UploadField was working fine. Some previous developers on the project had built a module that inserts the core Javascript in a strange way, which interfered with the behaviour of the JS files -- hence the error.
74: [02:05:33] <sould> Thanks for the help though DanaeNZ and Pippy!
75: [02:06:44] * Stomach quit (Quit: zzz)
76: [02:07:08] * janneklouman-- has joined #silverstripe
77: [02:07:12] <DanaeNZ> sould: ohohoho
78: [02:11:34] * janneklouman-- quit (Ping timeout: 240 seconds)
79: [02:13:21] * phorloop has joined #silverstripe
80: [02:13:36] * Stomach has joined #silverstripe
81: [02:17:00] * phorloop quit (Client Quit)
82: [02:17:56] <spronk> anyone here encountered any php libs that can bind JSON to classes?
83: [02:18:57] * phorloop has joined #silverstripe
84: [02:19:22] * phorloop quit (Client Quit)
85: [02:47:53] * janneklouman-- has joined #silverstripe
86: [02:52:36] * janneklouman-- quit (Ping timeout: 244 seconds)
87: [02:53:42] * pippy quit (Ping timeout: 250 seconds)
88: [02:54:10] * pippy has joined #silverstripe
89: [02:54:38] <pippy> there's always serialize
90: [03:03:28] <DanaeNZ> Ugh, why isn't onBeforeInit firing
91: [03:03:32] <DanaeNZ> how annoying
92: [03:08:43] * janneklouman-- has joined #silverstripe
93: [03:12:51] * janneklouman-- quit (Ping timeout: 246 seconds)
94: [03:15:32] <DanaeNZ> ughghghhghg why is my xdebug not hitting init()
95: [03:15:35] <DanaeNZ> it hits main.php
96: [03:23:15] <pippy> DanaeNZ: i'm lazy and like to use die() instead of xdebug
97: [03:23:26] <pippy> or debug::show();
98: [03:25:02] <DanaeNZ> yeah those work ok
99: [03:25:18] <DanaeNZ> I'm just annoyed xdebug doesn't wanna show me anything
100: [03:26:59] <pippy> it could be your IDE isn't setting the breakpoints right
101: [03:42:25] <DanaeNZ> I'ma restart phpstorm
102: [03:42:30] <DanaeNZ> why didn't i do that first lol
103: [03:45:16] * sould quit (Ping timeout: 250 seconds)
104: [03:48:54] <DanaeNZ> aha
105: [03:49:00] <DanaeNZ> path mappings were turned on
106: [03:49:32] * janneklouman-- has joined #silverstripe
107: [03:54:54] * janneklouman-- quit (Ping timeout: 276 seconds)
108: [04:10:04] * janneklouman-- has joined #silverstripe
109: [04:14:31] * janneklouman-- quit (Ping timeout: 240 seconds)
110: [04:26:59] * Stomach quit (Quit: zzz)
111: [04:30:21] * Stomach has joined #silverstripe
112: [04:30:40] * janneklouman-- has joined #silverstripe
113: [04:34:14] * pippy quit (Ping timeout: 250 seconds)
114: [04:34:18] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
115: [04:35:24] * janneklouman-- quit (Ping timeout: 250 seconds)
116: [05:11:40] * janneklouman-- has joined #silverstripe
117: [05:16:46] * janneklouman-- quit (Ping timeout: 272 seconds)
118: [05:29:11] * sould has joined #silverstripe
119: [05:30:09] <sould> This is probably a silly question, but I'm trying to populate an object property via PHP. I have an object called Member. Currently, i'm trying to set the object property as such "$member->property = 'this string here'"
120: [05:30:23] <sould> But that's not working. Anybody know how?
121: [05:31:43] <sould> Ideally once i set it, it's saved. doing $member->property = ... seems to only do it for that specific page load, and doesn't actually save it anywhere.
122: [05:32:32] * janneklouman-- has joined #silverstripe
123: [05:37:40] * janneklouman-- quit (Ping timeout: 272 seconds)
124: [05:51:34] * camfindlay has joined #silverstripe
125: [05:53:06] * janneklouman-- has joined #silverstripe
126: [05:55:13] <DanaeNZ> sould: Is this $member var a Member instance? If you want to save the property, you would probably want it to be a database field. Then you could call $member->write() after setting the property (or $member->setField('property', 'this string here'))
127: [05:55:40] <DanaeNZ> PHP would inherently ditch any non-static properties after the next request
128: [05:57:34] * janneklouman-- quit (Ping timeout: 244 seconds)
129: [06:02:14] * camfindlay quit (Quit: camfindlay)
130: [06:16:22] * DanaeNZ quit (Remote host closed the connection)
131: [06:16:54] * DanaeNZ has joined #silverstripe
132: [06:19:32] * sould quit (Ping timeout: 250 seconds)
133: [06:21:09] * DanaeNZ quit (Ping timeout: 246 seconds)
134: [06:24:49] * sould has joined #silverstripe
135: [06:31:14] * sould quit (Ping timeout: 250 seconds)
136: [06:33:56] * janneklouman-- has joined #silverstripe
137: [06:35:43] * Firesphere has left #silverstripe
138: [06:35:59] * Firesphere has joined #silverstripe
139: [06:36:14] <Firesphere> how come ss23 is still admin here?
140: [06:37:37] <spronk> why wouldn't he be?
141: [06:37:56] * UncleCheese has joined #silverstripe
142: [06:38:34] * janneklouman-- quit (Ping timeout: 240 seconds)
143: [06:52:13] * wmk has joined #silverstripe
144: [06:57:58] <wmk> morning pretty people!
145: [07:01:12] * Stomach quit (Quit: zzz)
146: [07:02:51] * arnhoe has joined #silverstripe
147: [07:07:10] * micmania1 quit (Quit: micmania1)
148: [07:14:59] * janneklouman-- has joined #silverstripe
149: [07:19:34] * janneklouman-- quit (Ping timeout: 240 seconds)
150: [07:22:23] * swaiba has joined #silverstripe
151: [07:35:29] * janneklouman-- has joined #silverstripe
152: [07:38:52] <guci0> wmk: morning :)
153: [07:39:51] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
154: [07:40:27] * janneklouman-- quit (Ping timeout: 276 seconds)
155: [07:49:00] * UncleCheese has joined #silverstripe
156: [07:50:53] <swaiba> mornin guci0
157: [08:01:34] * janneklouman-- has joined #silverstripe
158: [08:04:36] * DarjusIT has joined #silverstripe
159: [08:06:08] * Stomach has joined #silverstripe
160: [08:13:19] * kinglozzer has joined #silverstripe
161: [08:17:42] * DanaeNZ has joined #silverstripe
162: [08:22:14] * DanaeNZ quit (Ping timeout: 244 seconds)
163: [08:40:22] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
164: [08:48:40] <guci0> swaiba: :)
165: [08:52:26] * spronk quit (Ping timeout: 240 seconds)
166: [09:15:27] * kinglozzer quit (Ping timeout: 244 seconds)
167: [09:21:06] * kinglozzer has joined #silverstripe
168: [09:25:19] * kinglozzer quit (Read error: Connection reset by peer)
169: [09:26:36] * kinglozzer has joined #silverstripe
170: [10:02:54] * Stomach quit (Quit: zzz)
171: [10:04:33] * agent44 has joined #silverstripe
172: [10:24:15] <ss23> Firesphere: Still need someone to admin :)
173: [10:30:13] <ss-helper> Silverstripe 3.1 wont change to dev env - http://stackoverflow.com/questions/38182206/silverstripe-3-1-wont-change-to-dev-env
174: [10:52:06] <kinglozzer> what you up to these days then ss23?
175: [11:31:46] <ss23> Working at a security place these days, zx :)
176: [11:32:37] <kinglozzer> ooo noice
177: [11:55:35] * kinglozzer quit (Remote host closed the connection)
178: [12:04:23] <DarjusIT> Hi all, I have cache on my layout. this create problem on user estate page, ajax functions dont show results because of cache. Is it possible on making ajax function clean cache of that page?
179: [12:19:06] * DanaeNZ has joined #silverstripe
180: [12:23:52] * DanaeNZ quit (Ping timeout: 260 seconds)
181: [12:33:41] <swaiba> DarjusIT surely the answer is to just have those ajax section loaded even if static published...
182: [12:45:10] * kinglozzer has joined #silverstripe
183: [13:21:26] <DarjusIT> about cache also if I have js function location.reload(); is it possible somehow to delete page then? location.reload(true); not helping
184: [13:30:08] * Azure quit (Ping timeout: 272 seconds)
185: [13:31:42] * UndefinedOffset has joined #silverstripe
186: [13:52:04] * wmk quit (Ping timeout: 240 seconds)
187: [13:55:33] * digitall has joined #silverstripe
188: [13:55:33] <ss-helper> digitall: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
189: [13:55:37] <digitall> Hello
190: [13:55:54] <swaiba> digitall hello
191: [13:56:18] <digitall> A week ago I added to issue #5384 via https://github.com/silverstripe/silverstripe-framework/pull/5384 . I am not yet very practical with GitHub, would like to know if I did that correctly.
192: [13:56:48] <digitall> My comment is the last one.
193: [14:01:35] <digitall> As the comment has been added to a closed issue, should I open a new one or wait for an answer on this?
194: [14:02:09] * DanaeNZ has joined #silverstripe
195: [14:04:47] <digitall> What is your stance on the best way to debug Silverstripe? What do you use? plain evals, phpdbg?
196: [14:06:16] <cloph> duck debugging, printf debugging ... :-)
197: [14:09:17] <digitall> ah ah didn't know the term "duck debugging"! I do that a lot with my brother, he's not a programmer!
198: [14:35:15] <swaiba> !debug digitall
199: [14:35:16] <ss-helper> digitall: 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/
200: [14:35:50] <swaiba> and regarding the silence about how to handle issues on github... I'm really not sure... just do what you think best
201: [14:36:06] <digitall> thank you swaiba. is this a bot?
202: [14:36:08] <digitall> this is a faq?
203: [14:36:30] <swaiba> if you make a mistake either nothing will happen, something good or if something "bad" it's probably they will tell you what you did wrong
204: [14:36:56] <swaiba> i think it is a bot, like if you type ! followed by certain commands it says things
205: [14:36:58] <swaiba> !paste
206: [14:36:59] <ss-helper> Please paste your code using something like http://kopy.io/ or http://www.sspaste.com/ or https://gist.github.com/ and then paste the link here.
207: [14:37:12] <swaiba> !paste digitall
208: [14:37:12] <ss-helper> digitall: 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.
209: [14:41:24] <cloph> digitall: in general, if it is just "similar" but not the same, go for a new issue
210: [14:41:42] <cloph> closed issues won't show up by default, and it is easy to miss the comment notification...
211: [14:56:09] <digitall> Thank you very much for you kind help!
212: [14:56:52] <digitall> I will copy and paste the issue and refer to connected issues.
213: [15:00:18] <digitall> Would you please check if I did open correctly the issue? https://github.com/silverstripe/silverstripe-framework/issues/5772
214: [15:01:12] <digitall> I respect the community and would not like to be rude, but you know, if you don't know the netiquette, better safe than sorry and ask...
215: [15:03:59] <digitall> Is xdebug better than phpdbg ? I heard the latter has been included by default in php 5.6
216: [15:07:52] * FrozenFire[alt] has joined #silverstripe
217: [15:09:42] * FrozenFire quit (Ping timeout: 276 seconds)
218: [15:13:47] * FrozenFire[alt] is now known as FrozenFire
219: [15:29:21] * arnhoe quit ()
220: [15:48:44] <swaiba> digitall I'd say xdebug is better, based on features
221: [15:49:09] <swaiba> but provided you can do line by line debugging and produce cachegrinds for analysis your all good
222: [15:49:33] <swaiba> I thought phpunit and xdebug were standard, surprised to hear otherwise
223: [15:53:48] * swaiba quit (Remote host closed the connection)
224: [15:58:21] <digitall> Interesting, thank you
225: [16:02:43] * digitall quit (Quit: Page closed)
226: [16:08:05] <slievr> I was wondering how to stop silverstripe checking other URL rules after it's found a match.
227: [16:08:06] <slievr> http://paste.ofcode.org/38VBkiwcT24szudxXK8Vty9
228: [16:29:27] * janneklouman-- quit (Ping timeout: 244 seconds)
229: [16:29:37] * kinglozzer quit ()
230: [16:30:30] * wilderich has joined #silverstripe
231: [16:30:37] <wilderich> hello everyone.
232: [16:31:04] <wilderich> just a quick question. I am currently trying to use sheadawson\silverstripe-blocks plugin.
233: [16:31:22] <wilderich> Can someone point to me, on how I can do nested / recursive blocks please?
234: [16:31:36] <wilderich> trying to build a modular site using this block plugin.
235: [16:31:39] <wilderich> Thank you in advance.
236: [16:35:01] * DanaeNZ quit (Ping timeout: 252 seconds)
237: [16:54:05] * slievr quit (Quit: Leaving.)
238: [16:58:29] * slievr has joined #silverstripe
239: [17:19:19] * agent44 quit (Quit: zzz)
240: [17:24:21] * janneklouman-- has joined #silverstripe
241: [17:58:44] * slievr quit (Quit: Leaving.)
242: [19:30:30] * janneklouman-- quit (Ping timeout: 272 seconds)
243: [19:44:07] * Stomach has joined #silverstripe
244: [20:01:24] * Stomach quit (Quit: zzz)
245: [20:09:02] * Stomach has joined #silverstripe
246: [20:13:57] * gelignite has joined #silverstripe
247: [20:19:12] * Stomach quit (Quit: zzz)
248: [20:20:36] * UndefinedOffset quit (Quit: Leaving.)
249: [20:34:14] * Stomach has joined #silverstripe
250: [20:44:32] * UncleCheese has joined #silverstripe
251: [20:52:04] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
252: [20:58:02] * janneklouman-- has joined #silverstripe
253: [21:12:55] * Hailwood has joined #silverstripe
254: [21:21:54] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
255: [21:29:06] <Hailwood> Does silverstripe have a way to get the pages menu to show what the site looks like in the Published view?
256: [21:29:13] * micmania1 has joined #silverstripe
257: [21:30:44] * EasyCo has joined #silverstripe
258: [21:31:50] * DanaeNZ has joined #silverstripe
259: [21:35:24] <DanaeNZ> oh man this coffee is life
260: [21:35:33] <DanaeNZ> first time I had a good coffee from Eve's pantry
261: [21:55:16] * Azure has joined #silverstripe
262: [21:56:39] * UncleCheese has joined #silverstripe
263: [22:15:22] * DimiStripe quit (Read error: Connection reset by peer)
264: [22:15:57] * DimiStripe has joined #silverstripe
265: [22:34:40] * janneklouman-- quit (Ping timeout: 264 seconds)
266: [22:37:10] * spronk has joined #silverstripe
267: [22:38:14] <DanaeNZ> If you ever have to work with an API that uses about four different fields to determine whether a user is unique - just don't do it
268: [22:38:21] <DanaeNZ> just don't
269: [23:30:48] * janneklouman-- has joined #silverstripe
270: [23:34:08] <Stomach> lol
271: [23:34:10] <Stomach> poor DanaeNZ
272: [23:34:53] <DanaeNZ> coffee dulls the pain somewhat
273: [23:35:02] <DanaeNZ> and a healthy does of cynicism
274: [23:35:07] <DanaeNZ> dose*
275: [23:35:14] <DanaeNZ> and however cynicism is spelled*
276: [23:35:24] * janneklouman-- quit (Ping timeout: 246 seconds)
277: [23:46:08] <spronk> lololol
278: [23:46:10] <spronk> chris evans quits top gear
279: [23:55:41] <DanaeNZ> Captain America?
280: [23:55:48] <spronk> nah the other one
281: [23:55:50] <spronk> the annoying british one
282: [23:56:08] <DanaeNZ> I didn't really watch Top Gear after clarkson et all left
283: [23:57:21] * guci0 quit (Ping timeout: 250 seconds)
284: [23:57:21] * elgabbu quit (Ping timeout: 250 seconds)
285: [23:57:21] * wilderich quit (Ping timeout: 250 seconds)

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