#silverstripe IRC Log

IRC log for 17 November 2013

All timestamps are in UTC.

1: [00:01:17] * mobiusnz has joined #silverstripe
2: [00:01:42] <mobiusnz> hello, anyone here using silverstripe-compass module?
3: [00:03:48] * willr has joined #silverstripe
4: [00:03:52] <mobiusnz> I'm trying to covert my theme but am getting an error: "Action 'convert' isn't allowed on class Compass.%"
5: [00:14:29] * SightUnseen has joined #silverstripe
6: [00:14:35] * SightUnseen has left #silverstripe
7: [00:15:43] * SightUnseen has joined #silverstripe
8: [00:15:44] * SightUnseen has left #silverstripe
9: [00:20:27] <Pyromanik> pass, sorry
10: [00:40:01] * Marvanni_ has joined #silverstripe
11: [00:42:18] * SightUnseen has joined #silverstripe
12: [00:42:21] * SightUnseen has left #silverstripe
13: [00:42:33] * Marvanni_ quit (Client Quit)
14: [00:46:26] * violetina quit (Ping timeout: 245 seconds)
15: [00:52:11] <mobiusnz> oh well, I've just given up and are using compass directly
16: [01:20:23] * mobiusnz quit (Quit: Leaving.)
17: [01:26:48] * mobiusnz has joined #silverstripe
18: [01:48:16] <Zauberfisch23> mobiusnz: stoped using it early on, just not worth the hassle
19: [01:49:02] <Zauberfisch23> I'd also recommend using compass directly, or using a tool that handles compass well (in my case my custom script for intellij)
20: [01:49:30] <mobiusnz> Zauberfisch23: fair enough. just diving in to sass for the first time
21: [02:08:04] * joelpittet quit (Remote host closed the connection)
22: [02:09:40] * joelpittet has joined #silverstripe
23: [02:24:09] <willr> GruntJS is my standard now, compass module is a bit of a hack
24: [02:35:31] * willr quit (Quit: willr)
25: [02:37:13] * DesignerX has joined #silverstripe
26: [02:46:22] * joelpittet quit (Remote host closed the connection)
27: [03:12:40] * willr has joined #silverstripe
28: [03:13:05] * joelpittet has joined #silverstripe
29: [03:59:45] * SightUnseen has joined #silverstripe
30: [04:06:27] * SightUnseen quit (Quit: Leaving.)
31: [04:38:13] * cloph has joined #silverstripe
32: [04:38:30] * cloph_away quit (Ping timeout: 252 seconds)
33: [04:46:13] * joelpittet quit (Remote host closed the connection)
34: [04:58:08] <mobiusnz> is it possible to get the previous object in a <% loop %> ?
35: [04:58:17] <willr> $Up
36: [04:58:25] <willr> Oh previous, hm
37: [04:58:35] <willr> don't think so?
38: [04:59:29] <mobiusnz> I want both previous and next, kinda like with pagenation
39: [05:12:28] <willr> Doesn't look like there is anything in there for ya to do that easily.
40: [05:14:20] * joelpittet has joined #silverstripe
41: [05:19:10] <mobiusnz> hmm, what about pagination that shows one record at a time?
42: [05:21:25] <willr> Well pagination works on reducing the list by a given request, not sure outputting to a single page would work. Would work if you're doing something like a gallery and loading via ajax. Why do you need next / prev
43: [05:22:36] <mobiusnz> I'm making a single page site, and looping child page's content
44: [05:22:54] <mobiusnz> I want to be able to link to #page-name for prev and next pages
45: [05:24:29] <willr> Well could mangle it by doing something like $Up.ListOfPages.Limit(1, $Pos).URLSegment
46: [05:24:44] <mobiusnz> http://www.sspaste.com/paste/show/5288510a80333
47: [05:24:59] <willr> Or just put a getNextPage() / getPreviousPage() on your Page class and do your own DB query
48: [05:28:34] <mobiusnz> is it easy to determine the order of children of a page?
49: [05:29:40] <willr> Yep, easy. Are you having children on the single page site or just 1 flat level?
50: [05:30:34] <willr> Some older 2.4 code around for getting next / previous page that handles going up the tree into next siblings if that's what you need - http://www.silverstripe.org/customising-the-cms/show/6320#post268876
51: [05:31:01] <mobiusnz> I've got SinglePageContainer->Multiple pages, then just normal Pages in the site tree
52: [05:31:43] <willr> if it's all just 1 level then the code is a pretty simple $next = Page::get()->filter(array('Sort:GreaterThan' => $this->Sort))->sort('Sort', 'ASC')->First();
53: [05:34:56] <mobiusnz> all the page sections being looped on are the child of one page
54: [05:35:29] <mobiusnz> I tried return $this->Parent()->Children()->filter(array('Sort:GreaterThan' => $this->Sort))->sort('Sort', 'ASC')->First();
55: [05:35:29] <mobiusnz> but that didn't work
56: [05:36:10] <willr> You can just use a filter of ParentID => $this->ParentID to get the same section
57: [05:37:42] <mobiusnz> I'm not sure what you mean
58: [05:39:41] <willr> https://gist.github.com/wilr/7509733
59: [05:40:59] <mobiusnz> nice!
60: [05:41:36] <mobiusnz> I don't understand the $this->Sort part but it does what I wan ;)
61: [05:43:39] <willr> So that filter, will get all the pages which share the parent ID (i.e siblings) and we just want the ones that have a Sort larger than the current one. Sort is the name of the column in the CMS that stores the order of the page
62: [05:43:50] <willr> so $this->Sort is the position of the current page
63: [05:43:58] <mobiusnz> ah yep
64: [05:44:30] <willr> Your previous method will look similar, though you want Sort:LessThan and also to change the sort to DESC (so you get the largest)
65: [05:45:19] <mobiusnz> I changed it to Sort:LessThan and Last() and it seems to be right
66: [05:46:12] <willr> ah yeah, same difference as long as it's sorted.
67: [05:52:13] * mobiusnz quit (Quit: Leaving.)
68: [05:53:50] * mobiusnz has joined #silverstripe
69: [05:58:42] * mobiusnz quit (Ping timeout: 268 seconds)
70: [06:07:13] * willr quit (Quit: willr)
71: [06:45:00] * robert___ is now known as robert_
72: [06:49:10] * joelpittet quit (Read error: Connection reset by peer)
73: [06:49:23] * joelpittet has joined #silverstripe
74: [07:03:07] * mobiusnz has joined #silverstripe
75: [07:07:53] * mobiusnz quit (Ping timeout: 265 seconds)
76: [07:24:13] * mobiusnz has joined #silverstripe
77: [07:31:58] * SightUnseen has joined #silverstripe
78: [07:32:06] * SightUnseen has left #silverstripe
79: [07:57:06] * Pyromanik has left #silverstripe
80: [08:21:32] * joelpittet quit ()
81: [08:23:44] * zippy__ has joined #silverstripe
82: [08:30:51] * violetina has joined #silverstripe
83: [08:58:29] * mobiusnz quit (Quit: Leaving.)
84: [09:52:59] * spronk2 has joined #silverstripe
85: [09:53:13] <spronk2> waaza
86: [09:59:12] * mobiusnz has joined #silverstripe
87: [10:04:04] * mobiusnz quit (Ping timeout: 264 seconds)
88: [10:06:41] * zippy__ quit (Quit: zippy__)
89: [10:08:47] * spronk2 has left #silverstripe
90: [10:09:11] * spronk2 has joined #silverstripe
91: [10:09:38] * mobiusnz has joined #silverstripe
92: [10:14:27] * mobiusnz quit (Ping timeout: 265 seconds)
93: [10:37:54] <spronk2> hmm
94: [10:37:57] <spronk2> bloody work
95: [11:00:05] * mobiusnz has joined #silverstripe
96: [11:04:18] * mobiusnz quit (Ping timeout: 245 seconds)
97: [11:34:57] * spronk2 quit (Quit: spronk2)
98: [11:37:16] * spronk2 has joined #silverstripe
99: [11:45:42] * zfmf has joined #silverstripe
100: [11:46:07] * spronk2 quit (Quit: spronk2)
101: [11:46:57] * spronk2 has joined #silverstripe
102: [11:48:25] * Alexwijn has joined #silverstripe
103: [11:57:14] <Alexwijn> What to do when you use the setDescription and the text is not displaying?
104: [12:00:59] * mobiusnz has joined #silverstripe
105: [12:05:08] * mobiusnz quit (Ping timeout: 245 seconds)
106: [12:15:28] * irogue23 quit (Ping timeout: 264 seconds)
107: [12:15:44] * irogue23 has joined #silverstripe
108: [12:25:14] * Error404NotFound has joined #silverstripe
109: [12:50:35] <Alexwijn> When your inside a loop that is also inside a loop
110: [12:50:42] <Alexwijn> How can I get a variable from the first loop
111: [12:53:52] * spronk2 quit (Ping timeout: 264 seconds)
112: [12:54:24] * spronk2 has joined #silverstripe
113: [13:15:46] <zfmf> $up.
114: [13:16:24] <zfmf> http://doc.silverstripe.org/framework/en/reference/templates#scope
115: [13:16:51] <zfmf> Alexwijn: ^^
116: [13:17:12] <Alexwijn> ah thanks
117: [13:30:26] <Alexwijn> Why I'm I able to see children that belongs to a other item in the database
118: [13:30:46] <Alexwijn> The item is connected to ID 1
119: [13:30:52] <Alexwijn> And I just created a new parent
120: [13:30:55] <Alexwijn> that now has ID 2
121: [13:31:03] <Alexwijn> but I can see the children of ID 1 in the other tba
122: [13:31:06] <Alexwijn> tab*
123: [13:32:19] <Alexwijn> I deleted the table and rebuild it
124: [13:32:23] <Alexwijn> created the item again
125: [13:32:28] <Alexwijn> But it still have the same
126: [13:32:31] <Alexwijn> problem
127: [13:32:34] <Alexwijn> Can anyone help me with this?
128: [13:32:57] * origincube has joined #silverstripe
129: [13:33:01] <Alexwijn> This is just basic SS
130: [13:33:15] <Alexwijn> This is not something that just got broken for now reason
131: [13:33:20] <Alexwijn> no*
132: [13:36:24] <Alexwijn> wtf is this
133: [13:38:26] <Alexwijn> Is this expected behavior that you can see all items that are also not attached to the parent that you are editing?
134: [13:39:48] <Alexwijn> Great, I'm taling to myself again
135: [13:39:54] <Alexwijn> talking*
136: [13:40:32] <Alexwijn> It is very frustrated when nobody replying when SS is falling apart here
137: [13:48:24] * origincube quit (Read error: Connection reset by peer)
138: [13:49:06] * origincube has joined #silverstripe
139: [13:51:59] <zfmf> share your code with us ;) sspaste.com
140: [13:52:10] <zfmf> so maybe i can help
141: [13:52:25] <origincube> hey guy, so i have a question which will sound completely daft most likely.
142: [13:53:00] <Alexwijn> you won't be able to get responds, everyone is sleeping here I think...allthough I can try to answer
143: [13:53:32] <origincube> the site i'm working on has a specialised image gallery, and i was planning to just dump the html code for it into a standard page, but obviously for maintenance and updating purposes this isn't the best idea, so i realised i could technically create a specialised page type etc like in the tutorial to manage this, my question is, this gallery has sections within it
144: [13:53:54] <Alexwijn> zfm, it is just basic relation model
145: [13:53:56] <origincube> so is it possible to have three page types a DesignGalleryHolder, a DesignGallerySection and a DesignGalleryPage
146: [13:54:19] <origincube> holder contains sections and sections contain pages
147: [13:54:28] <origincube> the section page will never need to be viewed though
148: [13:56:53] <origincube> this should be fairly straight forward right?
149: [13:56:57] <Alexwijn> Damn, I guess it was my own fault...I created a custom function to order the results of it, but forgot to also add a where in it that check for the parent
150: [13:57:25] <Alexwijn> origincube, sure why not
151: [14:00:13] * origincube quit (Read error: Connection reset by peer)
152: [14:00:58] * origincube has joined #silverstripe
153: [14:01:15] * Zauberfisch23 quit (Ping timeout: 246 seconds)
154: [14:02:03] * Zauberfisch23 has joined #silverstripe
155: [14:02:16] * mobiusnz has joined #silverstripe
156: [14:04:59] <Alexwijn> How can automaticly set the parent id when creating a new child
157: [14:05:15] <Alexwijn> because when i created it, it does not attach itself to the parent where i was in context
158: [14:07:27] * mobiusnz quit (Ping timeout: 272 seconds)
159: [14:11:24] <Alexwijn> I tried this
160: [14:11:25] <Alexwijn> $fields->replaceField('LayerSliderID', new HiddenField('LayerSliderID', null, $this->LayerSlider()->data()->ID));
161: [14:11:33] <Alexwijn> But all I get is the number 0
162: [14:11:42] <Alexwijn> LayerSlide is the parent of Slide
163: [14:13:06] <Alexwijn> Anyone got a suggestion
164: [14:13:37] <origincube> wish i could offer help, but you're sounding a lot more knowledgeable about SS than I am :/
165: [14:13:56] * origincube is a newbie to customisation
166: [14:16:51] <origincube> ugh, can't even get this image upload field to work :(
167: [14:17:05] <origincube> just says "not found" when i try upload anything
168: [14:17:22] <Alexwijn> what url?
169: [14:17:45] <Alexwijn> and how did you add the upload field?
170: [14:19:45] <origincube> in the page that contains it
171: [14:19:55] <Alexwijn> you also added the has_one?
172: [14:20:14] <origincube> i have static $many_many = array ( "PageImages" => "Image" );
173: [14:20:21] <origincube> and then in getCMSfields()
174: [14:20:27] <origincube> $fields->addFieldToTab('Root.Main', $uploadField = new UploadField('PageImages', 'Example Images'));
175: [14:20:45] <Alexwijn> You want to add one or more images to that page?
176: [14:20:55] <origincube> yeah
177: [14:21:05] <Alexwijn> one or more ?
178: [14:21:10] <origincube> bascially its a design gallery, so it has a design with 0 or more
179: [14:21:19] <origincube> example images
180: [14:21:21] <Alexwijn> then you don thave to add your uploadfield
181: [14:21:26] <Alexwijn> SS will do for you
182: [14:21:39] <origincube> so i can leave that out in the getCMSfields?
183: [14:21:42] <Alexwijn> But you only be able to see it after you created the page
184: [14:21:44] <Alexwijn> yes
185: [14:21:59] <Alexwijn> You are using $fields = parent::getCMSFields(); right?
186: [14:22:04] <origincube> yes
187: [14:22:06] <Alexwijn> ok
188: [14:22:10] <Alexwijn> then you can leave it out
189: [14:22:21] <origincube> ok, if i remove it and rebuild
190: [14:22:23] <Alexwijn> Because then SS will create a gridfield in a second tab once the page got created
191: [14:22:24] <origincube> will that fix it
192: [14:22:45] <Alexwijn> yes
193: [14:23:30] <origincube> ok thanks, let me try that
194: [14:23:49] <Alexwijn> sure
195: [14:25:42] * Error404NotFound quit (Read error: Connection reset by peer)
196: [14:25:57] <origincube> hmm, where will this gridfield be then? ;)
197: [14:26:03] <Alexwijn> in a new tab
198: [14:26:07] <Alexwijn> the page it already created right?
199: [14:26:12] <origincube> yeah
200: [14:26:19] <Alexwijn> then it should be a second tab
201: [14:26:25] <zfmf> Alexwijn: dont replace the id field remove it. then i thinks its added automatically
202: [14:26:27] <Alexwijn> you also have $has_one on the parent
203: [14:26:55] <Alexwijn> zfmf, yeah I found the problem...it is the custom function that I use to get the children
204: [14:26:55] <origincube> has_one on the parent?
205: [14:27:03] <Alexwijn> $layerSet = Layer::get()->where('SlideID = ' . $this->ID)->sort('Order DESC');
206: [14:27:07] <Alexwijn> return $layerSet;
207: [14:27:12] <Alexwijn> If I use that function
208: [14:27:20] <Alexwijn> Then he is unable to retrieve the parent for somer eason
209: [14:27:28] <Alexwijn> if I remove the function it works fine again
210: [14:27:37] <Alexwijn> Do you know how to order the list in the frontend?
211: [14:28:00] <Alexwijn> because the order is a critical on the frontend
212: [14:28:11] <origincube> brb
213: [14:28:42] <Alexwijn> origincube, parent needs has_many
214: [14:29:06] <Alexwijn> not many many, btw
215: [14:31:31] <zfmf> Alexwijn: doyou have a DO
216: [14:31:33] <zfmf> ?
217: [14:31:40] <Alexwijn> a DO?
218: [14:31:46] <zfmf> dataobject
219: [14:31:47] <Alexwijn> DataObject?
220: [14:31:51] <Alexwijn> for?
221: [14:32:04] <Alexwijn> That custom is in the DO
222: [14:32:10] <Alexwijn> /**
223: [14:32:10] <Alexwijn> * @return DataList
224: [14:32:10] <Alexwijn> */
225: [14:32:10] <Alexwijn> function Layers()
226: [14:32:10] <Alexwijn> {
227: [14:32:10] <Alexwijn> $layerSet = Layer::get()->where('SlideID = ' . $this->ID)->sort('Order DESC');
228: [14:32:10] <Alexwijn> return $layerSet;
229: [14:32:11] <Alexwijn> }
230: [14:33:23] <zfmf> and sort doesn't work here ? or whats the problem ?? do you call Layers in your frontend?
231: [14:33:28] <origincube> back
232: [14:33:50] <Alexwijn> The problem is that I cant create a child when I that function is in place
233: [14:34:01] <Alexwijn> The child is not getting attached to the parent that I have in context
234: [14:34:07] <Alexwijn> it does created in the databse
235: [14:34:13] <Alexwijn> but it is not getting attached
236: [14:34:21] <Alexwijn> Without that funciton in place the attaching works fine
237: [14:35:36] * Error404NotFound has joined #silverstripe
238: [14:39:23] <zfmf> try using static $default_sort=('Order DESC') if its a DO
239: [14:40:01] <Alexwijn> You just it has be with round brackets?
240: [14:40:30] <zfmf> no its a string sorrfy :)
241: [14:40:35] <Alexwijn> ok
242: [14:41:24] <Alexwijn> When I rename order to a faulty name I get no error
243: [14:41:37] <Alexwijn> It like $default_sort is not getting used
244: [14:47:15] <Alexwijn> fixed it
245: [14:47:21] <Alexwijn> it was caching
246: [14:49:09] <origincube> cool :)
247: [14:49:15] <origincube> ok so now i can jump in again
248: [14:49:25] <origincube> so you mentioned the parent needs a has_one?
249: [14:49:30] <origincube> i'm not seeing why though?
250: [14:50:12] <origincube> basically the design page just needs to display a possible set of example images
251: [14:58:38] <origincube> any ideas how to get that many_many with image grid thing you mentioned working?
252: [15:02:56] * mobiusnz has joined #silverstripe
253: [15:04:00] <origincube> hi mobiusnz
254: [15:07:28] * origincube quit (Quit: ~ Trillian - www.trillian.im ~)
255: [15:07:50] * mobiusnz quit (Ping timeout: 265 seconds)
256: [15:14:21] * Error404NotFound quit (Read error: Connection reset by peer)
257: [15:19:52] * DesignerX quit (Ping timeout: 268 seconds)
258: [15:25:38] * spronk2 quit (Quit: spronk2)
259: [15:31:43] * Error404NotFound has joined #silverstripe
260: [15:44:39] <Alexwijn> the parent does not need origincube
261: [15:44:43] <Alexwijn> has_one
262: [15:44:57] <Alexwijn> it needs has_many
263: [15:51:09] * Error404NotFound quit (Read error: Connection reset by peer)
264: [16:03:33] * mobiusnz has joined #silverstripe
265: [16:07:35] * Error404NotFound has joined #silverstripe
266: [16:08:14] * mobiusnz quit (Ping timeout: 265 seconds)
267: [16:10:49] * Error404NotFound quit (Client Quit)
268: [16:12:50] <Alexwijn> Why is this not possible in a ife
269: [16:12:52] <Alexwijn> statement:
270: [16:12:53] <Alexwijn> <% if $Pos % 3 %>
271: [16:42:26] * origincube has joined #silverstripe
272: [16:42:45] <origincube> hi guys!
273: [16:54:33] * zfmf has left #silverstripe
274: [17:02:39] * Shrike_Finland1 quit (Ping timeout: 252 seconds)
275: [17:04:10] * mobiusnz has joined #silverstripe
276: [17:08:28] * mobiusnz quit (Ping timeout: 245 seconds)
277: [17:59:03] * SightUnseen has joined #silverstripe
278: [17:59:05] * SightUnseen has left #silverstripe
279: [18:04:59] * mobiusnz has joined #silverstripe
280: [18:10:01] * mobiusnz quit (Ping timeout: 272 seconds)
281: [18:13:36] * Shrike_Finland has joined #silverstripe
282: [18:24:08] * origincube has left #silverstripe
283: [18:47:39] * zfmf has joined #silverstripe
284: [18:55:15] <Zauberfisch23> Alexwijn: % is not possible
285: [18:55:39] <Zauberfisch23> but there is a method for it
286: [18:55:51] <Zauberfisch23> $Modulus(3)
287: [18:56:04] <Alexwijn> and I can use a if statement around it?
288: [19:00:36] <Zauberfisch23> yes
289: [19:02:01] <Zauberfisch23> <% if $Modulus(3) == 0 %>this is the 3rd item in the row<% end_id %>
290: [19:05:04] * Stomach has joined #silverstripe
291: [19:05:23] * simon_w has joined #silverstripe
292: [19:05:26] * mobiusnz has joined #silverstripe
293: [19:09:25] * joelpittet has joined #silverstripe
294: [19:09:59] * mobiusnz quit (Ping timeout: 252 seconds)
295: [19:19:02] * mobiusnz has joined #silverstripe
296: [19:25:30] * joelpittet quit ()
297: [19:27:58] * Zauberfisch__ quit (Quit: Leaving)
298: [19:28:47] * Zauberfisch has joined #silverstripe
299: [19:33:26] * nickmolhoek has joined #silverstripe
300: [19:39:29] * mobiusnz quit (Quit: Leaving.)
301: [19:47:56] * Alexwijn quit ()
302: [19:48:17] * zippy__ has joined #silverstripe
303: [19:49:00] <zippy__> morning
304: [19:51:57] * origincube has joined #silverstripe
305: [19:52:16] <origincube> Hi guys, so i have a question
306: [19:52:37] <origincube> I have a design gallery, and each gallery item can have 0 or more example images
307: [19:52:49] <origincube> these images are displayed in an image slider
308: [19:53:09] * tankr quit (Quit: Leaving.)
309: [19:53:13] <origincube> but i need to hide the next previous arrows if there is only 1 item
310: [19:53:32] <origincube> i thought <% if ExampleImages.TotalItems > 1 %> would do the trick
311: [19:54:13] <origincube> but it isn't working
312: [19:54:14] <origincube> any ideas?
313: [19:54:47] <Zauberfisch23> try ExampleImages.Count
314: [19:55:29] <Zauberfisch23> also, I believe the > operator was not availiable in 3.0, I think it was introduced in 3.1
315: [19:55:47] <origincube> ah cool, running 3.1.1
316: [19:55:56] <origincube> that works perfectly thanks! :)
317: [19:58:50] * DigNZ has joined #silverstripe
318: [20:15:47] * UncleCheese has joined #silverstripe
319: [20:17:02] * travis-ci has joined #silverstripe
320: [20:17:02] <travis-ci> [travis-ci] silverstripe/silverstripe-framework#1558 (master - 538f09b : Ingo Schommer): The build passed.
321: [20:17:02] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-framework/compare/802b64db207e...538f09b94fea
322: [20:17:03] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-framework/builds/14108658
323: [20:17:03] * travis-ci has left #silverstripe
324: [20:23:37] * travis-ci has joined #silverstripe
325: [20:23:37] <travis-ci> [travis-ci] silverstripe/silverstripe-framework#1559 (3.1 - 651d3ea : Mateusz U): The build passed.
326: [20:23:37] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-framework/compare/bd5fdf1f1964...651d3ea7fc57
327: [20:23:38] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-framework/builds/14108875
328: [20:23:38] * travis-ci has left #silverstripe
329: [20:23:59] * antmas has joined #silverstripe
330: [20:24:25] * Pyromanik has joined #silverstripe
331: [20:24:47] * Ryan-Toast has joined #silverstripe
332: [20:26:08] <zippy__> anyone seen any real world performance with silverstripe on apache vs nginx?
333: [20:27:51] <simon_w> It's not static, a properly configured Apache is likely to be faster
334: [20:27:52] <Zauberfisch23> I've been told nginx will yield a significant performance gain, but I can only repeat what others told me, I have not used nginx yet
335: [20:28:09] * antmas quit (Ping timeout: 250 seconds)
336: [20:28:25] * antmas has joined #silverstripe
337: [20:28:34] <Zauberfisch23> simon_w: intressting, can you elaborate on properly configured?
338: [20:28:52] * origincube quit (Quit: ~ Trillian - www.trillian.im ~)
339: [20:29:34] <simon_w> Zauberfisch23, actually configured for the amount of memory you have, removed excessive modules, no htaccess or checking for symlinks (just follow them), that sort of thing
340: [20:30:16] <simon_w> zippy__, if you're after performance, move the database to its own server so it can be almost entirely in RAM
341: [20:30:32] <simon_w> That'll speed you up more than what pokes PHP can
342: [20:31:29] <simon_w> Zauberfisch23, also, mod_php over cgi
343: [20:31:47] <antmas> mornin
344: [20:33:40] <Zauberfisch23> simon_w: mod_php? I was lead to believe that fastcgi beats mod_php in performance
345: [20:33:52] * mobiusnz has joined #silverstripe
346: [20:34:03] <simon_w> Just like you're lead to believe that nginix is faster?
347: [20:34:10] <Zauberfisch23> I guess so
348: [20:34:31] <simon_w> Why spin up two processes (with all the overhead associated with that) when you only need one?
349: [20:34:50] <Zauberfisch23> well, I am currently running both, mod_php and fastcgi, and I guess my sites are just to small to notice any real benefits on either one
350: [20:34:58] <simon_w> Sure, fastcgi is faster if it sticks around and apache doesn't
351: [20:35:14] <simon_w> Very few sites will get any benefit
352: [20:35:37] <simon_w> You can save maybe a couple of milliseconds at best from a 300ms request
353: [20:36:39] <zippy__> simon_w: thanks, this box has 6 hdd's and 24Gb of ram, so going to be fine having them DB on there for now and have it all in memory. I am going to use nginx for all the static files and videos, and apache for the php I think.
354: [20:37:07] <simon_w> zippy__, you'll still get more of a speedup moving the DB on to its own box
355: [20:38:13] <zippy__> that will be the first upgrade path once we hit some slow down
356: [20:38:45] * simon_w uses the ?flush admin-bypass to slowdown zippy__'s site!
357: [20:39:40] <zippy__> pft, that wouldn't be fixed by moving the DB off, just throw more connections at it
358: [20:39:44] <zippy__> to slow it down
359: [20:40:51] <simon_w> Yeah, it'll be fixed by SS actually caring about these sort of things
360: [20:41:32] <zippy__> php 5.4 or 5.5 .. 5.5 does have the opcode in which could be useful.. after a few more minor versions I think
361: [20:41:58] <antmas> I'm a js noob - http://jsfiddle.net/Bs3k4/4/
362: [20:42:16] <antmas> trying to hide the div by class if img.alt = some text
363: [20:42:48] <Zauberfisch23> antmas: to me it seems more like you are a jquery noob :P
364: [20:43:05] <antmas> Zauberfisch23: correction. Yes. :P
365: [20:43:08] <simon_w> antmas, that sets the attribute then returns the object
366: [20:43:11] <Zauberfisch23> $('img').attr({alt: 'foo'})
367: [20:43:14] <Zauberfisch23> does 2 things
368: [20:43:19] <antmas> :O
369: [20:43:22] <antmas> ah, whoops
370: [20:43:24] <Zauberfisch23> set alt to "foo" of all items that match the selector img
371: [20:43:36] <Zauberfisch23> and then return a collection of all items that matched
372: [20:44:06] <Zauberfisch23> so you are sort of doing "if ([<img>, <img>, <img>] != true)
373: [20:44:15] <Zauberfisch23> you might want to do:
374: [20:44:16] <antmas> yeah
375: [20:44:33] <antmas> I'm only trying to select the img with that alt - not set it
376: [20:44:37] <Zauberfisch23> if ($('img.myImage').attr('alt' == 'some alt text'))
377: [20:44:48] <antmas> ^^^^^
378: [20:44:51] <simon_w> nope
379: [20:44:57] <Zauberfisch23> searching by alt content?
380: [20:44:59] <zippy__> if ($('img.myImage').attr('alt') == 'some alt text')
381: [20:45:17] <simon_w> antmas, $('img.myImage[alt=some alt text]')
382: [20:45:20] <Zauberfisch23> fail, yeah, have missplaced the )
383: [20:45:23] <zippy__> but, you might be able to use the alt in a selector
384: [20:45:33] <Zauberfisch23> yeah, what simon_w said
385: [20:45:49] <antmas> aweome, thanks team
386: [20:45:49] <simon_w> Really, both of you need to learn 2 jquery too :p
387: [20:46:32] <Zauberfisch23> my excuse is miss understood the question for checking the alt text rather than searching for it
388: [20:47:51] <Zauberfisch23> $Layout and $Content for template folders, are there any drawbacks of $Content?
389: [20:48:04] <Zauberfisch23> because $Content also represents the content of the page
390: [20:48:18] <simon_w> Can't use it in $Layout, and is at the bottom of the stack
391: [20:48:52] <Zauberfisch23> oh, so I can't nest it? as in I can't use it in Layout/Page.ss?
392: [20:48:59] <Zauberfisch23> ok, then my usecase is out the window anyway
393: [20:49:56] <antmas> so
394: [20:50:44] <antmas> it is not working
395: [20:50:59] <Zauberfisch23> the alt selector?
396: [20:51:14] <antmas> yeh - I'm not sure what I need to be calling myImage
397: [20:52:00] <Zauberfisch23> myImage? forget my code, I missunderstood your problem, use simons solution (the [alt=]) selector
398: [20:52:20] <antmas> Zauberfisch23: I am using simon_w code
399: [20:52:42] <simon_w> antmas, you probably don't need the .myImage since your images don't have classes
400: [20:53:23] <antmas> simon_w: right, so if ($('img.[alt=sometext]')) ?
401: [20:53:31] <Zauberfisch23> use .length
402: [20:53:40] <Zauberfisch23> $() will always return an object
403: [20:53:40] <simon_w> And just img[alt...]
404: [20:54:26] <antmas> ok, that's it
405: [20:54:27] <Zauberfisch23> if ($('img[alt=sometext]').length)
406: [20:54:34] * violetina quit (Remote host closed the connection)
407: [20:54:54] <antmas> Zauberfisch23: why lenght? I only need this for certain alt tags, not if > 0 or anything
408: [20:55:21] <Zauberfisch23> antmas: because $('something-that-does-not-exist') will still return a jquery collection
409: [20:55:33] <Zauberfisch23> so even if jquery does not find something, it will return an object
410: [20:55:44] <antmas> Zauberfisch23: I see
411: [20:55:47] <Zauberfisch23> and so if($(...)) will _always_ be true
412: [20:56:07] <Pyromanik> how to tell wy webserver responds slowly?
413: [20:56:10] <Zauberfisch23> if you want to check if jquery found something, you have to use .length
414: [20:58:27] <Pyromanik> but often it doesn't matter Zauberfisch23, it depends on your usecase.
415: [20:58:54] <antmas> so, if that's the case - this would work? $('img.myImage[alt=some alt text]')
416: [20:59:13] <antmas> fff sorry
417: [20:59:56] <antmas> http://jsfiddle.net/Bs3k4/4/ that's it
418: [21:00:01] <Pyromanik> $('selector').blahfunc() will do blah func to all found elements, or it will try to do blahfunc to nothing because jquery object is null length
419: [21:00:24] <antmas> Pyromanik: so it wont return a collection in that case?
420: [21:00:46] <Zauberfisch23> Pyromanik: yeah, of course, thats whay I was saing if you want to check if jquery found something
421: [21:00:53] <Pyromanik> it always returns a collection. just that the collection length CAN be 0.
422: [21:01:06] <Zauberfisch23> because than it matters, if you just want to call an operation on all found elements, it does not matter ineed
423: [21:01:28] <Pyromanik> yeh, what Zauberfisch23 said, and what I said. it depends on usecase.
424: [21:01:44] <antmas> ok
425: [21:01:56] <antmas> I'm onboard now... I think :P
426: [21:02:15] <Zauberfisch23> antmas: the reason why jquery always returns a collection is that jQuery('foo').hide() will never throw an error, because it is always called on an object, even if there is no element foo
427: [21:02:30] <Zauberfisch23> if it finds foo, it will call hide on foo
428: [21:02:36] <Zauberfisch23> if it doesn't, it will do nothing
429: [21:03:15] <Zauberfisch23> if jQuery did not return an empty collection but instead would return false, then hide() would throw an error, because there is no method hide() on boolean
430: [21:04:32] <simon_w> jQuery tries to make it so you can follow the null pattern
431: [21:05:43] <zippy__> simon_w: You source compile php on your mac, and use something like macports?
432: [21:05:59] <simon_w> zippy__, yes, no
433: [21:06:19] <zippy__> should of been or not and. So source eh, much of a hassle?
434: [21:06:34] <simon_w> Not once you've got it set up
435: [21:06:46] * mobiusnz quit (Quit: Leaving.)
436: [21:07:08] <zippy__> use the apache that comes with osx, or compile latest there also?
437: [21:07:50] <simon_w> using the inbuilt one
438: [21:17:57] <zippy__> god damn trying to find when php 5.4 eol / when no more updates will be put out - can't find! where do they hide this
439: [21:18:44] <simon_w> A year after 5.6 gets released
440: [21:18:46] * mobiusnz has joined #silverstripe
441: [21:19:46] <zippy__> mm I think they've changed it now to be 3 years after release, so 5.4 was released 2012-03-01 so will be 2015-03-01
442: [21:19:58] <simon_w> Well, going by the 5.3 sol
443: [21:20:13] <simon_w> *eol
444: [21:21:19] <zippy__> tits…. I will just go with php 5.5
445: [21:21:24] <ss23> tits?!
446: [21:21:27] <ss23> oh... :(
447: [21:21:40] <zippy__> ^tits^fuck it^
448: [21:21:52] <simon_w> You know those things that filled out your dress, ss23?
449: [21:22:09] <zippy__> what could go wrong eh
450: [21:22:26] <ss23> :(
451: [21:22:35] <ss23> The entire issue with that dress was the like.. uh. shoulders
452: [21:22:41] <ss23> wide shoulders on a dress == oh god so tight
453: [21:31:24] <antmas> hmmmm
454: [21:31:33] <antmas> this is pretty standard right? $("img").error(function(){
455: [21:31:55] <antmas> $("elementhere").hide();
456: [21:32:01] <antmas> });
457: [21:32:12] <ss23> I wouldn't do it
458: [21:32:22] <antmas> so, if image error - hide something?
459: [21:32:36] <ss23> Why would you do that though?
460: [21:32:56] * ss23
461: [21:32:58] <ss23> .
462: [21:37:43] * Colin[pi] has joined #silverstripe
463: [21:37:56] <Colin[pi]> mood gorning
464: [21:41:29] <ss23> moin
465: [21:41:46] <Colin[pi]> you're in early
466: [21:41:46] <Colin[pi]> ;P
467: [21:42:43] <simon_w> Weekly meeting
468: [21:42:54] <Colin[pi]> ahhh I see, be there or be fired
469: [21:44:03] <simon_w> You should try having one of those :p
470: [21:44:07] <antmas> this is the first week in 8 that I haven't had at least 4 meetings :D
471: [21:44:25] <Colin[pi]> simon_w: I try to avoid as many meetings as possible :P
472: [21:44:48] <Colin[pi]> antmas: ugh
473: [21:45:09] <antmas> Colin[pi]: oh yea
474: [21:45:17] <antmas> hangin out for my xmas annual leave
475: [21:45:40] <Colin[pi]> me too but my boss is a dick
476: [21:45:44] <Colin[pi]> <--- my boss
477: [21:46:44] <ss23> lol
478: [21:46:48] <ss23> that's right, I should book flights etc
479: [21:46:51] <ss23> 10:41:29 <+ss23> moin
480: [21:46:51] <ss23> 10:41:46 < Colin[pi]> you're in early
481: [21:46:52] <ss23> ouch
482: [21:46:57] <ss23> I didn't even make it in time for the meeting, simon_w :(
483: [21:46:58] <Colin[pi]> ;D lol
484: [21:47:02] <Colin[pi]> hahaha
485: [21:47:09] <simon_w> ss23, FIRED!
486: [21:47:13] <ss23> :D
487: [21:47:20] <Colin[pi]> ss23: where are you off to?
488: [21:48:12] <ss23> Nowhere?
489: [21:48:17] <ss23> At the moment I'm going to try release this site
490: [21:48:21] <Colin[pi]> but.. flights?
491: [21:48:25] * simon_w guesses "home"
492: [21:48:28] <ss23> oh uh
493: [21:48:29] <ss23> home, yeah
494: [21:48:33] <ss23> I have family in Hamilton
495: [21:48:38] <Colin[pi]> ah k
496: [21:48:48] <Colin[pi]> yeah that's right I forgot you had to move to start at SS
497: [21:48:56] <simon_w> I'm not going away this Christmas break
498: [21:49:00] <ss23> Well I was in Sydney before that, Colin[pi] :P
499: [21:49:06] <Colin[pi]> ah yes lol
500: [21:49:16] <antmas> heading down south for xmas
501: [21:49:21] <antmas> then Franz for new years
502: [21:49:24] <Colin[pi]> I don't have a great urge to travel this xmas
503: [21:49:26] <simon_w> You can get further south than Tasman?
504: [21:49:30] <Colin[pi]> I may go to visit some fam
505: [21:49:39] <simon_w> Colin[pi], you can come visit!
506: [21:49:42] <Colin[pi]> :D
507: [21:49:47] <Colin[pi]> we do want to see NZ some time
508: [21:50:25] <simon_w> Flights are only like AUD$1100 return at the moment
509: [21:50:34] <antmas> simon_w: wtf? for NZ?
510: [21:50:49] <Colin[pi]> hmm thought it'd be cheaper :D
511: [21:50:54] <simon_w> antmas, yeah, over new years
512: [21:50:54] <antmas> that's cray
513: [21:51:02] <Colin[pi]> would be tempted except for my looming tax bill ;(
514: [21:51:31] <simon_w> Colin[pi], it's usually about NZD$600-700 return from CBR
515: [21:51:41] <Colin[pi]> that sounds more like it
516: [21:51:52] <simon_w> But Christmas and high demand and stuff
517: [21:52:03] <Colin[pi]> capitalist dogs
518: [21:52:18] <simon_w> Damn people going on holiday making my holiday more expensive
519: [21:53:38] <antmas> if I wasn't buying a car, it'd be a decent holiday
520: [21:55:16] <antmas> buying cars sucks :<
521: [21:56:19] <Colin[pi]> yes, yes it does
522: [21:56:27] <Colin[pi]> the salesmen suck even more though
523: [21:56:30] <ss23> 10:50:25 <@simon_w> Flights are only like AUD$1100 return at the moment
524: [21:56:34] <ss23> jesus
525: [21:58:27] * LimRes has joined #silverstripe
526: [21:59:22] <simon_w> That's to CBR
527: [21:59:28] <Colin[pi]> simon_w: I can get a return flight for about $800 ex Canberra on 10 Dec
528: [21:59:32] <ss23> CBR == ??
529: [21:59:39] <ss23> CBR == canberra?
530: [21:59:42] <simon_w> Colin[pi], yeah. Now move to the Christmas break
531: [21:59:43] <Colin[pi]> aye
532: [22:00:00] <LimRes> Hello all, I am just finally getting a chance to update from 2.3 to 3.1 and I am struggling a bit with changes to the director routes/ routes.yml. Anybody give me some advice?
533: [22:00:33] <Colin[pi]> simon_w: mm yeah now it has shot up to 1100 :(
534: [22:00:34] <antmas> that's a
535: [22:00:34] <ss23> ouch, big update
536: [22:00:39] <antmas> that;s a big jump
537: [22:00:48] <LimRes> Yeah, I am feeling it :D
538: [22:00:51] <LimRes> but very excited
539: [22:01:05] <LimRes> at least client is giving me the time to do it properly
540: [22:01:59] <LimRes> My issues is mainly around forms actions
541: [22:02:06] <LimRes> In the old model
542: [22:02:33] <LimRes> I just made director rules, and used a single controller to instantiate many different forms based on the $Action passed along by the rule
543: [22:02:39] <simon_w> LimRes, well, the routes YML is pretty much like the old Director::add_routes, except the // split now actually works consistently
544: [22:03:01] <LimRes> Thanks simon_w
545: [22:03:07] <LimRes> that is one part I don't understand
546: [22:03:09] <LimRes> the //
547: [22:03:37] <LimRes> but firstly, should that file sit in my custom folder or just be added to mysite?
548: [22:03:47] <simon_w> Basically, everything before the // is consumed by the rule and everything after is passed on to the controller
549: [22:03:48] <LimRes> I have it in my own folder, it seems to behave like it is not there...
550: [22:03:56] <LimRes> Ah ok
551: [22:04:10] <LimRes> that's a nice clear way of putting it !
552: [22:04:21] <LimRes> maybe it is just that I have it in wrong place?
553: [22:04:59] <simon_w> Probably
554: [22:05:08] <simon_w> You usually want it before the $Action
555: [22:05:15] <LimRes> I mean the file itself
556: [22:05:20] <LimRes> the routes.yml
557: [22:05:32] <LimRes> my code is in its own folder
558: [22:05:48] <simon_w> So long as it's in a blah/_config/ folder, it should work fine
559: [22:06:00] <antmas> ^^^
560: [22:06:00] <LimRes> yup that's where it is
561: [22:06:05] <LimRes> so maybe it has nothing to do with that
562: [22:06:21] <antmas> is it yml that has issues with whitespace?
563: [22:06:45] <simon_w> yes
564: [22:07:02] <LimRes> I don't see any whitespace
565: [22:07:04] <simon_w> LimRes, you need to only use spaces for indentation and flush after each change
566: [22:07:21] <LimRes> yup checked that
567: [22:07:53] <LimRes> Is there any default
568: [22:07:57] <LimRes> routing rule
569: [22:07:58] <LimRes> in other words
570: [22:08:06] <LimRes> my rule has an "$ID
571: [22:08:13] <LimRes> and "$OtherID"
572: [22:08:28] <LimRes> is there any chance that SS is just doing that internally based on some best guess?
573: [22:10:22] <simon_w> That's from the $url_handler on the Controller
574: [22:10:38] * wracu has joined #silverstripe
575: [22:10:51] * antmas quit (Ping timeout: 250 seconds)
576: [22:11:30] <LimRes> Ok then that means that I have the routes.yml in the right place and it is doing its job
577: [22:11:47] <LimRes> so then I truly don't understand how the form actions are resolving their urls
578: [22:12:04] <LimRes> the uri is http://fpa.localhost/quote/edit/6
579: [22:12:11] <LimRes> and when I submit the form
580: [22:12:21] <LimRes> it resolves to http://fpa.localhost/QuotePage_Controller/EditQuoteForm
581: [22:12:52] <LimRes> And since the edit action requires the /$ID/ in order to proceed with rendering the form
582: [22:12:54] <simon_w> It uses ->Link() on the Controller
583: [22:13:16] <LimRes> So does it sound like that is what is missing?
584: [22:13:31] <simon_w> If you want a different URL, yes
585: [22:13:57] * EasyCo has joined #silverstripe
586: [22:14:12] <EasyCo> Morrrrrning
587: [22:14:24] * mobiusnz quit (Quit: Leaving.)
588: [22:14:44] <wracu> In ModelAdmin, I wanted to have two tabs. One for the first type of dataObject, and another tab for all others (3 others) that can each be displayed on a subtab of that tab.
589: [22:14:47] <wracu> Before I spend too much more time trying to figure this out, is this doable?
590: [22:15:05] * origincube has joined #silverstripe
591: [22:15:25] <wracu> its simple enough do do this within a dataobject (when the other objects are children)
592: [22:15:39] <Colin[pi]> Hey EasyCo
593: [22:15:42] <wracu> but I'm not feeling the same simplicity when trying to do it on the ModelAdmin
594: [22:16:42] <LimRes> Ah ok, thanks simon_w I think this must be it
595: [22:16:47] <simon_w> wracu, it's not. You can use multiple ModelAdmins though
596: [22:17:00] <LimRes> Does Link() get passed a $URLSegment automagically?
597: [22:17:47] <simon_w> It usually gets passed the action, but forms don't
598: [22:18:53] <LimRes> So with forms then, I guess I am missing a fundamental aspect of the existing model (which I inherited from another dev)
599: [22:19:10] <LimRes> I have been simply replicating a pattern without knowing how it actually worked
600: [22:19:30] <LimRes> how do I pass along the form action to the URL with Link()
601: [22:19:46] <LimRes> $URLSegment doesn't seem to be passed automatically
602: [22:19:47] <simon_w> It gets appended to whatever you return by the form
603: [22:20:08] * antmas has joined #silverstripe
604: [22:20:36] <simon_w> Otherwise, you can make a specific FormObjectLink() method which gets passed the name of the form
605: [22:20:45] <origincube> hi guys, so i have a question about string manipulation
606: [22:21:11] <origincube> is there any easy way for me to truncate a string in my template so that it stops throwing the design out
607: [22:21:32] <simon_w> $String.LimitCharacters(50)
608: [22:21:39] <origincube> awesome
609: [22:21:50] <origincube> thanks :)
610: [22:22:01] * mobiusnz has joined #silverstripe
611: [22:22:46] * Vikk has joined #silverstripe
612: [22:22:50] <Vikk> Hey there all :)
613: [22:23:31] <Vikk> I've just logged out of the CMS and I get this error when attempting to log in...
614: [22:23:53] <EasyCo> Colin[pi]: Did you get any of that hail this weekend?
615: [22:24:00] * origincube has left #silverstripe
616: [22:24:00] <Colin[pi]> thankfully, no
617: [22:24:06] <EasyCo> Pieces a bit bigger then hail came down here
618: [22:24:08] <Vikk> Action 'Security' isn't available on class Security.
619: [22:24:17] <Colin[pi]> yeah some of it was rather huge
620: [22:24:29] <simon_w> Vikk, you don't have a <% base_tag %> in your Page.ss template
621: [22:25:00] <Vikk> lol, Thanks for that :) I'm an absolute noob on silverstripe, Enjoying it though :)
622: [22:25:10] <Vikk> Thanks once again
623: [22:26:21] <LimRes> simon_w, I am having no luck. I would gladly paypal you a sandwich if you could see me through this concept :)
624: [22:27:30] <Colin[pi]> does paypal accept sandwich as currency?
625: [22:27:43] <Ryan-Toast> What's the best practise way to have one installation handle different country versions of the same SS site?
626: [22:28:07] <LimRes> Simon what does a good sandwich cost where you are :)
627: [22:28:23] <Pyromanik> Ryan-Toast: there are 2 ways these days.
628: [22:28:36] <Pyromanik> you can use SS's translatable
629: [22:28:42] <Pyromanik> or use tractorcow's fluent
630: [22:28:51] <Pyromanik> (modules iirc)
631: [22:29:07] <Pyromanik> LimRes: about $20
632: [22:29:12] <Ryan-Toast> Pyromanik: Will that allow me to have different pages on different sub domains?
633: [22:29:27] <Pyromanik> Ryan-Toast: translatable will, yes.
634: [22:29:33] <Pyromanik> not sure about fluent, but probably not.
635: [22:29:47] <Ryan-Toast> Pyromanik: 80% of the pages will be the same, but there will need to be the flexablility to have different ones.
636: [22:29:51] <Pyromanik> I haven't used it, but it works quite differently to translatable.
637: [22:30:12] <Pyromanik> Ryan-Toast: translatable basically makes a whole new site tree structure for you.
638: [22:30:20] <Ryan-Toast> Ohh, cool.
639: [22:30:27] <Pyromanik> ie, new SiteConfig (this is one of those edge cases I think it was you I talked about with)
640: [22:30:54] <Pyromanik> ie siteConfig ID isn't always 1, in this case it'd be 2 for Afrikaans, 3 for Indian, etc.
641: [22:31:03] <LimRes> Is that $NZD?
642: [22:31:09] <Pyromanik> or whatever languages you have.
643: [22:31:11] <Pyromanik> LimRes: yes.
644: [22:31:14] * mobiusnz quit (Quit: Leaving.)
645: [22:31:19] <Ryan-Toast> Pyromanik: So for each siteConfig I add, it will add a sitetree?
646: [22:31:57] <Pyromanik> Ryan-Toast: for each translation you add, it'll form a new site tree structure. first copying over whatever page you've selected to translate, but it's not a 1:1 copy, nor is it necessary to be.
647: [22:32:34] <Pyromanik> LimRes: A good sandwich here is a hard thing to come by. But can cost anywhere from $7 to $22.
648: [22:32:41] <Pyromanik> on average.
649: [22:33:11] <Pyromanik> Ryan-Toast: the best thing to do would be for you to set up a dummy install & put translatable on it so you can see how it works.
650: [22:33:23] <Ryan-Toast> Pyromanik: Will do.
651: [22:33:25] <Pyromanik> you could do the same with fluent if you wished for a comparison.
652: [22:33:49] <Ryan-Toast> Pyromanik: I'll have a pl;ayu with them now and see how they stack up.
653: [22:33:51] <Ryan-Toast> Pyromanik: Cheers.
654: [22:34:07] <LimRes> Alright, sold for $20. It's about time I gave something back to the SS community :)
655: [22:34:22] <LimRes> Are you taking over the lesson Pyromanik or is simon_w still there?
656: [22:34:47] <Pyromanik> LimRes: I've no idea what you're talking about, I only saw your question about sandwhich prices.
657: [22:34:54] <LimRes> haha
658: [22:34:56] <Pyromanik> I thought you were just curious abou the cost of living in NZ
659: [22:35:05] <LimRes> simon_w was helping me understand an issue with FormObjectLink
660: [22:35:10] <LimRes> my forms are broked
661: [22:35:15] <Pyromanik> can't say I've heard of it sorry.
662: [22:35:20] <LimRes> upgrading ss 2.3 to 3.0
663: [22:35:23] <LimRes> 3.1
664: [22:35:29] <LimRes> simon_w are you still there?
665: [22:35:59] <Pyromanik> LimRes: the issue atm with NZ is that it's the middle of the work day, and most of us have day-jobs.
666: [22:36:16] <LimRes> I am in Taranaki
667: [22:36:22] <Pyromanik> oh
668: [22:36:30] <Pyromanik> 'Naki proud.
669: [22:36:39] <LimRes> Hard Core
670: [22:36:53] <LimRes> you are in welly?
671: [22:36:56] <Pyromanik> NP or somewhere round the mountain?
672: [22:37:00] <LimRes> NP
673: [22:37:02] <Pyromanik> LimRes: no, I'm in Christchurch.
674: [22:37:12] <LimRes> I used to live in Shirley then Burnside
675: [22:37:20] <LimRes> Before the shakes
676: [22:37:27] <Pyromanik> and you moved to NP?
677: [22:37:29] <Pyromanik> o.0
678: [22:37:31] <LimRes> So I moved to a volcano
679: [22:37:32] <LimRes> haha
680: [22:37:36] <LimRes> yeah
681: [22:37:44] <Pyromanik> I spent time in Hawera as a kid.
682: [22:37:51] <LimRes> I'm sorry!
683: [22:37:54] <LimRes> j/k
684: [22:38:01] <LimRes> pretty quiet there
685: [22:38:29] <Pyromanik> yeh, it is.
686: [22:38:49] <Pyromanik> so what's the attraction to NP?
687: [22:39:03] <Pyromanik> get a job in the sewerage section of the council?
688: [22:39:13] <LimRes> Not quite
689: [22:39:19] <LimRes> we just like it here
690: [22:39:29] <LimRes> I do dev and design so could go anywhere
691: [22:39:33] <Pyromanik> it's one of the best kept NZ secretes.
692: [22:39:33] <LimRes> good for kids here
693: [22:39:39] <LimRes> shhh!!!
694: [22:39:42] <Pyromanik> beautiful location.
695: [22:39:44] <Pyromanik> great surf.
696: [22:39:45] <Pyromanik> etc.
697: [22:39:50] <Pyromanik> just...
698: [22:39:52] <LimRes> that's the one
699: [22:39:56] <Pyromanik> lots of cows.
700: [22:39:58] <Pyromanik> :<
701: [22:40:02] <LimRes> not here in town
702: [22:40:07] <Pyromanik> }:[:]
703: [22:40:23] <Pyromanik> LimRes: I think your definition of 'cow' neeeds broadening!
704: [22:40:25] <Pyromanik> xD
705: [22:40:31] <LimRes> I resisted the joke
706: [22:40:38] <Pyromanik> :)
707: [22:40:40] <LimRes> alright, well I am pretty stuck and still need help, any suggestions?
708: [22:41:12] <Pyromanik> ok, rule #1 of IRC: don't ask about asking questions.
709: [22:41:32] <Pyromanik> so things like "is anyone here" or "can someone help me" or "I need help" are out.
710: [22:41:43] <Pyromanik> just describe your issue, etc.
711: [22:41:50] <LimRes> yup that's how it started...
712: [22:41:54] <Pyromanik> you might not get an answer straight away
713: [22:42:05] <LimRes> I just think Simon got busy, at least put me on right track
714: [22:42:12] <Ryan-Toast> How do I do sweet backflips?
715: [22:42:22] <LimRes> Practice practice practice
716: [22:42:24] <Ryan-Toast> plz respond.
717: [22:42:41] <LimRes> Or greenscreen
718: [22:42:51] <Ryan-Toast> Pyromanik: Fluent is pretty swish.
719: [22:43:04] <Pyromanik> quite swish looking.
720: [22:43:17] <Pyromanik> LimRes: wirework.
721: [22:43:28] <Ryan-Toast> Went on a 3 day charter, and I'm still swaying.
722: [22:48:59] * mobiusnz has joined #silverstripe
723: [22:49:24] <Pyromanik> Ryan-Toast: I'm still swaying too
724: [22:49:29] <Pyromanik> but for different reasons I think.
725: [22:49:49] <Ryan-Toast> Pyromanik: Good weekend of drinking then?
726: [22:49:51] <Pyromanik> on Friday at about 3pm I smashed my cranium into a rock and spend the next 24 hours in hospital.
727: [22:49:55] <Pyromanik> Ryan-Toast: nope.
728: [22:50:00] <Ryan-Toast> Pyromanik: Oh, shiet.
729: [22:50:04] <Ryan-Toast> No good, man.
730: [22:50:07] <Pyromanik> nope.
731: [22:50:13] <Pyromanik> conecentration still lacking.
732: [22:50:14] <Ryan-Toast> Pyromanik: How did you manage that?
733: [22:50:24] <Pyromanik> Ryan-Toast: downhill mountain bike.
734: [22:50:38] <Ryan-Toast> Did you have a helmet on?
735: [22:50:39] <Pyromanik> apparently there's a track! x
736: [22:50:41] <Pyromanik> DxD
737: [22:50:53] <Pyromanik> Ryan-Toast: yeh, course. I might not be here if I didn't.
738: [22:50:57] <Pyromanik> split the helmet.
739: [22:51:00] <Ryan-Toast> Pyromanik: wow.
740: [22:51:24] <Ryan-Toast> Pyromanik: That much damage through a helmet. Must have been a pretty big fall.
741: [22:51:36] <simon_w> LimRes, figured it out yet?
742: [22:51:52] <Pyromanik> was going around a corner that tightened up, bike ran a bit wide and got up on the vegetation. Nek minit I'm hurtling into a wee gully towards some volcanic rocks...
743: [22:52:23] <Pyromanik> at least, that's what I think happened. I seem to have this... dream/memory that seems to explain it.
744: [22:52:30] <Ryan-Toast> Pyromanik: Crazy.
745: [22:52:32] <Pyromanik> but I don't actually remember... well pretty much anything.
746: [22:52:46] <antmas> Pyromanik: should have had a gopro on the helmet :P
747: [22:52:52] <Ryan-Toast> Pyromanik: Hard :D
748: [22:52:53] <Pyromanik> antmas: it'd be dead.
749: [22:53:17] <Pyromanik> plus it sounds like it could have been the pivot for the helmet that might have snapped my neck.
750: [22:53:17] <antmas> Pyromanik: yeah but I imagine the sd card would survive
751: [22:53:34] <Pyromanik> antmas: yeh, I do agree it would be cool to have on tape.
752: [22:53:41] <antmas> hell yeah
753: [22:53:53] <antmas> totally putting in for one for xmas
754: [22:53:54] <antmas> :D
755: [22:53:55] <Pyromanik> if only for my own benefit so I can see what the fuck even happened to me (see part about fucked short term memory)
756: [22:53:58] <LimRes> thanks simon_w, no I haven't
757: [22:54:14] <simon_w> Okay, so what are you trying to do?
758: [22:54:17] <LimRes> I did get FormObjectLink to fire
759: [22:54:26] <LimRes> but now the actions don't get fired
760: [22:54:27] <Pyromanik> antmas: concentrating at work is... difficult :(
761: [22:54:44] <Pyromanik> And I'm under doctors orders that if I get a headache to go back to hospital/
762: [22:54:56] <antmas> ugggh
763: [22:54:58] <antmas> headaches
764: [22:54:59] <LimRes> In a nutshell, I am trying to keep everything in one controller so I don't have to re-architect a whole bunch
765: [22:55:09] <antmas> had a migrain yesterday for 8 hours :(
766: [22:55:16] <Pyromanik> antmas: mmm, symptom of intracranial bleeding I guess. Dunno.
767: [22:55:26] <simon_w> antmas, amputate.
768: [22:55:30] <LimRes> and that one controller needs to be able to return a different form based on different actions, like "Add" or "Edit"
769: [22:55:35] * howardgrigg has joined #silverstripe
770: [22:55:49] <Pyromanik> antmas: I chipped my scapula (Shoulder blade).
771: [22:55:51] <LimRes> and each form can have it's own actions
772: [22:56:04] <Pyromanik> moving my left arm under it's own power is... agonising.
773: [22:56:14] <Colin[pi]> antmas: I had them daily for three years :(
774: [22:56:27] <Pyromanik> Colin[pi]: how did you get rid?
775: [22:56:28] <LimRes> but as soon as I use the FormObjectLink, it seems to never reach the formaction
776: [22:56:32] <Pyromanik> My mother suffers.
777: [22:56:42] <Pyromanik> she's tried all sorts of shit.
778: [22:56:45] <Colin[pi]> Pyromanik: tried.. literally.. everything
779: [22:56:50] <antmas> Pyromanik: had a friend that did that recently, he got drunk and somehow managed to do that, plus break his collar bone while going through the McD's drive through on his downhill
780: [22:56:54] <Colin[pi]> spent thousands and thousands on doctors :(
781: [22:57:00] <Colin[pi]> nothing was ever found
782: [22:57:13] <simon_w> LimRes, so, the action of a form needs to point to a method that directly returns that form object (hence why the default one is $controller->Link() . '/FormMane')
783: [22:57:14] <Colin[pi]> eventually discovered it was the mocha coffee that I was drinking
784: [22:57:15] <Pyromanik> Colin[pi]: sounds familiar.
785: [22:57:21] <Pyromanik> Colin[pi]: hahahah, bl man.
786: [22:57:24] <simon_w> Colin[pi], parenthood?
787: [22:57:33] <Colin[pi]> well I did just get married when they started....
788: [22:57:46] <Colin[pi]> for some reason, I can drink coffee no problems, I can drink hot chocolate no problems
789: [22:57:49] <Colin[pi]> but COMBINE the two
790: [22:57:52] <Colin[pi]> headaches
791: [22:57:56] <Colin[pi]> go figure
792: [22:58:09] <Colin[pi]> and really severe ones too
793: [22:58:29] <Colin[pi]> it was either that, or temporary cluster headaches
794: [22:58:34] <Colin[pi]> they just sorta started... and then stopped after three years
795: [22:58:46] <Colin[pi]> but I stopped the mochas about the same time ;)
796: [22:58:47] <antmas> Colin[pi]: the tumor must have...moved
797: [22:59:04] <LimRes> simon_w, that makes sense
798: [22:59:07] <Ryan-Toast> Holy shit this is awesome: http://robotgame.org/home
799: [22:59:08] <Colin[pi]> haha that was the thing, I had super high res MRIs done and I was kinda hoping they would find something
800: [22:59:12] <Colin[pi]> but nada
801: [22:59:13] <Colin[pi]> no brain even ;)
802: [22:59:15] <Colin[pi]> just sawdust
803: [22:59:37] <antmas> Colin[pi]: lol, yeah I had an MRI - and the doctor literally told me to harden up when they found nothing
804: [22:59:39] <LimRes> so is there a simple example of this pattern somewhere, or am I just being silly trying to handle all of this in one controller? It seems to make sense to do it this way...
805: [22:59:53] <Colin[pi]> antmas: how painful are yours out of 10?
806: [23:00:03] <Colin[pi]> where 10 is like the worst pain imaginable
807: [23:00:03] <Pyromanik> 11:59 < Ryan-Toast> Holy shit this is awesome: http://robotgame.org/home
808: [23:00:09] <Pyromanik> 500 Internal server error.
809: [23:00:10] <antmas> Colin[pi]: I get them twice per month on average - about 8/10
810: [23:00:15] <Colin[pi]> oooh
811: [23:00:16] <simon_w> LimRes, usually, the default URLs work fine and you don't need to customise them.
812: [23:00:18] <Pyromanik> 12:00 < Colin[pi]> where 10 is like the worst pain imaginable
813: [23:00:20] <Ryan-Toast> Pyromanik: Try again.
814: [23:00:26] <Pyromanik> I find people's imagination.... limited
815: [23:00:29] <simon_w> LimRes, why couldn't you do that?
816: [23:00:41] <Colin[pi]> antmas: I'd rate mine at 8 or 9 out of 10 also, but I had them every day :(
817: [23:00:52] <antmas> Colin[pi]: bah, screw that
818: [23:01:10] <antmas> I understand the universe when I have them, that and vommit profusely
819: [23:01:23] <Colin[pi]> sounds like migranes
820: [23:01:43] <LimRes> If you are willing ... http://pastebin.com/msgb4Bpf
821: [23:01:44] <Colin[pi]> if mine were cluster headaches, I can see why people call them "suicide headaches"
822: [23:01:51] <Colin[pi]> because man... at times... was tempting lol
823: [23:02:41] <LimRes> When rendering the "Edit" form, I needed to know what quote I was editing, and so when I clicked either form action, it died at the "edit" action on the controller
824: [23:03:03] <simon_w> LimRes, okay, so you don't need the FormObjectLink method
825: [23:03:08] <LimRes> I thought not...
826: [23:03:10] <LimRes> :)
827: [23:03:15] <simon_w> or the calls to "$form->loadDataFrom($this->request->postVars());"
828: [23:03:19] <antmas> the best immediate remedy, was gentley pulling eye socket upwards on the side that hurts the most
829: [23:03:25] <antmas> gently*
830: [23:04:16] <simon_w> LimRes, basically, you need to check if you're using POST in EditQuoteForm ($this->request->isPOST()). If so, use $this->request->postVar('QuoteID') instead of $this->request->param('ID')
831: [23:04:58] <Pyromanik> and vommit profusely
832: [23:05:05] <Pyromanik> totally a migraine antmas.
833: [23:05:09] <simon_w> LimRes, also, I'm assuming you've got a 'quote': 'QuotePage_Controller' route?
834: [23:05:10] <Pyromanik> get that shit checked.
835: [23:05:20] <LimRes> Yup
836: [23:05:21] <LimRes> I do
837: [23:05:35] <simon_w> If so, you should add public function Link($action = '') { return self::join_links('quote', $action); } to get nicer URLs
838: [23:05:56] <antmas> Pyromanik: did, I'm all good. Low blood pressure + migrain tendencies is all
839: [23:07:41] <antmas> + stress
840: [23:08:29] <antmas> Pyromanik: if you (probably don't) remember last Friday - I had that issue with blank error messages? the fix you provided didn't work :(
841: [23:08:42] <antmas> ie. setting lang in yml
842: [23:08:43] <LimRes> Ok done all that
843: [23:08:46] <Pyromanik> antmas: last friday?
844: [23:08:51] <antmas> yeh
845: [23:08:54] <Pyromanik> antmas: no idea how I helped you last Friday.
846: [23:09:01] <Pyromanik> I was busy being in a near coma in a hospital bed.
847: [23:09:07] <ss23> o.o
848: [23:09:09] <ss23> what, Pyromanik?
849: [23:09:19] <antmas> Pyromanik: I'll take a look
850: [23:09:31] <Pyromanik> ss23: turns out the hospital takes head injuries very seriously.
851: [23:09:44] <ss23> You had a head injury? Hocket?
852: [23:09:47] <ss23> Hockey
853: [23:10:14] <Pyromanik> ss23: http://iforce.co.nz/i/4zwrqvgc.0sc.jpg
854: [23:10:25] <ss23> ouch
855: [23:10:26] <LimRes> Still no joy simon http://pastebin.com/i5DPRMdq
856: [23:10:27] <Pyromanik> apparently that was about 2cm wide.
857: [23:10:32] <Pyromanik> according to stitching doctor.
858: [23:10:33] <antmas> Pyromanik: 13:47 Friday
859: [23:10:36] <LimRes> and by the way the sandwich offer still stands :)
860: [23:10:36] <antmas> logs
861: [23:10:56] <Pyromanik> antmas: must have been just before I left. I went riding at 2pm.
862: [23:11:02] <antmas> this crap http://imgur.com/T0yLVSo
863: [23:11:09] <antmas> Pyromanik: yeh, you left not long after
864: [23:11:23] <Pyromanik> ss23: http://iforce.co.nz/i/xnn21k4k.hdu.jpg
865: [23:11:28] <Pyromanik> http://iforce.co.nz/i/pqbzelxf.o2s.jpg
866: [23:11:32] <ss23> blargh
867: [23:11:34] <ss23> From hocket, Pyromanik?
868: [23:11:43] <Pyromanik> ss23: no, volcano.
869: [23:11:48] <ss23> wtf?
870: [23:11:49] <ss23> what?
871: [23:12:38] <antmas> so, include lang in mysite/lang
872: [23:12:46] <antmas> and require it in config.php
873: [23:12:50] <antmas> :< no luck
874: [23:13:40] <Pyromanik> ss23: somewhere around here http://goo.gl/maps/v95uf
875: [23:13:44] <simon_w> LimRes, you need to update line 49 too
876: [23:13:56] <Pyromanik> ss23: actually have no idea where, memory gone.
877: [23:13:56] <ss23> idgi, Pyromanik
878: [23:13:57] <ss23> what happened?
879: [23:14:08] <Pyromanik> ss23: downhill mountainbike, sans track apparently.
880: [23:14:11] <ss23> oic
881: [23:14:13] <Colin[pi]> :o
882: [23:14:20] <Colin[pi]> my little boy cracked his head open on a door frame last night :(
883: [23:14:28] <ss23> Pyromanik: Well, good thing you're not dead I guess! :D
884: [23:14:33] <Pyromanik> yeh
885: [23:14:34] <Colin[pi]> running in the house... i've told him about 1000 times
886: [23:14:37] <EasyCo> The most helpful error message ever: 'There has been an error'
887: [23:14:49] <Colin[pi]> EasyCo: sounds like 90% of Microsoft errors
888: [23:14:51] <Pyromanik> EasyCo: good news, easy to grep for!
889: [23:14:54] <Colin[pi]> "Something went wrong."
890: [23:15:08] <EasyCo> Haha, yah
891: [23:15:10] <LimRes> yup had just spotted that :)
892: [23:16:12] * Ryan-Toast quit (Quit: Ryan-Toast)
893: [23:16:29] <LimRes> Ok got a Save action to fire! That's a minor victory
894: [23:16:33] <LimRes> as for the add one
895: [23:16:33] <LimRes> Action "doAddProduct" not allowed on controller (Class: QuotePage_Controller)
896: [23:16:47] <LimRes> I read that one should not add form actions to allowed actions on controller
897: [23:17:09] <LimRes> doSaveQuote did not need it...
898: [23:17:29] <simon_w> LimRes, you're adding the button that calls doAddProduct to the $fields, not to the $actions, so the form isn't expecting it to be allowed
899: [23:18:02] <simon_w> So, either add it to the $actions FieldList or to $allowed_actions
900: [23:18:08] <Pyromanik> actions are fields, but fields are not actions.
901: [23:18:40] <LimRes> Aha!
902: [23:19:02] <LimRes> So when it goes to set permitted functions, it only checks the actions, not the inline actions
903: [23:19:13] <LimRes> I had not guessed that thanks!
904: [23:19:14] <simon_w> yup
905: [23:19:44] * Ryan-Toast has joined #silverstripe
906: [23:19:56] <simon_w> And don't worry, I'll just make ss23 buy me lunch ;)
907: [23:20:07] <ss23> :(
908: [23:20:13] <ss23> what if I don't wanna buy you lunch!
909: [23:20:19] <ss23> In fact, I've only bought you lunch like once
910: [23:20:35] <Colin[pi]> that's the point I think?
911: [23:20:57] <LimRes> That's very kind, but the SS community has really helped me and I get to do precious little in return
912: [23:21:13] <ss23> LimRes: Oh, are you offering to write documentation?
913: [23:21:13] <ss23> :D
914: [23:21:23] <LimRes> hahahahahahahaha no.
915: [23:21:27] <Colin[pi]> LimRes: don't, it's ss23's jon
916: [23:21:29] <Colin[pi]> *job
917: [23:21:53] <ss23> nu uh!
918: [23:22:13] <Colin[pi]> yah uh!
919: [23:22:28] <LimRes> Ok last question, what is the preferred way now to add a child to a has_many component?
920: [23:22:35] <LimRes> I used to just set the ParentID manually
921: [23:22:41] <LimRes> on a new object
922: [23:22:48] <LimRes> is that still the cleanest way?
923: [23:23:17] <antmas> lunch!
924: [23:23:42] * Colin[pi] still has two hours until lunch ;(
925: [23:24:30] <EasyCo> Mmmm, lunch.
926: [23:24:36] <antmas> dat feels when you forgot a spoon for yoghurt
927: [23:24:56] <Colin[pi]> antmas: use your fingers sissy
928: [23:24:59] <Colin[pi]> ;P
929: [23:25:03] <EasyCo> Or tongue
930: [23:25:17] <antmas> lol - then you have to make 'that sound' that everyone loves
931: [23:25:34] <EasyCo> Fuck'm, eat your yogurt
932: [23:25:57] * antmas is using a fork
933: [23:26:27] * DesignerX has joined #silverstripe
934: [23:26:48] * SightUnseen has joined #silverstripe
935: [23:26:52] * SightUnseen has left #silverstripe
936: [23:29:51] <Pyromanik> LimRes: $mmrelList->add($obj)
937: [23:30:56] <EasyCo> Is there task that runs through DB entries for AssetAdmin and fixes/repairs any invalid inks? i.e: A file that doesn't exist on the server but is showing in AssetAdmin get removed.
938: [23:33:43] <LimRes> Pyromanik, does that mean you have to do $Quote = DataObject::get_by_id('Quote', $data['QuoteID']);
939: [23:33:45] <LimRes> then
940: [23:33:58] <LimRes> $Quote->Products->add($NewQuotedProduct);
941: [23:34:01] <LimRes> ?
942: [23:35:33] <EasyCo> Turns out that yes!
943: [23:35:44] <EasyCo> dev/tasks/FilesystemSyncTask
944: [23:35:46] <EasyCo> Beauty
945: [23:36:06] <LimRes> oops $Quote->Products()->add
946: [23:36:56] <EasyCo> You should be able to do it in one
947: [23:37:06] <EasyCo> line
948: [23:37:20] <EasyCo> No need to store in a var
949: [23:40:35] <LimRes> EasyCo you mean like DataObject::get_by_id('Quote', $data["QuoteID"])->Products()->add($NewQuotedProduct);
950: [23:41:48] <EasyCo> Yes
951: [23:41:51] <EasyCo> That should be fine
952: [23:41:56] * DigNZ1 has joined #silverstripe
953: [23:42:55] <LimRes> Hmmm not working with that
954: [23:43:42] <Vikk> I've got a dataobject and I'd like to output it in two places within the template. The template output must not repeat the dataobject, instead it must see if the object has been output and then output the next unique entry in the series. Where do I even start?
955: [23:46:32] <EasyCo> Vikk: Write a method that tracks when it's been called and increments the pointer to the next DO record.
956: [23:48:49] <Vikk> Great, will give it a try. Thanks
957: [23:49:10] <EasyCo> np
958: [23:49:46] <simon_w> ss23, want lunch?
959: [23:50:01] <ss23> Sure, but 10 mins? Just finished a release a little while ago and don't wanna run quickly
960: [23:51:24] <simon_w> I suppose so
961: [23:51:44] <ss23> ^.^
962: [23:56:07] * Nimle has joined #silverstripe
963: [23:57:24] <Nimle> Some of static methods calls have been replaced with config api calls in SS 3.2. for example, $config->update('LeftAndMain', 'application_name', 'Tickets.com'); But can this config api call be made in somewhere else rather than config file?
964: [23:57:29] <Nimle> I want to make it dynamic
965: [23:57:40] <Nimle> but dont want to put dynamic code into config file

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