#silverstripe IRC Log

IRC log for 17 January 2017

All timestamps are in UTC.

1: [00:04:03] * howardgrigg quit (Remote host closed the connection)
2: [00:04:32] * howardgrigg has joined #silverstripe
3: [00:05:07] * micmania1 has joined #silverstripe
4: [00:30:57] * adrexia quit (Quit: My Mac has gone to sleep. ZZZzzz…)
5: [00:31:52] * howardgrigg quit (Remote host closed the connection)
6: [00:31:59] * howardgrigg has joined #silverstripe
7: [00:52:01] * spronk quit (Quit: I may need a longer sleep timer...)
8: [00:55:36] * janneklouman-- has joined #silverstripe
9: [01:00:10] * janneklouman-- quit (Ping timeout: 240 seconds)
10: [01:16:14] * adrexia has joined #silverstripe
11: [03:45:19] * Isaac has joined #silverstripe
12: [03:50:40] <Isaac> hey guys, i stumbled upon some SS template magic
13: [03:50:46] <Isaac> why does <script>document.write("<b></b>");</script> (in a template)
14: [03:51:00] <Isaac> turn into <script>document.write("<b>");</script> (in the html source)
15: [03:51:46] <Isaac> or even worse:
16: [03:52:13] <Isaac> <script>document.write("<div class='inline'></div>");</script>
17: [03:52:16] <Isaac> turns into
18: [03:52:25] <Isaac> <script>document.write("<div class='inline'></script></div>");
19: [03:53:05] <Isaac> DanaeNZ you tend to be pretty good at these thingies
20: [03:57:51] <DanaeNZ> Isaac: sorry no idea, don't think I've had that before
21: [03:58:02] <DanaeNZ> Are you hard coding it or are you passing a variable through?
22: [03:58:07] <DanaeNZ> Oops, have to go though
23: [03:58:13] * DanaeNZ quit (Quit: TIME TO FEED)
24: [04:02:12] <Isaac> it's in an include. I think it might be something outside the include...
25: [04:04:28] <Isaac> ok that really was magic... the issue is gone. Maybe it was my IDE
26: [04:09:22] <Isaac> nevermind... it's back
27: [04:16:38] <adrexia> is it a broken html tag elsewhere tahts interferring?
28: [04:21:12] <Isaac> thats what im thinking
29: [04:21:20] <Isaac> turns out it isnt easy to track down
30: [04:35:31] * spronk has joined #silverstripe
31: [04:43:28] <Isaac> it's inside ShortcodeParser :(
32: [05:15:51] * adrexia quit (Quit: My Mac has gone to sleep. ZZZzzz…)
33: [05:16:09] * adrexia has joined #silverstripe
34: [06:01:31] * micmania1 quit (Quit: micmania1)
35: [06:11:06] * spronk quit (Quit: I may need a longer sleep timer...)
36: [06:29:42] * micmania1 has joined #silverstripe
37: [06:39:15] * micmania1 quit (Quit: micmania1)
38: [06:39:29] * Tron_ has joined #silverstripe
39: [06:40:28] * micmania1 has joined #silverstripe
40: [06:42:10] * micmania1 quit (Client Quit)
41: [06:43:22] <Tron_> Hey guys, I am trying to convert an SSList to Json and I swear it was working before. any reason why it would stop? here is the code http://pastebin.com/kxqwRgXY
42: [06:47:14] * Isaac quit (Ping timeout: 260 seconds)
43: [06:52:56] * micmania1 has joined #silverstripe
44: [06:53:09] * micmania1 quit (Client Quit)
45: [06:53:34] <Firesphere> I think you might want to do a Convert::obj2array($list);
46: [06:53:43] <Firesphere> Or $list->toNestedArray()
47: [06:54:56] * spronk has joined #silverstripe
48: [07:24:01] * Audlex quit ()
49: [07:38:14] * Eliseth has joined #silverstripe
50: [07:56:03] * spronk quit (Quit: I may need a longer sleep timer...)
51: [07:57:20] <Tron_> Thanks firesphere, but I figured our my problem, needed to set canView to true
52: [07:57:30] <Firesphere> Ahhhh :D
53: [07:57:37] <Firesphere> Yep, that helps :D
54: [07:57:44] <Tron_> Haha sure does
55: [07:58:20] <Tron_> those small ones are annoying some times, make you pull your hair out for 10 mins
56: [07:59:51] * samsamek has joined #silverstripe
57: [08:07:35] * wmk has joined #silverstripe
58: [08:15:34] * Tron_ quit (Quit: Page closed)
59: [08:16:56] * howardgrigg quit (Remote host closed the connection)
60: [08:17:43] * howardgrigg has joined #silverstripe
61: [08:26:21] <wmk> cool, https://packagist.org/packages/silverstripe/framework#4.0.0-alpha4 is out
62: [08:31:14] * jonas_ has joined #silverstripe
63: [08:31:14] <ss-helper> jonas_: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
64: [08:31:36] * jonas_ is now known as Guest22596
65: [08:35:16] * Nightjar quit (Read error: Connection reset by peer)
66: [08:35:57] * Nightjar has joined #silverstripe
67: [08:42:45] * Guest22596 quit (Ping timeout: 260 seconds)
68: [08:53:54] * filisko has joined #silverstripe
69: [09:02:46] * janneklouman-- has joined #silverstripe
70: [09:03:36] * kinglozzer has joined #silverstripe
71: [09:04:23] * deschebbs has joined #silverstripe
72: [09:05:01] * deschebbs quit (Client Quit)
73: [09:05:38] * howardgrigg quit (Remote host closed the connection)
74: [09:05:45] * howardgrigg has joined #silverstripe
75: [09:07:38] * janneklouman-- quit (Ping timeout: 258 seconds)
76: [09:14:13] * janneklouman-- has joined #silverstripe
77: [09:21:00] * Sentro has joined #silverstripe
78: [09:26:13] * Sentro has left #silverstripe
79: [09:39:56] * janneklouman-- quit (Read error: Connection reset by peer)
80: [09:44:56] * janneklouman-- has joined #silverstripe
81: [09:50:08] * agent44 has joined #silverstripe
82: [10:00:23] * deschebbs has joined #silverstripe
83: [10:01:07] * samsamek quit (Quit: samsamek)
84: [10:21:43] * NETim_ has joined #silverstripe
85: [10:22:19] <NETim_> Morning. How can I filter a datalist based on a many_many relation?
86: [10:30:41] <kinglozzer> NETim_: Got an example?
87: [10:31:15] <kinglozzer> It might be easier to come at it kinda backwards, e.g. if you're trying to get all members in a group you could do Group::get()->byID(1)->relation('Members')
88: [10:31:32] <NETim_> An event has many locations (many_many) trying to filter events by locations.
89: [10:31:32] <kinglozzer> I think Member::get()->filter('Groups.ID', 1) might work
90: [10:31:34] <kinglozzer> Not sure
91: [10:31:43] <NETim_> But there are a couple of other many_many items to filter on.
92: [10:31:49] <kinglozzer> That's fine
93: [10:32:01] <kinglozzer> I'd do Location::get()->filter('ID', $ids)->relation('Events');
94: [10:32:11] <kinglozzer> Oh, other many_many relations?
95: [10:32:17] <NETim_> How would that feed into the additional relations?
96: [10:32:24] <wmk> NETim_, http://silverstrip.es/blog/tag/many-many
97: [10:32:31] <NETim_> yes. there are 3.
98: [10:32:43] <kinglozzer> ^^
99: [10:34:02] <NETim_> Ok. that might just work.
100: [10:34:04] <NETim_> Thanks.
101: [10:36:46] <NETim_> That seems to have done it. Thanks.#
102: [10:37:44] * howardgrigg quit (Remote host closed the connection)
103: [10:38:22] * howardgrigg has joined #silverstripe
104: [10:59:00] * agent44 quit (Quit: zzz)
105: [11:00:45] * agent44 has joined #silverstripe
106: [11:03:23] * DimiStripe has joined #silverstripe
107: [11:20:15] * filisko quit (Ping timeout: 256 seconds)
108: [11:33:10] * filisko has joined #silverstripe
109: [11:45:50] * deschebbs quit (Ping timeout: 252 seconds)
110: [11:51:22] * tester_ has joined #silverstripe
111: [11:51:37] <tester_> hi, how can I use modal login in ss
112: [12:15:05] <wmk> tester_, depends... there is no modal out of the box, but i've seen some bootstrap modals containing the login form.
113: [12:16:16] <wmk> it's just a form, so put it in a modal and be sure to use the right endpoint
114: [12:19:51] <tester_> I am using that in a modal i.e $Form, $LoginForm but its not working sending me to a page not found error
115: [12:20:08] <wmk> !paste tester_
116: [12:20:08] <ss-helper> tester_: 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.
117: [12:21:47] <tester_> ok sure
118: [12:22:45] <wmk> always hard to guess without some code ;)
119: [12:31:23] <tester_> here is the code http://www.sspaste.com/paste/show/587e0e8bc5d7e
120: [12:32:58] * samsamek has joined #silverstripe
121: [12:34:09] <wmk> tester_, so you ahve the LoginForm already in the modal.
122: [12:34:16] <wmk> where does it send the data to?
123: [12:34:20] <wmk> what SS version are you on?
124: [12:36:40] <tester_> 3.5.0
125: [12:37:52] <wmk> and where does the form send the data to?
126: [12:38:13] <wmk> what path?
127: [12:38:54] <tester_> actually it does logs me in, but any user a/c doesn't match then it sends me to page not found
128: [12:39:50] <wmk> ah, so the redirect to the loginform doesn't work.
129: [12:42:51] <tester_> maybe, it works fine if user exists
130: [12:43:11] <wmk> again: what url is giving you the 404?
131: [12:45:38] <tester_> http://localhost/dyam//sign-up/login#MemberLoginForm_LoginForm_tab
132: [12:45:49] <tester_> on my local server
133: [12:45:55] <wmk> yup
134: [12:46:12] <wmk> that's generated in MemberLoginForm::doLogion()
135: [12:46:32] <wmk> what controller is responsible for /sign-up/ ? Is that a page?
136: [12:46:38] <tester_> yes
137: [12:46:45] <wmk> what type of page?
138: [12:47:40] <tester_> same thing is happeing if I login from any page http://localhost/dyam/home/login#MemberLoginForm_LoginForm_tab
139: [12:47:46] <tester_> on homepage
140: [12:48:11] <wmk> so the action "login" doesn't work, cause it's not in allowed_actions
141: [12:48:16] <wmk> two possible solutions:
142: [12:48:27] <wmk> - allow action "login" in your Page_Controller
143: [12:48:41] <wmk> - return something useful in Link('login')
144: [12:49:47] <wmk> See https://github.com/silverstripe/silverstripe-framework/blob/3.5/security/MemberLoginForm.php#L178
145: [12:51:47] <wmk> normally it should redirect to "Security/login"
146: [12:51:56] <wmk> this should work
147: [12:52:44] <wmk> So in your Page_Controller you can overwrite Link($action=null) and check if $action == 'login', return either a link to Security/login or Parent::Link($action)
148: [12:55:22] <tester_> now the error is removed but how can I show error in modal if user/pass is wrong
149: [12:55:31] <tester_> thanks so far
150: [13:05:15] <wmk> tester_, i guess that'd require either an iframe or some ajax magic
151: [13:05:57] <tester_> ok I got it thanks
152: [13:06:34] * agent44 quit (Quit: zzz)
153: [13:09:27] * agent44 has joined #silverstripe
154: [13:14:55] * agent44 quit (Ping timeout: 255 seconds)
155: [13:23:15] * UndefinedOffset has joined #silverstripe
156: [13:24:03] * agent44 has joined #silverstripe
157: [13:34:43] * filisko quit (Ping timeout: 255 seconds)
158: [13:45:46] * agent44 quit (Quit: zzz)
159: [13:49:08] * agent44 has joined #silverstripe
160: [13:49:56] * filisko has joined #silverstripe
161: [13:58:19] * muskie9 has joined #silverstripe
162: [14:04:48] * filisko quit (Ping timeout: 245 seconds)
163: [14:06:23] * saiyan quit (Quit: BYE)
164: [14:10:19] * saiyan has joined #silverstripe
165: [14:10:38] * saiyan quit (Client Quit)
166: [14:11:19] * saiyan has joined #silverstripe
167: [14:13:49] * saiyan quit (Client Quit)
168: [14:20:14] * filisko has joined #silverstripe
169: [14:22:06] * saiyan has joined #silverstripe
170: [14:24:07] * saiyan quit (Client Quit)
171: [14:24:42] * saiyan has joined #silverstripe
172: [14:26:01] * wmk quit (Ping timeout: 255 seconds)
173: [14:29:39] * saiyan quit (Quit: BYE)
174: [14:30:13] * saiyan has joined #silverstripe
175: [14:34:44] * saiyan quit (Client Quit)
176: [14:35:20] * saiyan has joined #silverstripe
177: [14:35:20] * saiyan quit (Client Quit)
178: [14:35:53] * saiyan has joined #silverstripe
179: [14:38:46] * saiyan quit (Client Quit)
180: [14:39:20] * saiyan has joined #silverstripe
181: [14:41:03] * saiyan quit (Client Quit)
182: [14:41:40] * saiyan has joined #silverstripe
183: [14:44:29] * saiyan quit (Client Quit)
184: [14:45:03] * saiyan has joined #silverstripe
185: [14:50:29] * saiyan quit (Quit: BYE)
186: [14:51:14] * saiyan has joined #silverstripe
187: [14:52:15] * saiyan quit (Client Quit)
188: [14:52:51] * saiyan has joined #silverstripe
189: [14:53:49] * Eliseth quit (Quit: Textual IRC Client: www.textualapp.com)
190: [15:15:14] * NETim_ quit (Ping timeout: 258 seconds)
191: [15:18:40] * muskie9 quit (Ping timeout: 240 seconds)
192: [15:23:07] * samsamek quit (Quit: samsamek)
193: [15:26:29] * deschebbs has joined #silverstripe
194: [16:06:29] * samsamek has joined #silverstripe
195: [17:03:59] * samsamek quit (Quit: samsamek)
196: [17:07:38] * NETim has joined #silverstripe
197: [17:08:04] <NETim> morning, any way to get the ID/Pos of the next item in a loop in the template?
198: [17:12:41] <kinglozzer> NETim: You can do that with $Pos(2)
199: [17:12:41] <kinglozzer> ID is more difficult
200: [17:12:53] <kinglozzer> $Pos(1) is the default - as it starts at 1
201: [17:13:16] <NETim> so $Pos(2) will return the position of the next item in the list?
202: [17:13:21] <kinglozzer> Yep
203: [17:13:25] <NETim> cool. thanks.
204: [17:14:02] <kinglozzer> NETim: Note that if you have 5 items, and call $Pos(2) on the 5th (last) one, it'll say "6"
205: [17:14:08] <kinglozzer> Even though a 6th item doesn't exist
206: [17:14:13] <kinglozzer> Just a heads up
207: [17:14:15] <NETim> That's fine in this instance.
208: [17:14:20] <kinglozzer> Cool
209: [17:14:24] <NETim> It's only for anchors.
210: [17:20:10] * filisko quit (Ping timeout: 240 seconds)
211: [17:21:57] * filisko has joined #silverstripe
212: [17:24:44] * samsamek has joined #silverstripe
213: [17:28:01] * kinglozzer quit ()
214: [17:35:01] * filisko quit (Ping timeout: 255 seconds)
215: [17:38:40] * NETim quit (Ping timeout: 240 seconds)
216: [17:49:48] * filisko has joined #silverstripe
217: [17:52:24] * filisko quit (Excess Flood)
218: [17:52:51] * filisko has joined #silverstripe
219: [17:59:17] * filisko quit (Ping timeout: 240 seconds)
220: [17:59:50] * tester_ quit (Ping timeout: 260 seconds)
221: [18:02:54] * agent44 quit (Quit: zzz)
222: [18:11:48] * filisko has joined #silverstripe
223: [18:18:50] * Phlunk3 quit (Remote host closed the connection)
224: [18:25:33] * samsamek quit (Quit: samsamek)
225: [18:30:09] * wmk has joined #silverstripe
226: [18:33:01] * filisko quit (Ping timeout: 258 seconds)
227: [18:35:13] * janneklouman-- quit (Ping timeout: 245 seconds)
228: [18:41:23] * filisko has joined #silverstripe
229: [18:47:11] * deschebbs quit (Quit: Konversation terminated!)
230: [18:50:40] * samsamek has joined #silverstripe
231: [19:03:40] * gelignite has joined #silverstripe
232: [19:09:22] * _Nasir has joined #silverstripe
233: [19:09:23] <ss-helper> _Nasir: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
234: [19:09:50] <_Nasir> Can anyone shed some light on a (most likely) stupid PHP issue?
235: [19:10:55] <_Nasir> https://thepasteb.in/p/Elh1V8wyV0Etm
236: [19:11:35] <_Nasir> This function doesn't seem to work. However, if I just filter a single variable, it works.
237: [19:21:39] <wmk> _Nasir, which ss version are you on?
238: [19:26:30] <cloph> why put the sort first? (no idea whether it matters, but seems awkward to me, also no idea whether it *has* to be sort('LastEdited', 'DESC') in other words two parameters
239: [19:26:52] <wmk> it should work from the code, try to debug it
240: [19:27:02] <wmk> cloph, normally two params, yes.
241: [19:27:21] <cloph> (besides the example being redundant, partial match on "Words" already matches "More Words" :-P
242: [19:27:42] <wmk> though it's valid with one param, see http://api.silverstripe.org/3.5/source-class-DataList.html#283-353
243: [19:29:02] <wmk> _Nasir, as $file should be a DataList, try $file->sql() to see the generated sql. also it runs the sql only when you need it...
244: [19:29:29] <wmk> see http://api.silverstripe.org/3.5/class-DataList.html#_sql
245: [19:29:31] <cloph> also "does not seem to work" is very vague.
246: [19:29:47] <wmk> quasi en-vague
247: [19:29:51] <wmk> *duck*
248: [19:29:52] <cloph> so maybe the query works jsust fine, just wherever you use the result doesn't cope properly
249: [19:31:44] <cloph> full circle to duck-debugging - haha :-)
250: [19:32:03] * janneklouman-- has joined #silverstripe
251: [19:36:04] <wmk> sorry, i ran out of nails cloph https://speakerdeck.com/wernerkrauss/debug-silverstripe-like-a-pro#5
252: [19:36:31] * janneklouman-- quit (Ping timeout: 255 seconds)
253: [19:54:05] * newbee has joined #silverstripe
254: [19:54:42] <newbee> hello, I am using ss newsletter plugin but when I try to add a newsletter item I get this error
255: [19:54:43] <newbee> Fatal error: Call to a member function setTitle() on a non-object in /var/www/html/dyam/newsletter/code/form/gridfield/NewsletterGridFieldDetailForm.php on line 26
256: [19:54:56] <newbee> is this module bug free
257: [19:55:08] <wmk> define bugfree...
258: [19:55:48] <wmk> Could be it's not 100% compatible with latest SS, could be you just missed to set it up correctly. Did you add a mailing list yet?
259: [19:56:21] * howardgrigg quit (Remote host closed the connection)
260: [19:56:28] * howardgrigg has joined #silverstripe
261: [19:57:05] <newbee> yes I have
262: [19:57:17] <newbee> I am using latest ss
263: [19:58:07] <samsamek> Is there a way to set a css requirement to leftandmain in a config.php file?
264: [20:00:03] <wmk> newbee, hard to tell...
265: [20:00:06] <wmk> !debug newbee
266: [20:00:06] <ss-helper> newbee: Maybe it's time to start xdebug and see whats going on... check out http://docs.silverstripe.org/en/developer_guides/debugging/ and http://xdebug.org/docs/
267: [20:00:10] * adrexia quit (Quit: My Mac has gone to sleep. ZZZzzz…)
268: [20:01:12] <wmk> samsamek, why in php? is yml also an option? See http://www.silverstrip.es/blog/silverstripe-3-2-clean-up-the-cms/
269: [20:02:02] <samsamek> wmk: the thing is, it’s inside a mod folder, and the path name holds a constant MYMOD_DIR
270: [20:02:15] <samsamek> I can’t place that constant in yml
271: [20:02:24] * UndefinedOffset quit (Quit: Leaving.)
272: [20:02:33] <wmk> Config::inst()->get()->update....
273: [20:02:38] <wmk> so update config in php manually
274: [20:03:20] <wmk> though - if the dir constant isn't changed ...
275: [20:03:44] * micmania1 has joined #silverstripe
276: [20:04:18] <samsamek> how would I do that? ->update is to change class property values right? but when I want to include a css file I need to place that in the init() method
277: [20:06:13] <samsamek> I guess I’ll have to create another leftandmain extension, bit cumbersome for just a single css file include
278: [20:06:54] <wmk> well..
279: [20:07:50] <newbee> thanks I sorted it out i.e newsleller issue
280: [20:08:08] <wmk> samsamek, but... does that constant ever change?
281: [20:08:28] <newbee> I have a question how can I use newsletter form at footer of the site not on a different page
282: [20:08:32] <samsamek> no, it’s always the same and points to the current mod dir
283: [20:08:55] <wmk> samsamek, why not hardcode that mod dir in yml?
284: [20:09:09] * adrexia has joined #silverstripe
285: [20:09:15] <samsamek> wmk: interesting, is that possible?
286: [20:09:40] <wmk> well, if the mod dirname never changes
287: [20:09:47] <wmk> the constant never changes
288: [20:09:54] <samsamek> wait, I’ll show you my constant first
289: [20:10:00] <wmk> so you know the dir name, put that name in yml
290: [20:10:32] <samsamek> define('BB_BASE_DIR', rtrim(basename(dirname(__FILE__))))
291: [20:11:05] <samsamek> the dir name CAN change, the constant just fetches the dir name so inside the mod I can point to mod files like: BB_BASE_DIR . ‘/js/somescript.js
292: [20:11:36] <wmk> so you have multiple modules and in each you want to add some css to leftandmain?
293: [20:11:43] <samsamek> this makes it possible to point to files regardless of the mod dir name
294: [20:12:20] <samsamek> well, not in each one but multiple yes.
295: [20:13:40] <wmk> config::inst()->get()->update() will merge the new value to existing config according to the docblocs
296: [20:14:15] <samsamek> LeftAndMain:
297: [20:14:16] <samsamek> extra_requirements_css:
298: [20:14:17] <samsamek> mymodname/css/style.css
299: [20:14:23] <wmk> http://api.silverstripe.org/3.5/class-Config.html#_update
300: [20:14:38] <samsamek> this does exactly what I want, the only problem is, the mod dir name can be changed by developer
301: [20:14:40] <wmk> yup. or hardcoded yml when modname never changes
302: [20:14:58] <wmk> then developer has to change f**** config also
303: [20:15:00] <samsamek> thanks for thinking with me
304: [20:15:05] <wmk> never rename a running module
305: [20:15:07] <wmk> *cough*
306: [20:15:20] <wmk> if he copy/pastes for a new module he has to search/replace the name manually
307: [20:15:48] <samsamek> sounds like a bad idea yeah
308: [20:15:49] * janneklouman-- has joined #silverstripe
309: [20:16:59] <wmk> well, you could make a module generator that includes all information ;) but renaming a module (without search/replace for paths) sounds like a real bad idea
310: [20:17:27] * filisko quit (Ping timeout: 240 seconds)
311: [20:17:43] <samsamek> since I dont use composer, I name my module dirs however I like
312: [20:17:49] <samsamek> can be dangerous
313: [20:18:18] <wmk> you want to live on the edge
314: [20:18:40] * wmk cannot imagine not using composer anymore
315: [20:19:07] <wmk> how do you update? how do you ensure you (or your devs) don't modify core's or module's code
316: [20:19:45] <samsamek> I override the old folder with the updated respository folder lol
317: [20:19:57] <wmk> sounds like work
318: [20:20:01] <samsamek> I just upgraded my server to cloudlinux which comes with composer so I’m making the switch soon
319: [20:20:03] <samsamek> it is..
320: [20:20:19] * janneklouman-- quit (Ping timeout: 260 seconds)
321: [20:23:16] * filisko has joined #silverstripe
322: [20:27:46] <wmk> you can install composer on any linux, osx or windows
323: [20:35:24] * filisko quit (Ping timeout: 248 seconds)
324: [20:36:34] * janneklouman-- has joined #silverstripe
325: [20:39:05] <_Nasir> Sorry WMK, I left for lunch. I ultimately removed the sort function and it worked. So, I guess it was just that.
326: [20:40:50] * newbee quit (Ping timeout: 260 seconds)
327: [20:41:16] * janneklouman-- quit (Ping timeout: 256 seconds)
328: [20:43:32] <wmk> well, if you need it sorted you can still use ->sort(['columnname', 'DESC')
329: [20:43:46] <wmk> normally i put it after filter, but the order should not matter
330: [20:43:47] * filisko has joined #silverstripe
331: [20:44:37] <_Nasir> yeah, I have the sorting done in the template also
332: [20:44:47] <_Nasir> so it was completely redundant anyhow.
333: [20:45:52] <_Nasir> So in that example I have a filter that searches for 2 results, can I have a filter that has to match 2 terms?
334: [20:45:53] <wmk> you might use $default_sort on the model, so you don't have to call it all the time in getters or templates
335: [20:46:19] <_Nasir> say it returns only dataojects with 2 specific tags.
336: [20:46:42] <wmk> _Nasir, ->filter([]) => AND ->filterAny() => OR
337: [20:47:05] <_Nasir> ahh, excellent
338: [20:48:07] * trash_ has joined #silverstripe
339: [20:50:47] <wmk> ->filter(['Content:PartialMatch' => ['Word1', 'Anotherword']])
340: [20:50:53] <wmk> _Nasir, ^^
341: [20:51:55] <wmk> oops... according to docs this would be like Content in ('Word1', 'AnotherWord') (plus partialmatch)..
342: [20:53:16] <wmk> basically https://docs.silverstripe.org/en/3.4/developer_guides/model/data_model_and_orm/#filtering-results should get you started
343: [21:09:05] * filisko quit (Ping timeout: 240 seconds)
344: [21:14:36] * spronk has joined #silverstripe
345: [21:14:49] * filisko has joined #silverstripe
346: [21:18:11] <Nightjar> newbee :( The newsletter module is not fit for purpose at all D:
347: [21:18:28] <spronk> just like most of the modules!
348: [21:18:29] <spronk> wait
349: [21:18:31] <spronk> i didn't say that
350: [21:19:27] <Nightjar> :P
351: [21:21:46] * UndefinedOffset has joined #silverstripe
352: [21:25:55] * filisko quit (Ping timeout: 255 seconds)
353: [21:26:04] <spronk> Lines: 93.28% (333/357)
354: [21:26:05] <spronk> FUCK
355: [21:26:12] <spronk> where is my 6.72%
356: [21:33:24] <spronk> Lines: 94.12% (336/357)
357: [21:33:24] <spronk> hmm
358: [21:33:27] <spronk> that was some of it
359: [21:33:31] <spronk> #chasing100
360: [21:34:38] * UndefinedOffset quit (Read error: Connection reset by peer)
361: [21:37:30] * wmk quit (Ping timeout: 240 seconds)
362: [21:41:43] * filisko has joined #silverstripe
363: [21:41:54] <_Nasir> so this filter is giving me result for word1 and word2
364: [21:42:03] <_Nasir> like it's searching for an OR
365: [21:44:15] <_Nasir> got it working.
366: [22:03:46] * UndefinedOffset has joined #silverstripe
367: [22:11:09] * UndefinedOffset quit (Quit: Leaving.)
368: [22:15:32] * samsamek quit (Quit: samsamek)
369: [22:19:21] * DanaeNZ has joined #silverstripe
370: [22:20:28] * samsamek has joined #silverstripe
371: [22:21:39] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
372: [22:52:31] * samsamek quit (Quit: samsamek)
373: [23:00:01] * ss-helper quit (Remote host closed the connection)
374: [23:00:16] * ss-helper has joined #silverstripe
375: [23:04:53] * janneklouman-- has joined #silverstripe
376: [23:13:55] * janneklouman-- quit (Read error: Connection reset by peer)
377: [23:19:42] * janneklouman-- has joined #silverstripe
378: [23:36:24] * howardgrigg quit (Remote host closed the connection)
379: [23:36:51] * howardgrigg has joined #silverstripe
380: [23:53:48] * filisko quit (Ping timeout: 248 seconds)

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