#silverstripe IRC Log

IRC log for 19 May 2016

All timestamps are in UTC.

1: [00:00:02] * ss-helper quit (Remote host closed the connection)
2: [00:00:16] * ss-helper has joined #silverstripe
3: [00:01:30] * muskie9__ has joined #silverstripe
4: [00:02:34] * muskie9 quit (Read error: Connection reset by peer)
5: [00:12:11] * muskie9__ quit (Quit: My Mac has gone to sleep. ZZZzzz…)
6: [00:19:17] <Hailwood> Hey Exor Try ->write() ->publish('Stage', 'Live'); ->flushCache(); (aka don't do writeToStage()) that seems to work for us
7: [00:21:24] * muskie9 has joined #silverstripe
8: [00:22:42] * Exor quit (Ping timeout: 250 seconds)
9: [00:53:03] * micmania1 quit (Quit: micmania1)
10: [00:59:00] * micmania1 has joined #silverstripe
11: [01:00:09] <ss-helper> $many_many relation in summary fields - http://stackoverflow.com/questions/37312259/many-many-relation-in-summary-fields
12: [01:10:11] <Stomach> why did I use solr
13: [01:10:12] <Stomach> >_<
14: [01:13:57] <Audlex> would anyone be able to tell me how to set content in a userform?
15: [01:19:37] * cheddam quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
16: [01:31:07] * micmania1 quit (Quit: micmania1)
17: [01:32:50] * micmania1 has joined #silverstripe
18: [01:45:14] * cheddam has joined #silverstripe
19: [01:49:21] <Firesphere> Audlex: What exactly do you mean
20: [01:49:25] <Firesphere> ?
21: [02:01:08] <irogue> Stomach: you wanted pain
22: [02:01:16] <Stomach> no I didn't >_<
23: [02:01:34] <Stomach> I honestly thought "this will make everyones lives easier"
24: [02:24:12] <micmania1> Stomach: you were wrong.
25: [02:24:25] * Stomach quit (Quit: zzz)
26: [02:24:44] <micmania1> rage quit. I’m definitely taking credit for that.
27: [02:36:18] * Stomach has joined #silverstripe
28: [02:37:02] * Exor has joined #silverstripe
29: [02:39:43] <Stomach> micmania1 :D
30: [02:50:42] * Hailwood quit (Remote host closed the connection)
31: [04:35:58] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
32: [04:36:05] * slievr_ quit (Ping timeout: 260 seconds)
33: [04:40:45] * glenn-bautista has joined #silverstripe
34: [04:40:47] * spronk quit (Quit: I may need a longer sleep timer...)
35: [04:45:33] * Stomach quit (Quit: zzz)
36: [04:51:19] * Stomach has joined #silverstripe
37: [05:13:02] * Exor quit (Ping timeout: 250 seconds)
38: [05:15:34] * Stomach quit (Ping timeout: 240 seconds)
39: [05:47:51] * glenn-bautista quit (Quit: Leaving.)
40: [05:49:46] * lerni has joined #silverstripe
41: [06:01:30] <Firesphere> Hello world.
42: [06:01:58] <irogue> kia ora
43: [06:04:28] * adrexia quit (Quit: My Mac has gone to sleep. ZZZzzz…)
44: [06:08:19] * Mike123 has joined #silverstripe
45: [06:24:33] * cheddam quit (Ping timeout: 240 seconds)
46: [06:26:32] * marvanni has joined #silverstripe
47: [06:27:18] * micmania1 quit (Quit: micmania1)
48: [06:44:07] <wmk> hi Firesphere
49: [06:50:42] * marvanni quit (Quit: marvanni)
50: [07:08:01] * arnhoe has joined #silverstripe
51: [07:36:00] <Audlex> why wouldn't this work? <% if ClassName != HomePage || URLSegment != appointments %>
52: [07:36:05] <Audlex> they work individually
53: [07:42:39] * cheddam has joined #silverstripe
54: [07:47:06] <wmk> why do siteconfig extensions always make problems?
55: [07:47:27] <wmk> after upgrading a project from git i want to run dev/build/flush
56: [07:47:36] <wmk> Unknown Column ...
57: [07:48:06] <wmk> Audlex, did you try brackets? It _might_ work maybe
58: [07:48:35] <wmk> <% if ($ClassName != "HomePage") || ($URLSegment != 'appointments') %>
59: [07:48:55] <wmk> but i'd make a helper method in PHP.... more flexible
60: [07:49:19] * marvanni has joined #silverstripe
61: [07:56:03] * kinglozzer has joined #silverstripe
62: [07:57:47] * Agilix_ has joined #silverstripe
63: [07:59:04] <Agilix_> Mornin o/
64: [08:05:47] <irogue> wmk: I don't usually have it with SiteConfig, but extending SiteTree is a recipe for /dev/build nightmares
65: [08:06:22] <wmk> irogue, well, it was a crappy module injecting into every controller
66: [08:06:27] <wmk> self made :(
67: [08:06:35] <wmk> just fixed it.
68: [08:07:11] * slievr_ has joined #silverstripe
69: [08:26:00] * zippy has joined #silverstripe
70: [08:26:03] <zippy> an r1 already?..
71: [08:26:20] <wmk> alpha afaik
72: [08:27:54] <zippy> https://packagist.org/feeds/package.silverstripe/framework.rss
73: [08:28:56] <zippy> 3.4 rc1 hahaha
74: [08:29:05] <zippy> man I jumped the gun :)
75: [08:29:17] <zippy> I thought it was crazy to have a 4.0 rc1 already
76: [08:33:15] * zippy quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
77: [08:43:10] * agent44 has joined #silverstripe
78: [08:53:11] * Eliseth has joined #silverstripe
79: [08:57:27] <Eliseth> Goodmorning!
80: [08:57:52] * r3v3rb has joined #silverstripe
81: [08:58:00] * irogue quit (Quit: Textual IRC Client: www.textualapp.com)
82: [08:58:33] <Eliseth> Weird stuff: When I do dev/build through the CLI my HomePage tables gets deleted... When i do /dev/build in a browser they get recreated...
83: [08:59:41] <marvanni> using mamp?
84: [09:00:05] <Eliseth> Nope, production environment
85: [09:00:11] <marvanni> nevermind
86: [09:00:26] <marvanni> you probably have to rfm -rf your cli cache
87: [09:00:58] <marvanni> caching and manifest are different because cli is running as another used then web
88: [09:01:24] <marvanni> https://github.com/silverstripe/silverstripe-framework/issues/5550
89: [09:01:59] <Eliseth> Hmm
90: [09:03:06] <Audlex> thanx wmk, i just added an else_if
91: [09:03:41] <Eliseth> Is this new behaviour? Haven't seen it occur in the past.
92: [09:03:56] <marvanni> for a while
93: [09:07:09] <wmk> Eliseth, i always run in cli as webserver user
94: [09:07:13] <wmk> sudo su - www-data
95: [09:07:15] <wmk> e.g.
96: [09:07:23] <wmk> so i'm the same user -> the same manifest etc...
97: [09:07:31] <Eliseth> That's what we do
98: [09:09:33] * marvanni quit (Ping timeout: 246 seconds)
99: [09:10:16] * marvanni has joined #silverstripe
100: [09:19:38] * zippy has joined #silverstripe
101: [09:20:22] <marvanni> and cli uses the same php version as the webserver?
102: [09:21:48] <Eliseth> Hm, yes, but there must be some inconsistency somewhere... Looking into the remove-cache thingy atm
103: [09:27:23] <wmk> it _could_ be that the manifest checks if it's cli or webserver...
104: [09:27:48] <wmk> if there are two cache folders in /tmp/ or silverstripe-cache/
105: [09:44:26] * Agent47 has joined #silverstripe
106: [09:44:45] * zippy quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
107: [09:47:23] <Agilix_> Can you do a get()->find() with multiple params? Array() does not seem to work (I get warnings) and so far internet is not turning up an answer :) :p
108: [09:49:06] <wmk> !paste Agilix_
109: [09:49:06] <ss-helper> Agilix_: 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.
110: [09:49:20] <wmk> Agilix_, ->filter() ??
111: [09:49:51] <Agilix_> but won't that return multiple?
112: [09:51:02] <wmk> filter()->first()
113: [09:51:08] <wmk> is there a find() method?
114: [09:51:12] <Agilix_> wmk: http://kopy.io/BWKeA
115: [09:51:14] <Agilix_> ah true
116: [09:52:02] <wmk> well, it's basically a shortcut for filter->first http://api.silverstripe.org/3.3/source-class-DataList.html#832-841
117: [09:52:13] <wmk> maybe that's why i don't use it
118: [09:52:22] * CodeTrap has joined #silverstripe
119: [09:54:48] <Agilix_> wmk: i see :p I'll use the filter one then
120: [09:56:37] * r3v3rb has joined #silverstripe
121: [09:56:46] * zippy has joined #silverstripe
122: [09:56:47] <r3v3rb> ugh, there is always something!
123: [09:57:21] <r3v3rb> how can I get the normal leftandmain js to load after my own? to ensure the version of jQuery I need to use is already loaded?
124: [09:57:59] <r3v3rb> i’ve tried Requirements::set_force_js_to_bottom(true); but it doesn’t affect the order only the position
125: [10:03:10] <wmk> r3v3rb, the order is hard to tell... you can hook in LeftAndMain controller onAfterInit() theoretically...
126: [10:03:38] <r3v3rb> actualy its because I need jquery2 and clean doesn’t exist :(
127: [10:03:46] <r3v3rb> time to dig deeper
128: [10:03:57] <wmk> yup.
129: [10:04:21] <wmk> Requirements::block('jquery1.x') might help you
130: [10:07:12] <r3v3rb> wmk, indeed, however it then stops the ajax save of a dataobject!
131: [10:07:34] <r3v3rb> .clean is used by LaftandMain.js which isn’t present in jQ2
132: [10:07:41] <wmk> aah
133: [10:08:02] <wmk> aren't there some jq1 fixtures for jq2 ?
134: [10:09:39] <r3v3rb> there are where?
135: [10:10:57] <r3v3rb> jquery migrate ;)
136: [10:17:05] <wmk> hooray
137: [10:22:06] * CodeTrap quit (Quit: CodeTrap)
138: [10:39:33] <r3v3rb> nope, doesn’t fix jqueryUI issue :(
139: [10:39:54] <r3v3rb> which stops popup windows working in SS when running the angular app
140: [10:40:04] <r3v3rb> for that dataobject
141: [10:41:32] <Audlex> what is the best way to find a depth of a child? eg it has a parent who has a parent (3 deep)
142: [10:42:23] <Audlex> use a loop to check $this->Parent()?
143: [10:45:56] * cheddam quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
144: [10:47:11] <kinglozzer> Audlex: Yeah I think so
145: [10:49:14] <r3v3rb> kinglozzer: time to switch back to entwine methinks - angular destroys jquery UI and requirements means it wont run under 1.72 which is the base jquery from SS :(
146: [10:49:32] <r3v3rb> time to read lots on entwine - if lots exists for targeting elements and functions
147: [10:50:06] <kinglozzer> Good luck r3v3rb! :P
148: [10:50:34] <r3v3rb> should i even bother with entwine - and just go pure jquery selectors etc
149: [10:57:48] * jeep_ has joined #silverstripe
150: [10:57:48] <ss-helper> jeep_: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
151: [11:05:43] * swaiba has joined #silverstripe
152: [11:09:21] <wmk> r3v3rb, the future of entwine (after 4.x) is unsecure
153: [11:09:37] <r3v3rb> wmk, no chance of moving this app to 4.0 in a hurry
154: [11:09:46] <r3v3rb> react looks horredous
155: [11:09:52] <r3v3rb> horrendous*
156: [11:10:02] <wmk> yes, the first time it's a big wtf...
157: [11:10:05] <r3v3rb> but at least it works I guess!
158: [11:10:10] <kinglozzer> Entwine will definitely still be in 4.x if you do decide to make it compatible
159: [11:10:19] <kinglozzer> But as wmk said, after that is anyone's guess
160: [11:13:04] <zippy> Entwine and react?
161: [11:15:29] * __barry has joined #silverstripe
162: [11:15:29] <ss-helper> __barry: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
163: [11:16:47] <__barry> hello. Is there a template variable for the page type / classname in an Admin template?
164: [11:19:13] <Agilix_> $Dump tends to show that info, amongst others. If that is what you need (e.a. debugging)
165: [11:19:42] <Agilix_> k, I need some thought exchange. We do calls to a third party for actions done by the user. Now One of them is the update of the profile and thus the password. They require the password in md5 (32 length max). So instead of overwritting the default password I was thinking about extending and writing the password away in a seperate field in that format to send. Thoughts?
166: [11:21:24] <r3v3rb> kinglozzer: you’ve used entwine a bit - how can I call a function outside of the entwine onclick http://www.sspaste.com/paste/show/573da19ec7058
167: [11:21:37] <r3v3rb> this.addText doesn’t appear to get called :(
168: [11:21:47] <__barry> its not for debugging, i want to link to an external help file for the page type
169: [11:22:10] <kinglozzer> r3v3rb: Huh? That example you'd just call addText()
170: [11:22:13] <kinglozzer> Not this.addText()
171: [11:22:24] <kinglozzer> Different scope and all that
172: [11:22:34] <r3v3rb> tried that maybe my cache is bolloxed it made no difference
173: [11:22:44] <r3v3rb> or me browser is dying!
174: [11:23:17] <r3v3rb> lets try again after a shutdown of FF
175: [11:24:01] <Agilix_> __barry: so you created new sets of Page types?
176: [11:24:07] <Agilix_> or at least one
177: [11:24:24] <Agilix_> that you can set in the back-end, and there you want to show the link?
178: [11:24:52] <__barry> no, i just need to know if i'm in the admin page for a blog post, a regular page, or a recipe page etc etc
179: [11:25:16] <__barry> so i can link to http://help.example.com/page-type/recipes
180: [11:25:59] <__barry> i'm overriding CMSMain_Content.ss to add a help link up next to the content / settings / history tabs
181: [11:28:48] <Agilix_> but that's not working?
182: [11:29:17] <Agilix_> or you only want it in a certain set of page types?
183: [11:29:29] <Agilix_> (sorry a bit lost due to own question :p )
184: [11:29:43] <__barry> the override works fine, but i don't know how to change the link depending on the page type
185: [11:30:07] <__barry> what i'm looking for is something like $ClassName
186: [11:30:31] <__barry> so i can change the template to he http://help.example.com/page-type/$ClassName
187: [11:31:10] <Agilix_> ah now i see
188: [11:34:12] <Agilix_> __barry: but doesn't $ClassName do just that?
189: [11:34:29] <Agilix_> https://docs.silverstripe.org/en/3.0/topics/page-type-templates/#classname
190: [11:35:25] <__barry> I've tried dumping that into a page, nothing happens
191: [11:35:59] <__barry> i guess that variable is only set in the front end templates, not in the admin area templates
192: [11:36:00] <Agilix_> !flush __barry
193: [11:36:00] <ss-helper> __barry: Have you flushed? Try doing a ?flush=all and /dev/build then see if it's sorted. Do it twice for good measure ;-)
194: [11:36:10] <__barry> no, changes are showing.
195: [11:36:26] <Agilix_> ah I see
196: [11:36:33] <__barry> i'm surrounding debug efforts with ** ** etc.
197: [11:37:37] <Agilix_> It does sound logical as the classname there would be the one that the admin uses and not the one you chose to use in the front-end. If you catch my train of thought
198: [11:37:50] <Agilix_> if admin uses one at all
199: [11:39:01] <Agilix_> wmk: ws it you that showed me the link to extend password? I want to add an extra field to save a third party compliant hashed password
200: [11:40:20] * zippy quit (Quit: Textual IRC Client: www.textualapp.com)
201: [11:41:28] <__barry> yep, i can see it would be different to the front end templates, but it still seems like something i should be able to get at simply
202: [11:50:09] * kinglozzer quit (Remote host closed the connection)
203: [11:55:09] * jeep_ quit (Quit: Page closed)
204: [12:00:25] <ss-helper> Accessing the class name of the page being edited - http://stackoverflow.com/questions/37322431/accessing-the-class-name-of-the-page-being-edited
205: [12:01:39] * UndefinedOffset has joined #silverstripe
206: [12:24:58] * __barry quit (Quit: Page closed)
207: [12:30:26] <ss-helper> Sorting ModelAdmin Columns in related Silverstripe tables - http://stackoverflow.com/questions/37322927/sorting-modeladmin-columns-in-related-silverstripe-tables
208: [12:41:35] <shellbac1pacific> "Export to CSV" in 3.3 for a model admin. Throwing a 400. Looks like it's choking on a CSRF but there isn't one sent in the request
209: [12:42:09] <shellbac1pacific> i'm knee-deep in the debugger - just wondering if anyone has any insight
210: [12:49:43] * kinglozzer has joined #silverstripe
211: [13:01:37] <r3v3rb> arghh, so close. why when passing a value to a function is the value ending up undefined (js) by the way
212: [13:01:59] <r3v3rb> 70% complete on switching app from angular back to entwine kinglozzer
213: [13:04:06] * slievr__ has joined #silverstripe
214: [13:04:24] <kinglozzer> sweet r3v3rb
215: [13:08:44] * slievr_ quit (Ping timeout: 260 seconds)
216: [13:09:02] <r3v3rb> apart from the this.value ending up as undefined on the other side of entering my function at the moment kinglozzer
217: [13:12:12] <wmk> Agilix_ you need your own passwordencryptor
218: [13:12:16] <wmk> no seperate field
219: [13:13:06] <Agilix_> wmk: But I do not want to overwrite the default way of storing the passwords
220: [13:14:54] <wmk> do you just need it for converting from another app?
221: [13:14:56] <kinglozzer> r3v3rb: Paste!
222: [13:15:05] <wmk> !paste r3v3rb kinglozzer
223: [13:15:05] <ss-helper> r3v3rb: 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.
224: [13:15:12] <r3v3rb> kinglozzer: might have too
225: [13:16:14] <r3v3rb> http://www.sspaste.com/paste/show/573dbc9365b39 << king
226: [13:16:26] <r3v3rb> kinglozzer: its not funny - it should just work!
227: [13:16:34] <r3v3rb> all functions get called
228: [13:17:30] <kinglozzer> So... console.log(this.value); ?
229: [13:17:32] <Agilix_> wmk: the used password needs to be encrypted in different format to pass on to third party. md5. But I do not want to lower security login that is standard now
230: [13:17:53] <r3v3rb> this.value is set but when I call the function setFontSize value is undefined
231: [13:18:07] <wmk> So you pass something to a 3rd party so they can log in there now
232: [13:18:19] <wmk> but users manage the password in the current silverstripe installation=?
233: [13:18:34] <kinglozzer> r3v3rb: What happens if you just pass a number hardcoded?
234: [13:19:00] <r3v3rb> lets try kinglozzer
235: [13:19:26] <r3v3rb> yep that works
236: [13:19:30] <r3v3rb> :\
237: [13:19:44] <kinglozzer> So this.value is wrong?
238: [13:19:51] <kinglozzer> this.val() perhaps?
239: [13:20:09] * kinglozzer shrugs
240: [13:20:40] * DarjusIT has joined #silverstripe
241: [13:20:41] <r3v3rb> argh, how frustrating!
242: [13:20:55] <r3v3rb> my brain is having a hard time today
243: [13:21:43] <DarjusIT> Hi all i have question Controller::curr()->redirectBack() how to add get param to if for example "?success" ?
244: [13:23:27] <wmk> DarjusIT, redirectBack: doesn't work. you can do Controller::curr()->redirect($url)
245: [13:23:38] <wmk> and calculate the url beforehand
246: [13:24:03] <wmk> using Controller::join_links()
247: [13:25:56] <DarjusIT> is it possible to get controller link on this Controller::curr()->Link() on something like this because this is in Form.php file and this form is in several pages, I need to redirect to same page after submittion
248: [13:27:45] <marvanni> You feed the controller as first parameter to the form constructer?
249: [13:28:03] <marvanni> $this->controller should be there
250: [13:41:24] <r3v3rb> hmm, whats the doodar to refresh the adminpanel after ajax save in entwine
251: [13:41:36] <r3v3rb> doodar being function :)
252: [13:45:27] <ss-helper> How to define composite primary key in Silverstripe ORM/Dataobject - http://stackoverflow.com/questions/37325001/how-to-define-composite-primary-key-in-silverstripe-orm-dataobject
253: [13:45:28] <ss-helper> Silverstripe: Import Widget-specific CSS on Widget install - http://stackoverflow.com/questions/37324924/silverstripe-import-widget-specific-css-on-widget-install
254: [13:58:34] * wmk quit (Ping timeout: 240 seconds)
255: [14:01:29] * muskie9 has joined #silverstripe
256: [14:02:27] <r3v3rb> one thing about angular is it handles callbacks to the firing inputs nicely updating values etc etc as they go
257: [14:02:30] <r3v3rb> :(
258: [14:03:20] <r3v3rb> \me
259: [14:03:25] <r3v3rb> ./ me
260: [14:03:43] <r3v3rb> /o\
261: [14:03:46] <r3v3rb> |
262: [14:03:50] <r3v3rb> / \
263: [14:04:09] <r3v3rb> covers head and hides under duvet
264: [14:04:13] * Azure quit (Quit: My Mac has gone to sleep. ZZZzzz…)
265: [14:07:16] * Azure has joined #silverstripe
266: [14:40:58] * Agilix_ thinks r3v3rb meant this
267: [14:42:10] <r3v3rb> what :O
268: [14:42:16] * r3v3rb waits
269: [14:42:38] <r3v3rb> ;)
270: [14:42:40] <r3v3rb> Agilix_:
271: [14:43:06] <Agilix_> hehe :p
272: [14:46:09] <swaiba> you alirght r3v3rb?
273: [14:46:39] <r3v3rb> swaiba: having fun backporting an app from angular to entwine for CMS admin ;)
274: [14:46:52] <swaiba> phonegap?
275: [14:58:25] <r3v3rb> kinglozzer: do you know how to fire entwine after a page save in the admin?
276: [14:59:11] <kinglozzer> r3v3rb: I'm pretty sure onmatch fires after a save
277: [14:59:16] <kinglozzer> As the HTML is loaded in again
278: [14:59:19] <r3v3rb> really?
279: [14:59:43] <r3v3rb> why’s it fudging the canvas, but a ‘refresh’ works fine :( same code being called...
280: [14:59:56] <r3v3rb> one for UncleCheese later methinks!
281: [15:04:32] * Mike123 quit (Ping timeout: 250 seconds)
282: [15:08:21] * DarjusIT quit (Quit: Leaving)
283: [15:15:48] * Agent47 quit (Quit: Leaving)
284: [15:19:03] * slievr__ is now known as slievr
285: [15:24:33] * spekulatius quit (Ping timeout: 276 seconds)
286: [15:27:20] * spekulatius has joined #silverstripe
287: [15:29:55] * arnhoe quit ()
288: [15:30:58] * Agilix_ quit (Ping timeout: 250 seconds)
289: [15:45:44] * lerni quit (Remote host closed the connection)
290: [15:53:51] * r3v3rb quit (Quit: r3v3rb)
291: [15:58:22] * Eliseth quit (Ping timeout: 252 seconds)
292: [16:18:40] * kinglozzer quit ()
293: [16:24:26] * swaiba quit (Remote host closed the connection)
294: [16:30:30] <ss-helper> How to avoid data being stored to Page table - http://stackoverflow.com/questions/37328904/how-to-avoid-data-being-stored-to-page-table
295: [16:36:24] * slievr quit (Ping timeout: 260 seconds)
296: [16:56:13] * lerni has joined #silverstripe
297: [17:00:54] * lerni quit (Ping timeout: 260 seconds)
298: [17:46:03] * marvanni quit (Quit: marvanni)
299: [17:50:20] * gelignite has joined #silverstripe
300: [18:26:33] * shellbac1pacific quit (*.net *.split)
301: [18:26:33] * TombL quit (*.net *.split)
302: [18:26:47] * TombL has joined #silverstripe
303: [18:26:55] * shellbackpacific has joined #silverstripe
304: [18:54:57] * agent44 quit (Quit: zzz)
305: [19:08:25] * r3v3rb has joined #silverstripe
306: [19:11:19] <neomang> I built a function to create an arraylist of data from another api, but cant seem to get it to give me one random element
307: [19:11:43] <neomang> $random = $list->sort('RAND()')->limit(1); return $random; should work, right?
308: [19:14:06] * Stomach has joined #silverstripe
309: [19:39:40] * PenguinMan98 has joined #silverstripe
310: [19:59:25] <ss23> Don't you need like
311: [19:59:31] <ss23> ->limit(1)->fetchFirst() or soemthing/
312: [20:01:30] <r3v3rb> neomang, ->first() on the end
313: [20:02:12] <r3v3rb> will return a single item
314: [20:05:31] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
315: [20:07:38] * muskie9 has joined #silverstripe
316: [20:14:22] * r3verb has joined #silverstripe
317: [20:15:33] <ss-helper> Silverstripe 3.2 re-usable blocks - http://stackoverflow.com/questions/34365890/silverstripe-3-2-re-usable-blocks
318: [20:15:36] * r3v3rb quit (Ping timeout: 246 seconds)
319: [20:19:45] * lerni has joined #silverstripe
320: [20:30:57] * lerni quit (Remote host closed the connection)
321: [20:40:37] * muskie9 quit (Quit: My Mac has gone to sleep. ZZZzzz…)
322: [20:42:26] * lerni has joined #silverstripe
323: [20:47:14] * lerni quit (Ping timeout: 260 seconds)
324: [20:53:59] * glenn-bautista has joined #silverstripe
325: [21:00:34] <ss-helper> Re: [silverstripe-dev] Re: Looking for a replacement FIG rep - https://groups.google.com/d/msg/silverstripe-dev/mj5GlYJ2Pco/E77aEujhCQAJ
326: [21:01:16] * lerni has joined #silverstripe
327: [21:01:57] * muskie9 has joined #silverstripe
328: [21:08:42] * UndefinedOffset quit (Quit: Leaving.)
329: [21:09:00] * micmania1 has joined #silverstripe
330: [21:10:04] * marvanni has joined #silverstripe
331: [21:21:20] <r3verb> hi micmania1 any idea why saving a dataobject causes my entwine to lose access to itself
332: [21:22:13] <r3verb> the dataobject saves fine but the onmatch/onchange stop working - refresh the page and everything works as normal again
333: [21:26:24] * marvanni quit (Quit: marvanni)
334: [21:30:05] <micmania1> r3verb: not off the top of my head, sorry
335: [21:31:41] <Stomach> r3verb - are you sure you're matching the right elements and they still exist in the pjax return?
336: [21:31:48] <Stomach> and aren't changed somehow
337: [21:32:21] <r3verb> Stomach, yes everything is identical after the saving... :(
338: [21:32:31] <r3verb> micmania1, no worries
339: [21:32:54] <Stomach> I honestly don't use entwine in complicated enough situations to help sorry :\
340: [21:34:58] <r3verb> not a problem Stomach :D thanks for thinking though
341: [21:40:27] * Exor has joined #silverstripe
342: [21:43:56] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
343: [21:44:40] * Stomach quit (Quit: zzz)
344: [21:48:17] * Stomach has joined #silverstripe
345: [21:56:44] * cheddam has joined #silverstripe
346: [22:00:43] * muskie9 quit (Quit: My Mac has gone to sleep. ZZZzzz…)
347: [22:03:11] * r3verb quit (Quit: Leaving)
348: [22:10:38] * micmania1 quit (Quit: micmania1)
349: [22:12:42] * micmania1 has joined #silverstripe
350: [22:23:13] * muskie9 has joined #silverstripe
351: [22:33:47] * Stomach_ has joined #silverstripe
352: [22:33:51] * muskie9 quit (Quit: My Mac has gone to sleep. ZZZzzz…)
353: [22:35:33] * Stomach quit (Ping timeout: 240 seconds)
354: [22:49:38] * Stomach_ quit (Read error: Connection reset by peer)
355: [22:49:51] * Stomach has joined #silverstripe
356: [23:05:31] * sslearner has joined #silverstripe
357: [23:05:31] <ss-helper> sslearner: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
358: [23:06:34] <sslearner> How to define composite primary key in Silverstripe ORM/Dataobject
359: [23:07:49] <Firesphere> In the $indexes static
360: [23:09:32] <sslearner> @fire I tried private static $indexes = array(type...value...) thing but my modeladmin still accept duplicates
361: [23:10:02] <Firesphere> Look in framework/docs/en/02_Developer_Guides/00_model/12_indexes.md
362: [23:10:28] <Firesphere> (Docs are currently down, as updates are pushed through.
363: [23:12:43] <sslearner> you mean this link https://docs.silverstripe.org/en/3.1/developer_guides/model/indexes/
364: [23:13:44] <Stomach> try https://github.com/silverstripe/silverstripe-framework/blob/master/docs/en/02_Developer_Guides/00_Model/12_Indexes.md
365: [23:14:58] <sslearner> I tried that already, private static $indexes = array( 'MyIndexName' => array( 'type' => 'index', 'value' => '"MyField","MyOtherField"' ) );
366: [23:15:10] <Firesphere> Type should be unique, not index
367: [23:15:30] <sslearner> oh sorry yes I tried unique
368: [23:16:04] <sslearner> then entered the field I want to be unique
369: [23:22:18] <sslearner> is the example incomplete, meaning I need to do something else?
370: [23:29:28] <Firesphere> This works fine: http://sspaste.com/paste/show/573e4c4d0548a
371: [23:29:42] * lerni quit ()
372: [23:29:51] <Firesphere> Do note, the CMS, when entering the data, does not validate if it is correct, until you try to save.
373: [23:30:42] <ss-helper> SilverStripe 3.4.0-rc1 Release Announcement - https://groups.google.com/d/msg/silverstripe-announce/4oav-KYkg8Q/cH5cvaDUCQAJ
374: [23:43:08] <sslearner> Is alpha1 ready for indexes i'm using alpha
375: [23:46:53] <Firesphere> Yes, why shouldn't it?
376: [23:47:10] * robbiea has joined #silverstripe
377: [23:47:48] * spronk has joined #silverstripe
378: [23:47:57] <robbiea> Morning all! I have a QQ regarding adding next/previous page links to a blog page. I want to do this by storing the page IDs in fields on the BlogPost. Should I add NextID/PreviousID as Int DB fields, then define foreign keys?
379: [23:48:38] <sslearner> index not working as per documentation
380: [23:49:01] * spronk quit (Max SendQ exceeded)
381: [23:50:59] <Firesphere> sslearner: They are for me, you must be doing something funky. Can you make a pasty of what you're doing?
382: [23:51:56] <Firesphere> robbiea: Why not just 2 has_one's?
383: [23:53:17] <robbiea> no DB fields required in that case eh Firesphere?
384: [23:53:37] <Firesphere> Well, the framework will generate them for you, and in onBeforeWrite, you could set them
385: [23:54:07] <robbiea> Sounds ideal. Can the Page still have no association, or is it a "must have one" kind of situation?
386: [23:54:16] <Firesphere> Nope, can be null
387: [23:54:20] <robbiea> Ideal.
388: [23:54:22] <robbiea> Thanks

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