#silverstripe IRC Log

IRC log for 4 October 2016

All timestamps are in UTC.

1: [00:25:32] * wmk has joined #silverstripe
2: [00:33:27] * ahr3n has joined #silverstripe
3: [00:36:05] * zippy has joined #silverstripe
4: [00:39:05] * Stomach quit (Quit: zzz)
5: [00:39:37] * wmk quit (Ping timeout: 248 seconds)
6: [00:43:02] * zippy quit (Ping timeout: 265 seconds)
7: [00:44:23] * Stomach has joined #silverstripe
8: [00:58:40] * spronk has joined #silverstripe
9: [01:10:41] * visod has joined #silverstripe
10: [01:13:44] <visod> Hey all, question about the SiteTreeURLSegmentField. I've got a Title and a URLSegmentField field on a DataObject. When the Title is edited and unfocused, it doesn't update the URLSegment field, but the Update button shows up and works properly. I'm just wondering why, when I put a MenuTitle field in, it populated that properly on unfocus, but won't trigger the suggest method on the URLSegmentField?
11: [01:46:49] * UncleCheese has joined #silverstripe
12: [01:50:05] * Bollig|DesignCty has joined #silverstripe
13: [01:55:17] * ahr3n quit (Ping timeout: 244 seconds)
14: [02:08:41] * ahr3n has joined #silverstripe
15: [02:10:57] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
16: [02:11:26] * Stomach quit (Quit: zzz)
17: [02:12:09] * Stomach has joined #silverstripe
18: [02:12:52] * pinc_ quit (Remote host closed the connection)
19: [02:13:45] * pinc_ has joined #silverstripe
20: [02:22:04] * UncleCheese quit (Read error: Connection reset by peer)
21: [02:28:51] * pinc_ quit ()
22: [02:53:12] * visod quit (Ping timeout: 240 seconds)
23: [03:00:07] <ss-helper> Silverstripe Conditionals in Templates - http://stackoverflow.com/questions/39843386/silverstripe-conditionals-in-templates
24: [03:26:07] * visod has joined #silverstripe
25: [03:54:55] * ahr3n quit (Ping timeout: 265 seconds)
26: [04:05:12] * visod quit (Ping timeout: 240 seconds)
27: [04:06:51] * pandaux has joined #silverstripe
28: [04:11:12] * pandaux quit (Ping timeout: 240 seconds)
29: [04:13:47] * Hailwood quit (Remote host closed the connection)
30: [04:39:39] * Stomach quit (Quit: zzz)
31: [05:16:14] * Azure|dc has joined #silverstripe
32: [05:18:01] * Azure quit (Ping timeout: 248 seconds)
33: [05:21:59] * Stomach has joined #silverstripe
34: [05:23:25] * Stomach quit (Read error: Connection reset by peer)
35: [05:23:39] * Stomach has joined #silverstripe
36: [05:35:13] * Stomach quit (Ping timeout: 272 seconds)
37: [05:35:48] * spronk quit (Quit: I may need a longer sleep timer...)
38: [05:36:53] * spronk has joined #silverstripe
39: [05:42:08] * wmk has joined #silverstripe
40: [05:43:54] * micmania1 quit (Quit: micmania1)
41: [06:01:45] * Stomach has joined #silverstripe
42: [06:19:47] * Stomach quit (Quit: zzz)
43: [06:36:45] * Stomach has joined #silverstripe
44: [06:38:53] * spronk quit (Quit: I may need a longer sleep timer...)
45: [06:39:51] * Eliseth has joined #silverstripe
46: [06:41:40] * Stomach quit (Ping timeout: 265 seconds)
47: [06:43:10] * spronk has joined #silverstripe
48: [06:52:46] * Stomach has joined #silverstripe
49: [07:07:09] * marvanni has joined #silverstripe
50: [07:07:10] * darianno has joined #silverstripe
51: [07:10:02] * micmania1 has joined #silverstripe
52: [07:29:28] * swaiba has joined #silverstripe
53: [08:01:35] * DarjusIT has joined #silverstripe
54: [08:02:45] * kinglozzer has joined #silverstripe
55: [08:07:22] * janneklouman-- has joined #silverstripe
56: [08:08:56] * spronk quit (Quit: I may need a longer sleep timer...)
57: [08:10:42] <Eliseth> morning
58: [08:11:07] <ss23> moin moin
59: [08:11:33] <kinglozzer> \o
60: [08:13:00] <Eliseth> Is there a way to use GD as default image backend, but imagick for specific classes?
61: [08:13:29] <ss23> I doubt it, but in your code that like... requires it, you could in the init/__construct you could perhaps change it there?
62: [08:13:38] <ss23> So, I think, probably not directly, but you could hax it up if you had to, maybe...
63: [08:14:48] <Eliseth> Hmmh, too bad >.< Kinda need it :D
64: [08:15:08] <kinglozzer> Eliseth: You can update the Image.backend config value before you call a specific method, then change it back after if that helps ¯\_(ツ)_/¯
65: [08:15:23] <ss23> ^ yeah, that's only way I can think of
66: [08:15:25] <ss23> it'd work
67: [08:15:32] <Eliseth> kinglozzer: wait what? How does that work?
68: [08:15:42] <kinglozzer> Eliseth: What version of SS are you using?
69: [08:15:59] <Eliseth> 3.2
70: [08:17:01] <kinglozzer> So you'd do something like... Image::set_backend('ImagickBackend'); $this->createAllMyImagesYo(); Image::set_backend('GDBackend');
71: [08:17:32] <Eliseth> Hmmh
72: [08:17:36] <Eliseth> Will give that a try, thanks
73: [08:17:47] <kinglozzer> Eliseth: How come you need Imagick? Running out of memory? :P
74: [08:18:01] <Eliseth> No, need to scale animated gifs
75: [08:18:04] <kinglozzer> Ahh
76: [08:18:44] <kinglozzer> Would it be easier to just switch to using it for everything?
77: [08:19:26] <Eliseth> Yes, it would. But I can't, as the rest of the site needs GD for proper hi-res image functions and in PDF generation, and Imagick won't handle 300dpi
78: [08:19:44] <kinglozzer> Shame :(
79: [08:19:54] <kinglozzer> I always thought Imagick was supposed to perform better :(
80: [08:20:18] <Eliseth> Yes, I thought so as well, until we started running tests :D
81: [08:20:20] <ss23> computers suck, I guess
82: [08:20:24] <Eliseth> It actually _did_ perform better
83: [08:20:41] <Eliseth> But it couldn't produce the desired quality
84: [08:20:59] <kinglozzer> https://imagetragick.com/ D:
85: [08:42:40] * marvanni quit (Quit: marvanni)
86: [08:52:57] * Bollig|DesignCty quit (Ping timeout: 248 seconds)
87: [09:02:33] * agent44 has joined #silverstripe
88: [09:03:19] * Stomach quit (Quit: zzz)
89: [09:11:09] * DarjusIT quit (Read error: Connection reset by peer)
90: [09:29:35] * agent44 quit (Quit: zzz)
91: [09:34:15] * micmania1 quit (Quit: micmania1)
92: [09:36:57] * micmania1 has joined #silverstripe
93: [09:42:45] * agent44 has joined #silverstripe
94: [10:12:32] <madmatt> I miss ss23
95: [10:12:37] <ss23> Me too
96: [10:12:38] <ss23> Wait
97: [10:12:54] <madmatt> _b
98: [10:12:58] <madmatt> How's work?
99: [10:13:13] <ss23> Not baaad, just spent like 1.5 weeks in Sydney/Melbourne, so today is my first day properly back at the office
100: [10:13:18] <ss23> Still more fun than dev stuff, which is nice :D
101: [10:35:55] <madmatt> awesome :)
102: [10:37:19] <ss23> What about you?
103: [11:23:02] * micmania1 quit (Quit: micmania1)
104: [11:26:51] * swaiba quit (Remote host closed the connection)
105: [11:47:51] * Bollig|DesignCty has joined #silverstripe
106: [12:14:23] * ss-helper quit (Ping timeout: 252 seconds)
107: [12:16:11] * Bollig|DesignCty quit (Read error: Connection reset by peer)
108: [12:16:39] * Bollig|DesignCty has joined #silverstripe
109: [12:17:17] * UndefinedOffset has joined #silverstripe
110: [12:20:17] * ss-helper has joined #silverstripe
111: [12:34:52] * lerni has joined #silverstripe
112: [12:35:51] * DarjusIT has joined #silverstripe
113: [12:36:13] <DarjusIT> https://github.com/UndefinedOffset/silverstripe-nocaptcha have any tried this?
114: [12:53:12] <kinglozzer> DarjusIT: Nope, but I've used this: https://github.com/Level51/silverstripe-recaptcha
115: [12:53:51] <kinglozzer> They do the same thing, but use different methods
116: [12:54:00] <DarjusIT> just tried it forks good :) just in docs not written that use NocaptchaField
117: [12:54:01] <kinglozzer> The second one doesn't require the spamprotection module
118: [12:54:09] * marvanni has joined #silverstripe
119: [12:54:24] <DarjusIT> both requires
120: [12:54:28] <DarjusIT> as in docs
121: [12:55:23] <UndefinedOffset> DarjusIT: since it's using spamprotection you simply call "$myForm->enableSpamProtection()" on your form which is why I don't mention the method of directly adding the field to your form, the spamprotection module does all the grunt work for you
122: [12:57:50] <DarjusIT> then I putted form to file MyForm.php and in construct i tried $this->enableSpamProtection() I get error that enableSpamProtection() is not available in form
123: [12:58:34] <DarjusIT> so I just uesd field in form NocaptchaField and worked perfecly
124: [12:58:41] <kinglozzer> DarjusIT: Do you have the spamprotection module installed?
125: [12:58:45] <DarjusIT> yes
126: [12:59:10] <DarjusIT> and yml default set to nocaptcha
127: [13:00:02] <kinglozzer> Strange :/
128: [13:00:10] <kinglozzer> Oh well, as long as you've got it working :0
129: [13:00:11] <kinglozzer> :)
130: [13:01:35] <UndefinedOffset> that's very odd... are you using composer to install the module?
131: [13:01:51] <DarjusIT> but as as say i putted field to construct without $this->enable and it worked :) so I am thankful for module to devs
132: [13:02:11] <DarjusIT> nop just downloaded, set up and builded
133: [13:03:00] <UndefinedOffset> I bet it's because it's in the constructor, are you calling parent::__construct() first? it maybe the extensions are not setup yet construct is pretty earlly in the life of the object
134: [13:03:17] <DarjusIT> yes
135: [13:03:31] <UndefinedOffset> strange... well atleast you found a solution :S
136: [13:03:38] <DarjusIT> :)
137: [13:03:46] <DarjusIT> thx for module :)
138: [13:04:42] * wilson has joined #silverstripe
139: [13:04:52] <DarjusIT> and it seams it works with old recapcha configs so i could set up language for google
140: [13:05:06] * wilson is now known as Guest30368
141: [13:05:44] <Guest30368> HI to all, my template is not recognized (used) by the system. I can create a page type, see it in the CMS, but browser shows a generic page. Not my template.
142: [13:06:16] <DarjusIT> CMS settings choose template
143: [13:06:35] <DarjusIT> or in config.yml specify template
144: [13:06:54] <DarjusIT> SSViewer:
145: [13:06:54] <DarjusIT> theme: 'mytemplatefolder'
146: [13:07:15] <DarjusIT> and dev/build
147: [13:09:48] <Guest30368> <DarjusIT> Just did that, no use. Still generic template.
148: [13:10:22] <DarjusIT> can you make print screen of your folder structure
149: [13:10:48] <DarjusIT> also try domain/?flush=all
150: [13:11:18] <Guest30368> <DarjusIT>I might add that all other templates work fine. Only a specific one.
151: [13:12:21] <DarjusIT> folder name has spaces or characters?
152: [13:12:32] <Guest30368> <DarjusIT>Page renders with this text: Getting Started To get started with the SilverStripe framework: Create a Controller subclass (doc.silverstripe.org/framework/en/topics/controller) Setup the routes.yml to your Controller (doc.silverstripe.org/framework/en/reference/director#routing). Create a template for your Controller (doc.silverstripe.org/framework/en/reference/templates)
153: [13:13:42] <kinglozzer> Holy shit
154: [13:13:52] <kinglozzer> Just opened an old project, ran it through XHProf
155: [13:14:07] <DarjusIT> sometimes it was for me that i forgot to add array in costumize in controller function
156: [13:14:10] <kinglozzer> Changed one line, shaved ~70% CPU wall time off requests
157: [13:14:28] * kinglozzer winning this afternoon :D
158: [13:15:06] <DarjusIT> kinglozzer: sorry for stupid question what is XHProf?
159: [13:15:31] <kinglozzer> DarjusIT: A profiling tool, measures CPU & memory usage of functions etc
160: [13:16:18] <kinglozzer> https://blog.engineyard.com/2014/profiling-with-xhprof-xhgui-part-2
161: [13:16:26] <kinglozzer> https://blog.engineyard.com/images/blog-images/profiling-with-xhprof-xhgui/part-2/single-profile.png for example
162: [13:17:08] <Guest30368> <DarjusIT>I changed the page template source, and page is up again, but with wrong template. Zoning the problem to that specific template .ss
163: [13:19:14] * Bollig|DesignCty quit (Quit: Bollig|DesignCty)
164: [13:21:20] <DarjusIT> hmm hard to tell then not seeing a thing
165: [13:22:54] <kinglozzer> Guest30368: Do you have a MyPageType_Controller extends Page_Controller?
166: [13:23:22] <kinglozzer> If you're using 3.1, you need to create a controller for each page type too
167: [13:25:32] <DarjusIT> yes and if tou making functions like for example dashboard, I also for safety not just using MYPage_dashboard.ss but putting this to customise render
168: [13:25:35] * otterpocket has joined #silverstripe
169: [13:26:11] <Guest30368> <kinglozzer>Yes. Here is a pastie -=> http://www.sspaste.com/paste/show/57f3add86f934
170: [13:26:41] <DarjusIT> you extending not page
171: [13:26:48] <DarjusIT> but site tree
172: [13:26:56] <kinglozzer> Correct ^^
173: [13:27:07] <kinglozzer> You need to extend Page, and Page_Controller
174: [13:27:49] <Guest30368> OK, trying that.
175: [13:28:51] <Guest30368> <kinglozzer><DarjusIT>Same results...
176: [13:29:21] <kinglozzer> Guest30368: Where is your template located?
177: [13:30:05] * marvanni quit (Ping timeout: 265 seconds)
178: [13:30:33] <Guest30368> Into /themes/mytheme/templates - Again all other template work fine, if i change PageChantier template for another one, page works fine. So PageChantier.ss or .php is the problem.
179: [13:31:31] <Guest30368> I even tried to erase all references to PageChantier, create a new page type, a new .ss and create the page again. Same results.
180: [13:31:43] <DarjusIT> do you have Page.ss in that folder?
181: [13:32:23] <Guest30368> <DarjustIT>Sure... as in every site i am doing! Dont you?
182: [13:33:05] <DarjusIT> I puting my custom page .ss to /themes/mytheme/templates/Layout
183: [13:33:33] <DarjusIT> but I extend PAge not sitetree
184: [13:33:53] <kinglozzer> Guest30368: I can't spot anything obvious that would cause it not to work... which version of SilverStripe are you using?
185: [13:34:39] <Guest30368> <DarjusIT>Just moved it to /layout. Same results. Using SS3.1.2
186: [13:35:27] <DarjusIT> is it working with lowercase folder?
187: [13:36:13] <Guest30368> <DarjusIT>Sorry a typo.. yes it is /Layout
188: [13:36:17] <kinglozzer> Guest30368: Controller::getViewer() is what decides which templates to use, so I'd check that first. Add a var_dump($templates); before the return, /framework/control/Controller.php
189: [13:36:17] <DarjusIT> I always use that structure from simple theme as base with all lows and caps
190: [13:37:26] <Guest30368> I juste change page type (to page for example) in the CMS and page is showing again, but with pageB template.
191: [13:38:12] <DarjusIT> on change dont forget dev/build and flush frontend
192: [13:39:13] <kinglozzer> Guest30368: add var_dump($templates); to /framework/control/Controller.php, around line 299. See if 'PageChantier' is in there
193: [13:46:21] <Guest30368> Weird.... I dumped the page type and template, swap the page type in the CMS.. And now, browser shows remain of the deleted template!!!!
194: [13:53:48] <Guest30368> I gave up. Now, i want to create a simple image gallery. First i create this : private static $has_one = array( 'ImageChantier' => 'Image' ); Then, i want to loop those images in to a div => <div><% loop $ImageChantier %><img src="I-MISS-THAT-PART"><% end_loop %> Is it src="$ImageChantier.URL"> ?
195: [13:55:32] <kinglozzer> Guest30368: You've only got one image, so you don't want to loop (loop is for many)
196: [13:56:06] <kinglozzer> <% if $ImageChantier %> <img src="{$ImageChantier.URL}" /> <% end_if %>
197: [13:56:06] <DarjusIT> yes if you use has_one then you dont need loop
198: [13:56:15] <kinglozzer> Or just $ImageChantier - it will build the tag for you
199: [13:56:20] <Guest30368> <kinglozzer>So $has_many_many instead of has_one ?
200: [13:56:39] <DarjusIT> $many_many
201: [13:57:58] <kinglozzer> Yes, if you're attaching more than one image then you should use many_many
202: [13:59:46] <Guest30368> And <% loop $ImageChantier %><img src="$ImageChantier.URL"><% end_loop %> ?
203: [14:00:14] <kinglozzer> Yes
204: [14:00:46] <kinglozzer> I'd recommend using $CroppedImage or one of those methods. Otherwise CMS users will upload 15mb images and slow the page down ;)
205: [14:02:19] <DarjusIT> personally I would make DO for image with has_one, and DO has_many with page and use this for builk uploads https://github.com/colymba/GridFieldBulkEditingTools
206: [14:06:14] * marvanni has joined #silverstripe
207: [14:06:31] * muskie9 has joined #silverstripe
208: [14:07:38] <Guest30368> <% loop $ImageChantier %><img src="$ImageChantier.URL"> <end_loop %> is not working. I can load images into the CMS but the template returns no image source. Empty <img src="">
209: [14:08:14] <Guest30368> Sorry for typo, its <% end_loop %> at the end. That was corect
210: [14:08:30] <muskie9> Guest30368 if you're looping $ImageChantier then you're in the scope of $ImageChantier already when you hit your <img>... try just $URL in your src=""
211: [14:09:24] <Guest30368> Bingo! Thanks! Later.
212: [14:12:05] * Guest30368 quit (Quit: Page closed)
213: [14:17:04] * lerni quit ()
214: [14:55:19] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
215: [15:06:36] <Eliseth> Any idea why $MyDate.Format('M') displays "Oct" instead of my set locale?
216: [15:07:17] <Eliseth> When I check $ContentLocale it displays Nl-nl, which is correct, yet months are displayed in English
217: [15:08:47] <kinglozzer> Eliseth: Do you mean .FormatI18N('M') ?
218: [15:09:49] <kinglozzer> Or it might be something different: http://php.net/manual/en/function.strftime.php
219: [15:10:02] <kinglozzer> $MyDate.Format('%b') is probably the one
220: [15:12:40] <Eliseth> Unfortunately, that outputs just %b
221: [15:16:09] <kinglozzer> Eliseth: Sorry, I meant $MyDate.FormatI18N('%b')
222: [15:16:27] * darianno quit (Quit: Textual IRC Client: www.textualapp.com)
223: [15:18:58] * Eliseth quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
224: [15:35:05] * muskie9 has joined #silverstripe
225: [15:38:10] * marvanni quit (Ping timeout: 265 seconds)
226: [16:02:13] * muskie9 quit (Ping timeout: 272 seconds)
227: [16:10:41] <DarjusIT> is any possibility in SS amdin to restict vision of objects I mean, that I have Estates in left admin you click add estate as broker, and I need so when you enter in that left admin you could only see Estates that you have added, not whole list. Is it doable in SS cms?
228: [16:12:04] <kinglozzer> DarjusIT: Yes, you'll need to track who added them, though
229: [16:12:11] <kinglozzer> has_one member for example
230: [16:12:33] <kinglozzer> Then check who created it in canView(), canEdit() etc
231: [16:12:51] <DarjusIT> yes, so I need revrite filter function in LeftAdmin extension?
232: [16:13:16] <kinglozzer> No
233: [16:13:26] <kinglozzer> It will automatically check canView()
234: [16:13:37] <DarjusIT> oh nice
235: [16:13:40] <kinglozzer> https://docs.silverstripe.org/en/3.4/developer_guides/model/permissions/
236: [16:14:31] <kinglozzer> So you might change canEdit() to if ($this->Member()->ID == Member::currentUserID()) { return true; }
237: [16:16:38] * kinglozzer quit ()
238: [16:17:17] <DarjusIT> maybe some also get this strange SS admin behavior, I go to admin > pages make some changes, then I dont close tab and go make some other things in pc. I go back click on for example Settings or other part of admin and then I see SS logo loading but its not loading view only changes link. What could it be?
239: [16:22:17] * gelignite has joined #silverstripe
240: [16:48:41] * wmk quit (Ping timeout: 248 seconds)
241: [16:59:00] * agent44 quit (Quit: agent44)
242: [17:25:49] * wmk has joined #silverstripe
243: [17:34:18] * shellbac1pacific quit (Quit: Lost terminal)
244: [18:03:36] * UndefinedOffset quit (Quit: Leaving.)
245: [18:40:43] * CodeTrap has joined #silverstripe
246: [18:46:11] * wmk quit (Ping timeout: 265 seconds)
247: [18:48:46] * Stomach has joined #silverstripe
248: [18:52:13] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
249: [19:20:30] * CodeTrap quit (Ping timeout: 265 seconds)
250: [19:22:34] * Stomach quit (Quit: zzz)
251: [19:23:37] * Stomach has joined #silverstripe
252: [19:37:13] * gelignite has joined #silverstripe
253: [19:59:50] * UncleCheese has joined #silverstripe
254: [20:12:16] * Hailwood has joined #silverstripe
255: [20:31:38] * UndefinedOffset has joined #silverstripe
256: [20:47:44] * UncleCheese quit (Read error: Connection reset by peer)
257: [20:58:06] * micmania1 has joined #silverstripe
258: [20:58:38] * UndefinedOffset quit (Quit: Leaving.)
259: [21:13:55] * zippy has joined #silverstripe
260: [21:24:35] * Stomach quit (Ping timeout: 272 seconds)
261: [21:31:58] * Hailwood quit (Ping timeout: 265 seconds)
262: [21:32:18] * zippy quit (Ping timeout: 264 seconds)
263: [21:33:30] * zippy has joined #silverstripe
264: [21:43:35] * zippy quit (Ping timeout: 272 seconds)
265: [21:44:12] * Hailwood has joined #silverstripe
266: [22:03:26] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
267: [22:10:15] * spronk has joined #silverstripe
268: [22:30:39] * Nightjar has joined #silverstripe
269: [22:37:47] * Stomach has joined #silverstripe
270: [23:00:01] * ss-helper quit (Remote host closed the connection)
271: [23:00:15] * ss-helper has joined #silverstripe
272: [23:02:28] * veb is now known as dhsdfk
273: [23:04:40] * dhsdfk is now known as veb
274: [23:10:59] * Azure|dc is now known as Azure

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