#silverstripe IRC Log

IRC log for 3 November 2013

All timestamps are in UTC.

1: [00:10:45] * mobiusnz has joined #silverstripe
2: [00:14:59] * EasyCo quit (Ping timeout: 240 seconds)
3: [00:15:21] * mobiusnz quit (Ping timeout: 272 seconds)
4: [00:30:54] * zfmf has left #silverstripe
5: [00:35:50] * robert_ quit (Read error: Connection reset by peer)
6: [01:11:45] * mobiusnz has joined #silverstripe
7: [01:13:40] * DesignerX has joined #silverstripe
8: [01:14:56] * spronk2 quit (Quit: spronk2)
9: [01:16:01] * mobiusnz quit (Ping timeout: 240 seconds)
10: [02:12:14] * mobiusnz has joined #silverstripe
11: [02:16:06] * UncleCheese has joined #silverstripe
12: [02:16:47] * mobiusnz quit (Ping timeout: 260 seconds)
13: [02:17:21] * robert_ has joined #silverstripe
14: [02:38:41] * UncleCheese quit (Quit: UncleCheese)
15: [02:48:25] * UncleCheese has joined #silverstripe
16: [02:50:16] * UncleCheese quit (Client Quit)
17: [02:53:28] * SightUnseen has joined #silverstripe
18: [02:53:30] * SightUnseen has left #silverstripe
19: [03:12:57] * mobiusnz has joined #silverstripe
20: [03:17:05] * mobiusnz quit (Ping timeout: 240 seconds)
21: [04:13:51] * mobiusnz has joined #silverstripe
22: [04:18:06] * mobiusnz quit (Ping timeout: 240 seconds)
23: [04:20:49] * EasyCo has joined #silverstripe
24: [04:54:25] * cloph_away has joined #silverstripe
25: [04:54:28] * cloph quit (Ping timeout: 240 seconds)
26: [05:05:27] * spronk2 has joined #silverstripe
27: [06:15:21] * mobiusnz has joined #silverstripe
28: [06:19:49] * mobiusnz quit (Ping timeout: 248 seconds)
29: [06:39:20] * UncleCheese has joined #silverstripe
30: [06:55:37] * UncleCheese quit (Quit: UncleCheese)
31: [07:15:44] * UncleCheese has joined #silverstripe
32: [07:15:57] * mobiusnz has joined #silverstripe
33: [07:20:12] * mobiusnz quit (Ping timeout: 240 seconds)
34: [07:24:16] * UncleCheese quit (Quit: UncleCheese)
35: [07:39:17] * ccburns has joined #silverstripe
36: [07:41:57] <ccburns> Hey guys - if I am using Director::forceSSL to force the whole site into SSL is there anything else needed? I.e. when I look at forceWWW() - the PHP header() function includes a 301 header but forceSSL() doesn't do that? Does google see https:// and http:// different like then do domain.com and www.domain.com?
37: [07:53:53] * EasyCo_ has joined #silverstripe
38: [07:56:09] * EasyCo quit (Ping timeout: 272 seconds)
39: [07:56:09] * EasyCo_ is now known as EasyCo
40: [07:57:26] * mobiusnz has joined #silverstripe
41: [08:01:33] * mobiusnz quit (Ping timeout: 240 seconds)
42: [08:01:37] * ccburns quit (Quit: ccburns)
43: [08:58:14] * mobiusnz has joined #silverstripe
44: [09:02:29] * mobiusnz quit (Ping timeout: 248 seconds)
45: [09:42:27] * EasyCo quit (Quit: We can't stop here, this is bat country)
46: [09:58:53] * mobiusnz has joined #silverstripe
47: [10:03:03] * mobiusnz quit (Ping timeout: 245 seconds)
48: [10:47:18] * guci0 has joined #silverstripe
49: [10:47:34] <guci0> hello!
50: [10:57:51] <ss23> HALLO
51: [10:59:39] * mobiusnz has joined #silverstripe
52: [11:01:17] <guci0> Yo!
53: [11:04:31] * mobiusnz quit (Ping timeout: 272 seconds)
54: [11:10:24] * Marvanni_ has joined #silverstripe
55: [11:15:19] * Marvanni_ quit (Quit: Marvanni_)
56: [11:33:37] <spronk2> hm
57: [12:00:28] * mobiusnz has joined #silverstripe
58: [12:05:15] * mobiusnz quit (Ping timeout: 260 seconds)
59: [12:48:33] * Alexwijn has joined #silverstripe
60: [12:48:52] <Alexwijn> Hi everyone
61: [12:57:03] <Alexwijn> Does anyone know how to add a field on top of form, rather then adding it to the bottom of it
62: [12:57:32] <marvanni> $fields->insertBefore()/insertAfter()
63: [12:57:42] <Alexwijn> ok thanks
64: [13:01:08] <Alexwijn> Is it possible to add a notice bar in a girdview?
65: [13:01:09] * mobiusnz has joined #silverstripe
66: [13:01:16] <marvanni> sure
67: [13:01:37] <Alexwijn> How?
68: [13:01:39] <marvanni> just create a component implements GridField_HTMLProvider
69: [13:02:05] <Alexwijn> I need to copy getEditForm?
70: [13:02:09] <Alexwijn> And edit it
71: [13:02:12] <Alexwijn> ?
72: [13:02:51] <marvanni> where does the noticebar need to show up?
73: [13:03:06] <Alexwijn> Above the buttons
74: [13:03:17] <marvanni> detailview ofr listview?
75: [13:03:22] <Alexwijn> listview
76: [13:03:23] <marvanni> ofr = or
77: [13:03:24] <marvanni> ok
78: [13:03:59] <marvanni> then yes, I would create a GridFieldNoticeBar implements GridField_HTMLProvider
79: [13:04:11] <marvanni> and add that component to you gridfield config
80: [13:04:28] <Alexwijn> So I need copy getEditForm and edit
81: [13:04:29] <Alexwijn> it
82: [13:04:45] <marvanni> depends where your gridfield is instantiated
83: [13:05:05] <Alexwijn> standard in getEditForm
84: [13:05:15] <marvanni> in a ModelAdmin?
85: [13:05:26] * mobiusnz quit (Ping timeout: 245 seconds)
86: [13:05:42] <Alexwijn> yeah
87: [13:06:54] * origincube has joined #silverstripe
88: [13:07:19] <marvanni> the way I would do it, i think
89: [13:09:16] <marvanni> in your custom modeladmin getEditForm, $sng = singleton($this->modelClass); if(method_exists($sng, 'updateGridField')) $form = $sng->updateGridField($form)
90: [13:09:55] <marvanni> in your DataObject, add a method updateGridField($form) {// find the gridfield from form and add the Component. return the $form}
91: [13:10:11] <marvanni> the create the nitice bar component and add the code you need
92: [13:10:39] <Alexwijn> Hm, that's a lot more complicated :)
93: [13:10:40] <marvanni> brb
94: [13:10:44] <Alexwijn> I copied getEditForm
95: [13:10:47] <Alexwijn> And edit it
96: [13:10:52] <Alexwijn> I'm not creating the noticebar
97: [13:10:55] <Alexwijn> now*
98: [13:25:58] <marvanni> yeah it, is, but in that way you can make the gridfield more DO specific
99: [13:26:16] * origincube has left #silverstripe
100: [13:26:22] <marvanni> you got the remote data working, it was you or not?
101: [13:26:26] <Alexwijn> yeah
102: [13:26:33] <Alexwijn> Works fine now
103: [13:26:58] <Alexwijn> I now want to add a notice bar when the MX Recods on the current domain is not pointing to my mail server
104: [13:27:13] <Alexwijn> To prevent angry customers saying that my email server does not work :)
105: [13:28:23] <Alexwijn> I added the notice bar now
106: [13:28:27] <Alexwijn> Only the Add button is above it
107: [13:30:54] <marvanni> you might play with the targetFragment
108: [13:31:07] <marvanni> and might need some additional css
109: [13:31:23] <marvanni> how did you fixed the detail view of the remote data?
110: [13:31:41] <Alexwijn> http://www.sspaste.com/paste/show/52755c7e67ab2
111: [13:32:02] <Alexwijn> Oh wait, that was for the fix when there were no rows
112: [13:32:33] <Alexwijn> I'm now using getList to get all the data
113: [13:32:51] <Alexwijn> And override the write function at the DataObject
114: [13:33:06] <Alexwijn> and the Delete()
115: [13:36:26] <marvanni> ok
116: [13:37:35] <Alexwijn> You had code that removed that add button
117: [13:37:38] <Alexwijn> Where was it?
118: [13:37:45] <Alexwijn> I can't find it in my history
119: [13:38:09] <Alexwijn> I can't seems to find the line where I the add button is added
120: [13:38:26] <Alexwijn> Maybe that's why its added before my noticebar
121: [13:40:18] <marvanni> the add button is added in gridfield config
122: [13:40:56] <Alexwijn> Maybe I need to remove and re-add it after my noticebar?
123: [13:41:21] <marvanni> $config = $gridField->getConfig(); $config->removeComponentsByType();
124: [13:41:36] <marvanni> that might work
125: [13:41:54] <Alexwijn> Do you know what the name is of that button
126: [13:43:23] <marvanni> GridFieldAddNewButton
127: [13:43:40] <marvanni> everything is in framework/forms/gridfield/*
128: [13:44:52] <Alexwijn> Seems like it prevent me to add it after it
129: [13:45:36] <marvanni> you can also start with a clean gridfield config if you want.
130: [13:46:10] <marvanni> if you look into the GridFieldConfig.php file, you can see all the various build in config variations
131: [13:47:55] <Alexwijn> Ok fixed it
132: [13:48:21] <Alexwijn> I copied everything from the record gridconfig
133: [13:48:29] <Alexwijn> And then create a clean gridfieldconfig
134: [13:49:54] <Alexwijn> How to remove the import block?
135: [13:51:58] <marvanni> the modeladmin sidebar you mean?
136: [13:52:02] <Alexwijn> yeah
137: [13:52:08] <Alexwijn> I do not support at the moment
138: [13:52:45] <marvanni> try overloading function ImportForm(){} in your modeladmin
139: [13:53:01] <marvanni> alternativly you can create custom templates for you modeladmin
140: [13:53:32] <marvanni> MyModelAdmin_Tools.ss / MyModelAdmin_Content.ss
141: [14:01:55] * mobiusnz has joined #silverstripe
142: [14:04:48] <Alexwijn> Overriding ImportForm did the trick
143: [14:04:54] <Alexwijn> Lol, looks empty now :0
144: [14:06:08] * mobiusnz quit (Ping timeout: 240 seconds)
145: [14:07:55] * zippy__ quit (Ping timeout: 260 seconds)
146: [14:20:47] * zippy__ has joined #silverstripe
147: [14:26:25] <Alexwijn> Does anyone here uses gitlab?
148: [14:26:29] * gelignite has joined #silverstripe
149: [14:43:19] * jrthomer quit (Remote host closed the connection)
150: [14:47:17] * origincube has joined #silverstripe
151: [15:02:40] * mobiusnz has joined #silverstripe
152: [15:07:02] * mobiusnz quit (Ping timeout: 240 seconds)
153: [15:07:45] <origincube> hi guys, so i have a tiny question. i have a template that is designed around placing a link to the latest blog entry in the footer area of my theme
154: [15:08:00] <origincube> i need to upgrade this so that it displays more than one
155: [15:08:49] <origincube> been looking through the reference to see if there is an easy way to change BlogEntry::get()->sort('Date DESC')->first(); so that it returns 3 items instead of just one. But coming up short.
156: [15:12:06] <marvanni> limit() ?
157: [15:14:01] <origincube> yeah, must see what it does tot he template though
158: [15:14:04] <origincube> may need to loop it
159: [15:14:18] <marvanni> indeed
160: [15:15:06] <marvanni> if yo have a DataObjectSet, which you will get when replacing first with limit yoy need to loop
161: [15:15:06] <origincube> beena while since i worked in SS, and been trying to get my head around the changes since 3.0
162: [15:15:25] <origincube> yeah, just meant i need to figure out where in the templates is the best place
163: [15:15:30] <marvanni> its much better then < 3.0
164: [15:16:02] <origincube> change my <% with $LatestBlogPost %> to <% loop $LatestBlogPosts %> (have two functions one returns first, and the other limit(3))
165: [15:16:43] <marvanni> that should work
166: [15:18:19] <origincube> yeah building now to test
167: [15:18:42] <origincube> arg
168: [15:18:45] <origincube> server error
169: [15:19:11] <origincube> oh, i see why
170: [15:19:32] <origincube> is there any reason why builds ignore my /code folder inside the theme?
171: [15:19:41] <origincube> i always have to duplicate that to the /mysite/code folder
172: [15:20:09] <marvanni> well, you generaly don't put php files in the theme folder
173: [15:20:40] <marvanni> ss looks for files with a _config.php or _config folder in it
174: [15:21:09] <marvanni> php files should be in mysite or a module folder
175: [15:22:00] <origincube> true, just some examples i saw showed putting code files inside the theme, which never worked so must have been a very bad tutorial
176: [15:22:01] <origincube> haha
177: [15:22:16] <marvanni> link?
178: [15:22:50] <origincube> no idae, was ages back when i first started working with SS
179: [15:23:24] <marvanni> ah ok, well forget about it. better stick to the SS conventions for your own good
180: [15:23:56] <origincube> yeah
181: [15:25:15] <origincube> still gives me a server error for some reason
182: [15:25:31] <origincube> must be me wanting to use a different name
183: [15:29:32] <origincube> ok, i'm an idiot, forgot to update the close tag for the loop to say end_loop
184: [15:29:34] <origincube> woops
185: [15:37:39] <marvanni> you got dev mode on right?
186: [15:38:04] <origincube> don't think so
187: [15:38:23] <marvanni> it should spit out errors on screeen
188: [15:38:50] <origincube> i can set that in _config.php?
189: [15:39:12] <marvanni> yeah
190: [15:39:13] <marvanni> Director::set_environment_type("dev");
191: [15:39:36] <origincube> awesome thanks, that will come in ever so handy
192: [15:39:43] <marvanni> but with 3.1 I think its possible to set in in a yml file, but in _config.php will work as well
193: [15:40:02] <origincube> the ss tutorials on the ss website fall a tad short of getting you fully immersed in all the options
194: [15:40:03] <marvanni> don't forget to set it to live on prod
195: [15:40:13] <origincube> and i work mainly with themes
196: [15:40:30] <origincube> i'll remove it from my config before uploading changes :)
197: [15:40:37] <origincube> thanks!
198: [15:41:22] <origincube> ok i have another question, sorry this relates to my previous stuff being on 3.0
199: [15:41:28] <origincube> and now some of it just breaks in 3.1
200: [15:41:34] <origincube> i had a BlogEntryDecorator
201: [15:41:40] <origincube> so that i can add in an image for each blogentry
202: [15:41:52] <origincube> the code is in /mysite/code/ext
203: [15:42:06] <origincube> but for some reason i still can't seem to add images to my blog entries
204: [15:42:32] <origincube> oh wait
205: [15:42:37] <origincube> config is missing!
206: [15:43:23] <marvanni> note that DataObjectDecorator = DataExtension in 3.x
207: [15:43:53] <origincube> my config is Object::add_extension('BlogEntry', 'BlogEntryDecorator');
208: [15:44:06] <origincube> and points to a php file called BlogEntryDecorator
209: [15:44:23] <origincube> which extends DataExtension :)
210: [15:44:25] <origincube> so should work
211: [15:47:27] * spronk2 quit (Quit: spronk2)
212: [16:03:24] * mobiusnz has joined #silverstripe
213: [16:08:15] * mobiusnz quit (Ping timeout: 272 seconds)
214: [16:20:43] * Marvanni_ has joined #silverstripe
215: [16:22:06] <Marvanni_> test
216: [16:22:28] <origincube> wb Marvanni_
217: [16:30:24] <Marvanni_> checking my laptop conn :)
218: [16:30:47] <origincube> cool
219: [16:57:37] * peter_ss has joined #silverstripe
220: [16:58:01] <peter_ss> hi guys can I ask something about custom gridfield component?
221: [16:59:10] <peter_ss> i have this gridfield component to force download an image from asset
222: [16:59:17] <peter_ss> but it just redirect back to non theme admin
223: [17:04:08] * mobiusnz has joined #silverstripe
224: [17:08:21] * mobiusnz quit (Ping timeout: 248 seconds)
225: [17:10:34] <Marvanni_> your sure you use the appropriate headers?
226: [17:10:40] <Marvanni_> code?
227: [17:13:52] <peter_ss> Marvanni_ i use $file_path = Director::absoluteBaseURL() . $file->Filename;
228: [17:13:53] <peter_ss> return SS_HTTPRequest::send_file(file_get_contents($file_path), $file->Filename);
229: [17:13:59] * origincube has left #silverstripe
230: [17:14:25] <Marvanni_> yeah, that should work….
231: [17:14:30] <peter_ss> but it didn't force the download anyway i set the button action to no-ajax
232: [17:15:41] <Marvanni_> I now for sure this works
233: [17:15:42] <Marvanni_> https://github.com/axyr/silverstripe-phpexcel/blob/master/code/GridFieldExportToExcelButton.php
234: [17:15:58] <Marvanni_> you might take a look add export button for cv as well
235: [17:16:02] <peter_ss> thanks I'll check it out
236: [17:16:19] <peter_ss> yeah I've check that export button but still didn't work
237: [17:16:29] <peter_ss> but thanks for this
238: [17:16:54] <peter_ss> maybe I din't include the mime type?
239: [17:17:24] <Marvanni_> might be...
240: [17:30:03] <peter_ss> can i still do a http request send file even the action is ajax?
241: [17:31:10] <Marvanni_> i don't think so… you will have to add something to the javascript request handeler
242: [17:31:21] <Marvanni_> you don't get any errors in firebug?
243: [17:32:56] <peter_ss> i don't get any error but html output
244: [17:33:24] <peter_ss> the whole form and field is sent back
245: [17:34:26] <Marvanni_> with ajax
246: [17:34:31] <Marvanni_> ?
247: [17:34:49] <Marvanni_> can you paste the code?
248: [17:36:31] <peter_ss> https://gist.github.com/chocnut/7292700
249: [17:37:21] <peter_ss> I've updated it
250: [17:37:36] <peter_ss> the other component is to add a checkbox field per row
251: [17:38:41] <Marvanni_> foreach ($ids as $id) {
252: [17:38:52] <Marvanni_> each selected need t result to a download???
253: [17:39:06] <Marvanni_> jepg typo?
254: [17:41:28] <Marvanni_> so if you select 5 files, that will result in 5 * choose save or open browser dialog...
255: [17:41:39] <Marvanni_> better first try to return 1 file..
256: [17:41:42] <Marvanni_> got to eat..
257: [17:42:08] <peter_ss> yeah sorry I tested it on one file only
258: [17:43:10] <peter_ss> just ignore the loop first I'm trying to get all image file and zip them in
259: [17:43:33] <peter_ss> what i'm trying now is to send file first the image
260: [18:04:55] * mobiusnz has joined #silverstripe
261: [18:08:41] <Zauberfisch23> I have updated a pull request on github, shouldn't travis run again now?
262: [18:08:55] <Zauberfisch23> I can't see any indication that travis is doing anything
263: [18:09:05] * mobiusnz quit (Ping timeout: 240 seconds)
264: [18:09:15] <Zauberfisch23> ah, nvm that
265: [18:09:18] <Zauberfisch23> there he goes
266: [18:12:19] * Marvanni_ quit (Quit: Marvanni_)
267: [18:23:25] * Alexwijn quit ()
268: [18:35:37] * SightUnseen has joined #silverstripe
269: [18:39:51] * SightUnseen quit (Ping timeout: 246 seconds)
270: [18:41:37] * origincube has joined #silverstripe
271: [18:41:52] <origincube> hi everyone, anyone around to offer some insight into something? ;)
272: [18:49:20] * SightUnseen has joined #silverstripe
273: [18:49:46] <Zauberfisch23> depends on what you are after
274: [18:50:08] <origincube> for some reason code in an SS file wasn't rendering, but i flushed a few times and its now appearing
275: [18:50:15] <origincube> so all good :)
276: [18:50:22] <Zauberfisch23> 3.1?
277: [18:50:41] <origincube> yip
278: [18:50:42] * mobiusnz has joined #silverstripe
279: [18:50:44] <Zauberfisch23> 3.1 requires more flusing than 3.0 did
280: [18:51:01] <Zauberfisch23> 3.1 does a lot more caching and fancy stuff
281: [18:51:18] <Zauberfisch23> like for examples silverstripe now also caches private statics
282: [18:51:28] <Zauberfisch23> so like $db, $has_one ... are all cached
283: [18:51:58] <origincube> cool, yeah this is all hard coded html inside the layout, but will definitely keep in mind that much flushing is required
284: [18:51:59] <origincube> hhehe
285: [18:52:05] <Zauberfisch23> its a known regression that you now also need to flush on build (/dev/build?flush=1)
286: [18:52:41] <Zauberfisch23> here:
287: [18:52:42] <Zauberfisch23> http://fc03.deviantart.net/fs18/f/2007/187/2/1/SilverStripe_WallPaper_01_by_will_rossi.jpg
288: [18:52:53] <Zauberfisch23> we have that hanging on our toilet
289: [18:53:05] <origincube> yeah always flush on builds too
290: [18:53:12] * SightUnseen1 has joined #silverstripe
291: [18:53:19] <origincube> hahaha!
292: [18:54:23] * SightUnseen quit (Quit: Leaving.)
293: [18:54:58] * SightUnseen has joined #silverstripe
294: [18:55:27] * mobiusnz quit (Ping timeout: 272 seconds)
295: [18:55:28] * SightUnseen has left #silverstripe
296: [18:57:28] * SightUnseen1 quit (Ping timeout: 240 seconds)
297: [19:02:10] <peter_ss> guys what library do you use for zipping files dynamically like zipping asset images?
298: [19:04:09] * SightUnseen has joined #silverstripe
299: [19:04:11] * SightUnseen has left #silverstripe
300: [19:10:10] * Stomach has joined #silverstripe
301: [19:11:25] * Stomach quit (Read error: Connection reset by peer)
302: [19:18:37] * nicolaas has joined #silverstripe
303: [19:19:57] <nicolaas> hi, this might be a very dumb question, but I noticed that in 3.1 sometimes the "linked" field in a gridfield "create record" form does not auto populate. Do you have any idea why this is?
304: [19:20:22] * mobiusnz has joined #silverstripe
305: [19:21:14] <nicolaas> Example: I have a list of countries and for each country I have cities (has_one / has_many relationship)... If I click the "add city" button then I can add a city, BUT it fails to recognise that I came from the country record and that I wanted to add the new record to that specific country....
306: [19:21:56] * Stomach has joined #silverstripe
307: [19:22:54] <nicolaas> ohhh - and goodmorning to ya'll (and evening)!!!!
308: [19:23:58] * needserioushelp has joined #silverstripe
309: [19:24:17] <needserioushelp> hello,, anybody out there?
310: [19:24:26] <nicolaas> sure, let me help you...
311: [19:24:32] <nicolaas> if I can!
312: [19:25:00] <needserioushelp> ookay. one of my websites has been running since two or three months working perfectly
313: [19:25:25] <needserioushelp> now it is crazily invaded by spam on trackbacks /backtracks whatever the name
314: [19:25:37] <needserioushelp> i want to disable them but my blogholder edit cmd page shows empty
315: [19:26:28] <nicolaas> ok - what sort of spam are you getting?
316: [19:26:37] <needserioushelp> empty means, menu bar and everything ok, but just and empty page. and clicking on another part of the menu doesn't make it load, need to refresh /admin to make it work
317: [19:26:50] <needserioushelp> thousands of chinese / english spam messages
318: [19:26:53] * origincube has left #silverstripe
319: [19:26:57] <needserioushelp> can't moderate them.
320: [19:27:32] <nicolaas> they are submitted as comments?
321: [19:27:42] <nicolaas> have you turned moderation on?
322: [19:27:47] <nicolaas> what version of SS are you using?
323: [19:27:59] <needserioushelp> 3.0
324: [19:28:05] <nicolaas> ok
325: [19:28:14] <needserioushelp> well, both
326: [19:28:20] <nicolaas> have you turned on moderation?
327: [19:29:12] <needserioushelp> it's a blogholder option and i can't access it afaik.
328: [19:30:03] <nicolaas> ok, so have you turned on moderation or you can not turn it on - sorry, that is an important first question I guess.
329: [19:31:11] <needserioushelp> checking now.
330: [19:32:19] <needserioushelp> so many trackback and comments that mysql is breaking apart... sorry if i give a slow response :D
331: [19:32:35] <nicolaas> take your time!
332: [19:32:35] * mobiusnz quit (Quit: Leaving.)
333: [19:32:49] <needserioushelp> turned on for comments, there is no option to turn it on for trackbacks
334: [19:33:35] <needserioushelp> even with moderation they fill my database... so i need to disable them from the "mother" of the blog entries, the blogholder i can't edit.
335: [19:33:39] * origincube has joined #silverstripe
336: [19:34:23] * mobiusnz has joined #silverstripe
337: [19:34:26] <needserioushelp> tried creating a new one, happens the same, doesn't show in CMS administration when i clock on it.
338: [19:34:34] <needserioushelp> click*
339: [19:36:17] <nicolaas> lets firstly get an answer to my question: have you turned on moderation... If you are not sure how to check this I will look it up for you.
340: [19:37:43] * zfmf has joined #silverstripe
341: [19:38:18] <needserioushelp> it should be. how should i check it?
342: [19:39:23] <needserioushelp> to give more information, none of the blog tree or blog holder edit pages seem to work anymore...
343: [19:39:34] <nicolaas> ok.
344: [19:39:57] <nicolaas> well, what I would do first is to delete all the comments directly out of your database (you will loose ALL comments!)
345: [19:40:08] <nicolaas> then check if moderation is turned on (in php)
346: [19:41:07] * origincube has left #silverstripe
347: [19:41:16] <nicolaas> do you know how to do a multi file search?
348: [19:41:44] * lerni has joined #silverstripe
349: [19:41:45] <needserioushelp> yup
350: [19:43:04] <needserioushelp> i can't access right now the server, file managing / ftp maintentance til tomorrow morning
351: [19:43:06] <nicolaas> so search in the blog code for moderation - and see if it is turned on (or turn it on via the config file)
352: [19:43:27] <nicolaas> ok then come back tomorrow morning!!!!
353: [19:43:44] <nicolaas> there is not much point in helping you if you cant access your files ;-)))
354: [19:44:02] <needserioushelp> yeah, i know, just saw the message while opening the web interface
355: [19:44:23] <needserioushelp> my hosting hates me , heh
356: [19:44:43] <needserioushelp> do you know what could cause blog module edit pages not showing?
357: [19:44:53] <needserioushelp> i could try to fix it tomorrow
358: [19:45:01] <needserioushelp> if i knew what the hell was going on
359: [19:45:06] <nicolaas> hi, this might be a very dumb question, but I noticed that in 3.1 sometimes the "linked" field in a gridfield "create record" form does not auto populate. Do you have any idea why this is?Example: I have a list of countries and for each country I have cities (has_one / has_many relationship)... If I click the "add city" button then I can add a city, BUT it fails to recognise that I came from...
360: [19:45:07] <nicolaas> ...the country record and that I wanted to add the new record to that specific country... I am using the automated getCMSFields rather than custom ones!
361: [19:45:23] <nicolaas> @needserioushelp
362: [19:47:22] <nicolaas> here is what you do: (1) delete all comments from the database (carefully!!!) (2) remove comments from the template (for now- $PageComments), (3) enable comment moderation (4) find a spam module that prevents robots from commenting (5) open the comments back up
363: [19:47:26] <needserioushelp> don't know. i like to mess with databases with custom code, i actually wanted to make my broken website with my bare hands and php but they wanted it way before i could have finished it without a cms.
364: [19:47:37] <needserioushelp> hmm
365: [19:47:38] <needserioushelp> ok
366: [19:47:45] <needserioushelp> will save it around and try it tomorrow
367: [19:53:03] * chillu has joined #silverstripe
368: [19:54:00] <needserioushelp> hrmm
369: [19:54:05] <needserioushelp> can't make it work.
370: [19:54:50] <needserioushelp> any way to change the admin panel theme? maybe it's the one breaking it..
371: [19:55:12] <needserioushelp> and it hasn't to do with messy code.. ( the can't edit blogholder / blogtree part, not teh comment part)
372: [19:55:17] <nicolaas> if you look at the five steps that I am recommending, none of them involve the admin (CMS).
373: [19:55:26] <needserioushelp> i know i know
374: [19:56:07] <nicolaas> if you tell us that your CMS is not working then no one can help you really, because there could be 10000 reasons why it is broken
375: [19:56:30] <nicolaas> when you say that you are getting 10000 of spam message in your comments then we can help you with the steps above.
376: [19:57:02] <needserioushelp> two separate problems
377: [19:57:33] <needserioushelp> admin panel doesn't show
378: [19:57:37] <needserioushelp> edit page
379: [19:57:45] <needserioushelp> for blogholder and blog tree
380: [19:57:51] <nicolaas> are you in dev or live mode?
381: [19:57:54] <needserioushelp> and the comments thing i'll do tomorrow
382: [19:57:58] <needserioushelp> live
383: [19:58:10] <nicolaas> switch to dev mode first and press F12 to see exact error message (under network tab)
384: [19:58:28] <nicolaas> what is the point in trying to fix a website when you do not have access to it???????
385: [20:00:35] <needserioushelp> finding if there is any routine (like ?flush) or /dev/build that fixes it or knowking what i have to do tomorrow
386: [20:01:11] <peter_ss> what should be the response to an ajax post in GridField?
387: [20:02:59] <nicolaas> @chillu - is it normal that when you add a record using a gridfield (e.g. add a city to a country) that it does not automatically complete the country (in the child "add record" form)???
388: [20:03:11] <nicolaas> (in SS 3.1)
389: [20:03:31] <chillu> wha. wait.. what?
390: [20:03:35] <nicolaas> @peter_ss: why are you asking
391: [20:04:05] <peter_ss> nicolaas I've a GridField component
392: [20:04:56] <nicolaas> @Ingo: the "linked" field in a gridfield "create record" form does not auto populate. Example: I have a list of countries and for each country I have cities (has_one / has_many relationship)... If I click the "add city" button then I can add a city (using the "add form"), BUT it fails to recognise that I came from a country so I have to reselect the country (reselect parent record) ...
393: [20:05:00] <peter_ss> nicolaas then I wanted to force download file form assets but first I want to select individual records
394: [20:05:30] <peter_ss> when i use no-ajax to my GridField_FormAction
395: [20:05:51] <peter_ss> it doesn't include checkbox field in the post
396: [20:05:59] <peter_ss> but when using ajax the form data is there
397: [20:06:24] <nicolaas> ok - so when you do not use AJAX it does not recognise the fields are you submitting?
398: [20:06:31] <needserioushelp> where should i look for debugging in the admin panel? does it show via html code? java console?
399: [20:06:39] <zippy__> morning
400: [20:06:46] <peter_ss> nicolaas yes
401: [20:07:56] <needserioushelp> oh great can't even turn dev mode on. memory exausted. too many records for the database.
402: [20:07:56] <peter_ss> nicolaas i've have checkboxes in each data record on my Gridfield
403: [20:08:27] <peter_ss> when checking the values for handleAction(GridField $gridField, $actionName, $arguments, $data)
404: [20:08:40] <peter_ss> my field is not there in $data
405: [20:08:57] <nicolaas> ok, but when you change to AJAX, it is...?
406: [20:09:09] <nicolaas> if so, could you force a download from AJAX???
407: [20:09:21] <needserioushelp> @chillu does your '@' mean you are dev, and if so, do you know why on heaven and hell would the blogholder edit page do not show on the admin panel?
408: [20:09:37] <zippy__> it means he's an op
409: [20:09:46] <zippy__> irc channel admin
410: [20:09:50] * jedateach has joined #silverstripe
411: [20:09:52] <needserioushelp> aah ok.
412: [20:09:53] <zippy__> but he is also a dev :)
413: [20:10:00] <peter_ss> nicolaas i don't think so so that's why i'm asking why does my field is not in the POST
414: [20:10:21] <peter_ss> nicolaas yes the field is there
415: [20:10:27] <peter_ss> on ajax
416: [20:10:33] <zippy__> needserioushelp: have you created a blog / blog holder first?
417: [20:11:37] <needserioushelp> yup, i just visited ( created on june by me, moderated and adminsitrated by them ( client) ) it cause they said it had a lot of spam
418: [20:11:42] <needserioushelp> and they no longer work
419: [20:11:45] * jedateach quit (Client Quit)
420: [20:11:52] <nicolaas> @Peter_ss: makes sense. So somehow the button is a action / link / otherwise, but not a form submitter!
421: [20:11:55] <needserioushelp> tried making new ones for test and they mess up even on creation
422: [20:12:11] <chillu> @nicolaas If you pass $this->Cities() into the GridField constructor in Country->getCMSFields(), it should work. Since GridFieldAddExistingAutoCompleter calls HasManyList->add()
423: [20:13:45] <nicolaas> thank you INGO!!! Do you know why this has not been added "by default"... I mean it seems strange that when you want to add a city you have to add the country again, even though the country you came from is by far the most likely candidate to be the "parent"... hmmm, answer: write a patch and a test???? ;-)
424: [20:14:44] <nicolaas> @Peter_ss: could you make another type of button... That submits the form but does not use AJAX? Does the button submit the Other fields ?
425: [20:15:11] <peter_ss> I can paste my code here
426: [20:15:14] <peter_ss> is that ok?
427: [20:16:03] <nicolaas> use pastie site ... http://www.sspaste.com/
428: [20:16:07] <needserioushelp> Fatal error: Maximum execution time of 30 seconds.... hell, those comments might be lagging my whole cluster.
429: [20:17:00] <needserioushelp> :/
430: [20:17:23] <needserioushelp> it might even be the reason of the maintenance.
431: [20:17:46] <nicolaas> that would be my guess... if you have access to PHP MyAdmin then start by deleting ALL the comments!!!
432: [20:18:01] <peter_ss> nicolaas http://www.sspaste.com/paste/show/5276ad8d91c49
433: [20:19:58] <peter_ss> nicolaas here's the array dump http://www.sspaste.com/paste/show/5276ae04dee4e
434: [20:20:38] <nicolaas> just having a look, not sure if I am smart enough to help.... let me have a look
435: [20:20:48] <peter_ss> thanks
436: [20:21:16] <nicolaas> you could add a bit of JS that adds the data?
437: [20:21:26] <nicolaas> i know that is a hack :-)
438: [20:22:39] <peter_ss> yeah an hidden field?
439: [20:22:44] <nicolaas> I would extend GridField_FormAction ... that seems the most logical way...
440: [20:22:46] <peter_ss> I've tried that
441: [20:22:56] <peter_ss> still no luck
442: [20:23:02] <nicolaas> did you extend new GridField_FormAction(?
443: [20:23:09] <peter_ss> not yet
444: [20:23:20] <peter_ss> but for my checkbox i create a component type also for that
445: [20:23:23] <peter_ss> extending GridField_ColumnProvider
446: [20:23:27] <nicolaas> and then $button = new MY_GridField_FormAction(
447: [20:24:17] <nicolaas> and then within that button, you start changing things around a bit... you need to work out why the data is with ajax... as soon as you know that, you can apply it to your "My_GridField_FormAction"
448: [20:24:56] <peter_ss> ok
449: [20:24:57] <peter_ss> thanks
450: [20:25:07] <nicolaas> i know that is not much help...
451: [20:25:16] <nicolaas> did you inspect the html for the button???
452: [20:27:03] * UncleCheese has joined #silverstripe
453: [20:27:16] <peter_ss> yup
454: [20:27:32] <peter_ss> i dont' know if it's withing my checkbox
455: [20:27:40] * Pyromanik has joined #silverstripe
456: [20:27:49] <Pyromanik> Today is:
457: [20:27:52] <Pyromanik> Notice day!
458: [20:27:57] <Pyromanik> :D
459: [20:28:32] * SightUnseen has joined #silverstripe
460: [20:29:15] * SightUnseen has left #silverstripe
461: [20:30:05] <nicolaas> did not notice it Pyromanik.
462: [20:31:00] * DigNZ has joined #silverstripe
463: [20:31:01] * DigNZ quit (Client Quit)
464: [20:34:27] * travis-ci has joined #silverstripe
465: [20:34:28] <travis-ci> [travis-ci] chillu/silverstripe-framework#113 (pulls/versioned-docs - d46c978 : Ingo Schommer): The build passed.
466: [20:34:28] <travis-ci> [travis-ci] Change view : https://github.com/chillu/silverstripe-framework/compare/a7bbf02f7a9c...d46c97873ccd
467: [20:34:28] <travis-ci> [travis-ci] Build details : http://travis-ci.org/chillu/silverstripe-framework/builds/13445020
468: [20:34:28] * travis-ci has left #silverstripe
469: [20:34:41] * needserioushelp quit (Ping timeout: 250 seconds)
470: [20:41:05] * DigNZ has joined #silverstripe
471: [20:41:34] * nickmolhoek has joined #silverstripe
472: [20:41:44] * travis-ci has joined #silverstripe
473: [20:41:44] <travis-ci> [travis-ci] chillu/silverstripe-framework#114 (pulls/versioned-docs - 65b4407 : Ingo Schommer): The build passed.
474: [20:41:44] <travis-ci> [travis-ci] Change view : https://github.com/chillu/silverstripe-framework/compare/d46c97873ccd...65b44073379d
475: [20:41:44] <travis-ci> [travis-ci] Build details : http://travis-ci.org/chillu/silverstripe-framework/builds/13445092
476: [20:41:44] * travis-ci has left #silverstripe
477: [20:42:44] * travis-ci has joined #silverstripe
478: [20:42:44] <travis-ci> [travis-ci] silverstripe/silverstripe-framework#1490 (3.1 - 70c23f3 : Sean Harvey): The build passed.
479: [20:42:44] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-framework/compare/4e7915996996...70c23f37de3a
480: [20:42:44] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-framework/builds/13445081
481: [20:42:44] * travis-ci has left #silverstripe
482: [20:44:25] * DigNZ quit (Client Quit)
483: [20:48:17] * antmas has joined #silverstripe
484: [20:48:24] <antmas> mornin2all
485: [20:51:20] <zippy__> morning
486: [21:00:44] * wilr_ has joined #silverstripe
487: [21:21:39] * lerni quit (Ping timeout: 272 seconds)
488: [21:28:29] * lerni has joined #silverstripe
489: [21:28:39] * lerni quit (Client Quit)
490: [21:33:43] * Colin[pi] has joined #silverstripe
491: [21:34:34] <antmas> Colin[pi]: HELLO!
492: [21:34:39] <Colin[pi]> HI!
493: [21:34:50] <antmas> :D
494: [21:39:34] * DigNZ has joined #silverstripe
495: [21:47:18] <Zauberfisch23> if filterByCallback expects a callback but gets something else
496: [21:47:49] <Zauberfisch23> should we have it throw a LogicException or a InvalidArgumentException
497: [21:50:06] <antmas> Zauberfisch23: InvalidArg
498: [21:50:33] <Zauberfisch23> I agree
499: [21:50:48] <Zauberfisch23> however, right now its logic
500: [21:51:28] <antmas> Zauberfisch23: whichever the context
501: [21:52:13] <Zauberfisch23> https://github.com/Zauberfisch/silverstripe-framework/blob/3.1/model/DataList.php#L418
502: [21:52:54] <antmas> Zauberfisch23: makes sense
503: [21:52:58] <antmas> in that instance
504: [21:53:21] <Zauberfisch23> well, I think invalid would still be more fitting
505: [21:53:29] <Zauberfisch23> both are fitting, I just like invalid better for that case
506: [21:54:30] <Zauberfisch23> but then again, that would be an API change to thorw a different one
507: [21:55:03] <Zauberfisch23> well, I'll keep it at logic then
508: [21:56:41] <antmas> hack the core!
509: [22:01:15] <Pyromanik> all the cores!@
510: [22:06:40] <Pyromanik> D:
511: [22:07:19] <Pyromanik> $summary_fields 'Boolean.Nice' => 'Is Blah' Used to be great :<
512: [22:07:25] <Pyromanik> sudddenly no workies "<>
513: [22:07:27] <Pyromanik> :<*
514: [22:07:35] <Pyromanik> =[
515: [22:07:39] <Pyromanik> D:
516: [22:08:19] <Pyromanik> [User Error] Uncaught Exception: Object->__call(): the method 'dbobject' does not exist on 'Boolean'
517: [22:09:28] <Pyromanik> seems to think it's a relation rather than a db thing
518: [22:20:49] <Pyromanik> hmm
519: [22:20:51] <Pyromanik> that's right
520: [22:21:27] <Pyromanik> DB.Method doesn't work, because no such method DB, so you make a getter (DB() returns this->dbObject(DB)
521: [22:21:34] <Pyromanik> that used to work
522: [22:21:49] <Pyromanik> now it tries to call dbObject on the dbObject
523: [22:23:04] <Pyromanik> LOOKS LIKE WILR'S FAULT
524: [22:25:15] <Pyromanik> wilr_: was that a change you made between 3.0.5 and 3.1?
525: [22:25:19] <Pyromanik> https://github.com/silverstripe/silverstripe-framework/commit/16231ce25340a5652523f9c4e4c525e73496dde8
526: [22:27:02] <Pyromanik> yes.
527: [22:27:11] <Pyromanik> $fieldName = array_pop($parts);
528: [22:27:22] <Pyromanik> rofl, read array_pop($tarts);
529: [22:27:37] <Pyromanik> :<
530: [22:27:44] <Pyromanik> suggary toaster rubbish.
531: [22:28:21] <Pyromanik> wilr_: fixit fix it fix it fix it
532: [22:29:39] <ss23> fix it fix it fix it fix it fix it fix it
533: [22:31:17] <spronk> bleef
534: [22:31:55] <spronk> POPTARTS
535: [22:31:56] <spronk> WANT
536: [22:32:32] <Pyromanik> gawd
537: [22:32:43] <Pyromanik> it's not different it's just rearanged D:
538: [22:34:48] <wilr_> tests passed. PR's welcome
539: [22:34:58] <Pyromanik> wilr_: it's just refactored layout
540: [22:35:03] <Pyromanik> now I'm so fucking confused.
541: [22:35:11] <Pyromanik> DID WORK now doesnt' :<
542: [22:35:17] * ss23 works
543: [22:35:20] * Ryan has joined #silverstripe
544: [22:35:34] <Ryan> Morning, guys.
545: [22:35:38] <Pyromanik> gidday
546: [22:35:40] * Ryan is now known as Guest38395
547: [22:35:46] <antmas> howdy
548: [22:36:00] <Guest38395> Okay, I can't be called Ryan apparently.
549: [22:36:05] <Pyromanik> nope
550: [22:36:11] <Guest38395> Rabble Rabble
551: [22:36:15] <Pyromanik> betcha Ryan_ works.
552: [22:36:35] * EasyCo has joined #silverstripe
553: [22:36:43] <EasyCo> Morning!
554: [22:36:47] <Pyromanik> gidday.
555: [22:36:54] <EasyCo> Everybody have a good weekend?
556: [22:37:21] <antmas> yeah, not bad
557: [22:37:33] * Guest38395 has left #silverstripe
558: [22:38:30] <Pyromanik> Am I allowed to submit a test without a patch to make it pass? :P
559: [22:39:21] * Ryan-Toast has joined #silverstripe
560: [22:39:30] * micmania1 has joined #silverstripe
561: [22:40:08] * gelignite quit (Quit: http://bit.ly/nkczDT)
562: [22:41:39] * unsignedint has joined #silverstripe
563: [22:42:56] <micmania1> Anybody use Silverstripe for ecommerce sites?
564: [22:43:01] <unsignedint> hey does anyone know how to implement a $allowed_parent type functionality. I have eg a "WidgetHolder" that has $allowed_children = array("Widget") which is fine, but I only want to be able to create Widget pages under a WidgetHolder page and not anywhere in the hierarchy
565: [22:43:20] <unsignedint> micmania1: I do, and the only usable way is to use Swipestripe
566: [22:44:04] <spronk> i know some outfits use ss ecommerce module
567: [22:44:18] * antmas feels sorry for them
568: [22:44:25] <unsignedint> haha
569: [22:44:25] * spronk does too, really
570: [22:44:26] <unsignedint> https://github.com/frankmullenger/silverstripe-swipestripe
571: [22:44:27] * Ryan-Toast quit (Remote host closed the connection)
572: [22:44:47] * Ryan-Toast has joined #silverstripe
573: [22:44:56] <micmania1> I was look at both today. Found a few major bugs in the ss ecommerce module and I through the swipestripe was a bit strange how it used the SiteTree to create products
574: [22:45:01] <unsignedint> ecommerce sucks, better to use something like Shopify unless your customer already has a site built in SS that they want a shop tacked on to
575: [22:45:29] <micmania1> yeah, we've been building a site in LemonStand
576: [22:45:54] <antmas> +1 for Shopify - you can build everything in a day, slap a theme on and charge $$$$
577: [22:46:07] <unsignedint> micmania1: thats pretty typical in the SS world, you have a SiteTree "ProductHolder" page and create your products as child "Product" pages of the "ProductHolder"
578: [22:46:42] <unsignedint> and then you can just use $Children in the ProductHolder template to iterate over them
579: [22:46:59] <micmania1> Its a bit strange. Surely a product would be its own DO, as would categories etc.?
580: [22:47:37] <Ryan-Toast> Is there a way to use tinyMCE short codes in a view?
581: [22:47:40] <guzzlefry> That's how I've implemented mine..
582: [22:47:47] <Pyromanik> someoen plz, what is difference between DataObject::relObject($fieldname) and DataObject::relField($fieldname) ?
583: [22:48:08] <EasyCo> 5 letters
584: [22:48:26] <Pyromanik> wrong.
585: [22:48:31] <EasyCo> Damnit
586: [22:48:38] <Pyromanik> Object is 6.
587: [22:49:00] <EasyCo> Double damnit
588: [22:49:05] <EasyCo> Well that backfired
589: [22:49:36] <unsignedint> micmania1: of course, you'd nest Category pages and have Product pages under the required Category. It makes sense to use the existing SiteTree structure as your product matrix is a typically a tree structure and SiteTree is a good way of managing a Tree structure
590: [22:50:36] <guzzlefry> Pyromanik: Looks like one returns DBField while the other returns a string.
591: [22:51:55] <EasyCo> Sweet jesus! How awesome is this tool: http://htaccess.madewithlove.be/
592: [22:52:29] <Pyromanik> hmm, looks like you might be right guzzlefry. But I'm not sure the usecases of relField :<
593: [22:52:56] <guzzlefry> we require better docs!
594: [22:53:03] <Pyromanik> indeed :(
595: [22:53:13] <antmas> EasyCo: about as good as understanding htaccess and how to correctly apply rules
596: [22:54:26] <Pyromanik> spronk: shed some light on some programming philosophy for me plxz
597: [22:54:42] <Pyromanik> so I've been doing some reading on frameworks
598: [22:54:50] <EasyCo> antmas: Understanding doesn't supplement testing.
599: [22:55:09] <EasyCo> or something like that
600: [22:55:14] <Pyromanik> and I find that lots of people rage the fuck out at modern ORMs because ActiveRecord (anti)pattern "SERIOUSLY" violates SRP.
601: [22:55:24] <antmas> EasyCo: :P
602: [22:55:28] <unsignedint> 11:53 guzzlefry: we require better docs! <-- yes you do, the docs are helpful but are still rather bad. I find myself reading the code more now since the docs dont go into enough detail
603: [22:55:46] <Pyromanik> unsignedint: code is truth.
604: [22:56:06] <Pyromanik> but doesn't deal with design philosophy and why something is why it is.
605: [22:56:11] <unsignedint> indeed but well written docs are helpful especially if you arent familiar with the architecture
606: [22:56:33] <Pyromanik> spronk: so anyway, everyone just rages the fuck out at it and never actually says WHY it violates SRP.
607: [22:56:52] <Pyromanik> Storing and fetching information seems to be one responsibility to me...
608: [22:56:56] <Pyromanik> so I dunno.
609: [22:56:58] <Pyromanik> halp?
610: [22:58:13] * Liquide quit ()
611: [23:02:26] <unsignedint> Pyromanik: it violates SRP because it ties your models to how they are persisted
612: [23:02:36] <unsignedint> eg ActiveRecord ties you to relational databases supported by ActiveRecord
613: [23:02:50] * spronk2 has joined #silverstripe
614: [23:03:10] <unsignedint> if you split out your model interfaces and keep them seperate from how they are persisted, then you are free to chaneg data stores as you please as long as the interface is implemented
615: [23:05:31] <Pyromanik> unsignedint: no it doesn't.
616: [23:05:51] <unsignedint> how are you not tied to ActiveRecord relational databases if you sue ActiveRecord?
617: [23:05:56] <unsignedint> use*
618: [23:05:57] <Pyromanik> I would argue otherwise, in that the persistence be abstracted into it's own class.
619: [23:06:33] <unsignedint> so youre a Repository Pattern proponent?
620: [23:06:46] <Pyromanik> like it almost is in SS.
621: [23:06:58] <unsignedint> when you start creating relationship structures amongst your models, Repository Pattern starts getting complicated
622: [23:07:23] <Pyromanik> I don't see why ActiveRecord requires a model to know about it's persistence. Only that it needs to get and save.
623: [23:07:43] <Pyromanik> the actual saving and getting can be performed elsewhere.
624: [23:07:58] <unsignedint> what about retrieving related models, and adding a related model to a model?
625: [23:08:00] <Pyromanik> unsignedint: repository pattern eh
626: [23:08:24] <Pyromanik> unsignedint: how does that not cover 'getting and setting data'?
627: [23:08:39] <unsignedint> its easier to go $category->getProducts() then going ProductPersister::getProductsFor($category)
628: [23:09:40] <Pyromanik> unsignedint: yes, but there's no reason why $category->getProducts() can't return PersistenceInterface::getRelation('Products', $this) or something
629: [23:09:56] <unsignedint> for sure
630: [23:10:06] <Pyromanik> keeping stuff decoupled and with a single responsiblity
631: [23:10:34] <Pyromanik> I think everyone rages the fuck out because they're shit at engineering an active record
632: [23:10:34] <unsignedint> you just need to make sure everything is implemented as an interface, including save() etc methods otherwise you can still have a dependence on the persistence layer from objects returned from your Repository
633: [23:10:42] <Pyromanik> from what I've read so far.
634: [23:11:14] <Pyromanik> unsignedint: yeah, but there's nothing too major in that.
635: [23:11:26] <unsignedint> just a bit of boilerplate
636: [23:11:48] <Pyromanik> exactly.
637: [23:12:16] <Pyromanik> I don't see why ActiveRecord as a pattern in itself is a violation of SRP - only that most/all IMPLEMENTATIONS of it violate SRP at current.
638: [23:12:41] <Pyromanik> thus my confusion. I feel like I'm missing something.
639: [23:12:50] <unsignedint> indeed. although doesnt ActiveRecord encourage making your models all inherit from a single base class?
640: [23:12:56] <Pyromanik> sure.
641: [23:13:09] <Pyromanik> but is that such a bad thing?
642: [23:13:27] <Pyromanik> I mean, one could use an overlay or an underlay to get around that if they so wished...
643: [23:13:33] <Pyromanik> decorator even.
644: [23:13:43] <unsignedint> well, it ties you to that ActiveRecord and youd have to go through and change all your base classes if you wanted to change ActiveRecord implementation
645: [23:13:58] <Pyromanik> do you?
646: [23:14:31] <antmas> mmm dat repo pattern
647: [23:14:35] <Pyromanik> it could just be a management class, that takes both an object and a persistence interface and melds the two together.
648: [23:14:49] <unsignedint> well if you have MyEntity extends DataObject , and then you switch your persistence to something thet has Model as a base class, youd have to go through and change everything to MyEntity extends Model
649: [23:15:24] <unsignedint> not that youd really do that, 99% of the time tying yourself to something is quicker and easier to get actual work done
650: [23:15:42] <Pyromanik> so far as I'm aware 'ActiveRecord' is just a description of wrapping data in save methods.
651: [23:15:49] * dospuntocero has joined #silverstripe
652: [23:16:54] <Pyromanik> unsignedint: if you've changed DataObject to ActiveModel for example... why would DataObject not just be altered to use a persistence interface that uses ActiveModel instead of the (abstracted out) DataObject core code?
653: [23:17:02] <Pyromanik> compositions, etc.
654: [23:17:26] <Pyromanik> 12:15 < unsignedint> not that youd really do that, 99% of the time tying yourself to something is quicker and easier to get actual work done
655: [23:17:46] <Pyromanik> I understand this, and that's why we have all these active record doodackies that everyone's raging at.
656: [23:17:56] <Pyromanik> but from a philosophical point of view...
657: [23:19:07] <unsignedint> from a philosophical point of view the system should be modular and you should be able to switch out implementations of _anything_ at _any time_ without breaking any code. unfortunately this is very hard to achieve because there will always be implementation-specific bugs
658: [23:19:14] * mobiusnz quit (Quit: Leaving.)
659: [23:19:25] <Pyromanik> wiki yes, that's yeah.
660: [23:19:51] <Pyromanik> but I mean - active record is defined on wiki as wrapping a table row, which ties it to RDBMS.
661: [23:20:10] <Pyromanik> but philosophically why should it be defined as that specifically? why can't it just wrap data?
662: [23:20:18] <Pyromanik> a single record.
663: [23:20:31] <Pyromanik> which is why I paused, I was looking up the repository pattern
664: [23:21:03] <antmas> Pyromanik: yeah I had to look it up too :D I forget most of thenm
665: [23:21:04] <antmas> them*
666: [23:21:25] <Pyromanik> urgh C# winds me up
667: [23:21:38] <Pyromanik> why can't someone just explain this shit simply?
668: [23:21:45] <unsignedint> youre right, a "record" is really specific to a relational database, where a row typically maps to an entity, but a entity data object is just a piece of data that describes an "entity" and who cares how its stored
669: [23:22:25] <antmas> Pyromanik: c# or ActiveRecord?
670: [23:22:51] <Pyromanik> unsignedint: exactly. So an ActiveRecord implementation could theoretically be defined as a class that wraps data for purpose of saving and loading from a persistence layer.
671: [23:23:11] <Pyromanik> whether that persistence layer be the traditional activeRecord in RDBMS or something else
672: [23:23:25] <Pyromanik> antmas: Any programming theory.
673: [23:23:31] <unsignedint> i suppose so
674: [23:23:36] * unsignedint shrugs
675: [23:23:57] <Pyromanik> it almost always boils down to either super complex semi domain specific UML, or a dickload of code in some rando language.
676: [23:23:59] <antmas> gah, theory was the easy part for me :(
677: [23:24:17] <Pyromanik> antmas: yeah, the theory is fine. It's how people explain it that shits me.
678: [23:24:43] <antmas> Pyromanik: stay away from logs and MSDN sites :p
679: [23:24:48] <antmas> blogs*
680: [23:24:55] <Pyromanik> like
681: [23:25:01] <Pyromanik> "Domain driven design"
682: [23:25:23] <Pyromanik> and I'm all "Fuck you and your 'domain' - that shit is ambiguious at best and seems to stem ENTIRELY from C# as a language"
683: [23:25:56] <Pyromanik> which leaves me completely in the dark, especially when it's followed up with examples in C#.
684: [23:26:15] <Pyromanik> it shits me up entirely.
685: [23:26:15] <antmas> hmmmm
686: [23:26:53] <antmas> I could prolly translate an example if you have one
687: [23:26:54] * Ryan-Toast quit (Quit: Ryan-Toast)
688: [23:27:00] <Pyromanik> hmm
689: [23:27:01] <Pyromanik> http://en.wikipedia.org/wiki/Data_access_object
690: [23:27:04] <antmas> into le lamens terms
691: [23:27:04] * DigNZ quit (Quit: DigNZ)
692: [23:27:25] <Pyromanik> antmas: and that's my point. Why does no one anywhere ever start in laymans terms
693: [23:27:44] <Pyromanik> how are people expected to learn that shit if the entry bar is so high?
694: [23:27:55] <Pyromanik> lunch, bbl
695: [23:28:13] <antmas> Pyromanik: that's why I love my 2IC, he breaks it WAAAAAY down and then I can go ge the uber explanation on the net later
696: [23:28:51] * zfmf has left #silverstripe
697: [23:29:57] * Ryan-Toast has joined #silverstripe
698: [23:38:41] * howardgrigg has joined #silverstripe
699: [23:40:22] <antmas> yay for being a developer http://imgur.com/NPJQUx2
700: [23:47:32] * antmas quit ()
701: [23:47:33] * mobiusnz`home has joined #silverstripe
702: [23:47:33] * howardgrigg quit (Read error: Connection reset by peer)
703: [23:48:00] * spronk has left #silverstripe
704: [23:48:04] * dospuntocero quit ()
705: [23:48:07] * antmas has joined #silverstripe
706: [23:48:56] * spronk has joined #silverstripe
707: [23:58:26] * mobiusnz`home quit (Quit: Leaving.)

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