#silverstripe IRC Log

IRC log for 8 December 2016

All timestamps are in UTC.

1: [00:03:33] * samsam quit (Quit: samsam)
2: [00:03:54] * samsam has joined #silverstripe
3: [00:48:38] * janneklouman-- has joined #silverstripe
4: [00:51:07] * samsam quit (Quit: samsam)
5: [00:51:52] * samsam has joined #silverstripe
6: [00:53:31] * janneklouman-- quit (Ping timeout: 250 seconds)
7: [00:58:49] <trash__> I have 2 questions about UploadField
8: [00:59:21] <trash__> after I select a file File row is created immediately and the file is uploaded
9: [01:00:09] <trash__> the first question is: If the form is not submitted at all I will not need this file, so how to remove all files that I do not need?
10: [01:01:13] <trash__> and the second question is: on form action how to access the uploaded files? The only one way I can see is $form->Fields()->fieldByName('Files')->getItems()
11: [01:01:31] <trash__> Is this the correct way or I should do something else?
12: [01:09:48] * janneklouman-- has joined #silverstripe
13: [01:11:47] <Nightjar> dunno, seems about right. and yeh, that's the downside to uploadfield
14: [01:12:40] <Nightjar> if you're using it on the frontend, maybe considering FileField instead could be wise
15: [01:14:31] * janneklouman-- quit (Ping timeout: 268 seconds)
16: [01:14:44] <Nightjar> In for the first question, you could select an upload folder such as "Uploads/MaybeFiles" and then on save move the file from MaybeFiles to eg. "Uploads/KeepFiles". You can write a task to run after hours to clean up files over a certain age (via the CMS so it removes the DB rows too)
17: [01:14:55] <Nightjar> well, via the framework.
18: [01:23:38] * micmania1 quit (Quit: micmania1)
19: [01:25:15] <Nightjar> trash__, ^
20: [01:39:00] * micmania1 has joined #silverstripe
21: [01:40:39] * janneklouman-- has joined #silverstripe
22: [01:44:52] <Firesphere> What's trash?
23: [01:45:14] * janneklouman-- quit (Ping timeout: 250 seconds)
24: [02:15:53] * micmania1 quit (Quit: micmania1)
25: [02:22:17] * lerni quit (Quit: Connection closed for inactivity)
26: [02:31:25] * micmania1 has joined #silverstripe
27: [02:35:18] * DanaeNZ quit (Remote host closed the connection)
28: [02:35:51] * DanaeNZ has joined #silverstripe
29: [02:40:25] * DanaeNZ quit (Ping timeout: 256 seconds)
30: [03:21:51] <Audlex> Could someone please give me advice on this? relations is all kind of new to me so was hoping someone could tell me if there is a better way. the where clause does not seem to work, but if I change it to a static page ID it works fine. thanx
31: [03:21:53] <Audlex> http://pastebin.com/cNwq6Wu9
32: [03:25:00] <Audlex> sorry, probably better if i paste the whole function http://pastebin.com/zrRJgV2S
33: [03:36:15] * DanaeNZ has joined #silverstripe
34: [03:41:54] * janneklouman-- has joined #silverstripe
35: [03:41:59] * samsam quit (Quit: samsam)
36: [03:43:51] * micmania1 quit (Quit: micmania1)
37: [03:44:27] * Stomach quit (Ping timeout: 244 seconds)
38: [03:50:53] * janneklouman-- quit (Ping timeout: 260 seconds)
39: [04:00:51] <Firesphere> Audlex: What's your has_one/has_many relation?
40: [04:01:24] <Firesphere> also, $_GET['id']? That's ehm... please don't do that
41: [04:01:53] <Firesphere> $this->getRequest()->getVar('id'); and Convert::raw2sql($portfolioID);
42: [04:02:11] <Firesphere> You're setting yourself up for SQL injection by directly accepting GET parameters
43: [04:14:45] * micmania1 has joined #silverstripe
44: [04:34:03] <Audlex> noted! PortfolioPage has_many Portfolio. Not the best naming convention i found but essentially I need to return all portfolios from the $_GET id. perhaps it would be easier to go Portfolio::get and return its PortfolioPage?
45: [04:34:08] <Audlex> sorry, hope this makes sense.
46: [04:44:06] * adrexia quit (Quit: My Mac has gone to sleep. ZZZzzz…)
47: [04:58:36] <Firesphere> So Portfolio should have a has_one to PortfolioPage
48: [04:59:14] <Firesphere> Is the function you're showing in the PortfolioPage?
49: [04:59:55] <Firesphere> In that case, you'll want to do something like $this->Portfolio()->filter('Portfolio.CategoryID', $portfolioID)->sort($sort)->first()
50: [05:00:18] <Firesphere> I'm trying to get an understanding of what you're trying to achieve
51: [05:00:45] <Firesphere> Also, a custom "where" isn't needed here.
52: [05:01:14] <Firesphere> And the DataObject::get() should be SiteTree::get()->filter(array('your' => 'filter', 'params' => 'here')->sort($sort)->first();
53: [05:02:23] <Firesphere> That way, you're using the actual ORM, using the ORM escapes most of the issues for you, plus it's easier to hook into later on.
54: [05:04:31] * DanaeNZ quit (Quit: TIME TO FEED)
55: [05:05:17] * janneklouman-- has joined #silverstripe
56: [05:10:02] * janneklouman-- quit (Ping timeout: 250 seconds)
57: [05:13:38] <Firesphere> Please tag me when reply Audlex, I'm not on here 24/7 ;)
58: [05:55:24] * micmania1 quit (Quit: micmania1)
59: [06:44:16] * trash__ quit (Ping timeout: 260 seconds)
60: [06:56:48] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
61: [07:06:46] * janneklouman-- has joined #silverstripe
62: [07:07:10] * janneklouman-- quit (Read error: Connection reset by peer)
63: [07:17:50] * Mike123 has joined #silverstripe
64: [07:25:51] * UncleCheese has joined #silverstripe
65: [07:27:36] * janneklouman-- has joined #silverstripe
66: [07:28:03] * UncleCheese quit (Client Quit)
67: [07:28:30] * Stomach has joined #silverstripe
68: [07:32:21] * janneklouman-- quit (Ping timeout: 248 seconds)
69: [07:32:53] * Stomach quit (Ping timeout: 248 seconds)
70: [07:49:30] * Stomach has joined #silverstripe
71: [07:54:37] * Stomach quit (Quit: zzz)
72: [07:55:39] * janneklouman-- has joined #silverstripe
73: [08:00:26] * janneklouman-- quit (Ping timeout: 265 seconds)
74: [08:03:49] * Shrike_Finland has joined #silverstripe
75: [08:09:17] * UncleCheese has joined #silverstripe
76: [08:26:42] * janneklouman-- has joined #silverstripe
77: [08:42:33] * janneklouman-- quit (Ping timeout: 258 seconds)
78: [08:57:48] * kinglozzer has joined #silverstripe
79: [09:05:31] * agent44 has joined #silverstripe
80: [09:10:43] * janneklouman-- has joined #silverstripe
81: [09:12:23] * Shrike_Finland quit (Quit: Leaving.)
82: [09:16:31] * Mike123 quit (Ping timeout: 260 seconds)
83: [09:27:52] * Shrike_Finland has joined #silverstripe
84: [09:46:47] * r5v3rb has joined #silverstripe
85: [09:46:53] <r5v3rb> mornign shoppers
86: [09:46:56] <r5v3rb> morning*
87: [09:48:31] <kinglozzer> \o r3
88: [09:48:33] <kinglozzer> r5v3rb:
89: [09:48:34] <kinglozzer> damnit
90: [09:48:46] <kinglozzer> r3<tab> doesn't find you anymore :(
91: [09:49:52] * janneklouman-- quit (Read error: No route to host)
92: [09:52:43] <r5v3rb> hehe
93: [09:52:46] <r5v3rb> sorry
94: [09:53:01] <r5v3rb> don’t bookmark r5 it might be r6 next week
95: [09:53:41] <r5v3rb> why am I not receiving emails from Slack to join the community!
96: [09:53:44] * janneklouman-- has joined #silverstripe
97: [09:54:55] <r5v3rb> kinglozzer: my little project now supports layered templates and lots of other goodness!
98: [09:55:23] <kinglozzer> Nice! And you can move layers up and down without deleting them? :D
99: [09:55:27] <r5v3rb> very soon I will add a feature to export the ‘design’ as a png or jpg for use in a mailing solution too :D
100: [09:55:35] <r5v3rb> indeed I can kinglozzer :D
101: [09:55:49] <kinglozzer> Sweeeeet :P
102: [09:56:01] <r5v3rb> email that is, the print ready PDF is already working perfectly
103: [09:56:36] <r5v3rb> frontend is almost go go go too, new year should see the release of this as a product
104: [09:56:46] <r5v3rb> standalone that is
105: [09:57:04] <r5v3rb> its already in use in a couple of places as an ‘engine’
106: [10:08:08] <Shrike_Finland> What are you working on, if I may ask? :)
107: [10:15:21] <ss-helper> Re: memcache help - https://groups.google.com/d/msg/silverstripe-dev/NFS2UXW8uEU/gZyLzqZFDAAJ
108: [10:16:43] <r5v3rb> Shrike_Finland: it’s very secret at the moment ;)
109: [10:42:20] <r5v3rb> here’s a good question, should a SQL DB usr on a lives site have drop functionality with an SS site - is it completely unnecessary - does SS ever drop a table?
110: [10:42:44] <r5v3rb> is there a doc showing the usr requirements for DB users?
111: [11:09:51] * jonners9_ has joined #silverstripe
112: [11:09:55] * jonners99 has joined #silverstripe
113: [11:10:33] * jonners9_ quit (Client Quit)
114: [11:11:56] * jonners99 quit (Client Quit)
115: [11:23:17] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
116: [11:40:20] * zippy has joined #silverstripe
117: [11:57:33] <trash_> Nightjar: thank you for your answer
118: [11:57:59] <trash_> this with the different upload directory is good idea :)
119: [12:02:01] <r5v3rb> Nightjar: you’re still awake?!?
120: [12:33:35] * zippy quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
121: [13:26:54] * UndefinedOffset has joined #silverstripe
122: [13:45:07] * RedDevilJones has joined #silverstripe
123: [13:45:07] <ss-helper> RedDevilJones: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
124: [13:45:46] <RedDevilJones> Good day all
125: [13:46:03] <RedDevilJones> I have a question. Which would be actually quite simple I guess
126: [13:47:23] <RedDevilJones> I want to generate a dropdownfield: https://gist.github.com/anonymous/45cd44af1976fa9fcb2b4e0ac6a93fc1. As far as I know (quite new still) I would in the template just call $FilterOnTags right?
127: [13:47:38] <RedDevilJones> Which piece of the puzzel am i missing?
128: [14:02:55] * kinglozzer quit ()
129: [14:23:30] <RedDevilJones> no one?
130: [15:11:33] * muskie9 has joined #silverstripe
131: [15:26:49] * Shrike_Finland quit (Quit: Leaving.)
132: [15:44:26] * UndefinedOffset quit (Quit: Leaving.)
133: [15:51:58] * muskie9 quit (Ping timeout: 250 seconds)
134: [16:00:40] * UndefinedOffset has joined #silverstripe
135: [16:03:41] * RedDevilJones quit (Ping timeout: 260 seconds)
136: [16:25:55] * DarjusIT has joined #silverstripe
137: [16:27:47] <DarjusIT> hi all in 2.4 how to write to draft and live stages of page, I have tried $brand->writeToStage('Stage'); $brand->publish("Stage", "Live"); but it dont work..
138: [16:37:01] <slievr> DarjusIT: for publishing it's $brand->doPublish(); if I remember correctly
139: [16:58:43] * darianno has joined #silverstripe
140: [17:01:26] * agent44 quit (Quit: zzz)
141: [17:04:57] * slievr quit (Read error: Connection reset by peer)
142: [17:41:57] * janneklouman-- quit (Ping timeout: 248 seconds)
143: [17:54:07] * DarjusIT quit (Read error: Connection reset by peer)
144: [18:49:34] <Nightjar> r5v3rb, Am now
145: [19:06:54] <Nightjar> RedDevilJones is missing a context piece of the puzzel. If the FilterOnTags form isn't showing, then it's likely because it's out of scope.
146: [19:07:50] <Nightjar> Urgh, so many answers, and no one to listen to them. The perils of being logged in overnight :/
147: [19:18:05] * Stomach has joined #silverstripe
148: [19:33:51] <Nightjar> yey, did I miss anything? https://gist.github.com/anonymous/45cd44af1976fa9fcb2b4e0ac6a93fc1
149: [19:43:57] <r5v3rb> Nightjar: nope :)
150: [19:44:03] <Nightjar> :D
151: [19:44:09] <Nightjar> I bet it's never seen :'(
152: [19:44:22] <r5v3rb> que?
153: [19:45:08] <Nightjar> anonymous gist
154: [19:45:13] <Nightjar> paste and forget I bet.
155: [19:47:59] <r5v3rb> mebbe
156: [19:48:27] <r5v3rb> good write up though - clear explanation of the requirements to get it working nicely
157: [19:51:02] <Nightjar> :)
158: [19:51:15] <r5v3rb> pm pm pm
159: [19:53:22] * gelignite has joined #silverstripe
160: [20:04:19] * FrozenFire quit (Quit: There's no place like ~)
161: [20:04:45] * FrozenFire has joined #silverstripe
162: [20:19:50] * zippy has joined #silverstripe
163: [20:21:43] * zippy quit (Read error: Connection reset by peer)
164: [20:26:02] * janneklouman-- has joined #silverstripe
165: [20:26:42] * DanaeNZ has joined #silverstripe
166: [20:28:51] * darianno quit (Quit: Textual IRC Client: www.textualapp.com)
167: [20:37:10] * zippy has joined #silverstripe
168: [20:37:38] <zippy> morning
169: [20:48:43] <Nightjar> gidday zippy :>
170: [20:57:56] <r5v3rb> gudday zippy
171: [20:58:00] * r5v3rb quit (Quit: r5v3rb)
172: [20:58:05] <zippy> lol and then leaves
173: [20:58:58] <Nightjar> back in a tick apparently
174: [20:59:42] * r3v3rb has joined #silverstripe
175: [20:59:50] <zippy> wb
176: [20:59:51] <r3v3rb> ta da!
177: [20:59:56] <r3v3rb> ty
178: [21:00:31] <DanaeNZ> happy friday!
179: [21:01:30] <r3v3rb> almost! DanaeNZ
180: [21:01:44] <r3v3rb> still working through Thursday here
181: [21:02:08] <DanaeNZ> sucks to be yoooou
182: [21:02:45] <r3v3rb> well maybe but I always 12 hours younger ;)
183: [21:02:57] <r3v3rb> I will always be*
184: [21:03:02] <r3v3rb> :D
185: [21:05:10] <Nightjar> wew, he's got his nick back!
186: [21:06:06] <Nightjar> permenantly r3v3rb ?
187: [21:07:30] <r3v3rb> nope, I doubt it
188: [21:07:45] <r3v3rb> let me just ping NickServ from here ;)
189: [21:07:45] * pippy has joined #silverstripe
190: [21:20:41] * micmania1 has joined #silverstripe
191: [21:21:10] * r3v3rb is now known as mspacem
192: [21:28:56] * mspacem quit (Ping timeout: 250 seconds)
193: [21:30:34] * pippy quit (Quit: Page closed)
194: [21:35:38] <Stomach> yaaaay for friday
195: [21:36:33] * trash__ has joined #silverstripe
196: [21:39:30] <DanaeNZ> agreed
197: [21:41:19] <trash__> hi all
198: [21:42:32] <trash__> hmmm I have missed r3v3rb :(
199: [21:46:54] <zippy> Stomach: white wash you reckon?
200: [21:47:03] <Stomach> zippy likely :\
201: [21:54:01] * Stomach quit (Ping timeout: 260 seconds)
202: [21:56:35] * Stomach has joined #silverstripe
203: [22:11:31] * micmania1 quit (Quit: micmania1)
204: [22:12:28] * micmania1 has joined #silverstripe
205: [22:12:44] * UndefinedOffset quit (Read error: Connection reset by peer)
206: [22:14:45] * UndefinedOffset has joined #silverstripe
207: [22:22:28] <Nightjar> hurgnhhhhhhhhhh
208: [22:22:31] <Nightjar> fk
209: [22:22:34] <Nightjar> friday.
210: [22:22:37] <Nightjar> friday.
211: [22:22:39] <Nightjar> friday.
212: [22:22:52] <Nightjar> Which seat will I sit in?
213: [22:24:33] <DanaeNZ> sittin in the front seat
214: [22:24:37] <DanaeNZ> kickin in the back
215: [22:24:43] <DanaeNZ> MY HAND IS A DOLPHIN!
216: [22:25:20] <Nightjar> urgh, people kick'n in the back. It's dangerous to distract the driver!
217: [22:25:24] <Nightjar> when will these kids learn?
218: [22:26:21] <trash__> when they are driving and you are kicking their seat :)
219: [22:27:15] <Nightjar> But, I'm /responsible/.
220: [22:28:55] <trash__> yeah we all are :)
221: [22:30:18] * UndefinedOffset quit (Quit: Leaving.)
222: [22:34:58] <Firesphere> No you're not Nightjar
223: [22:35:31] <Nightjar> On occasion.
224: [23:00:02] * ss-helper quit (Remote host closed the connection)
225: [23:00:15] * ss-helper has joined #silverstripe
226: [23:03:23] * zippy quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
227: [23:11:21] * Stomach quit (Quit: zzz)
228: [23:11:48] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
229: [23:34:22] * micmania1 quit (Quit: micmania1)
230: [23:38:58] * micmania1 has joined #silverstripe
231: [23:48:10] * DanaeNZ quit (Remote host closed the connection)
232: [23:48:42] * DanaeNZ has joined #silverstripe
233: [23:50:32] <trash__> Is it possible to hook on upload event and remove event of UploadField?
234: [23:50:52] <trash__> the idea is to run ajax request after the file list is changed
235: [23:52:40] * DanaeNZ quit (Remote host closed the connection)
236: [23:52:54] * DanaeNZ has joined #silverstripe
237: [23:59:35] * zippy has joined #silverstripe

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