#silverstripe IRC Log

IRC log for 21 July 2016

All timestamps are in UTC.

1: [00:00:01] * ss-helper quit (Remote host closed the connection)
2: [00:00:17] * ss-helper has joined #silverstripe
3: [00:04:07] <gigaquail> ahh got it, Directory wasn't encompassing the actual directory involved
4: [00:04:17] * BrewNaked quit ()
5: [00:35:59] * micmania1 quit (Quit: micmania1)
6: [00:37:25] * micmania1 has joined #silverstripe
7: [00:50:04] * janneklouman-- quit (Ping timeout: 252 seconds)
8: [01:24:03] * Stomach quit (Quit: zzz)
9: [01:26:57] * Stomach has joined #silverstripe
10: [01:30:32] * adrexia quit (Quit: Textual IRC Client: www.textualapp.com)
11: [01:45:30] <spronk> hm
12: [01:54:23] * DanaeNZ quit (Remote host closed the connection)
13: [02:01:14] * MichalKleiner has joined #silverstripe
14: [02:18:33] * DanaeNZ has joined #silverstripe
15: [02:26:42] * Guest50105 quit (Ping timeout: 250 seconds)
16: [02:29:07] <hailwood> Hey guys, when using GridFieldAddNewMultiClass is there any way to preset some data?
17: [02:42:28] * UncleCheese quit (Read error: Connection reset by peer)
18: [03:05:25] * Stomach quit (Quit: zzz)
19: [03:09:01] * Stomach has joined #silverstripe
20: [03:56:29] * DorsaiNZ has joined #silverstripe
21: [04:04:17] * muskie9 has joined #silverstripe
22: [04:08:48] <DorsaiNZ> anyone know how to over ride the savetreenode function in LeftAndMain.php?
23: [04:16:50] <muskie9> DorsaiNZ at a glance, other than using an injector to use a custom LeftAndMain class and overload the method, I don't see anything that allows you to hook into it
24: [04:20:23] <DorsaiNZ> I have tried creating something like class CustomLeftAndMain extends LeftAndMain, copying savetreenode into that and altering to my needs - but it does not appear to get called
25: [04:20:27] * adrexia has joined #silverstripe
26: [04:22:04] <muskie9> DorsaiNZ did you also update your config.yml with the injector to let SS know it should reference your new class: https://docs.silverstripe.org/en/3.4/developer_guides/extending/injector/
27: [04:22:27] <muskie9> second code block example in the above link..
28: [04:25:47] <DorsaiNZ> so 'Injector: MyClassName: class: MyBetterClassName' should be something like 'Injector: LeftAndMain: class: CustomLeftAndMain' ?
29: [04:26:01] <muskie9> exactly
30: [04:26:40] <muskie9> any instance of LeftAndMain should then be substituted with your CustomLeftAndMain, so your method should be called
31: [04:26:45] <muskie9> afaik
32: [04:26:54] <DorsaiNZ> okay - and does that yml file have to be in mysite or can it be in the config folder of the module I am working on?
33: [04:28:02] <muskie9> I've done it in "module" folders if I have my project files in a particular folder other than mysite... so I think either should work (I've done mysite too if I don't have a project specific folder)
34: [04:29:31] <DorsaiNZ> hmmm does not seem to work... do I need to copy the entire LeftAndMain class or just the function I wish to over ride?
35: [04:29:41] <DorsaiNZ> err overload
36: [04:29:55] <muskie9> just the method... did you flush?
37: [04:30:50] <DorsaiNZ> yeah - let me flush again just to be sure
38: [04:31:59] <muskie9> **I usually create a silverstripe-cache directory in my webroot and SS will put the cache files in there... if I _really_ want to make sure to flush I remove anything in that dir
39: [04:33:17] <DorsaiNZ> nope - at the moment all I am expecting to see is a change to the 'Reorganised the site tree successfully.' message when I drag a page around - might try aletring the fucntion to die() just to sse if I get a result
40: [04:34:15] <DorsaiNZ> nope ffs
41: [04:34:20] <muskie9> ya, since it's a sort of response I'm not totally sure how you'd debug it... but the injector is how I've gone about similar things in the past
42: [04:35:41] <DorsaiNZ> well thanks for the help anyway - I hadn't thought of the Injector stuff - had tried some extension stuff in the yml to try and get it working - but no luck
43: [04:36:49] <muskie9> using an extension generally relies on some sort of endpoint you can hook into... i.e. $this->extend('myMethodForExtensions', $myVarToPass);
44: [04:37:06] <muskie9> didn't see any in the method you are looking to overload so don't think extension would work
45: [04:37:06] <DorsaiNZ> so I gathered but I was/am getting desperate :)
46: [04:37:13] <muskie9> unfortunately
47: [04:38:25] <DorsaiNZ> anyway thanks for the pointers
48: [04:38:41] <muskie9> no prob, hope it works out in the end
49: [04:42:46] * DorsaiNZ quit (Ping timeout: 250 seconds)
50: [04:46:44] <muskie9> anyone used the share draft content module before? and if so, in your experience, did it not show things like relations (i.e. userform fields when previewing)
51: [04:54:20] * DanaeNZ quit (Quit: TIME TO FEED)
52: [04:55:45] * hailwood quit (Remote host closed the connection)
53: [05:12:46] * micmania1 quit (Quit: micmania1)
54: [05:22:04] * micmania1 has joined #silverstripe
55: [05:26:51] * Stomach quit (Ping timeout: 276 seconds)
56: [05:59:38] * micmania1 quit (Quit: micmania1)
57: [06:15:05] * Stomach has joined #silverstripe
58: [06:26:30] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
59: [07:10:21] * darianno|aw is now known as darianno
60: [07:30:09] <ss-helper> SilverStripe i18n Textcollector Task not loading - http://stackoverflow.com/questions/38497434/silverstripe-i18n-textcollector-task-not-loading
61: [07:30:21] * Stomach quit (Quit: zzz)
62: [07:36:25] * wmk has joined #silverstripe
63: [07:56:03] * swaiba has joined #silverstripe
64: [08:05:28] * xyphoid quit (Ping timeout: 272 seconds)
65: [08:06:13] * xyphoid has joined #silverstripe
66: [08:06:30] * adrexia quit (Ping timeout: 260 seconds)
67: [08:10:16] * slievr has joined #silverstripe
68: [08:22:14] * kinglozzer has joined #silverstripe
69: [08:25:37] * r3v3rb has joined #silverstripe
70: [08:26:24] <r3v3rb> silly question, I have a has one - is there a field for modeladmin that will offer a dropdown to select one from a list but also allow a clickable link to the chosen dataobject?
71: [08:26:49] <r3v3rb> the has one obviously just shows as an ID or the Title field currently in a text box
72: [08:28:31] <kinglozzer> Another three cheers for BT, who have fucked up for the second morning running D:
73: [08:31:57] <r3v3rb> hurrah for talktalk who haven’t but normally do!
74: [08:32:18] <r3v3rb> kinglozzer: any idea about the has_one
75: [08:32:34] <kinglozzer> I'm not aware of any field like that r3v3rb :/
76: [08:32:57] <r3v3rb> Hmm, what about one that would just be a link is it a literal field?
77: [08:33:12] <kinglozzer> Yeah you could probably do it like that
78: [08:33:22] <kinglozzer> Obviously it wouldn't update until after a write
79: [08:33:58] <r3v3rb> I can’t beleive the there isn’t a field type that provides a link to a hasone yet...
80: [08:34:09] <r3v3rb> believe*
81: [08:35:43] <slievr> could you not use SiteTreeURLSegmentField instead of a literal?
82: [08:40:22] <swaiba> r3v3rb yeah this comes close...
83: [08:40:23] <swaiba> https://github.com/sheadawson/silverstripe-quickaddnew
84: [08:40:27] <swaiba> but no donought
85: [08:47:54] <r3v3rb> swaiba: does it then create a link to the field created do you know?
86: [08:48:15] <swaiba> that allow you to *create* the has one object yes
87: [08:48:27] <swaiba> it doens't allow editing :( (yet..)
88: [08:48:50] * agent44 has joined #silverstripe
89: [08:50:29] <r3v3rb> right, this is a database populated via excel for 600 products per minor category of which there are 7 minor categories, which then reside in 18 major categories and are crosslinked - the has_one saves the ID of the linked object but shows as a textfield with the ID. I need it to be a link to that has_one…
90: [08:50:53] <r3v3rb> so I’m thinking a literalfield is quickest and dirtiest for my meeting at 11am :D
91: [08:52:06] <swaiba> add coffe you'll be fine r3v3rb
92: [08:52:19] <r3v3rb> aye, had 4 already!
93: [08:52:25] <gigaquail> false
94: [08:52:27] <gigaquail> add pho
95: [08:52:34] <gigaquail> breakfast pho + coffee = bam bam
96: [08:54:15] <r3v3rb> unfuckingbelievable! so guess what my field name is for the has_one … Component
97: [08:55:28] <r3v3rb> which results in $this->Component bailing out because viewable data has a getComponent function!: [Warning] Missing argument 1 for DataObject::getComponent(),
98: [08:55:30] * agent44 quit (Quit: Bai!)
99: [08:56:39] <swaiba> r3v3rb lol
100: [08:56:48] <r3v3rb> swaiba: you think!
101: [08:57:20] <swaiba> gigaquail "breakfast pho"? is that asian?
102: [08:57:37] <gigaquail> vietnamese, think of it as soup that doesn't have a lot of carbs in it
103: [08:57:59] <swaiba> interesting...
104: [08:58:09] <gigaquail> probably the best soup on earth
105: [08:58:17] <gigaquail> (disclosure, i'm a kiwi)
106: [09:04:09] <r3v3rb> last question then, changed the field name, how do a create a link that would work in ModelAdmin?
107: [09:04:17] <r3v3rb> to open the DataObject
108: [09:04:39] <r3v3rb> surely there must be a field-type for connecting to a has_one
109: [09:05:29] <r3v3rb> gigaquail: I read that as poo thinking it must have been a typo - so coffee then poo then meeting :P
110: [09:09:55] <r3v3rb> time to look at how gridfield builds its links for DO's
111: [09:17:02] * Azure quit (Ping timeout: 272 seconds)
112: [09:17:20] <swaiba> r3v3rb - http://<sitename>/admin/<modeladmin urlsegment>/<dataobject name>/EditForm/field/<dataobject name>/item/<dataobject id>/edit
113: [09:22:36] <r3v3rb> yupo swaiba :D
114: [09:23:17] <r3v3rb> /admin/<modeladmin urlsegment>/<dataobject name>/EditForm/field/<dataobject name>/item/<dataobject id>/edit is easier by a couple of segments
115: [09:27:58] * arnhoe has joined #silverstripe
116: [09:39:11] * janneklouman-- has joined #silverstripe
117: [09:51:09] <janneklouman--> For the display-logic module, is there any way to do a ->isNotChecked() comparison? I've tried ->isEqualTo(0), ->isNotEqualTo('checked'), ->isEmpty() without success
118: [09:54:24] <janneklouman--> I could reverse the logic by doing ->hideIf() instead of ->displayIf(), but my condition for displaying/hiding is that one checkbox is ticked and another is not..
119: [09:55:56] <swaiba> janneklouman-- I'd do that hideIf
120: [09:59:33] <r3v3rb> hmm, upgrading to 3.4 results in Warning at line 2694 of /home/osetbike/public_html/cms/code/model/SiteTree.php
121: [09:59:54] <r3v3rb> which is $subclasses = ClassInfo::subclassesFor($candidate);
122: [09:59:54] <r3v3rb> foreach($subclasses as $subclass) {
123: [09:59:55] <r3v3rb> if($subclass != "SiteTree_root") $allowedChildren[] = $subclass;
124: [09:59:56] <r3v3rb> }
125: [10:00:52] <r3v3rb> has allowed children changed?
126: [10:01:49] <janneklouman--> swaiba problem is I need to do hideIf('a')->isChecked()->andIf('b')->isNotChecked()
127: [10:02:21] <swaiba> janneklouman-- then you could contribute to UC module adding the function you want :)
128: [10:03:06] <janneklouman--> was wondering if there was support for it somehow, but yes that sounds good :-)
129: [10:03:53] <janneklouman--> thanks!
130: [10:09:27] <swaiba> may the fork be with you janneklouman--
131: [10:10:33] <janneklouman--> arigatou orz
132: [10:10:49] * Azure has joined #silverstripe
133: [10:19:49] * wmk quit (Quit: Leaving)
134: [10:31:13] * ajmitch_ quit (Quit: leaving)
135: [10:46:20] * gigaquail is now known as milesES
136: [10:46:47] * milesES is now known as gigaquail
137: [10:54:57] * ajmitch has joined #silverstripe
138: [11:10:56] * ajmitch quit (Quit: leaving)
139: [11:10:59] * Kapdap quit (Quit: Lost terminal)
140: [11:23:03] * ajmitch has joined #silverstripe
141: [11:27:15] * Liquide quit ()
142: [11:31:18] * Kapdap has joined #silverstripe
143: [11:57:02] * shellbackpacific has joined #silverstripe
144: [12:23:14] * UndefinedOffset has joined #silverstripe
145: [12:42:51] * agent44 has joined #silverstripe
146: [12:52:58] * muskie9 has joined #silverstripe
147: [13:01:00] <elgabbu> hi all anyone every implemented something to server all urls on lowercase?
148: [13:01:07] <elgabbu> *serve
149: [13:01:45] <muskie9> elgabbu if you're on apache there's this: http://www.askapache.com/htaccess/rewrite-uppercase-lowercase.html
150: [13:02:47] <muskie9> never tested it so no idea if it works
151: [13:04:50] <swaiba> elgabbu muskie9 is this following on from yesterday's chat about URL and case?
152: [13:05:15] <muskie9> can't remember, been a long 24 hrs lol
153: [13:05:24] <swaiba> lol
154: [13:20:54] <cloph> elgabbu: in silverstripe you can hook into the urlsegment creation/proposal function and force lowercase and making sure to avoid duplicates.. you'd still need to add stuff to assets/upload management though.. "why" is the question that comes to mind :-)
155: [13:31:26] <swaiba> cloph we were discussing that site.com/MyURL doesn't work when you have site.com/myurl
156: [13:31:33] <swaiba> and it would be good if they could
157: [13:37:23] * kinglozz_ has joined #silverstripe
158: [13:37:34] * kinglozzer quit (Ping timeout: 240 seconds)
159: [13:42:06] <elgabbu> cloph ... we want to mitigate possible SEO attacks and 301 to lowercased URL
160: [13:44:02] <elgabbu> muskie9 and swaiba i attempted implementation of htttpd conf redirect the problem is that a site wide config affect the backend .... some URLs when adding forms and data don't get parsed correctly
161: [13:44:57] <elgabbu> i was looking at the ModelAsController class to see if I can hook into it somewhere
162: [13:45:24] <elgabbu> considering the init hook atm
163: [13:46:23] <elgabbu> but at that point i wouldn't know if I am handling a page (SiteTree) request
164: [13:47:40] <elgabbu> RequestHandler beforeCallActionHandler hook might be interesting
165: [13:47:59] <cloph> I'd use nginx' perl or lua to rewrite to lowercase and use that in a try_files $uri $uri_lowercase =404
166: [13:48:08] <cloph> http://stackoverflow.com/a/11170826 for perl way
167: [13:54:53] * shellbac1pacific has joined #silverstripe
168: [13:56:00] * kinglozz_ quit ()
169: [13:57:45] * shellbackpacific quit (Ping timeout: 276 seconds)
170: [14:01:05] <swaiba> thinking about it and static caching... it might be easiet to add into php somehow
171: [14:01:17] <swaiba> maybe a nice hack at the start of main.php lol
172: [14:07:24] <janneklouman--> I remember trying something similar, redirecting all [A-Z] requests to lowercase using mod_rewrite, but I quickly ran into problems IIRC it had something to do with controller urls being capitalized
173: [14:07:37] <janneklouman--> but I can't really remember
174: [14:18:22] * agent44 quit (Ping timeout: 250 seconds)
175: [14:25:22] * agent44 has joined #silverstripe
176: [14:50:40] * darianno is now known as darianno|aw
177: [14:56:44] * johan_ has joined #silverstripe
178: [14:57:36] <johan_> hi fellow SS devs, just wondering if someone can point me at the right direction.
179: [14:58:35] <johan_> I installed silverstripe/subsites module, and would like to run experiment within my local URL.
180: [14:58:56] <johan_> My main SS site runs under http://ssready.local/
181: [14:59:44] <johan_> I created a new Subsite under the Subsites component in Admin page. Added the domain as: domain1.local
182: [15:00:10] <johan_> I then added a simple Home Page for domain1 subsite under Page component in Admin page.
183: [15:00:33] <johan_> For some reason, accessing http://domain1.local/ and http://domain1.local/home gives me nothing (404)
184: [15:00:35] <johan_> any idea?
185: [15:01:51] <AlphaCactus> johan_: imo, subsites add a whole level of complication so unless you need it for actual production features, I would just replicate my entire site to another folder and access it as a separate url like ssready.experiment. Do you need subsites?
186: [15:01:51] <muskie9> johan_ do you have your host file updated with both domains? and it also depends on what your dev env is like... for example, I have a vagrant box with vhosts and when using subsites I point my domains that are subsites to the directory of the SS installation
187: [15:03:59] <swaiba> johan_ if you look out for "wmk" i know he uses this...
188: [15:04:57] <johan_> @AlphaCactus: I am fairly aware of the extra complexity. However, for what I am planning to do in the near future, Subsites would be the perfect platform.
189: [15:05:34] <johan_> @muskie: I am using Vagrant in Windows environment. Yes, I have added domain1.local in the host file, pointing to my Vagrant IP.
190: [15:05:59] <muskie9> does it know that domain1.local should point to the same directory as ssready.local?
191: [15:06:02] <johan_> @muskie: omg, I totally forgot about the vhosts in Vagrant.
192: [15:06:11] <muskie9> that should fix you right up
193: [15:06:15] <johan_> @muskie: feel stupid now
194: [15:06:34] <muskie9> na, I always forget the vhosts ;P
195: [15:09:23] <AlphaCactus> ^
196: [15:10:23] <johan_> exactly!
197: [15:10:25] <AlphaCactus> Yay I finally passed 50 rep on stackoverflow so now I can comment!
198: [15:10:41] <johan_> congrats there!
199: [15:10:50] <johan_> what an achievement
200: [15:11:03] <swaiba> go AlphaCactus
201: [15:11:12] <janneklouman--> congratulations!
202: [15:11:20] <slievr> Grtz!
203: [15:11:28] <swaiba> I'm really starting to like SO
204: [15:11:57] <swaiba> I spent ages on the SS forum and now it's a ghost town, earning rep on SO is better
205: [15:12:13] <muskie9> nice that questions tagged with SS post here after a while... so can actually answer some things on there
206: [15:12:22] <johan_> cool
207: [15:13:15] <AlphaCactus> Hardest part is finding a question you can answer before someone else smarter does...
208: [15:13:26] <slievr> +1
209: [15:14:53] <johan_> is it that competitive?
210: [15:15:03] <slievr> Nope. I'm jsut bad
211: [15:15:16] <ss-helper> Silverstripe Listboxfield multiselect sort by user select - http://stackoverflow.com/questions/38507745/silverstripe-listboxfield-multiselect-sort-by-user-select
212: [15:15:30] <slievr> spooky.
213: [15:15:44] <swaiba> johan_ sure it, I've worked hard to get up to almost 2k
214: [15:16:00] <swaiba> yeah, come on the fast gun in the west...
215: [15:16:24] <johan_> wow, I never would've thought...
216: [15:16:35] <swaiba> I'm kinda busy ATM so go for that question...
217: [15:16:54] <swaiba> it helps if you start reviewing because you see a ton of questions quick... so answer the ones you can
218: [15:17:13] <johan_> gotcha.
219: [15:17:36] <johan_> @muskie9: sorry, but I might need your help again with this Subsites module.
220: [15:18:01] <muskie9> what's up
221: [15:18:03] <johan_> I've updated vhost file and http://domain1.local is now indeed pointing to SS web folder.
222: [15:18:33] <johan_> I've just added 2 simple files under domain1 -> Pages in admin section
223: [15:19:01] <johan_> I added domain1.local/home and domain1.local/about
224: [15:19:28] <johan_> For some weird reason, opening domain1.local/home on my browser, opens up main.local/home instead
225: [15:19:50] <johan_> and opening domain1.local/about gives me error message: Too many redirection.
226: [15:20:01] <johan_> any idea?
227: [15:21:09] <muskie9> double check that you have everything setup for the subsite domain... also not sure if you'd have to provision vagrant or restart apache since the vhost change
228: [15:24:43] <johan_> yep, pretty sure I've configured the Subsites properly in the Admin section, already restarted Apache as well. My only recourse is to check vagrant provision file. Not sure what I need to add / update, but I'll look into it.
229: [15:24:55] <johan_> thanks, muskie9
230: [15:25:01] <muskie9> 👍
231: [15:27:06] <johan_> quick question regarding architecture.
232: [15:28:04] <johan_> to make modular web application with SS, do people generally add modular components as nested sub-page under parent page, or add them as component tab on the parent page?
233: [15:29:11] <AlphaCactus> When you say modular component, what do you mean exactly
234: [15:30:31] <johan_> modular components would be something like: 2-Column Nav module, 3-Column Nav module, Gallery module, Top Nav module, Hero Image module, Social Media Share module, Search Box module.
235: [15:31:30] <johan_> Is it bizarre to treat these components as if they are "child-page" that sits under parent page - ex: Homepage, About Us page, etc.
236: [15:31:53] <johan_> some CMS use such approach.
237: [15:46:12] <janneklouman--> Create DataObjects and templates for your modules, and then make relations to them on the pages that use them, for example in Page.php you could say has_one => ['HeroImage' => 'HeroImage', 'Gallery' => 'Gallery'] etc
238: [15:46:55] <janneklouman--> Sub pages in the SiteTree are only for pages that should be accessible via the browser, not modules afaik
239: [15:48:33] <janneklouman--> I'm using elemental (https://github.com/dnadesign/silverstripe-elemental) for a project now that allows for a pretty modular approach to building your pages
240: [15:48:39] <janneklouman--> (@johan_)
241: [15:53:55] * swaiba quit (Remote host closed the connection)
242: [15:54:48] <johan_> @janneklouman: this sounds great
243: [15:55:17] <johan_> can we do nested elements? (elements within elements within ...)?
244: [15:57:28] <slievr> You could define a new element with related objects.
245: [15:58:08] <slievr> How deep will you go though, could get messy
246: [15:59:50] <janneklouman--> You can. It even comes bundled with an "element list"
247: [16:00:47] <johan_> @slievr ideally infinite, though most likely up to 4-5 levels deep
248: [16:01:45] <johan_> ex: Element:Image, Element:TopNav, Element:Gallery[Element:Image, Element:Image], etc.
249: [16:02:04] <johan_> @janneklouman: very nice, thank you.
250: [16:10:39] * johan_ quit (Quit: Page closed)
251: [16:22:54] * BrewNaked has joined #silverstripe
252: [16:24:18] <BrewNaked> o/ All you party people. Reminder... today is 'Take a Monkey to Lunch Day', so all developers should expect to get free lunch today.
253: [16:24:37] <muskie9> lol
254: [16:24:45] <muskie9> 🐒
255: [16:26:24] <AlphaCactus> hey how do you make emoticons like that
256: [16:26:52] <muskie9> AlphaCactus https://github.com/warpling/Macmoji
257: [16:27:05] <muskie9> semi related: http://lifehacker.com/5931337/do-yourself-a-favor-set-up-mountain-lions-built-in-text-expansion-with-these-shortcuts
258: [16:28:03] <AlphaCactus> < windows
259: [16:28:17] <muskie9> hmmmmm... not sure then
260: [16:28:53] <BrewNaked> I just threw a PokeBall at the screen... nothing happened. Knocked over my coffee...
261: [16:28:55] <AlphaCactus> but I see the icon so there must be a manual way to do it.
262: [16:29:09] <muskie9> lol
263: [16:29:18] <muskie9> BrewNaked I know that feeling ;P
264: [16:29:22] <AlphaCactus> Really, you just threw a Pocket Ball at your screen? One more and you will be out of ammo.
265: [16:29:53] <BrewNaked> I've got Pocket Balls for *days*!!!
266: [16:50:59] * slievr quit (Quit: Leaving.)
267: [17:03:56] * agent44 quit (Quit: zzz)
268: [17:20:27] <BrewNaked> Could someone give me a quick sanity check... I've created a DataExtension for UserDefinedForm, but I'm not seeing the method firing. http://pastebin.com/F74pHK1m
269: [17:22:17] <BrewNaked> I did a dev/build?flush after adding the code, I can add a die('Hi there') just before the $this->extend(...) call in the UserDefinedForm method that I'm interested in and get it to stop for me, but the extension's method never gets called.
270: [17:23:45] <BrewNaked> ...seems like I'm missing a piece or there is something not getting built/flushed correctly to see the new extension.
271: [17:24:46] <AlphaCactus> whats the method in UDF calling extend?
272: [17:26:11] <BrewNaked> public function FilteredEmailRecipients($data = null, $form = null) {
273: [17:28:48] <BrewNaked> $this->extend('updateFilteredEmailRecipients', $recipients, $data, $form);
274: [17:29:47] <AlphaCactus> so, FilteredEmailRecipients is in UserDefinedForm not UserDefinedForm_EmailRecipient. Are you DataExtending the correct class?
275: [17:30:32] <BrewNaked> Extension -> class UserDefinedForm_EmailRecipient_Extension extends DataExtension
276: [17:30:49] <BrewNaked> UserDefinedForm_EmailRecipient:
277: [17:30:50] <BrewNaked> extensions:
278: [17:30:50] <BrewNaked> - 'UserDefinedForm_EmailRecipient_Extension'
279: [17:31:16] <AlphaCactus> So shouldn't UserDefinedForm_EmailRecipient: be UserDefinedForm: in the yaml
280: [17:35:02] <BrewNaked> The UserDefinedForm_EmailRecipient was already in the YML and I was just piggybacking a new method in there...
281: [17:35:51] <BrewNaked> I'll add a new extension for UserDefinedForm... I'm not sure how the naming convention for Class_<xxxxx> is supposed to work in the YML
282: [17:38:36] <AlphaCactus> in the udf/lang/*.yml or you already have another unrelated UDF_ER extension?
283: [17:41:35] <BrewNaked> It's in /site/_config/config.yml
284: [17:42:16] <BrewNaked> Yeah... looks like creating a UserDefinedForm: extension worked.
285: [17:42:48] * thesaysora has joined #silverstripe
286: [17:43:07] <thesaysora> I'm trying to query an object by it's date being a certain day of week.
287: [17:43:20] <BrewNaked> So how does the naming in the YML work for extensions? What would UserDefinedForm_EmailRecipient actually reference?
288: [17:43:34] * arnhoe quit ()
289: [17:43:52] <thesaysora> But, I can't just do filter('ObjectDate->Day()' => 'Sunday'), anybody have any advice?
290: [17:44:17] <AlphaCactus> BrewNaked: I don't think there is a Class_asdfkj;sdflkj convention. UserDefinedForm_EmailRecipient is a class and its name is used verbatim. But since you are setting UDF_ER_E as DataExt on UDF_ER your function won't fire because you need to set, in the yml, your UDF_ER_E class to data extend UDF. Or so is my understanding
291: [17:45:08] <BrewNaked> Ahhhh... I looked for a UserDefinedForm_EmailRecipient earlier, but must have typo'd or something because it didn't come up with anything.
292: [17:45:14] <BrewNaked> That makes more sense.
293: [17:45:52] <AlphaCactus> thesaysora: what type is ObjectDate
294: [17:46:12] <BrewNaked> @thesaysora There is a MySQL selector function DAYOFWEEK... if you create a custom SQL query.
295: [17:46:47] <BrewNaked> As in "SELECT * FROM tblSomething WHERE DAYOFTHEWEEK(start_date) = 3"
296: [17:47:17] <thesaysora> Yeah BrewNaked
297: [17:47:45] <thesaysora> I was hoping I could do it without straight up sql in SS.
298: [17:48:31] <thesaysora> I had no idea there was a mysql statement for that. XD
299: [17:48:37] <thesaysora> Need to brush up on my sql.
300: [17:49:17] <thesaysora> AlphaCactus, it's a Date
301: [17:54:07] <AlphaCactus> thesaysora: great, what kind of food do you like?
302: [17:54:22] <thesaysora> ...Dates...?
303: [17:54:33] <thesaysora> Dates on a date. ;)
304: [17:58:27] * thesaysora_ has joined #silverstripe
305: [17:58:28] <ss-helper> thesaysora_: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
306: [17:58:28] * thesaysora quit (Read error: Connection reset by peer)
307: [17:58:43] <AlphaCactus> :P so you might want to check out the framework/search/filters folder because you can refine filters with those, but I think a ->where() or raw db query might be cleaner.
308: [18:00:24] <thesaysora_> Yeah, I think the where is my best bet.
309: [18:00:29] <thesaysora_> I just looked through the SearchFilters
310: [18:02:17] * r3v3rb quit (Quit: r3v3rb)
311: [18:12:10] <AlphaCactus> I use raw sql fairly often, just have to make sure your inputs are cleaned first
312: [18:13:59] * thesaysora_ salutes. Aye aye
313: [18:15:03] * gelignite has joined #silverstripe
314: [18:25:17] <neomang> So I have one page of a class that I want to render with a different template. I've got the template made up and I was thinking about how to do this
315: [18:25:56] <neomang> I am writing an index function in the controller for that pagetype to check if the page's name is the one I'm looking for and if so, to render it with the different template
316: [18:26:05] <neomang> Is this the right/best way to go about this?
317: [18:26:12] <AlphaCactus> And it isn't a unique page class?
318: [18:26:24] <neomang> No, i was hoping to avoid that
319: [18:26:32] <neomang> since It'd be almost entirely rehashing
320: [18:26:42] <neomang> just needs a different layout for the specific data it's handling
321: [18:27:03] <neomang> the only page where data is date-specific
322: [18:27:13] <AlphaCactus> the problem with using the page name is that a user can change it in the cms. but if you can be sure that won't happen then that will work.
323: [18:27:50] <neomang> Yeah, my boss and I are the only ones who will have that access so I don't expect that to be an issue
324: [18:27:54] <neomang> thanks!
325: [18:29:30] <thesaysora_> Hmm, this is rough.
326: [18:30:09] <AlphaCactus> There are lots of ways to do the same thing, each with their pro/con. You could also check against the Page ID or you could create a Checkbox on the PageType which you check on pages you want to render the alternate way... but result is same as name check.
327: [18:30:10] <thesaysora_> Everytime I try to do Object::get()->where('DATEPART(dw, \"Date\") = 0'); I just get a couldn't run distinct query
328: [18:32:36] <AlphaCactus> can you provide the full error perhaps in an sspaste
329: [18:33:06] <thesaysora_> For sure.
330: [18:34:22] <thesaysora_> http://sspaste.com/paste/show/579115a72d54c
331: [18:37:05] <thesaysora_> Huh...
332: [18:37:29] <thesaysora_> I could probably just make a function on my object to translate it's Date into a weekday, then in this filter query by that function? Maybe I'm wrong.
333: [18:40:02] <thesaysora_> Oh wait.
334: [18:40:03] <thesaysora_> I got it.
335: [18:40:12] <thesaysora_> where('DAYOFWEEK("Date") = 1')
336: [18:40:19] <thesaysora_> 0 wasn't returning anything probably cause there is nothing. XD
337: [18:40:29] <thesaysora_> Figured it out!
338: [19:05:07] * janneklouman-- quit (Ping timeout: 252 seconds)
339: [19:12:21] * thesaysora_ quit (Ping timeout: 276 seconds)
340: [19:48:19] * janneklouman-- has joined #silverstripe
341: [20:14:59] * DimiStripe quit (Quit: DimiStripe)
342: [20:22:45] <AlphaCactus> back and you fixed it already. yay
343: [20:27:21] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
344: [20:29:34] * UndefinedOffset quit (Quit: Leaving.)
345: [20:34:42] * BrewNaked quit (Remote host closed the connection)
346: [20:35:51] * BrewNaked has joined #silverstripe
347: [20:52:47] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
348: [21:01:53] * Stomach has joined #silverstripe
349: [21:06:11] * BrewNaked quit (Remote host closed the connection)
350: [21:06:43] * xyphoid quit (Ping timeout: 258 seconds)
351: [21:08:32] * xyphoid has joined #silverstripe
352: [21:11:10] * Hailwood has joined #silverstripe
353: [21:22:13] * DanaeNZ has joined #silverstripe
354: [21:40:00] * zippy has joined #silverstripe
355: [21:41:10] <zippy> Has anyone gotten 3.x running with PHP7? I know class name conflicts etc, but has anyone resolved them and got it running?
356: [21:43:02] * thesaysora_ has joined #silverstripe
357: [21:43:53] * BrewNaked has joined #silverstripe
358: [21:46:21] * micmania1 has joined #silverstripe
359: [21:47:54] <zippy> Morning micmania1
360: [21:48:13] <micmania1> zippy: mornin’
361: [21:48:19] <zippy> Hows goes it
362: [22:02:59] <micmania1> zippy: good, and you?
363: [22:08:56] <zippy> not bad, bit chilly
364: [22:09:09] <zippy> anyone in the office attempted to get 3.x running with php7?
365: [22:11:27] <Stomach> good morning :D
366: [22:11:32] <Stomach> zippy - nooope
367: [22:12:00] <Stomach> have seen this through https://github.com/lekoala/silverstripe-327
368: [22:12:11] <Hailwood> Ha I was just about to post that
369: [22:12:29] <zippy> no I haven't. Has anyone actually used it?
370: [22:12:49] <Stomach> lekoala has
371: [22:12:58] <Hailwood> lol
372: [22:13:03] <zippy> you sure? :)
373: [22:13:20] <AlphaCactus> pimp, I want
374: [22:14:20] <zippy> might have to give that a whirl
375: [22:19:41] <Stomach> give it a hoon
376: [22:30:13] * spronk quit (Quit: I may need a longer sleep timer...)
377: [22:35:32] <zippy> woah!
378: [22:40:31] <Hailwood> woah?
379: [22:40:40] <DanaeNZ> woooooaahhh
380: [22:44:57] <zippy> yea, it's Friday already
381: [22:48:25] <AlphaCactus> maybe for you...
382: [22:48:27] * muskie9 has joined #silverstripe
383: [23:01:09] * DorsaiNZ has joined #silverstripe
384: [23:02:00] * spronk has joined #silverstripe
385: [23:25:50] * BrewNaked quit ()

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