#silverstripe IRC Log

IRC log for 1 December 2013

All timestamps are in UTC.

1: [00:19:14] * spronk2 has joined #silverstripe
2: [00:23:05] * Motoservo has joined #silverstripe
3: [00:31:02] * Avro quit (Ping timeout: 265 seconds)
4: [00:31:49] * Avro has joined #silverstripe
5: [00:37:50] * Avro quit (Changing host)
6: [00:37:50] * Avro has joined #silverstripe
7: [00:45:06] * spronk2 quit (Quit: spronk2)
8: [00:53:50] * willr quit (Quit: willr)
9: [00:59:38] * guzzlefry has joined #silverstripe
10: [00:59:54] <guzzlefry> Does Varchar have a max length?
11: [01:00:10] <guzzlefry> My data is getting truncated at 50 characters..
12: [01:02:46] <guzzlefry> oh...50 is default
13: [01:02:48] <guzzlefry> wtf
14: [01:05:59] * spronk2 has joined #silverstripe
15: [01:08:42] * spronk2 quit (Client Quit)
16: [01:09:53] * spronk2 has joined #silverstripe
17: [01:11:18] * spronk2 quit (Client Quit)
18: [01:16:27] * SightUnseen has joined #silverstripe
19: [01:16:35] * SightUnseen quit (Client Quit)
20: [01:18:05] * SightUnseen has joined #silverstripe
21: [01:18:06] * SightUnseen has left #silverstripe
22: [01:32:15] <guzzlefry> How can I have a user redirect back to a URL after they register?
23: [01:50:16] * MichaelDesignerX has joined #silverstripe
24: [01:56:40] * SightUnseen1 has joined #silverstripe
25: [01:56:49] * SightUnseen1 has left #silverstripe
26: [02:39:24] * Motoservo quit (Ping timeout: 252 seconds)
27: [02:59:04] * robert_ has joined #silverstripe
28: [03:22:38] * mrzero quit (Remote host closed the connection)
29: [03:40:19] * mrzero has joined #silverstripe
30: [03:44:43] * mrzero quit (Remote host closed the connection)
31: [04:09:40] <Azure> I'm trying to make a recursive template in order to create a navigation bar that doesn't require n-level deep copying and pasting of the same code in loops of loops of ... etc.
32: [04:10:15] <Azure> Right now, I have two template files, one is my main navigation template, and the other is my template for the submenus.
33: [04:11:47] <Azure> Templates: http://pastie.org/8520014
34: [04:13:24] <Azure> Oh. And the calling of SubNavMenu doesn't seem to work.
35: [04:15:36] <Azure> ... nevermind, Apparently the module that I use makes the pages in question not visible by default.
36: [04:21:05] * cloph_away has joined #silverstripe
37: [04:22:15] * cloph quit (Ping timeout: 272 seconds)
38: [04:32:55] * Azure tries figuring out how to make then visible by default through a dataextension then.
39: [04:55:42] <Azure> Hm... I guess that already-existing items in $defaults can't be overridden by dataextensions
40: [05:56:19] * Azure quit (Remote host closed the connection)
41: [06:20:57] * simon_w quit (Ping timeout: 272 seconds)
42: [06:21:21] * simon_w has joined #silverstripe
43: [06:35:02] * zippy___ has joined #silverstripe
44: [06:55:42] * spronk2 has joined #silverstripe
45: [07:24:29] * spronk2 quit (Quit: spronk2)
46: [07:33:09] * spronk2 has joined #silverstripe
47: [07:45:41] * SightUnseen has joined #silverstripe
48: [07:45:47] * SightUnseen has left #silverstripe
49: [08:42:32] * SightUnseen1 has joined #silverstripe
50: [08:42:38] * SightUnseen1 has left #silverstripe
51: [10:21:24] * zippy___ quit (Ping timeout: 252 seconds)
52: [10:31:13] * Liquide quit ()
53: [10:34:08] * spronk2 quit (Quit: spronk2)
54: [10:59:42] * lenix- has joined #silverstripe
55: [11:01:15] <lenix-> hey :) can i rename the "mysite" folder if i'm using composer to manage my project or will it cause troubles with updates?
56: [11:45:04] * kerosene has joined #silverstripe
57: [12:07:53] * travis-ci has joined #silverstripe
58: [12:07:53] <travis-ci> [travis-ci] ajshort/sapphire#47 (injector-factory - fd1ed38 : Andrew Short): The build passed.
59: [12:07:53] <travis-ci> [travis-ci] Change view : https://github.com/ajshort/sapphire/compare/6820b8ebc52b...fd1ed3825576
60: [12:07:54] <travis-ci> [travis-ci] Build details : http://travis-ci.org/ajshort/sapphire/builds/14762351
61: [12:07:54] * travis-ci has left #silverstripe
62: [12:28:04] * Alexwijn has joined #silverstripe
63: [12:29:00] <Alexwijn> Him does anyone know how to remove a has_one using an extension?
64: [12:44:21] * Alexwijn_ has joined #silverstripe
65: [12:46:24] * Alexwijn quit (Ping timeout: 246 seconds)
66: [13:02:43] * Alexwijn_ quit ()
67: [13:27:12] * Alexwijn has joined #silverstripe
68: [13:32:30] <Alexwijn> I'm using the function getCMSFields() in Page.php, and the first line of it is: $fields = parent::getCMSFields();
69: [13:32:41] <Alexwijn> But now because I have an extension that is editing that Page
70: [13:32:46] <Alexwijn> I want to update the cms fields
71: [13:33:08] <Alexwijn> I can't add $this->extend('updateCMSFields', $fields); to the bottom of that function because parent::getCMSFields(); is already doing that aswell
72: [13:33:21] <Alexwijn> So what is the best way to update the fields in a extension when using the above method?
73: [14:32:39] * kerosene quit (Quit: gn)
74: [14:49:15] * MichaelDesignerX quit (Ping timeout: 252 seconds)
75: [14:50:17] * Alexwijn quit ()
76: [17:09:21] * simon_w quit (Ping timeout: 245 seconds)
77: [17:09:50] * simon_w has joined #silverstripe
78: [17:29:05] * joelpittet has joined #silverstripe
79: [17:37:08] * simon_w quit (Ping timeout: 265 seconds)
80: [17:37:36] * simon_w has joined #silverstripe
81: [18:12:24] <simon_w> lenix-, you can rename it. Just make sure to update $project too
82: [18:19:08] * Liquide has joined #silverstripe
83: [18:20:45] * SightUnseen has joined #silverstripe
84: [18:25:07] * SightUnseen quit (Ping timeout: 260 seconds)
85: [18:39:18] * simon_w quit (Quit: This computer has gone to sleep)
86: [18:46:06] * SightUnseen has joined #silverstripe
87: [18:46:09] * SightUnseen has left #silverstripe
88: [18:56:29] * SphereSilverNL has joined #silverstripe
89: [18:58:54] * gelignite has joined #silverstripe
90: [19:05:52] * ARNHOE has joined #silverstripe
91: [19:17:34] * mobiusnz quit (Quit: Leaving.)
92: [19:29:28] * simon_w has joined #silverstripe
93: [19:34:31] * mobiusnz has joined #silverstripe
94: [19:35:23] * nickmolhoek has joined #silverstripe
95: [19:38:33] * zippy___ has joined #silverstripe
96: [19:42:26] * joelpittet quit ()
97: [19:43:37] * mobiusnz quit (Quit: Leaving.)
98: [19:46:19] * mobiusnz has joined #silverstripe
99: [19:55:18] * notAzure has joined #silverstripe
100: [19:57:41] * SphereSilverNL quit (Ping timeout: 245 seconds)
101: [20:08:44] * SightUnseen1 has joined #silverstripe
102: [20:13:02] * SightUnseen1 quit (Ping timeout: 240 seconds)
103: [20:14:21] * notAzure quit (Quit: Textual IRC Client: www.textualapp.com)
104: [20:15:24] * Azure has joined #silverstripe
105: [20:23:52] * travis-ci has joined #silverstripe
106: [20:23:52] <travis-ci> [travis-ci] silverstripe/silverstripe-framework#1628 (3.1 - 6ea59e6 : Sean Harvey): The build passed.
107: [20:23:52] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-framework/compare/df2d59df1c29...6ea59e68ad64
108: [20:23:52] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-framework/builds/14776350
109: [20:23:52] * travis-ci has left #silverstripe
110: [20:24:15] * Arth has joined #silverstripe
111: [20:35:18] <lenix-> thanks simon_w, i'll give it a try :)
112: [21:04:46] * SightUnseen1 has joined #silverstripe
113: [21:12:41] * ARNHOE quit ()
114: [21:20:02] * SightUnseen1 quit (Read error: No route to host)
115: [21:20:09] * SightUnseen has joined #silverstripe
116: [21:23:09] * Arth quit (Ping timeout: 250 seconds)
117: [21:29:09] * SightUnseen1 has joined #silverstripe
118: [21:29:09] * SightUnseen1 quit (Client Quit)
119: [21:29:09] * SightUnseen quit (Read error: Connection reset by peer)
120: [21:29:13] * SightUnseen2 has joined #silverstripe
121: [21:29:52] * LimRes has joined #silverstripe
122: [21:31:08] <LimRes> Hi SS people
123: [21:31:14] <Shrike_Finland> hi
124: [21:31:21] <LimRes> Anybody know how to pass a date in the customise array so that we can format it easily in template?
125: [21:31:46] <LimRes> the old ss 2.* trick of making a new Date($Foo->Created) doesn't work anymore.
126: [21:33:00] * SightUnseen has joined #silverstripe
127: [21:33:01] * SightUnseen2 quit (Read error: Connection reset by peer)
128: [21:35:37] <simon_w> $this->dbObject('Created')
129: [21:35:50] <simon_w> The way you're supposed to do it in 2.4 too :p
130: [21:36:22] <simon_w> and new Date($this->Created) wouldn't have worked then either
131: [21:36:49] <LimRes> Wierd I swore it used to!
132: [21:36:51] <LimRes> Thanks Simon
133: [21:37:26] <LimRes> Ah it was never used in the template
134: [21:37:39] <LimRes> :)
135: [21:37:44] <LimRes> 'splains it
136: [21:37:48] <LimRes> Working swell now
137: [21:37:49] <LimRes> thanks
138: [21:41:37] <zippy___> damn yaml
139: [21:42:02] * SightUnseen has left #silverstripe
140: [21:50:10] * Ryan-Toast has joined #silverstripe
141: [21:59:37] <Ryan-Toast> Woah, guys. Don't all talk at once.
142: [22:00:18] <Snowman23> Hi, Ryan-Toast!
143: [22:00:19] <Snowman23> :D
144: [22:00:24] <Snowman23> Wow I lost my hat
145: [22:00:25] <Snowman23> :(
146: [22:00:34] <Ryan-Toast> Snowman23: Was it a nice hat?
147: [22:00:57] <Ryan-Toast> Snowman23: Wait, doesn't that mean you turn back into a normal snowman?
148: [22:01:37] <Snowman23> It was my +Snowman23 hat!
149: [22:02:07] * UncleCheese quit (Quit: UncleCheese)
150: [22:02:16] <Ryan-Toast> I still feel ill from Friday night. Damn old age.
151: [22:02:21] * SightUnseen1 has joined #silverstripe
152: [22:02:24] <Snowman23> XD
153: [22:02:59] * SightUnseen1 has left #silverstripe
154: [22:04:06] <Ryan-Toast> Why is it that LiteralFields require a name?
155: [22:04:17] <simon_w> because every field does
156: [22:04:58] <Ryan-Toast> Fair enough.
157: [22:06:15] * UncleCheese has joined #silverstripe
158: [22:06:56] <Ryan-Toast> I'm making a column moule, so you can just click an "add column" button and it will duplicate the editor field, and save it as an object. Should be fun.
159: [22:07:06] <Ryan-Toast> Unless it doesn't work. Then it will be no fun.
160: [22:11:10] * wracu has joined #silverstripe
161: [22:13:24] <wracu> Morning, can you tell me whether using UploadField('Image','Image') in a DataObject should display a thumbnail in the DataObect when viewing that object in a ModelAdmin? Or is this something I need to implement myself?
162: [22:13:47] <Ryan-Toast> You'll need to do that yourself.
163: [22:14:05] <wracu> It shows a small thumbnail while it is uploading, but goes blank once the upload is complete. The file is succesfully uploaded and attatched to the DataObject...
164: [22:14:47] <Ryan-Toast> Oh, right. It must not be saving properly.
165: [22:15:18] <Ryan-Toast> Does your class have a has_one Image?
166: [22:19:16] <Ryan-Toast> Snowman23: Would you save a title as Varchar(255), or Text? I believe you cvan only have a certain amount of Text fields in mySQL, is that right?
167: [22:19:45] <Snowman23> Hmm
168: [22:19:46] <Snowman23> varchar
169: [22:20:03] <Snowman23> Ryan-Toast: There's a size limit on rows in a table, but I wouldn't worry about that stuff
170: [22:20:16] <Snowman23> Because most titles are less than 255 chars, it makes sense to use varchar instead of text
171: [22:21:53] <Ryan-Toast> Snowman23: Thought so, cheers :)
172: [22:23:44] <simon_w> Unless you're using postgres, then text is less typing
173: [22:25:16] <Snowman23> Yeah, but most people aren't stupid enoguh to use postgres
174: [22:25:19] * Snowman23 giggles and runs away :D
175: [22:25:42] <simon_w> Most people aren't stupid enough to do web dev, so yeah :p
176: [22:26:33] <Snowman23> PSH, most people aren't stupid enough to work in any one particular field!
177: [22:27:51] * Jayden has joined #silverstripe
178: [22:29:06] <Jayden> Anyone have a nice way to get proper .ss syntax highlighting in coda? Just using the PHP-HTML mode ATM
179: [22:43:27] * Colin[pi] has joined #silverstripe
180: [22:43:36] <Colin[pi]> hey y'all
181: [22:43:40] <LimRes> Please anyone know how to setEmptyStying on a map in a front-end form? ->map("ID", "Name", "Please Select") not givin it
182: [22:43:59] <LimRes> in 3.1
183: [22:44:06] <Ryan-Toast> Colin[pi]: Morning
184: [22:44:07] <wracu> Ryan_Toast: Yes it does, and it must be saving as when I click the "Delete from files" button, it is removed from the assets folder...
185: [22:44:09] <Snowman23> hai hai Colin[pi]
186: [22:44:17] <Colin[pi]> ^_^
187: [22:44:30] <Ryan-Toast> wracu: Hmm, strange. Anything in the console?
188: [22:45:24] <wracu> no.
189: [22:45:29] <simon_w> LimRes, ->map('ID', 'Name')->unshift('', 'Please Select')
190: [22:45:31] <wracu> the filename is displayed so its def there
191: [22:46:00] <Ryan-Toast> wracu: Sorry, man. No idea.
192: [22:46:07] <wracu> all g
193: [22:46:56] <Ryan-Toast> Is it possible to save multiple HtmlEditorFields to the same row? i.e row[0] row[1] saves to "row" as an object or something?
194: [22:47:11] <LimRes> Thanks Simon, is that executed any faster than $Prod->setEmptyString('(Select one)');?
195: [22:47:20] <simon_w> Ryan-Toast, you'd need to do the processing yourself?
196: [22:47:27] <simon_w> LimRes, premature optimisation.
197: [22:48:03] <LimRes> haha
198: [22:48:07] <Ryan-Toast> simon_w: Is there documentation on manual saving?
199: [22:48:21] <LimRes> true, I just try to squeeze every drop of learning into every moment
200: [22:48:32] <LimRes> * out of
201: [22:49:19] <LimRes> I prefer your tidy one
202: [22:50:09] <simon_w> Ryan-Toast, you mean like pulling data out of $data and sticking it into $object?
203: [22:50:49] * gelignite quit (Quit: http://bit.ly/nkczDT)
204: [22:51:01] <Ryan-Toast> simon_w: I suppose I mean hooking into a before_save action or something, and injecting the $data as a single object.
205: [22:51:16] <Ryan-Toast> well, the data from the reletive fields.
206: [22:51:17] <simon_w> Ryan-Toast, setBlah
207: [22:52:01] <Ryan-Toast> $this->setField('Blah', $val); ?
208: [22:52:18] <simon_w> Is what you'd need inside it, yes
209: [22:52:44] <Ryan-Toast> And what hook will I call that in?
210: [22:52:51] <simon_w> No hook
211: [22:52:57] <simon_w> setBlah method
212: [22:53:00] <Ryan-Toast> Oh.
213: [22:53:05] <Ryan-Toast> That's literally a method?
214: [22:53:07] <Ryan-Toast> Lol.
215: [22:53:09] <Ryan-Toast> That's great.
216: [22:53:28] <simon_w> Well, it's like getBlah but for setting instead of getting
217: [22:53:39] <Ryan-Toast> I love the naming conventions.
218: [22:54:07] <Ryan-Toast> So can I use getBlah to get the $data?, or is that only for previously saved data?
219: [22:54:16] <simon_w> The method's only literally called setBlah if your field's called Blah
220: [22:54:26] <simon_w> setBlah($value)
221: [22:54:55] <Ryan-Toast> simon_w: Okay. So I still need to call that somewhere, right?
222: [22:55:09] <simon_w> $form->saveInto() calls it
223: [22:55:34] <Ryan-Toast> Does it just chack for any thing with get/set in it?
224: [22:56:17] <simon_w> You know how $this->Blah goes and looks for getBlah()? $this->Blah = $value; goes and tries to call $this->setBlah($value);
225: [22:58:12] <Ryan-Toast> simon_w: Like what's documented here? http://doc.silverstripe.org/framework/en/topics/datamodel
226: [22:58:34] <Ryan-Toast> under Properties > Customising
227: [22:59:12] <simon_w> Ryan-Toast, yes
228: [23:00:25] <Ryan-Toast> simon_w: Cheers, I will have lunch then have a play around :)
229: [23:00:30] <Ryan-Toast> simon_w: Sorry for being a retard.
230: [23:08:54] * Bollig|DesignCty has joined #silverstripe
231: [23:09:09] * MichaelDesignerX has joined #silverstripe
232: [23:10:22] <Ryan-Toast> simon_w: So I tried: http://pastebin.com/rYhpHNHu but it doesn't seem to save anything. Do I need to add a hiddenField or something?
233: [23:11:06] <simon_w> Ryan-Toast, $this->setField('Column', 'Test');
234: [23:11:18] <Ryan-Toast> simon_w: Derp. Cheers.
235: [23:12:03] <Ryan-Toast> simon_w: Still registers as NULL
236: [23:12:36] <Ryan-Toast> simon_w: NVM, added the hiddenField
237: [23:12:40] <Ryan-Toast> and now it works.
238: [23:12:48] <Ryan-Toast> Thanks for all your hgelp :)
239: [23:18:07] * SightUnseen has joined #silverstripe
240: [23:18:10] * SightUnseen has left #silverstripe
241: [23:21:48] * marvanni has joined #silverstripe
242: [23:22:31] * Marvanni2 quit (Ping timeout: 246 seconds)
243: [23:34:47] <wracu> I have a ModelAdmin, for DataObjects that each have a file upload field. This field can take several files... however... they save by default directly into the Assets folder, so I get filename clashes even across different DataObjects. Is there a simple way to create folders for assets i.e. filenames only need to be unique for a given DataObject, not across the whole set of DataObjects?
244: [23:35:44] <wracu> i.e. Assets/DataObjectNumber1/123.doc and Assets/DataObjectNumber2/123.doc
245: [23:36:03] <wracu> might be a stupid question :)
246: [23:36:42] * marvanni quit (Ping timeout: 246 seconds)
247: [23:36:56] * marvanni has joined #silverstripe
248: [23:38:27] * UncleCheese quit (Quit: UncleCheese)
249: [23:39:18] * UncleCheese has joined #silverstripe
250: [23:42:39] <simon_w> wracu, set the upload folder on the UploadField
251: [23:43:34] * Marvanni2 has joined #silverstripe
252: [23:43:51] * marvanni quit (Ping timeout: 252 seconds)
253: [23:47:16] <wracu> thanks simon_w! I feel like a lot of my questions seem to revolve around the best phrase to google on :D
254: [23:47:45] * marvanni has joined #silverstripe
255: [23:48:03] * Marvanni2 quit (Ping timeout: 260 seconds)
256: [23:50:46] * UncleCheese quit (Quit: UncleCheese)
257: [23:56:19] * antmas has joined #silverstripe
258: [23:56:42] <antmas> afternon
259: [23:56:50] <antmas> afternoon*
260: [23:58:03] <simon_w> Morning
261: [23:59:05] <Colin[pi]> HAI antmas :D
262: [23:59:20] <antmas> Colin[pi]: ! HELLO!

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