#silverstripe IRC Log

IRC log for 14 March 2016

All timestamps are in UTC.

1: [00:02:29] * Firesphere__ has joined #silverstripe
2: [00:05:21] * n8_ has joined #silverstripe
3: [00:10:18] * Stomach quit (Quit: zzz)
4: [00:12:30] * DanaeNZ has joined #silverstripe
5: [00:34:25] * Firesphere__ quit (Ping timeout: 240 seconds)
6: [00:38:47] * Stomach has joined #silverstripe
7: [00:45:04] <ss-helper> Re: [silverstripe-dev] Behat tests on modules - https://groups.google.com/d/msg/silverstripe-dev/uJx4iytU0gk/Fn9ps3RxBwAJ
8: [01:15:30] * Tanger has joined #silverstripe
9: [01:21:52] * UncleCheese has joined #silverstripe
10: [02:06:17] * Vanny quit (Quit: Page closed)
11: [02:18:34] * mahfuz quit (Ping timeout: 252 seconds)
12: [02:30:04] <ss-helper> Silverstripe solr search files, pages, and dataobjects - http://stackoverflow.com/questions/35978504/silverstripe-solr-search-files-pages-and-dataobjects
13: [02:30:27] <robbieaverill> Looking at this: https://github.com/silverstripe/silverstripe-framework/pull/5101/files - is there a way to achieve the same functionality without needing to be a descendent of .ss-gridfield? E.g. I've got a GridField Action button on a form which requests a URL that returns a 302 - can I easily tell SS to follow that redirect?
14: [02:33:06] <robbieaverill> E.g. Click a button, Action returns a redirect 302 header, can I easily make SS follow it?
15: [02:34:57] <robbieaverill> StackOverflow tells me that AJAX should follow 302s unless it crosses the domain (which mine does) :) #lmgtfy
16: [03:00:14] <robbieaverill> I'll ask a more simple question - using Form::sessionMessage() is there a way I can put an external link into it without having it escaped?
17: [03:00:31] <robbieaverill> D'oh - param three #facepalm
18: [03:20:28] * adrexia quit (Quit: My Mac has gone to sleep. ZZZzzz…)
19: [03:23:52] * adrexia has joined #silverstripe
20: [03:30:15] * gordon has joined #silverstripe
21: [03:30:39] * gordon is now known as Guest16488
22: [03:35:07] * adrexia quit (Quit: My Mac has gone to sleep. ZZZzzz…)
23: [03:48:10] * joelpittet has joined #silverstripe
24: [03:50:08] * Phlunk3 quit (Quit: Leaving)
25: [04:00:05] <ss-helper> How to display single page of children with a view per page types in Silverstripe 3 - http://stackoverflow.com/questions/35979222/how-to-display-single-page-of-children-with-a-view-per-page-types-in-silverstrip
26: [04:06:22] * robbieaverill quit (Ping timeout: 252 seconds)
27: [04:19:15] * adrexia has joined #silverstripe
28: [04:19:40] * micmania1 quit (Quit: micmania1)
29: [04:26:00] * Azure quit (Ping timeout: 244 seconds)
30: [04:31:18] * joelpittet quit ()
31: [04:42:13] * adrexia quit (Quit: My Mac has gone to sleep. ZZZzzz…)
32: [04:48:05] * DanaeNZ quit (Quit: TIME TO FEED)
33: [05:09:48] * Mitcheru quit (Ping timeout: 252 seconds)
34: [05:19:05] * cheddam quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
35: [05:19:06] * Guest16488 quit (Read error: Connection reset by peer)
36: [05:30:44] * Firesphere__ has joined #silverstripe
37: [05:40:54] * Stomach quit (Ping timeout: 276 seconds)
38: [05:47:31] * Firesphere__ quit (Ping timeout: 250 seconds)
39: [05:50:49] * Firesphere__ has joined #silverstripe
40: [06:06:04] <Audlex> Hi. I have extended Group but I wish to use my own extention of the Member class to add members, can someone point me in the right direction please?
41: [06:14:32] <Audlex> I mean, is it as simple as removing the 'Members' tab and creating my own with a simple GridField or is bad practice?
42: [06:24:42] <ss23> If you're still using the same group/member sytem, but just changing the interface to it, it's probably that simple
43: [06:39:00] <Audlex> precisely what I am doing. thank you ss23.
44: [06:58:37] * Stomach has joined #silverstripe
45: [07:00:12] <ss-helper> Re: [silverstripe-dev] Behat tests on modules - https://groups.google.com/d/msg/silverstripe-dev/uJx4iytU0gk/kYr8O-eFBwAJ
46: [07:06:49] * Mike123 has joined #silverstripe
47: [07:15:29] * UncleCheese quit (*.net *.split)
48: [07:15:29] * Tanger quit (*.net *.split)
49: [07:16:06] * UncleCheese has joined #silverstripe
50: [07:16:06] * Tanger has joined #silverstripe
51: [07:30:21] * spronka has joined #silverstripe
52: [07:32:51] * swaiba has joined #silverstripe
53: [07:54:42] <Mike123> hey
54: [07:55:20] * Stomach quit (Quit: zzz)
55: [07:56:41] <swaiba> hey Mike123
56: [07:58:13] <Mike123> sometimes i really dont understand how to extend controllers...
57: [07:58:32] <ss23> class MyController extends YourController { }
58: [07:58:33] <ss23> :D
59: [07:58:37] <ss23> (Aren't I helpful? :P)
60: [07:59:10] <Mike123> how do i change this http://www.sspaste.com/paste/show/56e66bf1bb08b controller function, the thing is i need to change only $user
61: [08:00:26] <swaiba> ss23 : best. description. ever. lol
62: [08:01:06] <Mike123> but i need to use the parent controller with my extended changes
63: [08:01:52] <Mike123> i tried to extends like normally (like ss23 said) but my functionality isn't there
64: [08:06:34] * DimiStripe has joined #silverstripe
65: [08:09:56] * Stomach has joined #silverstripe
66: [08:18:16] <Mike123> oh... i have had a mistype :D
67: [08:18:21] <Mike123> that explain everything
68: [08:18:33] <ss23> haha
69: [08:18:33] <ss23> nice
70: [08:18:56] * arnhoe has joined #silverstripe
71: [08:24:40] <Mike123> ok, another one :D can i extend function in DataExtension ?
72: [08:25:08] <ss23> If there's no extension point, it's frustrating. May be best to apply another DataExtension to the original DO?
73: [08:25:11] <Mike123> p.s there's no extension hook
74: [08:25:23] <Mike123> hmm
75: [08:26:47] <Mike123> ok so how can i remove the old extension on that object, so i could use mine ?
76: [08:28:23] <ss23> Remove it from the place it's being applied in the first place, or um
77: [08:28:32] <ss23> There was a Github issue where this came up recently
78: [08:28:34] <ss23> Let me find it
79: [08:29:15] <ss23> Mike123: https://github.com/silverstripe/silverstripe-cms/issues/1305#issuecomment-191541977 That's one way to remove an extension
80: [08:29:20] <ss23> As per further discussion, can't do it with YML
81: [08:31:01] <Mike123> ok i will try it , thanks
82: [08:55:32] * gordon__ has joined #silverstripe
83: [08:55:36] * gordon__ is now known as nontgor
84: [09:04:36] * Stomach quit (Quit: zzz)
85: [09:05:03] * wmk has joined #silverstripe
86: [09:09:41] * Eliseth has joined #silverstripe
87: [09:10:12] <nontgor> what's the correct way of setting up composer to always pull latest master branch on client modules/themes on prod?
88: [09:12:17] <Eliseth> Morning!
89: [09:22:34] <wmk> morning Eliseth
90: [09:22:39] <wmk> nontgor, i doubt you want to do that
91: [09:23:09] <wmk> composer install <- installs the stuff defined in composer.lock
92: [09:23:28] <wmk> composer update <- update to latest defined version and update composer.lock
93: [09:24:01] <wmk> i always update locally, commit composer.lock and on prod i just run "composer install -o" and a dev/build
94: [09:33:13] * Tanger quit (Quit: Tanger)
95: [09:38:37] <nontgor> wmk: So does that mean you'd edit client code, push it to a private git repo, and then run composer update locally which would effectively overwrite it, but update composer lock file?
96: [09:39:17] <wmk> yup
97: [09:40:16] * HARVS1789UK has joined #silverstripe
98: [09:42:23] <HARVS1789UK> Morning all
99: [09:47:56] <nontgor> ok, that makes sense, cheers wmk
100: [09:48:20] <wmk> ;)
101: [09:49:11] <wmk> i also have a git post-merge hook that does the job for you, nontgor e.g. https://gist.github.com/wernerkrauss/33dcb098c05ed063be22
102: [09:50:11] <wmk> lerni showed me http://deployer.org/ where you can deploy to prod from your laptop. That seems to be something like capistrano made with php
103: [09:51:07] <nontgor> I used to be familiar with capistrano
104: [09:53:12] <wmk> well, it's nice, but i didn't like it. or had the wrong scripts / setup
105: [09:53:20] * marvanni has joined #silverstripe
106: [09:53:38] <wmk> it took too long on my machine to clone / download everything again just for some minor theme tweaks
107: [09:53:57] <wmk> but with tagged composer packages now it should take them from cache
108: [09:54:20] <wmk> the "best" was, when a composer package got deleted and capistrano wasn't able to do a update
109: [09:54:43] <marvanni> Hi, has any tried to create a recursive template include for the root menu level like the simple theme does for the second level menu ?
110: [09:54:44] <marvanni> https://github.com/silverstripe-themes/silverstripe-simple/blob/master/templates/Includes/SideBar.ss
111: [09:56:56] <wmk> marvanni, should be possible.
112: [09:57:56] <marvanni> Thats what I thought, but as the simple them example does with Children is not gonna work. I would have to loop Children of Level (-1) ...
113: [09:59:06] * n8_ quit (Ping timeout: 252 seconds)
114: [10:00:23] <wmk> ah, ehem, yes...
115: [10:01:36] <wmk> well, for level 1 you could make <% include MyMenu.ss items=xxxx %> where xxx is the method to get Menu(0)
116: [10:01:53] <wmk> and inside MyMenu you can loop over $items
117: [10:01:57] <marvanni> Ah, dis does work : http://www.silverstripe.org/community/forums/template-questions/show/5007
118: [10:02:08] <wmk> and recuoursivly include again with items=$Children
119: [10:03:38] <HARVS1789UK> Does anyone else not suffer quite a large hit on performance when making heavy (or looped) use on includes?
120: [10:03:44] <HARVS1789UK> use of*
121: [10:04:46] <marvanni> Thats where caching comes into play when necessary
122: [10:05:38] <wmk> or static publisher when it's kinda static
123: [10:09:36] <swaiba> HARVS1789UK Morning
124: [10:09:38] <swaiba> and yes
125: [10:10:11] <swaiba> I've even put some viewer in the controller and avoid the ORM to make thing super-turbo-speed
126: [10:10:25] <swaiba> and no the key is the data could not be cached
127: [10:10:43] <HARVS1789UK> I use partial caching, but still, I dont really want the few users who run the page load which (re-)generates the cache to have lionger loading times than needed either
128: [10:11:37] <HARVS1789UK> I have a menu page on a current projecy which loops over menu items (approx 100) I was using <% include MenuItem.ss %> but the page load to generate the cache was like 15+ seconds
129: [10:11:57] <HARVS1789UK> removed all the includes within my loop and got it down to 8 seconds
130: [10:12:02] <swaiba> HARVS1789UK if I need caching I prefer static publisher
131: [10:12:04] <HARVS1789UK> that like double the time almost lol
132: [10:13:06] <HARVS1789UK> swaiba I have not really looked at static publisher yet, but isn't that a similr approach to just adding cache headers to your HTTP responses (i.e. use your stale copy for 15 mins or so)
133: [10:13:38] <HARVS1789UK> i.e any CMS changes will not be seen till the cache TTL expires
134: [10:13:46] <swaiba> HARVS1789UK if it is then I've been had!
135: [10:14:14] <swaiba> I see it as just managing static files of the HTML
136: [10:14:15] <HARVS1789UK> swaiba that was just my assumption from its name, I havnt investigated it
137: [10:14:28] <swaiba> as the page is changed so too is the cached file
138: [10:14:37] <HARVS1789UK> oh I se
139: [10:14:40] <HARVS1789UK> like error pages?
140: [10:14:47] <HARVS1789UK> on save, re-gen static file
141: [10:14:57] <swaiba> it iterupts at the htaccess level to either use main.php and normal route OR server a html file
142: [10:15:33] <HARVS1789UK> oh OK sounds interesting, ill read up on that :-) might be a beter solution for my menu [age
143: [10:25:07] * swaiba quit (Read error: Connection reset by peer)
144: [10:25:26] * swaiba has joined #silverstripe
145: [10:28:51] <ss23> wubble
146: [10:28:52] <ss23> quake
147: [10:28:52] <ss23> :O
148: [10:40:45] * Firesphere__ quit (Remote host closed the connection)
149: [10:43:05] * spronka quit (Quit: My Mac has gone to sleep. ZZZzzz…)
150: [10:44:11] * Azure has joined #silverstripe
151: [10:44:48] * HARVS1789UK quit (Remote host closed the connection)
152: [10:46:17] * HARVS1789UK has joined #silverstripe
153: [10:56:30] <Teddy__> guys, any idea why any content link (link to pages, link to files) i try to make in a website becomes websitedomain.com/[file_link,id=318] (the id's change, i assume are the ones of the pages and files)
154: [11:08:05] <wmk> Teddy__, in htmleditor field?
155: [11:08:11] <Teddy__> wmk, yep
156: [11:08:34] <wmk> well, the websitedomain.com/ part seems not that good, but the shortcode is totally ok
157: [11:08:50] <wmk> so the link remains intact if you rename the file in assets admin
158: [11:09:38] <Teddy__> wmk, sorry i might have mispoken, the [file_link, id=318] is that the href attr of the link appears in the front end
159: [11:10:03] <wmk> but a link to another page should be something like [sitetree_link]
160: [11:10:15] * SH__ has joined #silverstripe
161: [11:10:20] <wmk> !paste Teddy__
162: [11:10:21] <ss-helper> Teddy__: 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.
163: [11:10:30] <wmk> and an example output...
164: [11:13:59] <Teddy__> ss-helper, wmk, http://kopy.io/TdlBg hopefully this is what you'd need
165: [11:14:28] <Teddy__> ss-helper, since there's no particular function that I craeted to deal with this, there's no actuall code to paste
166: [11:14:38] * SH__ quit (Ping timeout: 252 seconds)
167: [11:14:46] <wmk> Teddy__, what version of SS are you using?
168: [11:14:54] <wmk> how did you install?
169: [11:15:06] <Teddy__> wmk, it's 3.20
170: [11:15:14] <wmk> and all those links should go to a file in assets?
171: [11:15:21] <Teddy__> wmk, thinks my sysadmin just did a simple install, no composer
172: [11:15:38] <wmk> are you sure, a file with ID 316, 317, 318 exist in DB?
173: [11:15:56] <Teddy__> wmk, yep
174: [11:16:07] <Teddy__> i can check but they should :p
175: [11:16:14] <wmk> are
176: [11:16:14] <wmk> you
177: [11:16:15] <wmk> sure
178: [11:16:17] <wmk> ??
179: [11:16:24] <wmk> read: did you double-check?
180: [11:17:24] <Teddy__> wmk, just did :D yep their there
181: [11:18:15] <Teddy__> wmk, page links become liks so in the frond end <a href="[sitetree_link,id=1]">test</a>
182: [11:18:24] <wmk> well, File::link_shortcode_handler should be called and replace the shortcode with the actual Link
183: [11:18:45] <wmk> weird.
184: [11:19:00] <Teddy__> wmk, yep :| had couple of problem with this install
185: [11:19:07] <wmk> so somehow the shortcodeparser is not called
186: [11:19:18] <wmk> how about a fresh install with composer?
187: [11:19:53] <wmk> can you reproduce the issue on another machine, e.g. testing VM locally?
188: [11:20:10] <Teddy__> wmk, that would be kind of pain, i would need to cross over all db
189: [11:20:29] <wmk> you could use sspak to get assets and db over to your testing machine
190: [11:20:34] <Teddy__> wmk, tried on several machines, all produce same issue
191: [11:20:44] <wmk> https://github.com/silverstripe/sspak
192: [11:20:44] <Teddy__> wmk, however this is the only install that does it
193: [11:21:11] <Teddy__> wmk, ah you mean second install with theme
194: [11:21:12] <wmk> all produce the same issue or this is the only install??? don't get that
195: [11:21:19] <Teddy__> wmk, yea i could give that a try
196: [11:21:58] <wmk> Teddy__, a local dev VM with xdebug would be handy to found this bug
197: [11:22:21] <Teddy__> wmk, might have to, since I see no other simple solution
198: [11:25:32] <wmk> *cough* echo ...?
199: [11:37:52] * Embraden_ has joined #silverstripe
200: [11:38:05] * Embraden quit (Read error: Connection reset by peer)
201: [12:24:23] <Audlex> does anyone how i would go about changing the breadcrumbs text? i have extended Member and wish to change it from LastName, FirstName to something different
202: [12:25:09] <wmk> Audlex, breadcrumbs - where? in MemberAdmin?
203: [12:26:00] <Audlex> yes, where it is at the top of the page
204: [12:26:34] <wmk> afaik the grid uses the Title of a Dataobject
205: [12:28:13] <wmk> Audlex, it might be simpler: http://api.silverstripe.org/3.2/class-Member.html#_set_title_columns
206: [12:28:19] <Audlex> ah yes, I see in Member.php now!
207: [12:29:45] * Eliseth quit (Ping timeout: 276 seconds)
208: [12:30:53] <Audlex> its always easier than i expect it to be ;)
209: [12:30:55] <Audlex> thanx for the help
210: [12:34:02] <wmk> you're welcome
211: [12:41:09] * UndefinedOffset has joined #silverstripe
212: [12:48:06] <nontgor> doing my first install on Centos. Not winning :(
213: [12:48:20] <nontgor> every page 'Server Error'
214: [12:48:24] <nontgor> nothing obvious in the Apache logs
215: [12:51:50] <nontgor> ok, main Apache error log "Premature end of script headers: main.php"
216: [13:00:43] <nontgor> ooooh, maybe the default collation under cpanel? http://www.silverstripe.org/community/forums/upgrading-silverstripe/show/8266
217: [13:05:38] <nontgor> latin_swedish_ci
218: [13:11:06] <nontgor> collation fixed. Site not :(
219: [13:16:18] * cloph_away is now known as cloph
220: [13:17:07] * wmk quit (Ping timeout: 244 seconds)
221: [13:17:13] <swaiba> nontgor - http://www.liquidweb.com/kb/apache-error-premature-end-of-script-headers/
222: [13:17:29] <swaiba> I'm sure you googled too... but I did just out of curiousisty
223: [13:18:36] <nontgor> I came across a few forum replies of yours swaiba
224: [13:19:31] <nontgor> caveat: I
225: [13:19:33] <nontgor> gah
226: [13:19:44] <nontgor> caveat: I've also been sick today so not firing anywhere near 100%
227: [13:19:53] <nontgor> "File "/home/cgiver/public_html/framework/main.php" is writeable by group" < suexec log
228: [13:21:59] <nontgor> oh.......... I need to set 664 locally as I'm running with my user gordon as part of the www-data group
229: [13:22:34] * marvanni quit (Quit: marvanni)
230: [13:23:05] <nontgor> and now the terminal hangs as I try to fix that *shakes first in rage*
231: [13:24:05] <nontgor> oh but hold on, that must be the permissions on framework comnig out of composer
232: [13:26:56] <nontgor> swaiba: It was the file permissions
233: [13:29:06] <swaiba> nontgor ah - a common contender
234: [13:29:53] <swaiba> btw did you have an article on search or something? Mike123 was asking about this the other day... I I'm sure I recall you have published something
235: [13:29:54] * arnhoe_ has joined #silverstripe
236: [13:33:23] * arnhoe quit (Ping timeout: 248 seconds)
237: [13:36:41] * marvanni has joined #silverstripe
238: [13:39:15] * HARVS1789UK quit (Remote host closed the connection)
239: [13:41:37] * arnhoe has joined #silverstripe
240: [13:43:13] * arnhoe_ quit (Ping timeout: 240 seconds)
241: [13:43:23] <Mike123> swaiba, nontgot, i would be very glad :)
242: [13:46:04] * arnhoe quit (Ping timeout: 244 seconds)
243: [13:49:49] * marvanni quit (Ping timeout: 250 seconds)
244: [13:50:47] * marvanni has joined #silverstripe
245: [13:59:27] * Embraden_ quit (Ping timeout: 268 seconds)
246: [13:59:51] * Embraden has joined #silverstripe
247: [14:00:47] * Frans_Amsterdam has joined #silverstripe
248: [14:05:24] * DimiStripe quit (Quit: DimiStripe)
249: [14:09:13] * DimiStripe has joined #silverstripe
250: [14:14:31] <nontgor> swaiba: Elastica module, see https://github.com/gordonbanderson/silverstripe-elastica - demo at http://elastica.weboftalent.asia/search-examples/flickr-text-results (basic auth = search/search)
251: [14:14:41] <nontgor> swaiba: Ah, SSH hanging, need to start elasticsearch...
252: [14:15:08] <swaiba> Mike123 ^^^
253: [14:15:52] <nontgor> ah, it was Dreamhost in the middle that was causing SSH hang
254: [14:17:35] <nontgor> Mike123: search-examples page is up and running now
255: [14:18:35] * kinglozzer has joined #silverstripe
256: [14:18:53] <nontgor> http://elastica.weboftalent.asia/search-examples/flickr-text-results?q=Wellington&sfid=flickr-text-results (search), http://elastica.weboftalent.asia/search-examples/flickr-text-results//similar/FlickrPhoto/4365 (similar search)
257: [14:19:09] <nontgor> also autocomplete find as you type dropdown
258: [14:39:11] * HARVS1789UK has joined #silverstripe
259: [14:42:21] * arnhoe has joined #silverstripe
260: [14:46:57] <nontgor> mmmm, unable to turn off 'Comments on' by default
261: [14:52:15] * vanny has joined #silverstripe
262: [14:52:16] <nontgor> and if I wipe out my config it works as I wish... interesting
263: [14:52:21] <nontgor> #TalkingToMyself
264: [14:52:21] <vanny> hey all
265: [14:52:32] * vanny waves
266: [14:52:35] <nontgor> haha
267: [14:53:46] <vanny> how are you on controllers, I have a form that when I submit it shows ProductPage_Controller/ReviewForm
268: [14:56:06] * Mike123 quit (Ping timeout: 252 seconds)
269: [15:00:21] <nontgor> vanny: Is this the action of your form? Normally one redirects either back to the form or to some kind of success page
270: [15:03:29] <swaiba> vanny yeah sounds like the form name isn't in your $allowed_actions array
271: [15:12:44] <nontgor> that makes sense
272: [15:13:11] * wmk has joined #silverstripe
273: [15:13:43] <vanny> sorry, had a shower. It is in my allow actions as it shows the form
274: [15:14:16] <vanny> I am using a routing to the page as it is built from a data object
275: [15:17:52] * wmk quit (Ping timeout: 264 seconds)
276: [15:28:59] * swaiba quit (Remote host closed the connection)
277: [15:36:40] <vanny> Ok, sorry, yes, looking at my html output it is putting ProductPage_Controller/ReviewForm <form action
278: [15:36:52] <vanny> I feel like it has something to do with routes
279: [15:52:21] <kinglozzer> vanny: Sounds like you're probably building the form on the DataObject or something?
280: [15:52:49] <kinglozzer> If you instantiate a controller without an underlying record (i.e. a page) that it can get a link from, it'll default to the controller name - hence why the URL is ProductPage_Controller
281: [15:53:34] <kinglozzer> Hard to guess at a fix/workaround without seeing any code
282: [15:54:11] * MrTopless quit (Ping timeout: 244 seconds)
283: [15:56:12] <vanny> ok, ill post my code :)
284: [15:57:59] <vanny> http://sspaste.com/paste/show/56e6df6dda883
285: [15:58:19] <vanny> I have this in the YAML 'product//$Action/$ID/$Name': 'ProductPage_Controller'
286: [16:07:24] * Frans_Amsterdam quit (Quit: Textual IRC Client: www.textualapp.com)
287: [16:10:16] * marvanni quit (Quit: marvanni)
288: [16:14:06] <BrewNake_> madmatt: Just saw your response from this weekend... looking to leave underscores in place for filenames, no replacement.
289: [16:14:37] * BrewNake_ is now known as BrewNaked
290: [16:15:06] * arnhoe quit ()
291: [16:29:48] <BrewNaked> Does anyone else have an "elegant" way to keep the SilverStripe default file upload handler from replacing underscores (_) with hyphens (-) ?
292: [16:30:45] <BrewNaked> As I see it, currently, I'll have to extend file.php, upload.php, uploadfield.php and filenamefilter.php in order to get the functionality that I'm looking for...
293: [16:30:55] * DimiStripe quit (Read error: Connection reset by peer)
294: [16:32:50] <vanny> what about extending the upload handler onBeforeWrite and fix the filename in there
295: [16:32:58] * marvanni has joined #silverstripe
296: [16:38:17] * DimiStripe has joined #silverstripe
297: [16:43:48] <BrewNaked> vanny: So save the original file name in a tmp variable of some kind, save the file and then recall the original name to rename the file and db record for the file in the onBeforeWrite?
298: [16:46:04] <vanny> I only just started using the onBefore onAfter. but this is how I would look at it, may not be the perfect solution, but in my head that works. but it would be an onAfterWrite, as you need the information saved first, then rename the file.
299: [16:47:39] <BrewNaked> vanny: Gotcha... yeah, I see where you're going. I'll see if I can hack that together. Thanks.
300: [16:48:23] <BrewNaked> I was really hoping for some way to pass along a variation of the FileNameFilter object to the filesystem, but it doesn't appear to be possible as it's written currently.
301: [16:50:16] <vanny> are you doing in CMS or upload from page form?
302: [16:50:37] <BrewNaked> CMS
303: [16:51:43] <vanny> ok. Then I know the onBeforeWrite works there.
304: [16:52:20] <vanny> see if in that you can echo/debug out the something like $this->FileName
305: [16:57:58] <kinglozzer> BrewNaked: Where is the replacement happening exactly?
306: [16:58:22] <kinglozzer> Can't you override the replacement, assuming it's in FileNameFilter?
307: [16:59:31] <kinglozzer> e.g. yaml: http://pastie.org/10759604
308: [16:59:44] <kinglozzer> So tell it to replace underscores with underscores :P
309: [17:02:19] <BrewNaked> kinglozzer: Hmmmm... tried to do a yaml extension before, but not directly to the default values there. I'll give that a try.
310: [17:02:34] <vanny> that is cool.
311: [17:02:42] <vanny> soo much to learn.
312: [17:02:53] <kinglozzer> BrewNaked: Yeah you can't *remove* config values using yaml (though you can in PHP), but you can replace them
313: [17:04:30] <vanny> ok, i've narrowed my issue down to the fact I am using a route as every form on that page puts the productPage_controller in the <form action
314: [17:05:43] <vanny> can I set which controller the form should use?
315: [17:06:20] <kinglozzer> vanny: The forms are all using ProductPage_Controller, the trouble is that the link to that controller is literally 'ProductPage_Controller'
316: [17:06:44] <kinglozzer> You might be able to work around it by adding a Link() method to your controller that returns 'product'
317: [17:07:14] <kinglozzer> i.e. public function Link() { return 'product'; }
318: [17:08:21] <kinglozzer> If that breaks the standard page linking, try if ($this->data()) { return $this->data()->Link(); } else { return 'product'; }
319: [17:08:22] <vanny> I already have a public function link that creates the 'product/show/$name'
320: [17:08:37] <kinglozzer> vanny: I mean add the 'link' function to ProductPage_Controller
321: [17:08:45] <kinglozzer> Rather than Product or something else
322: [17:08:45] <vanny> oh ok
323: [17:10:38] <vanny> thanks, I know I could save this by making a productPage in the sitetree and then _show.ss page trying to use a route as i think that is more technically correct
324: [17:23:58] * kinglozzer quit ()
325: [17:55:54] * Embraden_ has joined #silverstripe
326: [17:56:17] * Embraden quit (Read error: Connection reset by peer)
327: [17:57:19] * liori quit (Ping timeout: 260 seconds)
328: [17:57:54] * liori has joined #silverstripe
329: [17:59:29] * vanny quit (Quit: Page closed)
330: [18:24:40] * Stomach has joined #silverstripe
331: [18:26:01] * gelignite has joined #silverstripe
332: [18:26:37] * Stomach quit (Client Quit)
333: [18:27:58] * HARVS1789UK quit (Remote host closed the connection)
334: [18:41:12] * arnhoe has joined #silverstripe
335: [18:42:46] * Phlunk3 has joined #silverstripe
336: [18:50:14] * Stomach has joined #silverstripe
337: [19:00:16] <ss-helper> SilverStripe "Translatable" Multilingual content - http://stackoverflow.com/questions/35995824/silverstripe-translatable-multilingual-content
338: [19:10:15] <Neomang> I was trying to add a bySlug() method to filter my results from a DataObject::get() request, but I'm running into trouble putting it in practice
339: [19:11:14] <Neomang> I have created the function in a class that extends DataList, but when I use the line DataObject::get()->bySlug($request->param('slug')), i get an error
340: [19:11:31] <Neomang> it says "the method 'byslug' does not exist on 'DataList'"
341: [19:11:50] <Neomang> I have added the extension to the page using it in the config.yml file, but it still gives me this error.
342: [19:30:17] <ss-helper> How can I use something like the onAfterPublish() hook on a versioned dataobject in SilverStripe - http://stackoverflow.com/questions/35996117/how-can-i-use-something-like-the-onafterpublish-hook-on-a-versioned-dataobject
343: [19:32:17] * HARVS1789UK has joined #silverstripe
344: [19:36:33] * Stomach quit (Quit: zzz)
345: [19:36:36] * HARVS1789UK quit (Ping timeout: 246 seconds)
346: [19:52:35] * Stomach has joined #silverstripe
347: [19:54:09] * HARVS1789UK has joined #silverstripe
348: [19:57:29] * adrexia has joined #silverstripe
349: [20:02:32] * arnhoe quit ()
350: [20:04:33] * marvanni quit (Quit: marvanni)
351: [20:08:28] * willr has joined #silverstripe
352: [20:10:16] * DanaeNZ has joined #silverstripe
353: [20:10:52] * n8_ has joined #silverstripe
354: [20:14:32] * robbieaverill has joined #silverstripe
355: [20:18:11] * cheddam has joined #silverstripe
356: [20:19:30] * n8_ quit (Ping timeout: 252 seconds)
357: [20:22:06] * UndefinedOffset quit (Quit: Leaving.)
358: [20:22:30] * UndefinedOffset has joined #silverstripe
359: [20:23:58] * Stomach quit (Quit: zzz)
360: [20:24:11] * micmania1 has joined #silverstripe
361: [20:27:30] * UndefinedOffset quit (Ping timeout: 276 seconds)
362: [20:41:13] * Stomach has joined #silverstripe
363: [20:43:43] * DanaeNZ quit (Remote host closed the connection)
364: [20:55:19] * DanaeNZ has joined #silverstripe
365: [20:56:26] <DanaeNZ> Woohoo coffee!
366: [21:13:44] <Stomach> WOOHOO
367: [21:43:04] * Azure quit (Ping timeout: 240 seconds)
368: [21:45:06] * Teddy__ quit (Read error: Connection reset by peer)
369: [21:45:51] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
370: [21:45:51] * Azure has joined #silverstripe
371: [22:06:45] <BrewNaked> Woohoo-er beer!
372: [22:17:13] * omgHELP has joined #silverstripe
373: [22:17:13] <ss-helper> omgHELP: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
374: [22:17:41] <omgHELP> Hey guys, I am trying to add a custom method to a dataobject that is callable in a template, but nothing renders into the template
375: [22:17:43] <omgHELP> e.g
376: [22:18:00] <omgHELP> public function RandomThing() { return "HELLO"; }
377: [22:18:06] <omgHELP> then in template
378: [22:18:11] <omgHELP> $RandomThing
379: [22:18:13] <omgHELP> does nothing
380: [22:18:15] <omgHELP> omghelp
381: [22:18:25] <Firesphere_> Are you in the scope of the DataObject?
382: [22:18:32] <Firesphere_> $DataObjectName.RandomThing
383: [22:19:00] * Firesphere_ is now known as Firesphere
384: [22:21:33] <omgHELP> Yea all of the other db methods are working
385: [22:21:34] * HARVS1789UK quit ()
386: [22:21:40] <omgHELP> $Title etc.
387: [22:21:45] <Firesphere> Did you flush+
388: [22:21:47] <Firesphere> ?
389: [22:22:01] <omgHELP> if I print $ClassName into the template, it is the class name of the dataobject
390: [22:22:04] <omgHELP> yea
391: [22:25:52] <omgHELP> are there other ways to check if I am in the right scope?
392: [22:26:26] <Firesphere> Put a breakpoint in the RandomThing function to see if it actually reaches this function.
393: [22:27:28] <BrewNaked> Does the template know how to deal with a string for a return value? Does it have to be in a wrapper that extends ViewableData?
394: [22:27:38] <Stomach> BrewNaked yeah it does
395: [22:28:07] <Firesphere> BrewNaked: Yeah, the template usually only receives strings anyway.
396: [22:28:10] <omgHELP> RandomThing has a 'die()' and that doesnt get executed
397: [22:28:45] <Firesphere> Could you make a paste? http://sspaste.com
398: [22:32:00] <omgHELP> http://sspaste.com/paste/show/56e73bc472e50
399: [22:32:37] <omgHELP> and the template : http://sspaste.com/paste/show/56e73bf8404fd
400: [22:36:55] <Firesphere> Hmm, it should die in the templateviewer.
401: [22:43:22] <omgHELP> yeah, that's why I am confused
402: [23:00:01] * ss-helper quit (Remote host closed the connection)
403: [23:00:15] * ss-helper has joined #silverstripe
404: [23:00:38] <omgHELP> ANy other thoughts on how I could approach this?
405: [23:01:56] <Firesphere> No, sorry. It should just work. So it's odd it doesn't.
406: [23:02:38] * Stomach quit (Quit: zzz)
407: [23:06:12] <robbieaverill> Hey guys - I'm using a callback method from an external website in a GridFieldDetailForm_ItemRequest class - for the methods I define I can accept $data and $form as arguments, but for the callback method I don't have the $form - how can I set a session flash message without a Form class present?
408: [23:12:47] <micmania1> robbieaverill: you can obtain it from the message manually and then remove it
409: [23:12:54] <micmania1> from the session*
410: [23:12:56] <robbieaverill> Normally I'd just use /** @var Form $form */ $form->sessionMessage('Message here', 'good');
411: [23:13:09] <micmania1> oh, so you can’t set it?
412: [23:13:47] <robbieaverill> Not in my callback method, because I don't have a $form available
413: [23:14:04] <robbieaverill> The Form class has a static method messageForForm() though, which I could use instead and pass in the form name as well...?
414: [23:14:14] <micmania1> I guess you can also set it manually in the session too
415: [23:14:30] <robbieaverill> Looks like that's what ::messageForForm() does, just provides a wrapper
416: [23:14:38] <robbieaverill> Thanks micmania1
417: [23:15:01] <micmania1> and maybe send a PR so that Form is passed in the future? :p
418: [23:22:52] * UncleChe_ has joined #silverstripe
419: [23:27:42] * UncleChe_ quit (Client Quit)
420: [23:27:57] * Stomach has joined #silverstripe
421: [23:36:43] <robbieaverill> micmania1: I'm still quite new at using SS, so there's every chance I'm just doing it wrong :)
422: [23:53:16] * omgHELP quit (Ping timeout: 252 seconds)
423: [23:58:39] * spekulatius2 has joined #silverstripe

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