#silverstripe IRC Log

IRC log for 5 July 2016

All timestamps are in UTC.

1: [00:00:01] * ss-helper quit (Remote host closed the connection)
2: [00:00:18] * ss-helper has joined #silverstripe
3: [00:05:18] * Hailwood quit (Quit: Leaving)
4: [00:19:13] * DarjusIT quit (Read error: Connection reset by peer)
5: [00:25:59] * Stomach quit (Quit: zzz)
6: [00:28:00] * Stomach has joined #silverstripe
7: [00:29:28] <spronk> man
8: [00:29:31] <spronk> this channel is so dead these days
9: [00:36:00] <Stomach> yep
10: [00:37:22] <spronk> where has everyone gone?
11: [00:43:33] * Stomach quit (Ping timeout: 276 seconds)
12: [00:45:09] * micmania1 quit (Quit: micmania1)
13: [00:57:31] * johan_ has joined #silverstripe
14: [00:57:52] <johan_> hello folks, just wondering if someone can help me with Blocks module enquiry, please?
15: [01:09:14] * Stomach has joined #silverstripe
16: [01:19:08] * micmania1 has joined #silverstripe
17: [01:20:05] * janneklouman-- has joined #silverstripe
18: [01:20:07] <spronk> whats the issue johan_
19: [01:24:43] * janneklouman-- quit (Ping timeout: 244 seconds)
20: [01:27:02] <johan_> hi spronk, thanks for your attention.
21: [01:27:30] <johan_> my colleague recommends me to look into sheadawson\silverstripe-blocks module, to fulfill my requirement.
22: [01:27:53] <johan_> the Blocks module allows me to set up custom Blocks, BlockSets, and Block Areas.
23: [01:27:57] <spronk> yeah?
24: [01:28:07] <johan_> But I am not sure how I can go about creating nested Blocks
25: [01:28:25] <johan_> Blocks within Block within Blocks within ...
26: [01:28:58] <johan_> my objective is to create a very modular component.
27: [01:29:07] <johan_> modular website*
28: [01:29:27] <spronk> hmm
29: [01:29:34] <spronk> as far as i am aware, it's single layer of blocks
30: [01:29:49] <spronk> you can use block sets and a kind of inheritance for reusability
31: [01:30:01] <spronk> (i have only used the blocks module a wee bit btw)
32: [01:30:54] <johan_> that's alright, so as far as you are aware, it's not looking promising to create recursive nested Blocks?
33: [01:33:13] <spronk> to my knowledge no
34: [01:33:47] <spronk> but depending on exactly waht you want to do, the block set functionality may suffice
35: [01:35:33] <johan_> it might. can I share you a sample illustration, please?
36: [01:35:38] <spronk> sure
37: [01:35:48] <johan_> assume we have BasePage template.
38: [01:36:51] <johan_> I would like to add: HomePage block which has standard structure layout for a homepage. It hosts 3 sub-blocks: GlobalHeader block, ContentWrapper block, and GlobalFooter block.
39: [01:38:05] <johan_> ContentWrapper block can be populated with many different sub-block types, ex: Carousel block, Article block, Gallery block, Video block, etc.
40: [01:39:01] <johan_> Gallery block can be populated with many individual Image blocks - with simple properties such as: Image src, alt, width, and height.
41: [01:39:22] <johan_> Please let me know if it doesn't make sense for you.
42: [01:39:52] <spronk> hmm
43: [01:40:07] <spronk> do you need to use blocks for the standard structures?
44: [01:40:10] <spronk> as opposed to page types?
45: [01:40:47] <spronk> do you need to be able to edit the globalheader and globalfooter blocks from within the CMS?
46: [01:40:54] <johan_> I am afraid, yes. The constraint here is to only have 1 page type / template, and use Blocks to customise the content.
47: [01:41:00] <spronk> because if not, you could use page types, and template includes to do a lot of this...
48: [01:41:02] <spronk> ah
49: [01:42:00] <johan_> and yes, globalheader and globalfooter would be editable in the CMS.
50: [01:42:10] <spronk> hmm
51: [01:43:42] <spronk> I don't think you're going to find a blocks module that will let you do infinite nesting
52: [01:43:53] <johan_> globalheader and globalfooter are fairly straight forward, because it's just the first level.
53: [01:43:56] <spronk> mainly because it's reaaaally hard to do with the versioned stage/live stuff
54: [01:43:58] <spronk> yeah
55: [01:44:07] <johan_> but to go deeper to populate the content area with blocks within blocks...
56: [01:44:13] <johan_> I see.
57: [01:44:19] <spronk> yeah, this is what most people would be using Page Types for
58: [01:44:32] <spronk> to encapsulate the base layouts, and then use blocks within the layouts only
59: [01:45:40] <johan_> perfect.
60: [01:45:49] <johan_> thanks for your advice, spronk
61: [01:46:00] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
62: [01:46:05] <spronk> np
63: [01:46:36] <johan_> probably I have to go back to the drawing board and discard Blocks as an option.
64: [01:46:40] <johan_> appreciate it.,
65: [01:48:09] * UncleCheese has joined #silverstripe
66: [01:51:45] * phorloop has joined #silverstripe
67: [02:02:27] * phorloop quit (Quit: Byeee...)
68: [02:19:29] * micmania1 quit (Quit: micmania1)
69: [02:22:07] * micmania1 has joined #silverstripe
70: [02:48:08] * pippy has joined #silverstripe
71: [02:49:31] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
72: [02:49:52] * UncleCheese has joined #silverstripe
73: [03:22:08] * DanaeNZ makes noise
74: [03:23:08] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
75: [03:29:13] * janneklouman-- has joined #silverstripe
76: [03:33:55] * janneklouman-- quit (Ping timeout: 252 seconds)
77: [03:48:28] <pippy> ugh, i hate it when someone complains about something that can't change
78: [03:48:36] <pippy> so the fix is to add a disclaimer
79: [03:49:18] <pippy> so next time it happens you can say "you didn't read the disclaimer"
80: [03:58:58] <DanaeNZ> hmmm, I need to define a custom cache folder per theme
81: [04:01:29] <spronk> lalalalala
82: [04:01:47] <spronk> where is everyone these days, DanaeNZ ?
83: [04:03:17] <DanaeNZ> I have no idea
84: [04:03:27] <DanaeNZ> I went away and came back and everyone was gone
85: [04:03:33] <spronk> 40 users...
86: [04:03:37] <spronk> did we used to have more ?
87: [04:03:50] <DanaeNZ> yeah it used to stretch to the bottom of the pane on my limechat
88: [04:06:36] <spronk> hmm
89: [04:06:39] <spronk> is silverstripe less popular than it was?
90: [04:06:41] * spronk wonders
91: [04:08:32] <DanaeNZ> I was thinking it's a combo of things. New silverstripe.org help structure = less randoms to ask questions here. Demand for SilverStripe devs seems to be pretty high. Maybe regulars are bogged down with work
92: [04:08:40] <DanaeNZ> that's just optimistic me
93: [04:08:48] <DanaeNZ> I'm sure bogged down with work
94: [04:09:07] <spronk> hmm
95: [04:09:37] <DanaeNZ> damn, silverstripe gets temp cache folder name based off the apache user
96: [04:10:02] <DanaeNZ> I have two different HomePage.ss templates because two themes
97: [04:10:18] <DanaeNZ> plus subsites
98: [04:10:25] <DanaeNZ> so they are overwriting each other
99: [04:10:44] * janneklouman-- has joined #silverstripe
100: [04:14:58] <spronk> D:
101: [04:15:42] <DanaeNZ> Although, now that I look at the cache structure, it shouldn't do that at all
102: [04:15:43] * janneklouman-- quit (Ping timeout: 252 seconds)
103: [04:15:58] <DanaeNZ> it stores the full path of course
104: [04:25:41] * DorsaiNZ has joined #silverstripe
105: [04:25:41] <ss-helper> DorsaiNZ: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
106: [04:27:49] <DorsaiNZ> hi - anyone here know a bit about how the ORM should work inside loops?
107: [04:29:10] <spronk> badly
108: [04:29:37] <DanaeNZ> haha
109: [04:31:06] <DorsaiNZ> I figured as much :)
110: [04:31:18] <DanaeNZ> What are you tryna do?
111: [04:32:18] <DorsaiNZ> something like this
112: [04:32:20] <DorsaiNZ> $Chapters = Chapter::get(); foreach($Chapters as $Chapter) { $Chapter->Number = $ChapterCount.'.'; $Chapter->write(); $ChapterCount++; }
113: [04:32:30] <DorsaiNZ> excuse the bad formatting
114: [04:32:55] <DorsaiNZ> it does the first write then bad things happen
115: [04:35:04] * pippy quit (Ping timeout: 250 seconds)
116: [04:35:18] <DanaeNZ> hmmm
117: [04:35:38] <spronk> define bad things
118: [04:35:45] <DanaeNZ> I guess I don't know enough about the ORM cos I would have thought that would pretty much work
119: [04:36:10] <DorsaiNZ> it falls over and I get an error message - so not very bad
120: [04:36:16] <spronk> hmm
121: [04:36:18] <spronk> whats the error?
122: [04:37:00] <DorsaiNZ> Fatal error: maximum execution time exceeded or something like that
123: [04:37:10] <DorsaiNZ> but there are only 3 chapters for it to loop over so...
124: [04:37:21] <spronk> hmmmm
125: [04:37:41] <spronk> maybe it doesn't like the write in the loop o_O
126: [04:37:48] <DorsaiNZ> oh and this is being called via onAfterWrite
127: [04:38:05] <DanaeNZ> ah
128: [04:38:06] <spronk> onAfterWrite on what exactly?
129: [04:38:16] <DanaeNZ> Chapter I bet
130: [04:38:24] <DorsaiNZ> yep
131: [04:38:30] <spronk> yeahh
132: [04:38:33] <spronk> infinite looping
133: [04:38:37] <spronk> or
134: [04:38:38] <spronk> recursing
135: [04:38:39] <DorsaiNZ> bugger
136: [04:38:53] <DorsaiNZ> of course
137: [04:39:02] <spronk> you probably need to do a short circuit if the chapter you're looking at is the chapter you're triggering on
138: [04:39:15] <DorsaiNZ> some exit clause yeah
139: [04:42:03] <DorsaiNZ> or I could just not use the write function
140: [04:49:39] <spronk> indeed
141: [04:49:41] <spronk> ughh
142: [04:50:38] <DorsaiNZ> nah exit clause is better cause I still want all the heavy lifting write does with around the abstraction
143: [04:51:05] <DorsaiNZ> thanks for the pointing out the bloody obvious to me though :)
144: [04:52:48] * janneklouman-- has joined #silverstripe
145: [04:54:50] <DanaeNZ> DorsaiNZ: maybe take a peek at whatever it is in SiteTree / hierarchy that calculates the Sort variable, as it kinda looks like that's what you're doing (albeit automatically).
146: [04:55:46] <DanaeNZ> iirc, SiteTree or Hierarchy goes through in a similar way and updates all other pages in that level with a Sort order. Could be what you're after
147: [04:56:32] <DorsaiNZ> ta
148: [04:57:31] * janneklouman-- quit (Ping timeout: 252 seconds)
149: [05:13:54] * AlphaCactus_ has joined #silverstripe
150: [05:13:54] * spekulatius quit (Ping timeout: 250 seconds)
151: [05:14:19] * spekulatius has joined #silverstripe
152: [05:15:38] * AlphaCactus quit (Ping timeout: 250 seconds)
153: [05:15:48] * AlphaCactus_ is now known as AlphaCactus
154: [05:31:24] * DorsaiNZ quit (Ping timeout: 250 seconds)
155: [05:45:36] * sould has joined #silverstripe
156: [05:45:45] <sould> hey all
157: [05:46:15] <sould> Is anybody here familiar with hooking your own function into a UserForms submit?
158: [05:55:35] * janneklouman-- has joined #silverstripe
159: [05:57:53] <DanaeNZ> sould: I've only dealt with custom fields with userforms
160: [05:58:15] <DanaeNZ> the addons.silverstripe import doesn't run all that often, does it? lel
161: [05:58:20] <DanaeNZ> or it tries to
162: [05:58:36] <DanaeNZ> I want that green circle bruh
163: [05:58:46] <spronk> lol
164: [05:58:55] * wmk has joined #silverstripe
165: [06:00:03] * janneklouman-- quit (Ping timeout: 240 seconds)
166: [06:43:34] * wmk quit (Ping timeout: 240 seconds)
167: [06:50:15] * DanaeNZ quit (Quit: TIME TO FEED)
168: [06:56:41] * janneklouman-- has joined #silverstripe
169: [07:07:34] * arnhoe has joined #silverstripe
170: [07:14:57] * swaiba has joined #silverstripe
171: [07:20:44] * DarjusIT has joined #silverstripe
172: [07:23:46] <DarjusIT> Hi, maybe some one had problem same as me? situation I have made function that generate from objects XML and writes it to database row. It worked fine at least 2 months and now I noticed its not working. I have tried put print_r on funtion beggining but still no use, in logs I am getting [Tue Jul 05 10:04:00 2016] [error] [client 78.61.211.191] FastCGI: incomplete headers (0 bytes) received from server "/home/loruscrm/crm.lorus.lt/crm.lorus.lt.0fa
173: [07:23:46] <DarjusIT> ke"
174: [07:31:04] * wmk has joined #silverstripe
175: [07:31:10] * UncleCheese has joined #silverstripe
176: [07:45:18] * sould quit (Ping timeout: 250 seconds)
177: [07:56:20] * SH__ has joined #silverstripe
178: [07:57:38] <SH__> Hey guys, does anyone have experience with setting up the TinyMCE (HTMLEditorField) in a frontend form?
179: [08:03:48] * kinglozzer has joined #silverstripe
180: [08:10:36] * slievr has joined #silverstripe
181: [08:19:12] <swaiba> SH__ nope, it might have issues as tinymce is customized for use in the admin
182: [08:19:51] <swaiba> might be best to use a seperate version of it or choose another edit field, like http://nicedit.com/ it's simple to use
183: [08:19:56] <SH__> Hmm yeah I thought so too. But wouldnt you think it'd be possible if you only enable things like bold,italic, lists etc
184: [08:20:43] <SH__> Cool I''l have a look at that one aswell
185: [08:33:11] * micmania1 quit (Quit: micmania1)
186: [08:44:58] <slievr> Hello guys, I've got a url_handler that's matching but not running the action, it instead tests on ErrorPage_Controller. Has anyone come across this before?
187: [09:01:07] <janneklouman--> could you provide some code examples slievr?
188: [09:01:15] <janneklouman--> !paste slievr
189: [09:01:15] <ss-helper> slievr: Please paste your code using something like http://kopy.io/ or http://www.sspaste.com/ or https://gist.github.com/ and then paste the link here.
190: [09:17:19] * agent44 has joined #silverstripe
191: [09:30:59] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
192: [09:33:19] * UncleCheese has joined #silverstripe
193: [09:34:03] * Stomach quit (Quit: zzz)
194: [09:34:12] * micmania1 has joined #silverstripe
195: [09:34:41] <slievr> janneklouman--: oh sorry stepped out for a bit. Was a stupid mistake, action was misnamed.
196: [09:50:18] * ^pH has joined #silverstripe
197: [10:17:29] * darianno has joined #silverstripe
198: [10:27:13] * micmania1 quit (Quit: micmania1)
199: [10:28:34] * wmk quit (Ping timeout: 240 seconds)
200: [10:30:33] <janneklouman--> glad to hear slievr :)
201: [11:18:11] * micmania1 has joined #silverstripe
202: [11:35:55] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
203: [11:54:53] * kinglozzer quit (Remote host closed the connection)
204: [12:24:35] * UndefinedOffset has joined #silverstripe
205: [12:37:57] * micmania1 quit (Quit: micmania1)
206: [12:44:36] * kinglozzer has joined #silverstripe
207: [12:54:16] * swaiba quit (Remote host closed the connection)
208: [13:12:42] * agent44 has left #silverstripe
209: [13:15:16] <ss-helper> Silverstripe - Gridfield not populate with ArrayList when not in public function getCMSFields - http://stackoverflow.com/questions/38204430/silverstripe-gridfield-not-populate-with-arraylist-when-not-in-public-function
210: [13:46:45] * muskie9 has joined #silverstripe
211: [13:59:39] * arnhoe_ has joined #silverstripe
212: [14:00:34] * arnhoe quit (Ping timeout: 240 seconds)
213: [14:22:45] * arnhoe_ quit (Remote host closed the connection)
214: [14:23:20] * arnhoe has joined #silverstripe
215: [14:25:40] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
216: [23:05:50] * ss-log has joined #silverstripe
217: [23:08:17] * antons quit (Quit: Page closed)
218: [23:21:44] <DanaeNZ> fuck me, fucking regex parsley data attributes fuck I don't want to write a custom callback but I guess I have to fucccckkk
219: [23:22:20] <DanaeNZ> fsdfsdfsdg
220: [23:23:46] <DanaeNZ> my problem being, "0" qualifies through the 'required' check and I need it to not. I can use 'min' but then you can't use alphanumeric. Maybe I need another coffee
221: [23:23:59] <DanaeNZ> it needs to be frontend validation too
222: [23:24:05] <DanaeNZ> to prevent the damn API call
223: [23:29:16] * janneklouman-- quit (Ping timeout: 264 seconds)
224: [23:32:30] <DanaeNZ> Parsley validates on word boundaries??!
225: [23:35:11] <DanaeNZ> oh thank god I was just using it wrong
226: [23:40:12] * vanny has joined #silverstripe
227: [23:42:11] <vanny> hey all, when using .FirstParagraph is there a way to make it ignore images?
228: [23:47:30] <DanaeNZ> vanny: I would say chain up .noHTML.FirstParagraph, but without paragraph tags I'm not sure if it could work it out
229: [23:48:05] <vanny> like this $Text.noHTML.FirstParagraph
230: [23:49:03] <DanaeNZ> yep
231: [23:49:11] <DanaeNZ> but I dunno if that'll work
232: [23:49:59] <DanaeNZ> oh wait, that'll do it. Try $Text.FirstParagraph(1)
233: [23:50:05] <vanny> didnt like me:P it is just pulling the alt text from the image
234: [23:50:21] <DanaeNZ> the (1) means plain (so it'll look at newline instead of <p>
235: [23:50:31] <DanaeNZ> Or $Text.noHTML.FirstParagraph(1)
236: [23:51:17] <DanaeNZ> wait the default is 1...
237: [23:51:26] <DanaeNZ> framework/model/fieldtypes/Text.php:194
238: [23:51:31] <DanaeNZ> That's all I'm looking at
239: [23:53:05] <vanny> ok
240: [23:53:11] <vanny> text is a HTMLText field

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