#silverstripe IRC Log

IRC log for 23 March 2016

All timestamps are in UTC.

1: [00:01:33] * BrewNaked quit (Remote host closed the connection)
2: [00:02:01] <robbieaverill> I'd like it to be a "soft" dependency
3: [00:03:02] <vanny> im sure it will work robbie, whats the fallback?
4: [00:03:16] <robbieaverill> ignore it if the module isn't available
5: [00:03:23] <robbieaverill> it's a nice to have
6: [00:03:54] * Stomach quit (Ping timeout: 276 seconds)
7: [00:05:32] <zippy> robbieaverill: yea, but does it matter if that modle isn't installed?
8: [00:05:42] <zippy> if the module is not installed, then just don't use that class...
9: [00:06:12] <vanny> it must not contain anything overly important as not to break the site
10: [00:06:23] <robbieaverill> This is for extension, so unfortunately the SS autoloader will catch it even if it's not needed
11: [00:06:33] <zippy> exactly
12: [00:06:40] <zippy> so don't add the extension if the module isn't there
13: [00:06:59] <robbieaverill> Rephrase: it's for extending** i.e. MyClass extends PossiblyNonExistentClass
14: [00:07:07] <micmania1> robbieaverill: checkout widgets in the blog module
15: [00:07:08] <zippy> then
16: [00:07:18] <robbieaverill> @micmania1 will do
17: [00:07:20] <zippy> in your code don't add the extension unless the class exists..
18: [00:07:29] <zippy> if(class_exists('fooo')) {
19: [00:07:47] <robbieaverill> Lovely. No problem with "autoload = true" as the second argument to class_exists?
20: [00:07:55] <robbieaverill> I assume not since it's in the blog module already :)
21: [00:08:12] <zippy> hang on..
22: [00:08:19] <zippy> your not using DataExtension
23: [00:08:26] <zippy> your just plain ol Foo Extends Bar?
24: [00:09:30] <zippy> if DataExtension then, { PossiblyNonExistentClass::add_extension('MyClass'); }is that youd do in your class_exists block..
25: [00:10:46] <robbieaverill> Yeah. @zippy: I meant literally extending
26: [00:10:49] <robbieaverill> Foo extends Bar
27: [00:11:42] <zippy> if you never use MyClass then... I don't think it will matter will it?
28: [00:12:00] <zippy> the SS autoloader will parse the tokens out.. but, I don't think it inits the class
29: [00:14:46] <micmania1> SilverStripe will ignore classes that extend classes that don’t exist. The reason for the class_exists() check in blog is because unit tests tried to load the files.
30: [00:14:58] <micmania1> iirc
31: [00:21:21] * zippy quit (Quit: Textual IRC Client: www.textualapp.com)
32: [00:22:05] * Kolin_ has joined #silverstripe
33: [00:24:43] * Kolin quit (Quit: leaving)
34: [00:24:51] * Kolin_ is now known as Kolin
35: [00:30:01] * Stomach has joined #silverstripe
36: [00:30:48] <robbieaverill> @micmania1 so if I define MyNiceToHaveClass extends LunchTime, then if LunchTime doesn't exist it will just ignore MyNiceToHaveClass?
37: [00:31:40] * munk0r has joined #silverstripe
38: [00:31:43] <micmania1> I believe so. Unless you try to call MyNiceToHaveClass. I’ve only ever experienced this ones though so i have limited knowledge. Best thing to do is try and see what happens :)
39: [00:33:32] <munk0r> howdy, can I do a has_and_belongs_to_many :through sort of thing in SS? So data on the join table?
40: [00:37:06] <munk0r> e.g. Videos <-> Playlists but with a per-playlist ordering
41: [00:43:22] * Tanger has joined #silverstripe
42: [00:44:44] * Tanger quit (Client Quit)
43: [00:45:32] * Kolin quit (Quit: leaving)
44: [00:45:44] * Kolin has joined #silverstripe
45: [00:47:25] * robbieaverill quit (Remote host closed the connection)
46: [00:48:56] * Stomach quit (Quit: zzz)
47: [00:49:52] * Kolin quit (Client Quit)
48: [00:50:00] * Kolin has joined #silverstripe
49: [00:58:29] * Stomach has joined #silverstripe
50: [01:02:49] * robbieaverill has joined #silverstripe
51: [01:04:19] <munk0r> ah, $many_many_extraFields.
52: [01:05:49] * Tanger has joined #silverstripe
53: [01:09:12] * Stomach quit (Ping timeout: 244 seconds)
54: [01:15:53] * Stomach has joined #silverstripe
55: [01:21:27] * robbieaverill quit (Remote host closed the connection)
56: [01:36:23] * robbieaverill has joined #silverstripe
57: [01:50:30] * BrewNaked has joined #silverstripe
58: [01:54:33] * BrewNaked quit (Ping timeout: 240 seconds)
59: [02:05:59] * robbieaverill quit (Remote host closed the connection)
60: [02:09:07] * Stomach quit (Quit: zzz)
61: [02:15:35] * Stomach has joined #silverstripe
62: [02:18:28] * sunzofman has joined #silverstripe
63: [02:20:03] * vanny quit (Quit: Page closed)
64: [02:24:15] * robbieaverill has joined #silverstripe
65: [02:43:57] * Stomach quit (Quit: zzz)
66: [02:47:50] * pippy has joined #silverstripe
67: [02:49:41] <pippy> if I want to make a rfc, is this a good place to chat about it?
68: [02:50:35] <micmania1> pippy: probably on the dev list but more than happy to help where I can if you have questions
69: [02:52:46] <pippy> micmania1: sweet, i've got a pretty straight forward suggestion that's pretty easy to implement
70: [02:53:23] * Stomach has joined #silverstripe
71: [02:53:39] * jules0x has joined #silverstripe
72: [02:53:53] <pippy> micmania1: do non SS members have the ability to post to the dev list?
73: [02:54:39] <pippy> nm, I've applied to join
74: [02:55:04] <micmania1> pippy: yeah, you can post when you’re accepted.
75: [02:55:27] <micmania1> If the feature is small though, you don’t need an RFC. Its fine to just do the thing and then see what people think
76: [02:55:52] <micmania1> If it takes a while to develop, then its probably worth raising it on the dev list and see if you’ll need to write an RFC
77: [02:58:04] <pippy> ah cool
78: [02:58:30] <pippy> it can fit in a single pull request
79: [02:58:35] <pippy> thanks for your help!
80: [03:08:14] <openbees> is there any super perfect s3 module which works without any glitch when running with elastic beanstalk load balancers ? I am using https://github.com/edlinklater/silverstripe-cloudassets-s3 but it creates issues with cropped images.
81: [03:12:18] * spronk quit (Quit: I may need a longer sleep timer...)
82: [03:13:36] * pippy quit (Ping timeout: 250 seconds)
83: [03:15:10] <robbieaverill> @openbees what do you mean by glitches? in a scaled environment you need to centralise all of your storage (db using RDS, cdn using cloudfront/s3/*nfs*!, possibly even code) and just have the scalable web servers to do the actual frontline grunt work. it shouldn't matter what the application is, just that no matter how many servers there are they all have everything they need
84: [03:15:49] <robbieaverill> @openbees in terms of silverstripe modules, i don't actually think that it's a silverstripe issue when it comes to scaling in AWS - it's more about how you configure your infrastructure than it is about PHP
85: [03:16:03] <robbieaverill> BTW - forgot to mention session/cache storage using redis/elasticache or similar
86: [03:17:15] <openbees> yaah it works in same principal as you suggesting but sometime when more than one instance running some thumbnails disappear magically
87: [03:22:15] <openbees> my first guess was that it looking for images locally then i configured this module to not use local copy but still the same issue
88: [03:22:17] <openbees> before jumping more deeply into code of this module to figure out what could be issue I just want to know which module is community favorite for s3 storage of assets .. offcourse last option is to fix this issue and make the one I am using better one.
89: [03:30:01] <micmania1> openbees: I haven’t used any, but there is also this one: https://github.com/silverstripe-australia/silverstripe-s3cdn
90: [03:39:23] * BrewNaked has joined #silverstripe
91: [03:41:34] * robbieaverill quit (Ping timeout: 252 seconds)
92: [03:44:03] * BrewNaked quit (Ping timeout: 248 seconds)
93: [04:03:13] <openbees> thanks robbieaverill micmanial will give it a try :)
94: [04:07:27] * cheddam_ quit (Ping timeout: 244 seconds)
95: [04:17:17] * DanaeNZ quit (Quit: TIME TO FEED)
96: [04:26:24] * mahfuz quit (Ping timeout: 250 seconds)
97: [04:36:42] * Pyromanik quit (Quit: Leaving)
98: [04:40:58] * adrexia quit (Quit: My Mac has gone to sleep. ZZZzzz…)
99: [04:49:54] * openbees quit (Ping timeout: 276 seconds)
100: [04:56:25] * micmania1 quit (Quit: micmania1)
101: [05:15:37] * openbees has joined #silverstripe
102: [05:27:40] * Stomach quit (Quit: zzz)
103: [05:28:15] * BrewNaked has joined #silverstripe
104: [05:33:27] * BrewNaked quit (Ping timeout: 276 seconds)
105: [05:57:43] * Stomach has joined #silverstripe
106: [07:02:00] * Mike123 has joined #silverstripe
107: [07:04:27] <Mike123> morning
108: [07:06:12] * Stomach quit (Quit: zzz)
109: [07:10:51] * swaiba has joined #silverstripe
110: [07:15:11] <ss-helper> $LinkingMode Values in Silverstripe - http://stackoverflow.com/questions/36171857/linkingmode-values-in-silverstripe
111: [07:17:05] * BrewNaked has joined #silverstripe
112: [07:21:33] * BrewNaked quit (Ping timeout: 240 seconds)
113: [07:23:13] * Embraden quit (Read error: Connection reset by peer)
114: [07:24:30] * Embraden has joined #silverstripe
115: [07:24:30] * Embraden quit (Changing host)
116: [07:24:30] * Embraden has joined #silverstripe
117: [07:25:38] * Firesphere_ has joined #silverstripe
118: [07:26:20] * Stomach has joined #silverstripe
119: [07:27:21] * marvanni has joined #silverstripe
120: [07:27:37] <Firesphere_> Hey ppl
121: [07:28:02] <Firesphere_> Is anyone, by any chance, aware of a dropdownfield that doesn't pre-populate, but queries the backend for it's information?
122: [07:28:19] <Firesphere_> With over 50k records, the has_one dropdown is basically breaking the CMS at the moment.
123: [07:36:11] <swaiba> Firesphere_ only a dependant drop down that does that based on select from a first drop down
124: [07:41:50] * openbees quit (Ping timeout: 248 seconds)
125: [07:41:52] * marvanni quit (Ping timeout: 244 seconds)
126: [07:51:30] <Mike123> can i filter by has_one relation in grifdiels ?
127: [07:51:35] <Mike123> gridfield*
128: [07:54:23] * marvanni has joined #silverstripe
129: [07:56:04] <Firesphere_> swaiba: I guess I'll have to use that one, to write a first-level dropdown :)
130: [07:56:40] <swaiba> Firesphere_ - https://github.com/sheadawson/silverstripe-dependentdropdownfield
131: [07:56:46] <swaiba> is this for the members?
132: [07:57:05] <Firesphere_> No, dependent dropdown doesn't do what I want
133: [07:57:18] <Firesphere_> Hah, no, it's for a list of 50k+ movies, actors, directors, etc.
134: [07:57:48] <Firesphere_> If I write an article on my site, I can link it to a movie (e.g. a review), but also link the article to other movies.
135: [07:57:53] <swaiba> how about the suggestion field?
136: [07:57:58] <Firesphere_> Thus, I have a has_one on movie, and a has_many
137: [07:58:13] <Firesphere_> suggestion-field is partially what I want.
138: [07:58:27] <Firesphere_> I want it to be a dropdown, with a key => value pair, so it's relation is built.
139: [07:58:33] <swaiba> https://github.com/tractorcow/silverstripe-autocomplete
140: [07:58:48] <swaiba> if you get what you want then please report back here :)
141: [07:58:52] <Firesphere_> Yep, both dependent and autocomplete are _partially_ what I'm looking for :P
142: [07:58:58] <Firesphere_> Ow, I will.
143: [07:59:37] <Firesphere_> I think I'll ask Chillu tomorrow, if he has an idea :)
144: [08:08:54] * arnhoe has joined #silverstripe
145: [08:25:42] * arnhoe quit ()
146: [08:33:49] * leomeloxp has joined #silverstripe
147: [08:35:12] * arnhoe has joined #silverstripe
148: [08:36:00] * Agilix_ has joined #silverstripe
149: [08:36:39] <Agilix_> Morning!
150: [08:42:02] * robbieaverill has joined #silverstripe
151: [08:43:23] * robbieaverill quit (Remote host closed the connection)
152: [08:45:45] * openbees has joined #silverstripe
153: [08:51:39] <swaiba> good morning Agilix_
154: [08:59:41] * Stomach quit (Quit: zzz)
155: [09:00:23] <Mike123> is it possible to search a has_one relation's Title in gridfield ?
156: [09:01:21] * Tanger quit (Quit: Tanger)
157: [09:04:25] * kerozene quit (Ping timeout: 252 seconds)
158: [09:05:56] * BrewNaked has joined #silverstripe
159: [09:07:12] * Agilix_ quit (Ping timeout: 250 seconds)
160: [09:09:41] * leomelo1 has joined #silverstripe
161: [09:09:41] <ss-helper> leomelo1: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
162: [09:10:03] * BrewNaked quit (Ping timeout: 240 seconds)
163: [09:12:18] * leomeloxp quit (Ping timeout: 244 seconds)
164: [09:13:53] * leomeloxp has joined #silverstripe
165: [09:13:54] * leomelo1 quit (Read error: Connection reset by peer)
166: [09:14:29] * robbieaverill has joined #silverstripe
167: [09:14:38] * Firesphere_ quit (Ping timeout: 248 seconds)
168: [09:17:14] * robbieaverill quit (Remote host closed the connection)
169: [09:25:34] * kinglozzer has joined #silverstripe
170: [09:25:35] * DimiStripe quit (Quit: DimiStripe)
171: [09:26:25] * darjus01 has joined #silverstripe
172: [09:26:27] <kinglozzer> Anyone know if lumberjack supports drag+drop sorting with GridFieldExtensions?
173: [09:27:42] <darjus01> Hi all in dataobject has_one image, so on dataobject delete can i delete image by this $this->Image()->delete(); ?
174: [09:32:22] * DimiStripe has joined #silverstripe
175: [09:35:21] <swaiba> darjus01 i think so, but you'll also have to set the ImageID to 0 i think
176: [09:36:06] <darjus01> in file table?
177: [09:36:29] <swaiba> in the "dataobject" that you are calling the has_one from
178: [09:37:13] <swaiba> kinglozzer I've no idea, but provided it doesn't interfere with it... I've got heavlily modified ModelAdmin and had no issues with GridFieldExtensions sorting rows at all
179: [09:42:44] * UncleCheese has joined #silverstripe
180: [09:48:56] * agent44 has joined #silverstripe
181: [09:48:59] * agent44 quit (Client Quit)
182: [09:49:37] * agent44 has joined #silverstripe
183: [09:57:30] <kinglozzer> swaiba: It "works", but doesn't publish. Thankfully someone else has already taken care of it for me :D https://github.com/heyday/silverstripe-gridfieldversionedorderablerows
184: [09:58:15] <swaiba> good to know kinglozzer
185: [09:59:38] <marvanni> does anyone knows how the get the parameters in the raw query when doing this :
186: [09:59:39] <marvanni> var_dump($list->dataQuery()->sql());
187: [10:00:14] <marvanni> i only see the questionmarks where the parameters should be and i need to debug a query
188: [10:00:49] <marvanni> so instead of WHERE ("SiteBlock"."Locale" = ?) AND ("SiteBlock"."ClassName" = ?)
189: [10:00:58] <marvanni> the actual values I pass
190: [10:06:05] * leomeloxp quit (Quit: -a- Connection Timed Out)
191: [10:06:19] * leomeloxp has joined #silverstripe
192: [10:06:53] * leomeloxp quit (Client Quit)
193: [10:07:50] <marvanni> lkjshdfk;jsdhfgk;jdfhgkjdfgkjdbfkgjbdfkjgfdg
194: [10:08:06] <marvanni> I.WANT.MY.QUERY.BACK!!!
195: [10:08:38] <marvanni> nice that they added parameterised queries, but at least note somewhere how the get the end result
196: [10:16:25] <kinglozzer> marvanni: Which version of SS are you using?
197: [10:16:39] <marvanni> 3.3.x
198: [10:17:59] <kinglozzer> I think you might be out of luck :(
199: [10:18:01] <marvanni> I tried all the variations of $list->dataQuery()->getFinalisedQuery() ->sql() etc
200: [10:18:14] <kinglozzer> A method of viewing the parameters was added to master
201: [10:18:18] <kinglozzer> https://github.com/silverstripe/silverstripe-framework/pull/4582
202: [10:18:29] <marvanni> but icant get any further than the query parts as an array
203: [10:18:44] <kinglozzer> marvanni: That's as close as you can get
204: [10:18:59] <kinglozzer> Anything else is just doing a find + replace for ? with those array values
205: [10:19:26] <kinglozzer> There isn't a finalised SQL string for parameterised queries
206: [10:20:24] <marvanni> thats stupid
207: [10:20:47] <kinglozzer> marvanni: That's how parameterised queries work unfortunately
208: [10:20:52] <marvanni> sometimes i need/want to copy the final query in sequel pro to view the raw output
209: [10:21:53] <kinglozzer> marvanni: It's not a SilverStripe thing - parameters are handled separately to the actual query at a DB level
210: [10:22:24] <kinglozzer> But there should really be some method of viewing params in 3.3.x, even if it's just to output them as an array
211: [10:22:27] <kinglozzer> An oversight I guess
212: [10:22:30] <marvanni> hm, Iw as not aware of that
213: [10:23:13] <kinglozzer> marvanni: This explains it quite well https://en.wikipedia.org/wiki/Prepared_statement
214: [10:23:16] <marvanni> thats gonna be a pain with complex joins and wheres
215: [10:23:41] <marvanni> and i have gattered a lot them
216: [10:24:21] <marvanni> http://stackoverflow.com/questions/1786322/in-php-with-pdo-how-to-check-the-final-sql-parametrized-query
217: [10:39:07] * jackoconnor has joined #silverstripe
218: [10:48:46] <marvanni> Does anyone knows a good hack to search for a Locale, without Translatable wants to switch to that locale in the cms?
219: [10:48:57] <marvanni> I thougth I had one, but it is broken in 3.3
220: [10:50:39] * wmk has joined #silverstripe
221: [10:50:45] <wmk> kinglozzer, around?
222: [10:51:20] <wmk> my customer wants to embed something from another page with an iframe. Is https://github.com/kinglozzer/htmleditoriframe the way to go or are there better ways?
223: [10:52:50] <swaiba> wmk - https://github.com/silverstripe-labs/silverstripe-iframe
224: [10:53:17] <kinglozzer> Needs more badges!
225: [10:53:22] <wmk> swaiba, not an iframe page typ
226: [10:53:23] <wmk> e
227: [10:53:33] <wmk> inside e.g. a blog post etc...
228: [10:53:35] <kinglozzer> wmk: I haven't used that module for a while now, but I think it should do the trick still
229: [10:53:36] <swaiba> ok wmk, just a throught
230: [10:53:43] <wmk> swaiba, thanks ;)
231: [10:54:01] <wmk> kinglozzer, it configures tiny to allow iframes?
232: [10:54:52] * BrewNaked has joined #silverstripe
233: [10:55:27] <kinglozzer> wmk: I think it already allows them
234: [10:55:58] <wmk> ik
235: [10:56:03] <wmk> ok
236: [10:56:52] <swaiba> kinglozzer what badge do you want? :)
237: [10:58:46] <kinglozzer> swaiba: Sarcasm ;)
238: [10:59:15] * BrewNaked quit (Ping timeout: 248 seconds)
239: [10:59:24] <kinglozzer> I might see if I can find some more and create a PR :P
240: [10:59:51] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
241: [11:01:03] <wmk> kinglozzer, where?
242: [11:01:19] <kinglozzer> https://github.com/silverstripe-labs/silverstripe-iframe#iframe-module
243: [11:02:30] <wmk> oh...
244: [11:07:34] <kinglozzer> Did anyone else witness the JS shitstorm last night?
245: [11:08:52] <swaiba> i guess not
246: [11:12:12] <wmk> i just saw some funny tweets
247: [11:12:21] <wmk> made me think about composer...
248: [11:12:37] * sunzofman quit (Ping timeout: 260 seconds)
249: [11:13:57] <marvanni> link?
250: [11:15:19] <wmk> marvanni, http://www.theregister.co.uk/2016/03/23/npm_left_pad_chaos/
251: [11:15:48] <kinglozzer> Heh, yeah, it could in theory happen in PHP-land
252: [11:16:04] <kinglozzer> I mean simon_w caused enough trouble when he removed his packages
253: [11:16:27] <wmk> ehem, yes
254: [11:16:33] <kinglozzer> But having dependencies that are 11 lines of code for 1 function is just asking for trouble imo...
255: [11:16:49] <wmk> well, that's with this micro-addons
256: [11:16:54] <wmk> same in ss world
257: [11:17:18] <wmk> do we want small addons we can combine and configure or "one module takes it all" with too much unused functionality?
258: [11:17:33] <marvanni> agree with kinglozzer, but yes it can happen to ss
259: [11:17:37] <kinglozzer> It's about a balance IMO
260: [11:18:09] <kinglozzer> For example, you wouldn't want an SS module that contains one function to sort a DataList by 'Sort ASC'
261: [11:18:18] <wmk> hmm, yes
262: [11:18:28] <kinglozzer> Sure, you might be duplicating code from other projects, but still...
263: [11:18:36] <wmk> but some companies have their own helper modules around their modules depend on
264: [11:18:54] <wmk> which is also a nightmare imho
265: [11:19:11] <kinglozzer> Yeah, it could always happen to any module big or small
266: [11:19:19] <kinglozzer> Part of the fun that is open source I guess :P
267: [11:19:24] <wmk> kinglozzer, i installed the module but in htmleditor nothing changes... do i have to enable something in htmleditor?
268: [11:19:44] <kinglozzer> wmk: It should be under the "Insert Media" thing
269: [11:19:54] <wmk> the tree?
270: [11:19:56] <kinglozzer> Yeah
271: [11:20:18] <wmk> aaaah!
272: [11:20:21] <wmk> neat
273: [11:37:01] * Copperis has joined #silverstripe
274: [11:46:20] <Mike123> any ideas why no input fields on search http://snag.gy/z2N6x.jpg ?
275: [11:54:35] * kerozene has joined #silverstripe
276: [12:04:25] * marvanni quit (Quit: marvanni)
277: [12:05:07] <kinglozzer> Any SQL experts in the house?
278: [12:05:50] <kinglozzer> Got this (fairly simple) query: http://pastie.org/10770988
279: [12:06:16] <swaiba> go on kinglozzer
280: [12:06:25] <kinglozzer> Returns '0' on the live database, but returns '2' locally (2 is correct) - database content is identical
281: [12:06:57] <kinglozzer> If I remove the (`SiteTree_Live`.`ClassName` IN ('EventBlogPost')) clause it returns 2, but this is SS generated so I don't really want to have to rewrite it all :(
282: [12:09:31] <swaiba> do you get the same if you run SELECT ClassName, COUNT(*) FROM SiteTree_Live GROUP BY ClassName; ?
283: [12:09:46] <swaiba> on both databases?
284: [12:10:32] <kinglozzer> Yep, exactly the same
285: [12:12:41] <kinglozzer> Ahhh I think I've found it...
286: [12:13:02] <kinglozzer> If I remove the quotes around the '1' in (`BlogPost_Live`.`Featured` = '1') it returns the same count on both
287: [12:13:11] <kinglozzer> I wonder if it's to do with int vs string casting?
288: [12:13:53] * MrG has joined #silverstripe
289: [12:14:16] * MrG is now known as Guest10568
290: [12:15:15] <Guest10568> How do i publish from php?
291: [12:15:23] <Guest10568> is $this->writeToStage('Stage'); $this->publish("Stage", "Live"); the way to do it?
292: [12:16:33] <Guest10568> and how can i publish every page in a part of sitetree?
293: [12:17:15] <kinglozzer> Grrr that's really annoying, because I'm doing .Filter('Featured', 1) in template... and I can't force 1 to be an int instead of a string :(
294: [12:18:47] <kinglozzer> Guess I'll just have to move it into my model instead of being lazy... :P
295: [12:26:13] <swaiba> Guest10568 yep
296: [12:26:58] <swaiba> and to publish all... foreach (SiteTree:get() as $page) ...$page->writeToStage('Stage'); ....
297: [12:28:16] * UndefinedOffset has joined #silverstripe
298: [12:30:17] <Guest10568> thanx swaiba but i only want to publish children of X
299: [12:30:34] <Guest10568> (X = ID of page)
300: [12:30:55] <swaiba> Guest10568 foreach ($this->Children() as $page) ..
301: [12:32:36] * SH__ has joined #silverstripe
302: [12:32:59] <SH__> Hey guys how can i make sure the login form redirects to a certain link if the Member is not admin?
303: [12:33:58] <wmk> Guest10568, SiteTree Versioned extension also has a doPublish() method that does a bit more...
304: [12:34:10] <wmk> well, SiteTree class itself
305: [12:35:13] <wmk> hmm... interesting: https://github.com/silverstripe/silverstripe-framework/pull/4551#issuecomment-200329096
306: [12:37:31] <swaiba> SH__ extend MemberLoginForm and use that as a custom class
307: [12:39:41] <swaiba> SH__ and then this... http://www.sspaste.com/paste/show/56f28e843fa88
308: [12:43:06] <SH__> swaiba I see, thanks!
309: [12:43:42] * BrewNaked has joined #silverstripe
310: [12:48:04] * BrewNaked quit (Ping timeout: 260 seconds)
311: [13:05:22] * Agilix_ has joined #silverstripe
312: [13:05:40] <Agilix_> apparantly I was dc :p
313: [13:06:02] <Agilix_> Does anyone know If I can show tags from silverstripe/blog without the usage of the widgets?
314: [13:33:39] <kinglozzer> errrr
315: [13:33:55] <kinglozzer> swaiba: work this out - the query on live is now returning 2 results O.o
316: [13:34:01] <kinglozzer> The database hasn't changed at all...
317: [13:34:06] <kinglozzer> I'm so confused :(
318: [13:35:08] <swaiba> kinglozzer oh dear! there must be an explanation... there always is...
319: [14:06:18] * openbees quit (Ping timeout: 276 seconds)
320: [14:06:22] * marvanni has joined #silverstripe
321: [14:06:58] * openbees has joined #silverstripe
322: [14:13:47] * cloph quit (Ping timeout: 250 seconds)
323: [14:16:27] * cloph_away has joined #silverstripe
324: [14:20:50] <wmk> db config? php version? kinglozzer
325: [14:21:12] <wmk> Agilix_, of course you can.
326: [14:21:43] <wmk> Agilix_, i did so on http://www.silverstrip.es/blog/
327: [14:22:40] * SH__ quit (Ping timeout: 250 seconds)
328: [14:24:32] <wmk> hmm, or i just used the widget but modified the widget template
329: [14:25:03] <wmk> so Agilix_, where do you want to show all tags? and why not just use the widget?
330: [14:27:13] <wmk> But you can of course make a getter and return BlogTag::get() ... and filter and sort like you want Agilix_
331: [14:29:23] <Agilix_> In the blogholder
332: [14:29:36] <Agilix_> The widget isn't installing for a reason
333: [14:30:08] <Agilix_> The tags are working though under a blogEntry
334: [14:31:30] <wmk> did you assign a blog to the widget?
335: [14:31:53] <Agilix_> I can't reach the widgets
336: [14:32:29] <Agilix_> Should they be displayed in the menu of the cms?
337: [14:32:37] * BrewNaked has joined #silverstripe
338: [14:33:43] <wmk> there should be a tab in the blogholder
339: [14:34:44] <Agilix_> I know, yet it's not showing
340: [14:35:13] <wmk> like http://www.silverstrip.es/blog/
341: [14:35:52] <wmk> Did you apply WidgetPageExtension to Blog?
342: [14:36:06] <wmk> i've applied it to both, Blog and BLogPost
343: [14:37:09] * BrewNaked quit (Ping timeout: 260 seconds)
344: [14:38:42] <Agilix_> Yes
345: [14:38:46] <Agilix_> Might try again
346: [14:46:45] <Agilix_> wmk: This is my extensions.yml: http://pastie.org/10771184
347: [14:46:48] <Agilix_> not working
348: [14:46:57] <Agilix_> (Latest 2 entries are the blog)
349: [14:47:29] <wmk> !flush Agilix_
350: [14:47:29] <ss-helper> Agilix_: Have you flushed? Try doing a ?flush=all and /dev/build then see if it's sorted. Do it twice for good measure ;-)
351: [14:48:07] <Agilix_> done multiple times :p
352: [14:48:37] <wmk> so it works for BlogEntry but not for Blog?
353: [14:49:03] <wmk> and you don't have tabs there but spaces?
354: [14:51:16] <Agilix_> Yea Blogholder has none, blog entry has the tb
355: [14:51:54] <Agilix_> trying BlogHolder instead of Blog
356: [14:53:18] <Agilix_> That did it :)
357: [14:56:07] * openbees quit (Quit: Leaving)
358: [14:59:56] <Agilix_> K, widget is active but how do I custom show it?
359: [15:00:23] <wmk> Agilix_, dunno what version of Blog you have
360: [15:00:39] <Agilix_> 1.0.0
361: [15:00:41] <wmk> i have a Blog pagetype, not BlogHolder
362: [15:01:05] <wmk> ok, i'm on blog 2.0.x
363: [15:01:08] <wmk> *G*
364: [15:01:46] <Agilix_> got it
365: [15:10:46] * swaiba quit (Remote host closed the connection)
366: [15:14:26] * BrewNaked has joined #silverstripe
367: [15:29:44] * Agilix__ has joined #silverstripe
368: [15:29:44] <ss-helper> Agilix__: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
369: [15:30:19] <ss-helper> UPDATE: Dynamically updating manifest cache file in SilverStripe - http://stackoverflow.com/questions/36093607/update-dynamically-updating-manifest-cache-file-in-silverstripe
370: [15:30:44] * ^pH- quit ()
371: [15:32:00] * Agilix_ quit (Ping timeout: 250 seconds)
372: [15:32:26] * Guest10568 quit (Ping timeout: 250 seconds)
373: [15:34:25] * ^pH has joined #silverstripe
374: [15:45:19] <ss-helper> UPDATE: Updating manifest cache version and date in SilverStripe on upload - http://stackoverflow.com/questions/36093607/update-updating-manifest-cache-version-and-date-in-silverstripe-on-upload
375: [15:45:56] * BrewNaked quit (Remote host closed the connection)
376: [15:57:07] * darjus01 quit (Read error: Connection reset by peer)
377: [16:08:24] * Mike123 quit (Ping timeout: 250 seconds)
378: [16:24:00] * Agilix__ quit (Ping timeout: 250 seconds)
379: [16:29:15] * arnhoe quit ()
380: [16:52:28] * kinglozzer quit ()
381: [16:54:30] * jcwacky quit (Quit: jcwacky)
382: [17:04:28] * gelignite has joined #silverstripe
383: [17:13:47] * jackoconnor quit (Quit: jackoconnor)
384: [17:53:28] * Phlunk3 quit (Remote host closed the connection)
385: [17:57:54] * agent44 quit (Quit: zzz)
386: [18:11:54] * Stomach has joined #silverstripe
387: [18:17:42] * Stomach quit (Quit: zzz)
388: [18:20:58] <marvanni> What is wrong with this? http://sspaste.com/paste/show/56f2de8449873
389: [18:24:46] * BrewNaked has joined #silverstripe
390: [18:55:28] * madmatt quit (Ping timeout: 250 seconds)
391: [18:55:42] * madmatt has joined #silverstripe
392: [18:55:53] * jules0x quit (Ping timeout: 250 seconds)
393: [18:56:05] * madmatt is now known as Guest3090
394: [18:56:29] * jules0x has joined #silverstripe
395: [19:03:18] * arnhoe has joined #silverstripe
396: [19:03:51] * Stomach has joined #silverstripe
397: [19:07:12] * arnhoe quit (Client Quit)
398: [19:13:39] * muskie9 has joined #silverstripe
399: [19:16:44] <wmk> marvanni, dunno, what's the error?
400: [19:24:03] <marvanni> hm nothing apparently :) i copied the raw query, to check the results, but that did not work.
401: [19:24:18] <marvanni> the posted query does work though
402: [19:30:23] <ss-helper> Calling to data object function on upload (SilverStripe) - http://stackoverflow.com/questions/36186948/calling-to-data-object-function-on-upload-silverstripe
403: [19:33:00] * robbieaverill has joined #silverstripe
404: [19:36:43] * DanaeNZ has joined #silverstripe
405: [19:39:27] * Phlunk3 has joined #silverstripe
406: [19:52:23] * robbieaverill quit (Remote host closed the connection)
407: [19:52:35] * Hailwood has joined #silverstripe
408: [19:53:12] <Hailwood> Hey guys, does anyone have the docs, or a working example of adding csrf validation to a request manually?
409: [19:55:24] <Hailwood> Like I get to check the request I can do if(!SecurityToken::inst()->checkRequest($request)) return $this->httpError(400); apparently
410: [19:57:06] * robbieaverill has joined #silverstripe
411: [19:57:21] <DanaeNZ> Hailwood: do you have access to the Form object?
412: [19:57:40] <Hailwood> So would I just add a hidden field with the value of SecurityToken::getSecurityID() ?
413: [19:57:45] * adrexia has joined #silverstripe
414: [19:58:25] <DanaeNZ> Hailwood: right, so there's no Form object? Yeah you can do that. You can also echo $SecurityID to the template
415: [19:58:51] <Hailwood> DanaeNZ, correct no Form object.
416: [19:59:01] <Hailwood> Oh $SecurityID is automatically set? sweet
417: [20:00:43] <Hailwood> so <input type="hidden" name="SecurityID" value="{$SecurityID}" /> should do it then yeah?
418: [20:01:22] <DanaeNZ> Hailwood: yeah pretty sure
419: [20:01:29] <Hailwood> Thanks :)
420: [20:07:36] * micmania1 has joined #silverstripe
421: [20:07:47] <Hailwood> Oh no! he's at it again... http://i.imgur.com/KRydrYL.png
422: [20:15:24] <UndefinedOffset> haha ya it went through a bunch of my modules and the companies modules again lol
423: [20:17:47] <Hailwood> Ok next security question, anyone have an example of IP whitelisting for the cms?
424: [20:18:00] <Hailwood> aka lockdown /admin and /admin/*
425: [20:21:40] <Stomach> http://www.sspaste.com/paste/show/56f2facebaf14
426: [20:23:08] <Hailwood> Stomach, Well that was easy
427: [20:23:29] <Stomach> just make sure your IP isn't gonna change :P
428: [20:27:21] * robbieaverill quit (Remote host closed the connection)
429: [20:28:36] * marvanni quit (Quit: marvanni)
430: [20:28:47] * robbieaverill has joined #silverstripe
431: [20:28:52] <micmania1> Stomach: won’t that only block access to /admin and not /admin/pages?
432: [20:28:57] <Stomach> yeah
433: [20:28:59] <Hailwood> Stomach, ha it will happen eventually, I need to whitelist three difference offices to have access
434: [20:29:17] <Stomach> micmania1 - you're right, and I am lazy :D
435: [20:29:41] <micmania1> I think ^admin should be enough :)
436: [20:30:00] <micmania1> Hailwood: you might also want to block access to security/login too
437: [20:30:23] <Hailwood> I 'spose if they can't login they can't get to the admin section eh
438: [20:30:39] <Stomach> you'd be surprised
439: [20:30:55] <Hailwood> oh?
440: [20:31:14] <Stomach> people are tricksy
441: [20:31:46] <Hailwood> as a side question, why doesn't /security/login form have csrf protection?
442: [20:32:39] <Stomach> thats a very good question
443: [20:33:18] <micmania1> very good :|
444: [20:35:58] <Stomach> I assume its because ss23 didn't like it
445: [20:41:05] * robbieaverill quit (Remote host closed the connection)
446: [20:43:07] * UndefinedOffset quit (Quit: Leaving.)
447: [20:50:26] <Hailwood> Is it something that should be raised as a bug?
448: [20:51:25] * robbieaverill has joined #silverstripe
449: [20:52:49] * wmk quit (Ping timeout: 260 seconds)
450: [20:53:41] * Stomach quit (Quit: zzz)
451: [21:01:23] * robbieaverill quit (Remote host closed the connection)
452: [21:03:19] * Stomach has joined #silverstripe
453: [21:05:49] <micmania1> Hailwood: probably email security@silverstripe.org
454: [21:06:47] * robbieaverill has joined #silverstripe
455: [21:07:25] <Hailwood> done
456: [21:13:52] * UncleCheese has joined #silverstripe
457: [21:16:02] * Stomach quit (Quit: zzz)
458: [21:16:23] * Stomach has joined #silverstripe
459: [21:16:33] <DanaeNZ> Finally I have time for an R+D day!!
460: [21:18:14] <Stomach> hahahaha
461: [21:18:21] <Stomach> watch that time disappear :P
462: [21:20:13] <DanaeNZ> aaggghh
463: [21:29:43] * muskie9__ has joined #silverstripe
464: [21:29:56] * robbieaverill quit (Remote host closed the connection)
465: [21:30:01] * Pyromanik has joined #silverstripe
466: [21:30:10] <Pyromanik> guys I've got the shakes, what do?
467: [21:31:32] * muskie9 quit (Ping timeout: 260 seconds)
468: [21:31:42] * muskie9__ is now known as muskie9
469: [21:32:59] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
470: [21:33:41] <Stomach> Pyromanik shake, shake, shake it out, shake it out
471: [21:36:02] <micmania1> Pyromanik: milkshakes?
472: [21:37:23] * robbieaverill has joined #silverstripe
473: [21:37:27] <Pyromanik> micmania1, coffee and adrenaline I think :<
474: [21:43:28] * Copperis quit (Remote host closed the connection)
475: [21:45:15] * Stomach quit (Quit: zzz)
476: [21:49:07] * spronk has joined #silverstripe
477: [21:49:33] * Stomach has joined #silverstripe
478: [22:02:59] * BrewNaked quit (Remote host closed the connection)
479: [22:14:51] * UncleCheese has joined #silverstripe
480: [22:27:44] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
481: [22:43:45] <Pyromanik> Sunshine, lollipops and rainbows.
482: [22:50:15] <spronk> sunshine reggae
483: [22:50:17] <spronk> take it easy
484: [22:52:33] * Stomach quit (Quit: zzz)
485: [22:54:13] * Stomach has joined #silverstripe
486: [23:00:01] * ss-helper quit (Remote host closed the connection)
487: [23:00:17] * ss-helper has joined #silverstripe
488: [23:06:10] * sunzofman has joined #silverstripe
489: [23:13:30] * robbieaverill quit (Remote host closed the connection)
490: [23:16:00] * micmania1 quit (Quit: micmania1)
491: [23:19:15] * robbieaverill has joined #silverstripe
492: [23:19:18] <Pyromanik> --disable-shared
493: [23:25:18] <ss23> The reason login form doesn't have CSRF, as I understand it, is because on a staticly published site you often wanat a login form on every page
494: [23:25:24] <ss23> Super common use-case
495: [23:25:31] <ss23> I dunno how they're going to "fix" it
496: [23:25:51] <Pyromanik> statically publish php
497: [23:26:50] <Stomach> ss23 https://github.com/stojg/beeroclock
498: [23:26:51] <Stomach> :D
499: [23:27:23] <Pyromanik> kek
500: [23:27:29] <xyphoid> i was about to say 'but actually what's the point of CSRF protection for login pages' but http://stackoverflow.com/a/15350123/615471 is interesting
501: [23:28:52] <ss23> yeah, it was discussed on the mailing list
502: [23:28:56] <ss23> turns out it does matter, who knew!
503: [23:29:03] <ss23> lol Stomach
504: [23:29:07] <ss23> we haven't had that running for ages
505: [23:29:25] <Stomach> thats very disappointing
506: [23:46:59] * spronk quit (Quit: I may need a longer sleep timer...)
507: [23:54:21] * DanaeNZ quit (Remote host closed the connection)
508: [23:56:52] * DanaeNZ has joined #silverstripe
509: [23:57:11] * robbieaverill quit (Remote host closed the connection)

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