#silverstripe IRC Log

IRC log for 12 May 2016

All timestamps are in UTC.

1: [00:00:01] * ss-helper quit (Remote host closed the connection)
2: [00:00:17] * ss-helper has joined #silverstripe
3: [00:04:16] * jghazally quit (Quit: jghazally)
4: [00:08:09] * zlinux has joined #silverstripe
5: [00:11:12] * cheddam has joined #silverstripe
6: [00:12:09] * BrewNaked quit (Remote host closed the connection)
7: [00:12:40] <irogue> overwhelmed with the urge to punch someone in the dick right now, but my desired target is in another city. very frustrating.
8: [00:13:07] <irogue> I may just have to find a stranger on the street instead
9: [00:23:27] <adrexia> Sounds interetsing
10: [00:23:42] <adrexia> I'd recommend the stranger on teh street approach
11: [00:23:54] <adrexia> waitm no, _against_
12: [00:40:55] <irogue> [12:23:42] <adrexia> I'd recommend the stranger on teh street approach
13: [00:40:55] <irogue> quoted
14: [00:40:56] <irogue> :P
15: [00:41:45] <adrexia> well, out of context, that could mean anything irogue
16: [00:42:11] <irogue> true
17: [00:44:29] * jghazally has joined #silverstripe
18: [00:46:37] * UncleCheese has joined #silverstripe
19: [00:50:18] <irogue> g'day UncleCheese :)
20: [00:50:21] <UncleCheese> hi
21: [00:50:28] * UncleCheese quit (Read error: Connection reset by peer)
22: [00:50:42] <irogue> quick visit :P
23: [00:57:45] * zippy has joined #silverstripe
24: [00:58:11] <zippy> Bit of a pricing change from GitHub eh
25: [00:58:17] <irogue> yeah
26: [00:58:25] <irogue> good for personal users, hit-and-miss for organisations
27: [01:15:08] * jghazally quit (Quit: jghazally)
28: [01:16:01] * micmania1 has joined #silverstripe
29: [01:16:47] <adrexia> That was one of the things I _didn't_ like about bitbucket
30: [01:16:59] <adrexia> nvm. There's still gitlab :)
31: [01:19:21] * robbiea has joined #silverstripe
32: [01:19:44] <robbiea> I understand why Sapphire creates a new DB each time it runs, but why doesn't it remove it afterwards?
33: [01:20:41] <zippy> robbiea: for tests?
34: [01:20:47] <robbiea> Yeah
35: [01:21:03] <zippy> it's supposed to, mine never did either
36: [01:21:05] <robbiea> My docker container fills up after about 20 or 30 runs and I have to go in and delete all the old databases
37: [01:21:16] <zippy> infact I created a script that loops though and finds all ss_ databases and deletes them
38: [01:21:22] <robbiea> haha, nice
39: [01:22:45] <zippy> mmm aparently there is dev/tests/cleanupdb
40: [01:23:11] <irogue> it should clean up the db unless the test falls over
41: [01:23:22] <zippy> https://docs.silverstripe.org/en/3.0/topics/testing/testing-guide-troubleshooting/#my-database-server-is-cluttered-with-tmpdb-databases
42: [01:23:27] <zippy> irogue: na mine never did
43: [01:23:36] <zippy> or maybe my tests just failed loads.... :)
44: [01:23:57] <irogue> :P
45: [01:24:24] <zippy> I would always write a failing test first and then do the code to make it pass (ala tdd) so yea, maybe
46: [01:28:32] <robbiea> so if a test fails, it leaves the DB there so you can investigate it?
47: [01:30:38] <robbiea> dev/tests/cleanupdb is perfect, in the absence of it cleaning itself up automatically :)
48: [01:33:44] <robbiea> If I add a DB field to Page with an extension, can I fixture that field in a unit test?
49: [01:38:37] <zippy> I would assume so
50: [01:39:01] * Dedra has joined #silverstripe
51: [01:39:25] <Dedra> Hey, someone still awake? :-P Is there a .ss editor plugin vor eclipse PDT?
52: [01:41:39] <irogue> Dedra: no idea sorry - I doubt many people are using Eclipse for SilverStripe
53: [01:42:28] <zippy> argh eclipse!
54: [01:42:35] <Dedra> hmm. It's a bit ugly the highlighting of the "php" code in the .ss file. I'm using a normal HTML highlighting. But yeah :\ I'm pretty sure there is one :D im searching still
55: [01:42:39] <irogue> I know there are plugins for PhpStorm and Sublime, you might be able to port one of those
56: [01:43:20] <Dedra> http://www.edchipman.ca/blog/eclipse-plug-in-silverstripe-developer-tools/
57: [01:43:23] <Dedra> interessting
58: [01:43:31] <adrexia> https://github.com/UndefinedOffset/eclipse-silverstripedt ?
59: [01:44:01] <adrexia> Oh, same person?
60: [01:46:49] <robbiea> OOB Sublime thinks that .ss templates are written in Lisp
61: [01:48:39] <adrexia> yep :D
62: [01:48:43] <adrexia> so does atom
63: [01:49:23] <irogue> UndefinedOffset is a smart chap, so that plugin is probably decent
64: [01:51:12] <zippy> ddeecceennt
65: [02:01:01] * BrewNaked has joined #silverstripe
66: [02:05:04] * BrewNaked quit (Ping timeout: 240 seconds)
67: [02:06:12] * robbiea quit (Remote host closed the connection)
68: [02:09:00] * jghazally has joined #silverstripe
69: [02:18:51] * Stomach_ quit (Quit: zzz)
70: [02:34:53] * Stomach has joined #silverstripe
71: [02:48:11] * zippy quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
72: [03:05:52] * jghazally quit (Quit: jghazally)
73: [03:15:50] * jghazally has joined #silverstripe
74: [03:22:04] <Dedra> i found something in my class ArticlePage extends Page {
75: [03:22:09] <Dedra> what i dont understand right now:
76: [03:22:12] <Dedra> public static $defaults = array
77: [03:22:12] <Dedra> (
78: [03:22:12] <Dedra> 'ProvideComments' => true
79: [03:22:12] <Dedra> );
80: [03:22:25] <Dedra> it was ss2.4
81: [03:34:10] * adrexia quit (Quit: My Mac has gone to sleep. ZZZzzz…)
82: [03:37:09] * techquila quit (Remote host closed the connection)
83: [03:37:42] * techquila has joined #silverstripe
84: [03:42:39] * Dedra quit (Quit: Bye guys, have to go!)
85: [03:43:57] * micmania1 quit (Quit: micmania1)
86: [03:44:58] * zippy has joined #silverstripe
87: [03:49:52] * BrewNaked has joined #silverstripe
88: [03:54:09] * BrewNaked quit (Ping timeout: 244 seconds)
89: [03:56:18] * micmania1 has joined #silverstripe
90: [03:57:12] * jghazally quit (Quit: jghazally)
91: [04:29:55] * madmatt changed the topic to 'Welcome to #silverstripe | SS4 alpha 1 is out: http://bit.ly/1T6zz8b | Latest Stable available at http://www.silverstripe.org/software/download/ | Security releases 3.1.19, 3.2.4 and 3.3.2 now available | Dev Mailing List: http://silverstripe.org/dev-list | IRC Logs: http://silverstripe.org/irc-logs | Feature requests: http://silverstripe.uservoice.com'
92: [04:31:42] <zippy> wooo
93: [04:31:52] <zippy> SS alpha eh
94: [04:32:18] <zippy> good job guys
95: [04:36:10] <zippy> Looks like a composer update straight from 3.3 eh
96: [04:36:11] <zippy> :P
97: [04:36:21] <zippy> cool, excited to have a play
98: [04:43:16] * techquila quit (Remote host closed the connection)
99: [04:44:03] * zippy quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
100: [04:46:30] * techquila has joined #silverstripe
101: [04:51:58] * micmania1 quit (Quit: micmania1)
102: [04:55:26] * micmania1 has joined #silverstripe
103: [04:57:39] * techquila quit (Remote host closed the connection)
104: [04:58:09] * techquila has joined #silverstripe
105: [05:32:10] * adrexia has joined #silverstripe
106: [05:38:44] * BrewNaked has joined #silverstripe
107: [05:43:03] * BrewNaked quit (Ping timeout: 240 seconds)
108: [05:55:13] * wmk has joined #silverstripe
109: [06:02:50] * Agilix_ has joined #silverstripe
110: [06:03:05] <Agilix_> mornin o/
111: [06:03:43] <irogue> evening :)
112: [06:04:27] <Agilix_> hehe :p
113: [06:06:50] <wmk> something in the middle of the 24h rhythm we call a day
114: [06:09:17] <Agilix_> wmk: did you still see the answer I gave yesterday regarding the image task?
115: [06:11:33] * adrexia quit (Quit: My Mac has gone to sleep. ZZZzzz…)
116: [06:16:15] * Stomach quit (Quit: zzz)
117: [06:16:24] * micmania1 quit (Quit: micmania1)
118: [06:16:57] * marvanni has joined #silverstripe
119: [06:18:16] * Stomach has joined #silverstripe
120: [06:23:39] <wmk> Agilix_ no
121: [06:24:30] <wmk> i didn't use this task yet, afaik it didn't work well in 2.x versions, so i just do a find - delete manually for that images i want to recreate
122: [06:25:01] <wmk> i normally make helper methods like "ThumbnailImage", so this is reflected in the filename. Might have changed in latest versions
123: [06:25:34] * Dedra has joined #silverstripe
124: [06:26:51] <Dedra> Hi, I set a RedirectorPage in the backend. And set it to youtube.com as a test. But there's no option to open it in a new site: target="_blank". Is it not implemented as standard (the option to open it in a new window)?
125: [06:30:34] * Stomach quit (Quit: zzz)
126: [06:31:03] * Eliseth has joined #silverstripe
127: [06:31:58] * Dedra2 has joined #silverstripe
128: [06:31:59] <ss-helper> Dedra2: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
129: [06:32:13] <Dedra2> i had 24h DC :D
130: [06:32:39] <Dedra2> Well, because there is no _blank option for redirection page type in the backend, I have to set it automatically in the template, right? Like: <% if RedirectionType = External %> target="_blank"<% end_if %>
131: [06:35:34] * Dedra quit (Ping timeout: 260 seconds)
132: [06:35:42] * irogue quit (Quit: My Mac has gone to sleep. ZZZzzz…)
133: [06:37:12] <Agilix_> wmk: It worked pretty good locally and on the test server but as soon as I did it on our staging server it just kept running. It did the task but it never gave feedback
134: [06:38:50] <Agilix_> So I decorated my Image to have a copyright field. And it shows up under the Files->Images but not when adding an image in a block. You have the 'edit' option then but it doesn't show the copyright there. Do I need to decorate something else aswell?
135: [06:39:08] * zlinux quit (Ping timeout: 276 seconds)
136: [06:42:33] * cheddam quit (Ping timeout: 240 seconds)
137: [06:43:09] <wmk> phew, it should be there when you also added updateCMSFields in your ImageDecorator
138: [06:43:27] <wmk> like focuspoint does
139: [06:43:59] <Agilix_> freaky because I have it there but isn't showing as far as I see
140: [06:44:04] <wmk> Dedra2, afaik yes. There is some module with an advanced Redirector around
141: [06:44:08] <Agilix_> Trying a different way now
142: [06:44:40] <wmk> Agilix_, having copyright directly in Image is surely a good way. I normally have it in a seperate GalleryImage Dataobject, just in case you need it translated.
143: [06:44:55] <wmk> But you could use fluent or TranslatableDataobject to translate it in your Image class directly.
144: [06:45:20] <wmk> Sometimes i don't know the photographer, so i write "Source: Person"
145: [06:45:40] <wmk> i also did a quick search/replace that replaces (c) to the right html tag.
146: [06:45:56] <Agilix_> wmk: we use Fluent :)
147: [06:47:15] <Agilix_> wmk: got it now, was using push. Changed it to regular add (or addFieldToTab when there is a tab)
148: [06:47:18] <wmk> Agilix_, https://gist.github.com/wernerkrauss/ec1730f10967bb373292e17852bb19fb
149: [06:48:56] <Agilix_> wmk: seems interesting :) I'll have a look at it :)
150: [06:53:05] <wmk> i should make a module out of it i guess ;)
151: [06:55:09] <Agilix_> hehe :D
152: [06:56:32] <wmk> sigh... moving existing (and configured) vagrand boxes to another machine seems a bit work...
153: [06:58:26] * Embraden quit (Read error: Connection reset by peer)
154: [06:58:53] * Embraden has joined #silverstripe
155: [07:03:29] * arnhoe has joined #silverstripe
156: [07:10:45] <Dedra2> What's the difference between <% loop $Level(1) %> and <% with $Level(1) %> ?
157: [07:10:54] <Dedra2> I tested it in the template, same reult O.o
158: [07:12:44] * spronk quit (Quit: I may need a longer sleep timer...)
159: [07:15:23] <ss-helper> RFC: Remove shortcode parser in favor of thunderer/Shortcode - https://groups.google.com/d/msg/silverstripe-dev/Sy2hBqzgcbw/mFt0zOfvCQAJ
160: [07:15:37] <wmk> hmm, Dedra2 how many items has Level(1) ?
161: [07:15:51] <wmk> with normally is for ONE item, loop for looping over a list
162: [07:17:09] <Dedra2> ahm, i did 6 levels. Just for testing ^^
163: [07:17:36] <Dedra2> i use with, and i get all levels. BUT the loop comes inside the with :)
164: [07:24:38] * marvanni quit (Ping timeout: 276 seconds)
165: [07:27:38] * BrewNaked has joined #silverstripe
166: [07:30:24] <ss-helper> AW: [silverstripe-dev] Better support for testing out of the box - https://groups.google.com/d/msg/silverstripe-dev/YQ9ru7UuUV0/IMmLbB_xCQAJ
167: [07:30:24] <ss-helper> Re: [silverstripe-dev] Looking for a replacement FIG rep - https://groups.google.com/d/msg/silverstripe-dev/mj5GlYJ2Pco/FcHKTf7wCQAJ
168: [07:30:24] <ss-helper> Re: [silverstripe-dev] RFC: Remove shortcode parser in favor of thunderer/Shortcode - https://groups.google.com/d/msg/silverstripe-dev/Sy2hBqzgcbw/-dIcltfwCQAJ
169: [07:30:24] <ss-helper> Better support for testing out of the box - https://groups.google.com/d/msg/silverstripe-dev/YQ9ru7UuUV0/zWc-1pvwCQAJ
170: [07:30:24] <ss-helper> AW: [silverstripe-dev] RFC: Remove shortcode parser in favor of thunderer/Shortcode - https://groups.google.com/d/msg/silverstripe-dev/Sy2hBqzgcbw/eTneiGzwCQAJ
171: [07:32:10] * BrewNaked quit (Ping timeout: 265 seconds)
172: [07:34:18] * XorPush has joined #silverstripe
173: [07:36:20] * marvanni has joined #silverstripe
174: [07:43:58] <marvanni> .
175: [07:45:24] <ss-helper> Re: Better support for testing out of the box - https://groups.google.com/d/msg/silverstripe-dev/YQ9ru7UuUV0/HYOqiarxCQAJ
176: [07:46:05] <wmk> ..F...
177: [07:46:36] <marvanni> hehe
178: [07:47:21] <Dedra2> Whats better <% if Menu(1) %> OR <% if $Menu(1) %> both works, but with or without $ ??
179: [07:47:34] <wmk> It'd be art if.... ...IF...IE....F....U...
180: [07:47:51] <wmk> marvanni ^^^
181: [07:48:10] <marvanni> I always halt on first error
182: [07:48:14] <wmk> Dedra2, go for $, it's more clear (and newer syntax)
183: [07:48:28] <wmk> marvanni, nice.
184: [07:48:42] <wmk> marvanni, we should collect some unittest best practices
185: [07:48:57] <marvanni> it should work out of the box
186: [07:49:32] <wmk> dunno. it always runs all tests here
187: [07:49:45] <marvanni> once you know how to do it, it is not that hard, but with silverstripe it has a pretty steep learing curve if you ask me
188: [07:50:07] <marvanni> starting with tdd that is…
189: [07:50:15] <wmk> yes!
190: [07:50:27] <wmk> and adding some extensions break other tests sometimes.
191: [07:50:30] * Agilix_ quit (Quit: Page closed)
192: [07:50:37] <wmk> e.g. adding some required fields that are not in original fixtures
193: [07:50:56] <marvanni> something like codeception would be nice
194: [07:51:32] * Agilix_ has joined #silverstripe
195: [07:52:13] <wmk> of course you can use it in your own projects, but for modules phpunit is the standard imho
196: [07:52:13] <marvanni> $i->visit(‘home’)->iSee(‘Welcome’)->iClick(‘submit’)->iSeeInDatabase(‘Message’)->iSee(‘Form submitted’);
197: [07:52:31] <wmk> which also has functional tests
198: [07:52:43] <wmk> at least the silverstripe subclasses
199: [07:53:19] <marvanni> when a test breaks, thats the whole idea of tests right?
200: [07:53:38] <wmk> ?
201: [07:53:39] <marvanni> I always try to make them fail if they pass
202: [07:53:50] <marvanni> “and adding some extensions break other tests sometimes.”
203: [07:53:51] <wmk> it should not break
204: [07:54:09] <wmk> well, with the extension we change the behaviour of some classes / Dataobjects
205: [07:54:32] <wmk> so when a DO requires the field Foo now, but it has no Foo in the fixtures, it will not be created in DB and throws an error
206: [07:54:33] <marvanni> hm.. I often test my tests be letting them fail as well so im pretty sure the testcase is valid
207: [07:54:44] <marvanni> and it does not assert true all the time for example
208: [07:55:00] <wmk> of course in your test you should write some assertions and see if they fail or not
209: [07:55:06] <marvanni> Ah. yes, I never use those fixtures
210: [07:55:33] <marvanni> and, I have to admin i never run the core tests when testing my own modules…
211: [07:55:37] <marvanni> admit
212: [07:55:41] <wmk> yup.
213: [07:56:08] <wmk> we had a project with some "it should behave like that in this situation, when a user has other stuff it should behave different"
214: [07:56:11] <marvanni> I test them in isolation and assume that I dont break core functioanlity
215: [07:56:25] <wmk> so i made some fixtures for each situation and tested if my helper methods work like expected.
216: [07:56:46] <wmk> e.g. calculating shipping costs for different kind of products
217: [07:58:08] <marvanni> I always code those ‘fixtures’ in the test methods itself. that works faster for me then writing those fixture.
218: [07:58:22] <wmk> well, yml fixtures are nice
219: [07:58:23] <marvanni> probably because I have autocompletion in php
220: [07:58:29] <marvanni> I like this : https://laravel.com/docs/master/testing#model-factories
221: [07:59:07] <marvanni> $users = factory(App\User::class, 3)->make();
222: [07:59:25] <wmk> yup. yml fixtures are a bit more abstracted, but pretty much the same.
223: [07:59:43] <wmk> but it's a pita when your model becomes complicated, e.g. in a shop
224: [07:59:55] <marvanni> so if Silverstripe replaces also Object::create() with Object::make(), so I have my controller function create() back
225: [08:00:46] <marvanni> yes but complicated models will always be, … well … complicated. I think that is in every framework
226: [08:03:54] * cheddam has joined #silverstripe
227: [08:04:08] <wmk> of course
228: [08:05:27] * cheddam quit (Client Quit)
229: [08:07:45] * slievr has joined #silverstripe
230: [08:20:57] * lerni has joined #silverstripe
231: [08:30:25] <ss-helper> AW: [silverstripe-dev] Re: Better support for testing out of the box - https://groups.google.com/d/msg/silverstripe-dev/YQ9ru7UuUV0/MVCXeQH0CQAJ
232: [08:32:40] <Dedra2> Why is he using this in the tutorial: <li class="<% if $isCurrent %>current<% else_if $isSection %>section<% end_if %>"> instead of: <li class="$LinkingMode"> I mean it's the same, right?
233: [08:39:35] <Dedra2> hmm, whats the difference between loop children and control children?
234: [08:45:09] <marvanni> control is old
235: [08:45:24] <Dedra2> so basically ill replace control with loop, right?
236: [08:45:29] <marvanni> in 2.4 control was used for loop and with
237: [08:45:38] <marvanni> yes
238: [08:45:41] <Dedra2> i used control in ss2, now im doing ss3 tutorial and test a lot beside the tutorial.
239: [08:45:45] <Dedra2> ok thx :)
240: [08:45:54] <marvanni> $linkinmode gives fixes css classes
241: [08:46:22] <marvanni> I always overload that method in Page so I can use active for current and section
242: [08:50:02] <Dedra2> well, linkingmode is enough for your css styling. if you like other "names" well, its your thing :)
243: [08:50:16] <Dedra2> but normally it's totally enough. i do it like this right now (in my tests)
244: [08:50:29] <Dedra2> <li class="$LinkingMode<% if $First && $Last %> first last single<% else_if $FirstLast %> $FirstLast<% end_if %>">
245: [08:50:57] <marvanni> sometimes frameworks lik boostrap or foundation have predefined classes you want to use
246: [08:51:10] <Dedra2> so i get li class=link or li class=current the first li gets a first, the last gets a last css.
247: [08:51:40] <Dedra2> ah yeah that makes sense. So you have to overwrite $linkingmode OR do it in the template with isCurrent and so on. But overwrite is better i would say.
248: [08:51:44] <wmk> marvanni, something like http://stackoverflow.com/questions/1589278/sql-deleting-tables-with-prefix could delete all ss_tempdb% in one go...?
249: [08:51:51] <Dedra2> Even when im not at this part in the tutorial.
250: [08:51:53] <marvanni> or you use css selector :last-child . then you dont need first last
251: [08:52:13] <Dedra2> ah yeah well, i didnt made it for css3 / html5
252: [08:52:21] <Dedra2> with my ss2.4 projekt :-D
253: [08:52:43] <Dedra2> so i was used to do it with last / first :)
254: [08:52:44] <marvanni> wmk : SapphireTest::kill_temp_db();
255: [08:53:02] <wmk> well, - if you want to examine what happened that's a bad idea
256: [08:53:03] <marvanni> and there is another method that removes all test databases
257: [08:53:15] <wmk> there is?
258: [08:53:23] <marvanni> the databases DO get deleted when running from the browser, but not from the command line
259: [08:53:29] <marvanni> yes, hold on
260: [08:54:04] <wmk> afaik when a test passes the db gets deleted, only when it fails it stays
261: [08:54:34] * agent44 has joined #silverstripe
262: [08:54:39] <marvanni> ah now, its that one only
263: [08:54:53] <marvanni> I copied it to a command :
264: [08:54:54] <marvanni> https://github.com/axyr/silverstripe-console/blob/master/code/Commands/Dev/ClearTestDatabasesCommand.php
265: [08:55:04] <marvanni> is it?
266: [08:55:12] <marvanni> I shoudl test that :)
267: [08:58:51] <Agilix_> My fluent is breaking in the back-end. I checked and it tries to get a link on a Page with id int(-213827)
268: [08:58:55] <Agilix_> any ideas?
269: [09:00:26] <ss-helper> Re: Better support for testing out of the box - https://groups.google.com/d/msg/silverstripe-dev/YQ9ru7UuUV0/Tbx-NHL1CQAJ
270: [09:01:19] <wmk> Agilix_, ouch
271: [09:02:12] <Dedra2> i just checked bootstrap for a moment. Does bootstrap see that you use float:left; and instert the ::before and ::after automatically. Or how does bootstrap do that ::after automatically?
272: [09:04:51] <Agilix_> I really do not want to undo all changed I did since this morning ..
273: [09:05:07] <wmk> !debug Agilix_
274: [09:05:07] <ss-helper> Agilix_: Maybe it's time to start xdebug and see whats going on... check out http://docs.silverstripe.org/en/developer_guides/debugging/ and http://xdebug.org/docs/
275: [09:05:30] <Dedra2> ah i see it's just the classes.
276: [09:05:34] <marvanni> on command line test datbase are not removed when all tests pass
277: [09:09:27] <Agilix_> it even complains about my database now :/ what is going on :/
278: [09:16:32] * BrewNaked has joined #silverstripe
279: [09:18:57] * cheddam has joined #silverstripe
280: [09:20:13] * kinglozz_ has joined #silverstripe
281: [09:20:50] * kinglozzer quit (Read error: Connection reset by peer)
282: [09:21:27] * BrewNaked quit (Ping timeout: 260 seconds)
283: [09:22:35] * DimiStripe quit (Quit: DimiStripe)
284: [09:23:34] * cheddam quit (Client Quit)
285: [09:24:36] * cheddam has joined #silverstripe
286: [09:25:43] * DimiStripe has joined #silverstripe
287: [09:37:56] <Agilix_> I don't know what happened but I altered the fluent, flushed, then set back what was and it works
288: [09:38:05] <Agilix_> talk about unexpected behavior
289: [09:47:52] * irogue has joined #silverstripe
290: [10:07:54] * Werner__ has joined #silverstripe
291: [10:09:39] <Dedra2> i did my first /dev/build with the silverstripe 3 tutorial and get this red message: "Removing 2 orphaned versioned records"
292: [10:09:43] <Dedra2> what does this mean?
293: [10:09:49] * kinglozz_ quit ()
294: [10:11:03] * wmk quit (Ping timeout: 240 seconds)
295: [10:11:30] * wmk has joined #silverstripe
296: [10:13:33] * Werner__ quit (Ping timeout: 240 seconds)
297: [10:20:36] * kerozene quit (Ping timeout: 276 seconds)
298: [10:20:37] <cloph_away> orphan means that there is no reference to them - not sure whether that's epxected or not..
299: [10:26:51] * kerozene has joined #silverstripe
300: [10:28:15] * zippy has joined #silverstripe
301: [10:50:12] * agent44 quit (Quit: zzz)
302: [10:51:51] * agent44 has joined #silverstripe
303: [11:00:29] <ss-helper> Re: [silverstripe-dev] Re: Better support for testing out of the box - https://groups.google.com/d/msg/silverstripe-dev/YQ9ru7UuUV0/ow-4l-n7CQAJ
304: [11:01:53] * arnhoe quit (Ping timeout: 250 seconds)
305: [11:03:35] * arnhoe has joined #silverstripe
306: [11:05:24] * BrewNaked has joined #silverstripe
307: [11:09:41] * BrewNaked quit (Ping timeout: 244 seconds)
308: [11:20:01] * irogue quit (Ping timeout: 244 seconds)
309: [11:24:42] * cheddam quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
310: [11:42:26] * SH__ has joined #silverstripe
311: [11:43:00] <SH__> Hey guys, I'm using dataFieldByName in a Form template to output the form fields manually. However, this method does not seem to work on LitteralFields, any suggestions?
312: [11:44:25] <zippy> calling the right name?
313: [11:46:49] <SH__> Yes. However I can see that normally LitteralField name property never gets output to the template, while data fields do because they are input fields
314: [11:46:58] <marvanni> because LiteralField is not a DataField
315: [11:47:14] <marvanni> <% loop $Fields %>
316: [11:49:11] <SH__> Yes it just seems odd that you cant use the fieldByName() method instead then, for literalfields
317: [11:50:27] <SH__> I cant directly use <% loop $Fields %> only because I want to modify the layout of the form completely
318: [11:52:34] <zippy> isn't there a fieldByName...
319: [11:52:44] <marvanni> you can also use FieldGroup or CompositeFields to group fields
320: [11:53:31] <SH__> I have used FieldGroup aswell, however that still does not give me enough power to completely customize the template
321: [11:53:44] <SH__> zippy, fieldByName does not appear to get the LiteralField either
322: [11:53:54] <marvanni> so
323: [11:54:07] <marvanni> if you are using a custom form layout and template
324: [11:54:21] <marvanni> why not remove the literal feilds and add them as html in the template
325: [11:54:53] <marvanni> its gonna be a mess anyway
326: [11:55:36] <SH__> Thats true. The user needs to be able to edit the current literalfields though
327: [11:55:49] <marvanni> how?
328: [11:55:53] <marvanni> in the cms?
329: [11:56:08] <marvanni> a literal field has no value
330: [11:56:41] <marvanni> or did you put form field html into the literarlfield?
331: [11:57:21] <Dedra2> How do i do that: _config.php MySQLDatabase::set_connection_charset('utf8'); because it's deprecated.
332: [11:57:29] <Dedra2> or do i dont need this line at all anymore?
333: [11:57:33] <marvanni> no
334: [11:57:53] <SH__> marvanni , The literalFields are currently not dynamic yet,
335: [11:58:09] <marvanni> what are you gonna put into it then?
336: [11:59:05] <SH__> probably HTMLText
337: [12:00:26] <marvanni> and you cant markup your form with the FieldGroups?
338: [12:00:50] <marvanni> you can do a lot of columning with that
339: [12:01:27] <marvanni> and otherwise you can use $field->setTemplate(); to render a field different instead of using a seperate form field
340: [12:01:50] <marvanni> most of the time it gets a unmaintainable mess if I try that
341: [12:03:17] <Dedra2> class ArticleHolder extends Page {
342: [12:03:17] <Dedra2> private static $allowed_children = array('ArticlePage');
343: [12:03:17] <Dedra2> } was public in ss2, do i need to go private in ss3?
344: [12:04:24] <SH__> marvanni, Yeah I might just try to do it dynamicly and see if I can figure it out
345: [12:04:35] <zippy> Dedra2: yeap, private
346: [12:04:47] <Dedra2> public static $$db = array();
347: [12:04:47] <Dedra2> public static $$has_one = array();
348: [12:04:49] <Dedra2> private too now?
349: [12:04:51] <cloph_away> Dedra2: if it's deprecated, you should not use it anymore.
350: [12:04:54] <SH__> Dedra2, I think sunnysideup wrote a module to detect all the statics and update them
351: [12:05:02] <cloph_away> http://api.silverstripe.org/3.1/deprecated.html → Use "MySQLDatabase.connection_charset" config setting instead
352: [12:05:31] <Dedra2> ahm well, i'm just doing the tutorial of ss3 right now. Did the tutorial of ss2.4 years ago. So in that time it was public, now it's private.
353: [12:05:38] <zippy> Dedra2: yeap all private
354: [12:05:39] <marvanni> and you should get errors if make parent private statics public
355: [12:05:56] <marvanni> but pretty much everything is private
356: [12:06:22] <marvanni> and if you dont need php 5.4 $db = []; much cleaner
357: [12:06:30] <marvanni> 5.3 i mean
358: [12:06:55] <SH__> well if you are doing the tutorial you should just started with a fresh install, in case you are currently updating all the statics yourself
359: [12:07:31] <Dedra2> i did a fresh install, i just compare stuff with ss2.4 sometimes :)
360: [12:07:39] <Dedra2> an realised everything was public, now its private :)
361: [12:07:56] <Dedra2> so i adjust my ecplise templates too :P which creates a page and controller quickly u know
362: [12:09:23] <cloph_away> Dedra2: so you should browse through the changelogs, and especially the "Upgrade" sections :-) https://docs.silverstripe.org/en/3.1/changelogs/3.1.0/
363: [12:09:43] <Dedra2> yep, after i did the tutorial step by step :)
364: [12:09:47] <Dedra2> forgot a lot about ss :D
365: [12:12:25] * UndefinedOffset has joined #silverstripe
366: [12:27:45] * zippy quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
367: [12:30:16] <ss-helper> Silverstripe access to one page with model admin - http://stackoverflow.com/questions/37186699/silverstripe-access-to-one-page-with-model-admin
368: [12:32:46] * agent44 quit (Quit: zzz)
369: [12:34:56] <Dedra2> ok this private static $db = array( is interessting now :) I'm able to set a new WYSIWYG editor field into the cms?
370: [12:40:14] * agent44 has joined #silverstripe
371: [12:54:16] * BrewNaked has joined #silverstripe
372: [12:58:42] * BrewNaked quit (Ping timeout: 244 seconds)
373: [13:07:58] <SH__> Dedra2, you can use the field type HTMLText and then add a HTMLEditorField to the cms fields :9
374: [13:23:44] * Eliseth quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
375: [13:31:21] * Eliseth has joined #silverstripe
376: [13:32:02] * Agilix_ quit (Ping timeout: 250 seconds)
377: [13:33:17] <Dedra2> I'm doing the "ss3 tutorial", do I don't need to set: private static $allowed_children = 'none'; private static $can_be_root = false; in my ArticlePage.php ??
378: [13:34:46] <Dedra2> I already got ArticleHolder.php: private static $allowed_children = array('ArticlePage'); I tested the ArticlePage.php without allowed_children and can_be_root and it's working without it. So perhaps that's standard now?
379: [13:40:39] <Dedra2> So, I tested a bit: ArticlePage { private static $allowed_children = 'none'; } is working.
380: [13:41:17] <Dedra2> But private static $can_be_root = false; seems not working. How do I tell a PageType that it's not allowed anywhere? Only as a child of ArticleHolder ?!
381: [13:41:37] <marvanni> see how the blog module has done that
382: [13:41:49] <Dedra2> Something like: private static $allowed_mother = array; would be funny XD
383: [13:42:08] <marvanni> that would be allowed_parent ;)
384: [13:42:11] <marvanni> i guess
385: [13:42:12] <Dedra2> ah, im no that far into ss3 yet @marvanni if it's a bit harder to do, I'll check it out later :)
386: [13:42:21] <Dedra2> yeah, parent ur right :D
387: [13:42:26] <Dedra2> but that's not the way i guess.
388: [13:42:28] <marvanni> but that module has solved your problem
389: [13:42:40] <marvanni> see lumberjack module as well
390: [13:42:42] <Dedra2> well it's not my "problem" im just curious :D
391: [13:42:48] <Dedra2> if there is a quick fix :)
392: [13:42:52] * Azure quit (Remote host closed the connection)
393: [13:43:12] <marvanni> its not easy to force hierachy in the sitetree. the lumberjack module solves that
394: [13:43:15] <marvanni> no
395: [13:43:27] <Dedra2> im still doing the ss3 tutorial, and besides that im flying around the cms and stuff, testing and learning. Better the look behind the scenes a bit, while doing the "quick" tutorial.
396: [13:43:28] <marvanni> the qick fix is install that module
397: [13:43:55] <Dedra2> well ok. In ss2.4 it was just simple: private static $can_be_root = false;
398: [13:44:45] <Dedra2> And if my other page types have: private static $allowed_children = 'none'; or the array list. it's working.
399: [13:45:11] <Dedra2> But in ss3 it seems not be possible to set private static $can_be_root = false; ^^
400: [13:46:11] <marvanni> you can
401: [13:46:21] <marvanni> but you need to run dev/build after changing that
402: [13:46:25] <marvanni> see SiteTree
403: [13:48:10] <Dedra2> ArticlePage: private static $can_be_root = false; and i did a dev/build/ but i still can add ArticlePage Type below a normal Page :-\
404: [13:49:53] <Dedra2> Ah, ok with cant be root it's only "root" so that's working. But Page is not root. So I have to tell Page that ArticlePage is not allowed.
405: [13:50:17] <Dedra2> Is there a: private static $NOT_allowed_children
406: [13:50:44] <Dedra2> array list? Or do i have to add all the allowed things into "Page" I wouldn't like to do that. Because extends of Page all the time.
407: [13:51:15] <Dedra2> I did that in silverstripe 2.4 like: public static $allowed_children = array('MyPage', 'VirtualPage', 'RedirectorPage', 'ContactPage', 'ArticleHolder', 'StaffHolder', 'TutorialHolder');
408: [13:51:23] <Dedra2> in my Page.php
409: [14:00:18] <ss-helper> Within silverstripe CMS add a tab within TextareaField when pressed - http://stackoverflow.com/questions/37188923/within-silverstripe-cms-add-a-tab-within-textareafield-when-pressed
410: [14:01:44] * wmk quit (Ping timeout: 265 seconds)
411: [14:08:20] * DimiStripe quit (Remote host closed the connection)
412: [14:08:43] * DimiStripe has joined #silverstripe
413: [14:09:52] <marvanni> like I said the lumberjack module is the example how to accomplish that
414: [14:09:56] * cmcramer has joined #silverstripe
415: [14:10:31] <marvanni> if you want code examples, see that module. as far as I know that is the only workable solution to limit children in a solid way
416: [14:12:53] * cloph_away is now known as cloph
417: [14:14:45] <cmcramer> I'm having a problem with routing. I've got a rule set up similar to this: listings//$Action/$Key1/$Value1/$Key2/$Value2/$Key3/$Value3/$Key4/$Value4
418: [14:15:59] * kinglozzer has joined #silverstripe
419: [14:16:06] * kinglozzer quit (Client Quit)
420: [14:16:14] * kinglozzer has joined #silverstripe
421: [14:16:55] * wmk has joined #silverstripe
422: [14:17:21] <cmcramer> I can tell with debugging statements that my params are being loaded correctly, the DB query is being run, and the correct route is found in the Page class. And using ?showtemplate=1 I see that the correct templates are being found. But it gives a page not found error if I enter a url longer than $Value1
423: [14:18:05] <kinglozzer> Hmm. How do you get all objects that don't have a many_many entry? E.g. I want to find all products that don't have any related products added (given that related products is a many_many relation to product)
424: [14:18:36] <kinglozzer> $products = Product::get()->filter('RelatedProducts.ID:not', 0); seems to work, but it just doesn't look right :/
425: [14:20:11] <cmcramer> Can SilverStripe 3 handle long routes or should I pass the params as a query string?
426: [14:31:12] <Dedra2> https://github.com/silverstripe/silverstripe-blog/issues/391
427: [14:31:27] <Dedra2> CTRL F enter: Config::inst()
428: [14:31:31] <Dedra2> ill try that one
429: [14:43:11] * BrewNaked has joined #silverstripe
430: [14:47:39] * BrewNaked quit (Ping timeout: 265 seconds)
431: [14:47:52] * SH__ quit (Ping timeout: 250 seconds)
432: [14:50:11] * muskie9 has joined #silverstripe
433: [14:53:56] * XorPush quit (Ping timeout: 250 seconds)
434: [14:54:27] <cmcramer> Has anyone set up custom routes with more than 3 parameters?
435: [14:55:54] <Dedra2> what about this hmm http://www.balbuss.com/hide-a-page-from-the-cms-pagetype-dropdown/
436: [14:58:52] <cloph> cmcramer: what do you think of as "long route"?
437: [14:59:58] <cmcramer> Anything with more than 3 parameters, which is the equivalent of the built-in $Action/$ID/$OtherID gives me a page not found error.
438: [15:01:47] <cloph> then you need to show code - even default docs contain sample with 5 variables...
439: [15:03:02] <cloph> you probably overlooked the big fat red box that says you *must* use $url_handlers when you want to use more than two parameters...
440: [15:03:04] <cmcramer> cloph I can't find any examples for 3.3 that show more than 5 parameters. I posted my route earlier. Do you need me to repost?
441: [15:03:29] <cmcramer> cloph can you post a link
442: [15:04:23] * lerni quit ()
443: [15:04:25] <cloph> https://docs.silverstripe.org/en/3.3/developer_guides/controllers/routing/#url-Handlers
444: [15:06:12] <cmcramer> cloph I'll give that a try. Thanks!
445: [15:06:41] <cloph> (and /me cannot find your code in backlog, you just posted a url-pattern you'd like to use, but not how your actual code looks like)
446: [15:08:32] <Dedra2> marvanni, this works 100% perfect: http://www.balbuss.com/hide-a-page-from-the-cms-pagetype-dropdown/
447: [15:08:41] <Dedra2> dunno if that is "dirty". But it's working.
448: [15:08:51] <Dedra2> What do you think about that solution?
449: [15:09:48] <marvanni> that should work, but lumberjack also offers a grid field for the children
450: [15:10:05] <marvanni> see how the blog module works. it is really good learning example
451: [15:14:36] <cloph> using allowed children is perfectly fine - if you don't want to have it show up *at all*, then you could extend it to require permission to create or similar
452: [15:25:12] <NETim_> Anyway to push additional gridfields into a single modeladmin page?
453: [15:25:37] * arnhoe quit ()
454: [15:29:54] <muskie9> NETim_ you mean for managing multiple models?
455: [15:30:29] <NETim_> Sort of yes.
456: [15:30:44] <NETim_> The customer wants a list of the latest 10 from several dataobjects.
457: [15:30:52] <NETim_> But they want it on one screen.
458: [15:31:56] <muskie9> ah, well if you add the models to the managed_models array in your ModelAdmin class it'll put each in it's own tab, but you'd likely have to extend LeftAndMain if you want them to be all on one screen
459: [15:32:13] <NETim_> ah, thanks.
460: [15:32:19] <NETim_> Was afraid I'd have to do that.
461: [15:34:37] * TombL has joined #silverstripe
462: [15:37:43] * BrewNaked has joined #silverstripe
463: [15:38:16] * Eliseth quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
464: [15:39:35] <cmcramer> NETim_ I've added multiple GridFields on one page.
465: [15:41:16] <muskie9> cmcramer pages or modeladmin?
466: [15:41:49] <cmcramer> muskie9 pages
467: [15:42:39] <muskie9> ya, pages are play nice with that... model admins not so much (outside of the managed models setting up tabs)
468: [15:45:53] * kinglozzer quit (Remote host closed the connection)
469: [15:48:32] * kinglozzer has joined #silverstripe
470: [15:51:13] * martimiz has joined #silverstripe
471: [15:52:19] * kinglozzer quit (Client Quit)
472: [15:54:04] <martimiz> Hi guys, this must have been asked sooo many times, but has anyone ever found the best way to trigger something on the last onAfterWrite / onBeforeWrite?
473: [15:55:58] <marvanni> how do you know when its the last one
474: [15:56:02] <marvanni> you dont
475: [15:56:29] <marvanni> what are yo trying to achive?
476: [15:58:16] <martimiz> No I guess not :( I'm trying to update values in a record and generate a pdf for it, after a has_many has been added or changed
477: [15:58:46] <martimiz> and with the pdf you do not want to generate that twice...
478: [15:58:55] <marvanni> no i understand that
479: [15:59:50] <marvanni> you could touch the filename and check for th existence of that file in onafterwrite, so you know the generations is started
480: [15:59:51] <Dedra2> Tadaaa: http://pastebin.com/ktRb8VgC
481: [16:00:19] <ss-helper> Silverstripe $searchable_fields over a $has_one, then a $many_many relationship - http://stackoverflow.com/questions/37191854/silverstripe-searchable-fields-over-a-has-one-then-a-many-many-relationship
482: [16:00:24] <marvanni> but that can also achieved by setting a MyDataObject::$pdfgenerationstarted = 1;
483: [16:00:26] <Dedra2> That's my workaround for removing a ArticlePage out of the PageTypeList in the CMS :-) Works like a charm.
484: [16:00:53] <martimiz> yes... but the pdf needs to be updated as well, so often it is already there :)
485: [16:01:34] <martimiz> Just want to make sure I only start rebuilding it after everything has been updated...
486: [16:01:36] <marvanni> and you cannot generate the pdf in a cron or on request
487: [16:02:07] <martimiz> no, it needs to be available immediately after changing the related object...
488: [16:03:20] <marvanni> and with a 1 minute delay?
489: [16:03:23] * zlinux has joined #silverstripe
490: [16:03:39] <marvanni> that should be enough to let roll all the writes that silverstripe has build in
491: [16:04:22] <martimiz> eh... no, but I seem to be getting there...
492: [16:04:36] <marvanni> how?
493: [16:05:12] <martimiz> Just one final check....
494: [16:05:35] <marvanni> the only other thing i can think of is in the form submit method
495: [16:06:17] <martimiz> OnAfterWrite() in the related has_many: if it has an ID then write the master object
496: [16:06:46] <martimiz> OnbeforeWrite in the master object calculate the new totals...
497: [16:06:58] <marvanni> hm.
498: [16:07:20] <marvanni> is the pdf always generated from within a model admin?
499: [16:07:53] <martimiz> then onafterwrite in the masterobject generate the pdf... Seems to be working
500: [16:08:16] <martimiz> but the objects are not pages and they are not versioned, so that makes it easy
501: [16:08:47] <martimiz> and I check against a static var just in case :)
502: [16:10:04] <martimiz> No it is first created from a frontendform to be attached to an e-mail, then after the admin adds some stuff it should be recreated in the CMS...
503: [16:11:39] <martimiz> But it always helps if someone is thinking along, clears my stuffy head some :) thanks!
504: [16:18:21] * martimiz quit (Quit: Page closed)
505: [16:23:49] * wmk quit (Ping timeout: 244 seconds)
506: [16:30:37] <ss-helper> Re: RFC: Remove shortcode parser in favor of thunderer/Shortcode - https://groups.google.com/d/msg/silverstripe-dev/Sy2hBqzgcbw/6HdOEGkOCgAJ
507: [16:36:52] * Dedra2 quit (Quit: Bye guys, have to go!)
508: [16:45:37] <ss-helper> Re: RFC: Remove shortcode parser in favor of thunderer/Shortcode - https://groups.google.com/d/msg/silverstripe-dev/Sy2hBqzgcbw/Sf9Kg0UPCgAJ
509: [17:04:36] <marvanni> https://github.com/silverstripe/silverstripe-framework/blob/master/model/DataList.php#L487
510: [17:04:56] <marvanni> does this mean fields from a has_one relatio ?
511: [17:04:58] <marvanni> n
512: [17:06:29] <marvanni> joinHasOneRelation
513: [17:06:35] <marvanni> probably :)
514: [17:12:20] * agent44 quit (Quit: zzz)
515: [17:48:24] * shellbac1pacific has joined #silverstripe
516: [17:48:24] <ss-helper> shellbac1pacific: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
517: [17:48:55] * muskie9 quit (Quit: My Mac has gone to sleep. ZZZzzz…)
518: [17:49:36] * shellbackpacific quit (Ping timeout: 244 seconds)
519: [18:04:54] * zlinux quit (Ping timeout: 276 seconds)
520: [18:18:27] <Neomang> marvanni, I saw the URLSegmentFilter sample you left for me but I'm not sure what I do with $t there
521: [18:18:41] <Neomang> sorry, the docs on this one weren't as helpful as I'd hoped
522: [18:19:06] <marvanni> it replacex invalid character from a string that is used in the url
523: [18:19:51] <Neomang> Right, but the line $t = $filter->filter($title)
524: [18:20:13] <Neomang> where does the $t get used? do I use it as the field for 'Slug'
525: [18:20:25] <Neomang> or does it just exist in case i need to modify that further
526: [18:22:17] <cloph> that value is checked for more things, and then returned as result of the function call.
527: [18:22:56] <cloph> if you want to do your own link-segment-creation stuff, you can hook into updateURLSegment, and what string you return from that will be used as URLSegment.
528: [18:28:09] <Neomang> Right, but this isn't for a page, this is for a dataobject
529: [18:28:30] <Neomang> so URLSegment isn't built in data
530: [18:28:44] <Neomang> I'm storing it in the DB as 'Slug' but
531: [18:29:09] <cloph> well, then just look at the code to see wher that $t is reused/passed into..
532: [18:29:10] <Neomang> I'm making sure that I get the value in there right, and make it update as the user adds/updates the page title
533: [18:29:46] <Neomang> $t is from a 2 line code sample marvanni provided me earlier, it wasn't used anywhere
534: [18:29:52] <Neomang> that's why I was confused lol
535: [18:30:39] <Neomang> [17:30] <marvanni> you can to that in php [17:30] <marvanni> $filter = URLSegmentFilter::create(); [17:30] <marvanni> $t = $filter->filter($title);
536: [18:32:02] <cloph> https://github.com/silverstripe/silverstripe-cms/blob/master/code/model/SiteTree.php#L1579 the whole thing in context...
537: [18:32:05] <marvanni> https://github.com/silverstripe/silverstripe-cms/blob/master/code/model/SiteTree.php#L1590-L1601
538: [18:32:26] <cloph> similar filter also for file and folder names in framework
539: [18:33:06] <marvanni> https://github.com/silverstripe/silverstripe-framework/blob/master/core/Convert.php#L400-L410
540: [18:33:15] <marvanni> or use Convert::raw2url($string);
541: [18:34:41] <cloph> I meant FileNameFilter :-)
542: [18:35:44] * muskie9 has joined #silverstripe
543: [19:00:11] * wmk has joined #silverstripe
544: [19:06:40] * Stomach has joined #silverstripe
545: [19:23:43] * gelignite has joined #silverstripe
546: [19:36:15] * muskie9 quit (Quit: My Mac has gone to sleep. ZZZzzz…)
547: [19:38:45] * UndefinedOffset1 has joined #silverstripe
548: [19:38:53] * UndefinedOffset quit (Disconnected by services)
549: [19:38:54] * UndefinedOffset1 is now known as UndefinedOffset
550: [20:23:51] * UndefinedOffset quit (Quit: Leaving.)
551: [20:28:41] <marvanni> so if I have define('SS_ENVIRONMENT_TYPE', 'dev'); in my env file
552: [20:29:13] <marvanni> why do I have to use Config::inst()->update('Director', 'environment_type', 'dev'); in mysite/_config.php as well
553: [20:36:53] * Stomach quit (Quit: zzz)
554: [20:38:16] * Stomach has joined #silverstripe
555: [20:47:00] * DimiStripe quit (Quit: DimiStripe)
556: [20:51:53] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
557: [20:52:40] * zippy has joined #silverstripe
558: [20:58:51] * CrashyBang has joined #silverstripe
559: [20:58:52] <ss-helper> CrashyBang: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
560: [20:59:01] <CrashyBang> Hey guys anybody areound?
561: [21:08:41] <zippy> hi
562: [21:08:58] <zippy> CrashyBang: :)
563: [21:09:01] * wmk quit (Ping timeout: 244 seconds)
564: [21:16:05] <CrashyBang> Figured it out thanks guys :)
565: [21:17:36] <zippy> we try :)
566: [21:17:40] * muskie9 has joined #silverstripe
567: [21:19:53] * jules0x has joined #silverstripe
568: [21:22:40] <marvanni> any ss 4.0 expert awake?
569: [21:23:06] <Firesphere> Probably, we're all in the office
570: [21:24:20] <marvanni> great, i need you :)
571: [21:24:37] <marvanni> im playing with ideannotator branch for ss 4
572: [21:24:37] * spronk has joined #silverstripe
573: [21:25:00] <marvanni> you know the Int DBInt story, since you added it ;)
574: [21:25:15] <Firesphere> Yeps :)
575: [21:25:26] <marvanni> if I set a $dn = [‘VisitCount’ => ‘Int’];
576: [21:25:37] <marvanni> how and where is this converted to DBInt
577: [21:25:49] <marvanni> dn = db
578: [21:26:36] <Firesphere> framework/_config/model.yml tells the injector to use the DBInt class instead of Int itself
579: [21:27:54] <marvanni> ah a new dependency injection method
580: [21:28:05] <marvanni> so we get rid of Object::create() ?
581: [21:28:49] <Firesphere> Well no, because Object::create() is for instantiating objects. The YML is basically telling Injector to use a namespaced class, instead of the non-namespaced one.
582: [21:29:10] <zippy> ahh.. not more yml..
583: [21:29:26] <Firesphere> Not for you, for the framework ;)
584: [21:30:32] <marvanni> well Object::create() with use_custom_class is halve backed dependency injector right?
585: [21:31:52] <Firesphere> I wouldn't call it half baked, but it is using Injector, yes.
586: [21:32:08] * micmania1 has joined #silverstripe
587: [21:32:41] <Firesphere> If you'd have a namespaced model to instantiate, but want to instantiate it without using the namespace, _then_ you'd use the yml to tell injector how to find the class.
588: [21:33:12] <marvanni> so if the model.yml will be used for everything. then use_custom_class can be replaced with the injector yml settings
589: [21:33:29] <marvanni> developers can overload those values right?
590: [21:33:50] <marvanni> like replacing the mailer?
591: [21:34:09] <Firesphere> Yep
592: [21:34:41] <marvanni> so lets rfc for dropping Object::create() ;)
593: [21:35:13] <Firesphere> Good luck with that
594: [21:35:19] <marvanni> i have my method back and no more TextField::create everywhere :)
595: [21:43:28] <marvanni> so :
596: [21:43:30] <marvanni> Injector::inst()->get($dbClass) === Object::create_from_string($dbClass)
597: [21:43:31] <marvanni> ??
598: [21:55:58] * Azure has joined #silverstripe
599: [21:57:14] * Azure quit (Remote host closed the connection)
600: [21:57:52] * Azure has joined #silverstripe
601: [22:01:29] * BrewNaked quit (Remote host closed the connection)
602: [22:04:52] * cheddam has joined #silverstripe
603: [22:10:19] * micmania1 quit (Quit: micmania1)
604: [22:11:06] * micmania1 has joined #silverstripe
605: [22:11:47] * zlinux has joined #silverstripe
606: [22:16:47] <Firesphere> More the other way around :P
607: [22:17:35] * irogue has joined #silverstripe
608: [22:17:35] * irogue quit (Changing host)
609: [22:17:35] * irogue has joined #silverstripe
610: [22:17:43] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
611: [22:21:59] * BrewNaked has joined #silverstripe
612: [22:24:30] * robbiea has joined #silverstripe
613: [22:25:22] <robbiea> morning all - I've got a DataObject which has an extension overriding the canDelete() method. it's applied correctly etc, but when I go to delete that item from a gridfield it's not using the extension's method. I've set breakpoints in xdebug in both classes and it's going straight to the base DataObject... any ideas?
614: [22:25:38] * BrewNaked quit (Remote host closed the connection)
615: [22:27:02] <marvanni> and the extensions is acually added to the dataobject?
616: [22:28:05] <robbiea> yep, other methods in the extension run fine
617: [22:28:38] <robbiea> GridFieldDeleteAction:145 calls $item->canDelete() which isn't going through the extension
618: [22:28:45] * CrashyBang quit (Quit: Leaving)
619: [22:35:34] <robbiea> does the DataObject need to provide an extension hook in the canDelete() method or something?
620: [22:36:21] <marvanni> do you call parent::canDelete(); on the DataObject?
621: [22:36:55] <robbiea> doesn't look like it, no
622: [22:37:01] <zippy> don't think so. it's an extension not a class 'extended' so canDelete() in your extension doesn't iirc override the DataObject
623: [22:37:13] <zippy> have a look into the DataObject canDelete method, there should be a hook there which will tell you
624: [22:38:04] <robbiea> there is a hook there - looks like i'll have to call the parent method first, then do my own stuff
625: [22:38:05] <zippy> sorry, it does look like it uses that method name in the extension
626: [22:38:08] <robbiea> then the hook should be used
627: [22:38:24] <robbiea> let's try that :)
628: [22:39:04] <zippy> generally, I always call the parent::canDelete()
629: [22:39:25] <robbiea> yep, that's sorted it :)
630: [22:39:25] <robbiea> thanks
631: [22:39:30] <zippy> ie, public function canDelete() { if(something user can't do) { return false} // otherwise fall back to default. return parent::canDelete(); }
632: [22:39:50] <zippy> but then I guess you need your extension first eh
633: [22:52:14] * Phlunk3 quit (Remote host closed the connection)
634: [22:52:58] * BrewNaked has joined #silverstripe
635: [23:00:45] <ss-helper> Re: RFC: Remove shortcode parser in favor of thunderer/Shortcode - https://groups.google.com/d/msg/silverstripe-dev/Sy2hBqzgcbw/BNHO-K0jCgAJ
636: [23:12:31] <robbiea> yeah - example base implementation should be canDelete() { parent::canDelete(); // custom code here } - this way the extension will run first and your overridden code will run second
637: [23:12:53] * BrewNaked quit (Remote host closed the connection)
638: [23:14:10] <marvanni> Firesphere ?
639: [23:14:55] <marvanni> could you take a look at my composer file ?
640: [23:14:56] <marvanni> https://github.com/axyr/silverstripe-ideannotator/blob/ss-4/composer.json
641: [23:15:25] <marvanni> it seems that the silverstripe travis support module overwrites the minimim stability to dev.
642: [23:15:45] <ss-helper> Re: [silverstripe-dev] Re: RFC: Remove shortcode parser in favor of thunderer/Shortcode - https://groups.google.com/d/msg/silverstripe-dev/Sy2hBqzgcbw/DzrsVYwkCgAJ
643: [23:15:46] <ss-helper> Re: [silverstripe-dev] Re: RFC: Remove shortcode parser in favor of thunderer/Shortcode - https://groups.google.com/d/msg/silverstripe-dev/Sy2hBqzgcbw/NAinl3wkCgAJ
644: [23:15:46] <ss-helper> Re: [silverstripe-dev] Re: RFC: Remove shortcode parser in favor of thunderer/Shortcode - https://groups.google.com/d/msg/silverstripe-dev/Sy2hBqzgcbw/rPQtFlAkCgAJ
645: [23:16:26] * micmania1 quit (Quit: micmania1)
646: [23:17:15] * UncleCheese has joined #silverstripe
647: [23:22:57] * BrewNaked has joined #silverstripe
648: [23:23:16] <robbiea> BTW re: earlier - will R suggsted not using parent::canDelete but calling the extendedCan method instead: https://github.com/dnadesign/silverstripe-elemental/pull/30
649: [23:23:22] * cmcramer quit (Quit: Textual IRC Client: www.textualapp.com)
650: [23:24:51] <zippy> hey UC o/ :)
651: [23:25:45] <Firesphere> marvanni: That's odd. It shouldn't. Have to check with Chillu though.
652: [23:31:56] <Firesphere> Ah, it seems the travis module isn't setup to use SS4 yet. You might need one from Open Sourcerers
653: [23:32:18] * kerozene quit (Ping timeout: 276 seconds)
654: [23:33:43] <marvanni> ok, thanks. will try later.
655: [23:33:54] <marvanni> bed time here. laters
656: [23:33:54] * Hailwood has joined #silverstripe
657: [23:48:39] * marvanni quit (Quit: marvanni)
658: [23:52:27] * robbiea quit (Remote host closed the connection)

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