#silverstripe IRC Log

IRC log for 16 January 2013

All timestamps are in UTC.

1: [00:01:00] * catcher quit (Quit: Leaving)
2: [00:02:00] <ApacheTiger> If anyone is interested in code hinting Classes in SS you need to do it in the class docblock with @property type name desc
3: [00:29:00] * liam quit (Quit: liam)
4: [00:34:00] * ApacheTiger has left #silverstripe
5: [00:40:00] <travis-ci> [travis-ci] silverstripe/silverstripe-cms#188 (3.0 - 0dd6ded : Ingo Schommer): The build passed.
6: [00:40:00] <Pyromanik> MDN says that vendor prefix for linear gradient is no longer needed since firefox 16
7: [00:40:00] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-cms/compare/cb96255e8072...0dd6dedab2da
8: [00:40:00] <Pyromanik> lolfantastic
9: [00:40:00] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-cms/builds/4176183
10: [00:40:00] * travis-ci has left #silverstripe
11: [00:40:00] * travis-ci has joined #silverstripe
12: [00:41:00] <spronk> pretty sure it worked for me at some stage with ff17../
13: [00:41:00] <Pyromanik> LULZORBEAM
14: [00:41:00] <Pyromanik> have firefox 18, no go.
15: [00:41:00] <spronk> hmm
16: [00:46:00] <spronk> what os?
17: [00:48:00] * SightUnseen has joined #silverstripe
18: [00:50:00] * SightUnseen has left #silverstripe
19: [01:06:00] <Pyromanik> winduhz
20: [01:06:00] <Pyromanik> but it is choosing the vendor prefixed rule over the non-prefixed
21: [01:06:00] <Pyromanik> specifically
22: [01:06:00] <Pyromanik> to be fair I actually haven't tried it in ff18
23: [01:07:00] <Pyromanik> ff17 which I was running this morning wasn't having a bar of the non-prefix.
24: [01:11:00] * liam has joined #silverstripe
25: [01:11:00] <Pyromanik> rugh, breadcrumbs in 3.0
26: [01:11:00] <Pyromanik> where find?
27: [01:15:00] <Pyromanik> oh it's templated, what a glorious surprise!
28: [01:15:00] <Pyromanik> :D
29: [01:19:00] * blindMoe is now known as blindNoob
30: [01:22:00] <spronk> that was my exact reaction
31: [01:22:00] <spronk> haha
32: [01:23:00] <spronk> yay our site is finally on the showcase
33: [01:25:00] * ApacheTiger has joined #silverstripe
34: [01:26:00] <ApacheTiger> I simply have it emailing onAfterWrite and it keeps sending two copies.
35: [01:26:00] <ApacheTiger> is anyone else experiencing a onAfterWrite on a DataObject executing code twice?
36: [01:27:00] <Pyromanik> pretty crap, but mailer is mostly neglected.
37: [01:27:00] <Pyromanik> your setup is returning false from first attempt to mail.
38: [01:27:00] <Pyromanik> probably to do with what it thinks are bung email addresses
39: [01:27:00] <ApacheTiger> ok, how do you fix it?
40: [01:27:00] <Pyromanik> hack core
41: [01:27:00] <ApacheTiger> hmmm
42: [01:27:00] <Pyromanik> yeh
43: [01:27:00] <Pyromanik> ApacheTiger: it's a thing with Mailer.php
44: [01:28:00] <Pyromanik> https://github.com/xeraa/silverstripe-smtp
45: [01:28:00] * BPower has joined #silverstripe
46: [01:28:00] <ApacheTiger> can i use another class like HTML5Mailer if it calls the mail function
47: [01:28:00] <Pyromanik> ApacheTiger: alternatively you could try the SMTP module
48: [01:28:00] <Pyromanik> ApacheTiger: theoretically it's possible to switch out the mail backend, yeah.
49: [01:29:00] <Pyromanik> don't look at it much
50: [01:29:00] <Pyromanik> iirc they're set up as an interface and an implementation
51: [01:29:00] <ApacheTiger> okay thanks
52: [01:29:00] <Pyromanik> not entirely sure
53: [01:30:00] <Pyromanik> no space
54: [01:30:00] <Pyromanik> if you wanna take the shortcut find the line that's something like if(!@mail($to, $from ...) { mail($to, $from ... ); }
55: [01:30:00] <ApacheTiger> I want to bring in the old faithful html5mimemail i'm just afraid that the mail call will screw up because someone decided to name a class after a built in function
56: [01:30:00] <Pyromanik> it's to do with the -f option
57: [01:30:00] <ApacheTiger> i'll look at it, at least i know why now.
58: [01:30:00] <Pyromanik> or something
59: [01:30:00] <Pyromanik> yeah, took irogue forevers to find that out, lol.
60: [01:30:00] <Pyromanik> so cc'd addresses come out as "user@domain.com-f lol"
61: [01:31:00] <BPower> I just noticed that if add a URL via the WYSIWYG URL prompt (CMS) that is a relative path like "/path/to/file.html", it will strip out the first slash to become "path/to/file.html"
62: [01:31:00] <Pyromanik> because <base>
63: [01:31:00] <Pyromanik> it's not an issue, it's a feature.
64: [01:31:00] <BPower> Can someone help me confirm if this is a SS issue or an issue with my own setup?
65: [01:31:00] <Pyromanik> BPower: and?
66: [01:32:00] <Pyromanik> if you're having problems you might have forgotten to put in <% base_tag %>
67: [01:32:00] <BPower> you may be right
68: [01:32:00] <Pyromanik> base confuses me a bit
69: [01:32:00] <Pyromanik> or something
70: [01:32:00] <BPower> lol i'll check the <base> and make sure
71: [01:32:00] <Pyromanik> or I've got it backwards
72: [01:33:00] <Pyromanik> ApacheTiger: did I paste this? I forget. https://github.com/xeraa/silverstripe-smtp
73: [01:33:00] <Pyromanik> BPower: good to know :)
74: [01:33:00] <BPower> You were right the first time.
75: [01:33:00] <Pyromanik> BPower: if you want a relative url to something on the same domain but isn't powered by SS, you'll have to use an absolute URL
76: [01:33:00] <BPower> Thanks a ton Pyromanik -- I completely forgot about <base>
77: [01:33:00] <ApacheTiger> Yes, thank you.
78: [01:33:00] <BPower> <base> does handle that
79: [01:34:00] <Pyromanik> BPower: I've done it a couple of times myself.
80: [01:34:00] <BPower> I almost had a heart attack because I just imported about 300 pages until I realized the "/" was being stripped out.
81: [01:34:00] <Pyromanik> search ninja
82: [01:34:00] <Pyromanik> :P
83: [01:34:00] <Pyromanik> irogue to the rescue!
84: [01:34:00] <Pyromanik> pretty easy to slip by
85: [01:34:00] <irogue> ApacheTiger: http://logs.simon.geek.nz/index.php?date=2012-09-27#11_49_1
86: [01:35:00] <Pyromanik> haha
87: [01:36:00] <Pyromanik> :P
88: [01:36:00] <Pyromanik> yeah nah it's supposed to
89: [01:36:00] <Pyromanik> afaik
90: [01:38:00] <ApacheTiger> what am i reading irogue? that it is a bug and just was never addressed?
91: [01:39:00] <ApacheTiger> 3.0.3
92: [01:39:00] <irogue> ApacheTiger: basically, yes. are you using 2.4 or 3.0?
93: [01:40:00] * irogue checks the code
94: [01:40:00] <irogue> that's a little worrying
95: [01:41:00] <ApacheTiger> if you have an object say emailtemplate that has many emailconditions and i put the trigger in onafterwrite in the emailcondition object could it be being called twice? once on the emailcondition and again on the emailtemplate?
96: [01:42:00] <ApacheTiger> tis in cms
97: [01:43:00] <ApacheTiger> ok
98: [01:43:00] * travis-ci has left #silverstripe
99: [01:43:00] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/sapphire/builds/4176190
100: [01:43:00] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/sapphire/compare/5bd0f0accd03...432ff753c254
101: [01:43:00] <travis-ci> [travis-ci] silverstripe/sapphire#1185 (3.0 - 432ff75 : Ingo Schommer): The build is still failing.
102: [01:43:00] * travis-ci has joined #silverstripe
103: [01:43:00] <ApacheTiger> i will continue
104: [01:43:00] <Pyromanik> ApacheTiger: shouldn't do.
105: [01:43:00] <Pyromanik> they're separate objects, they save as such.
106: [01:44:00] <ApacheTiger> even when the emailcampaign has a separate tab from main that is emailconditions?
107: [01:44:00] <ApacheTiger> let me trace it, thanks
108: [01:46:00] * AlphaCactus quit (Ping timeout: 252 seconds)
109: [01:50:00] <ApacheTiger> This is the issue for sure. I have a DataObject EmailCampaign that has_many DataObject EmailCondition. The CSM is showing a tab on the EmailCampaign to Add/Edit EmailConditions. When I add an EmailCondition it executes onAfterWrite twice. If I put the same code in onAfterWrite in the EmailCampaign it only fires once therefore it is not the Mailer.
110: [01:51:00] <ApacheTiger> copy and paste otherwise
111: [01:51:00] <ApacheTiger> I changed the email content each time to be sure.
112: [01:52:00] <ApacheTiger> I guess I will just have to update the QueuedContacts when the EmailCampaign is saved and not when a new condition is saved.
113: [01:54:00] <irogue> only 'cleans' the $bounceAddress if a couple of conditions are met
114: [01:54:00] <irogue> yep, still buggy
115: [01:54:00] <irogue> https://github.com/silverstripe/sapphire/blob/3.0/email/Mailer.php#L224
116: [01:55:00] * irogue submits a something something
117: [01:55:00] <ApacheTiger> Since email is a prime functionality of web sites this is an issue for me.
118: [01:56:00] <Pyromanik> not a concrete class
119: [01:56:00] <Pyromanik> Mailer should be an interface
120: [01:56:00] <irogue> yeah
121: [01:56:00] <Pyromanik> This is an issue for many I'd imagine, just that most people don't tax the email code so heavily so don't get into is as much
122: [01:56:00] <Pyromanik> as it is
123: [01:57:00] <irogue> a lot of people probably don't use full "Name Name <email@email>"
124: [01:57:00] <Pyromanik> yeah
125: [01:57:00] <Pyromanik> most people don't, you're right.
126: [01:57:00] <irogue> if you just put "email@email" as from address it's fine
127: [01:58:00] * irogue is submitting a pull req
128: [01:58:00] <Pyromanik> still, Mailer should still be an interface
129: [01:58:00] <Pyromanik> it's a seriously neglected part of the system.
130: [01:58:00] <Pyromanik> fix it with Injector!
131: [01:58:00] * Pyromanik confuses himself about dependency injection again
132: [01:59:00] * priithansen quit (Quit: priithansen)
133: [01:59:00] <Pyromanik> ApacheTiger: subclass Email class and redefine send and sendPlain to use htmlMimeMail5
134: [01:59:00] <Pyromanik> which is due soon
135: [01:59:00] <Pyromanik> mark it urgent if you can, it should be pulled in for 3.1
136: [01:59:00] <ApacheTiger> I'm just puling in and using htmlMimeMail5
137: [02:00:00] <Pyromanik> that way you still get all the templating and stuff.
138: [02:00:00] <Pyromanik> probably the best way to get around it
139: [02:00:00] <ApacheTiger> okay thanks
140: [02:00:00] <Pyromanik> (send and sendPlain)
141: [02:00:00] <Pyromanik> subclass Mailer, re-implement the 2 functions in it
142: [02:00:00] <Pyromanik> or better yet
143: [02:01:00] <ApacheTiger> lmao, no wonder the class is so neglected. You don't use it.
144: [02:01:00] <irogue> personally i'm using fullscreeninteractive/silverstripe-postmarkmailer
145: [02:01:00] <Pyromanik> and make THAT use your separate class thing
146: [02:01:00] <irogue> since I use Postmark for outbound email
147: [02:02:00] <Pyromanik> people from SS and core devs do come in from time to time
148: [02:02:00] <FrozenFire> Well, not all of us do develop SS itself
149: [02:02:00] <ApacheTiger> well thanks for your help guys
150: [02:02:00] <Pyromanik> mm
151: [02:02:00] <Pyromanik> :P *
152: [02:02:00] <Pyromanik> LO
153: [02:02:00] <ApacheTiger> i see
154: [02:02:00] <Pyromanik> we develop WITH SS, not devlop SS
155: [02:02:00] <ApacheTiger> ohh
156: [02:02:00] <Pyromanik> haha, none of us here are SS developers.
157: [02:02:00] <FrozenFire> Useless gits, the lot of 'em!
158: [02:03:00] <FrozenFire> Always going on vacation
159: [02:03:00] <Pyromanik> I posted the link before
160: [02:03:00] <ApacheTiger> well when you see them, tell them the email needs some work
161: [02:03:00] <FrozenFire> La dee dah
162: [02:03:00] <Pyromanik> They're running a company.
163: [02:03:00] <Pyromanik> ApacheTiger: it's a known issue.
164: [02:03:00] <Pyromanik> it's more an issue of allocating resources
165: [02:03:00] <FrozenFire> https://github.com/xeraa/silverstripe-smtp
166: [02:03:00] <Pyromanik> yes
167: [02:03:00] <FrozenFire> Heh. There's an SMTP mailing module
168: [02:03:00] <FrozenFire> :P
169: [02:03:00] <Pyromanik> ha, busy gits.
170: [02:04:00] <Pyromanik> nope, sorry
171: [02:04:00] <FrozenFire> Me.
172: [02:04:00] <ApacheTiger> anyone here use the smtp module
173: [02:04:00] <Pyromanik> also as irogue said https://github.com/fullscreeninteractive/silverstripe-postmarkmailer
174: [02:04:00] <Pyromanik> haha
175: [02:04:00] <FrozenFire> It's pretty good
176: [02:04:00] <ApacheTiger> how fast and how much overhead?
177: [02:04:00] <FrozenFire> Just actually was debugging it
178: [02:05:00] <ApacheTiger> thanks
179: [02:05:00] <FrozenFire> The SMTP module is basically just a wrapper between SS's Email stuff and PHPMailer, iirc
180: [02:05:00] <FrozenFire> Not sure what you mean.
181: [02:05:00] <FrozenFire> You connect to it and relay
182: [02:05:00] <FrozenFire> It's SMTP
183: [02:06:00] <irogue> what did github do
184: [02:06:00] <Pyromanik> PHPMailer sitting in the code/vendor folder.
185: [02:06:00] <Pyromanik> irogue: ??
186: [02:06:00] <FrozenFire> They've been dashboarding the UI :P
187: [02:06:00] <Pyromanik> mmm
188: [02:06:00] <irogue> fuck.
189: [02:06:00] <Pyromanik> I was going to work on Mailer at hackfest, but then I realised I needed to write tests
190: [02:07:00] <Pyromanik> oh wow
191: [02:07:00] <FrozenFire> Burying all the useful stuff
192: [02:07:00] <Pyromanik> because it's THAT neglected
193: [02:07:00] <Pyromanik> and I was all "no phpunit"
194: [02:07:00] <Pyromanik> so that was that, lol
195: [02:07:00] <FrozenFire> Meh. SS doesn't need to reinvent the wheel
196: [02:07:00] <Pyromanik> because you made a request
197: [02:07:00] <irogue> was just using the Edit button in github
198: [02:07:00] <FrozenFire> Just fork xeraa's
199: [02:07:00] <Pyromanik> HAHAHAHAHHAHAHAHAHAHAH
200: [02:07:00] <irogue> idek why
201: [02:07:00] <irogue> apparently my pull request included 500+ commits
202: [02:08:00] <FrozenFire> Or maybe you PR'd against a different branch
203: [02:08:00] <Pyromanik> on your own fok
204: [02:08:00] <Pyromanik> or did you already have a fork?
205: [02:08:00] <FrozenFire> Don't use the edit button on GitHub
206: [02:08:00] <irogue> i'm guessing its that i already had a fork
207: [02:08:00] <FrozenFire> Or automatic merge
208: [02:08:00] <FrozenFire> Or anything like that
209: [02:08:00] <Pyromanik> irogue: must have
210: [02:08:00] <Pyromanik> lol
211: [02:08:00] <irogue> and github didn't think "maybe i should let him know before he does a pull on waaay more current code"
212: [02:08:00] <FrozenFire> E.g. master => 3.1
213: [02:08:00] <Pyromanik> it's probably a request to revert back to some 2.4 codes, lulz
214: [02:08:00] <irogue> FrozenFire: it's that, or i don't do it at all
215: [02:08:00] <irogue> :P
216: [02:08:00] <irogue> which is how we got into this mess
217: [02:09:00] <Pyromanik> :P
218: [02:09:00] <Pyromanik> irogue: I'd just lodge a ticket
219: [02:10:00] <Pyromanik> then I'll dive into it myself.
220: [02:10:00] <irogue> it'll come up again by 3.1 i'm sure :-P
221: [02:10:00] <irogue> https://github.com/edlinklater/sapphire/commit/d1835dd08127e8a6894bebf223f54dd264a620a8 <-- all i'm trying to change
222: [02:10:00] <Pyromanik> I might get around to learning what php unit is, how to install and configure it, and remind myself how to write tests.
223: [02:10:00] <irogue> too hard, i give up now
224: [02:11:00] <irogue> someone who can be bothered is more than welcome to take that patch and submit it themselves somehow :P
225: [02:11:00] <Pyromanik> get rid of that horrible proceedural stuff.
226: [02:11:00] <Pyromanik> and then I'll be all http://i.imgur.com/nRJQY.jpg
227: [02:12:00] <Pyromanik> haha
228: [02:20:00] <FrozenFire> PR
229: [02:20:00] <FrozenFire> Push upstream
230: [02:20:00] <FrozenFire> Cherry-pick that commit into it
231: [02:20:00] <FrozenFire> Branch it into a feature branch
232: [02:20:00] <FrozenFire> Check out the branch you want to submit a fix for
233: [02:20:00] <FrozenFire> irogue, It's as simple as cherry-pick
234: [02:22:00] <irogue> that's what i thought i did :-P
235: [02:23:00] <FrozenFire> Make sure you're branching off the branch you mean to submit the fix for
236: [02:24:00] <FrozenFire> Otherwise it'll try to merge the remainder of the history behind the commit, that differs from the one you're trying to PR on
237: [02:33:00] * SightUnseen has joined #silverstripe
238: [02:34:00] * SightUnseen has left #silverstripe
239: [02:40:00] <FrozenFire> ?debug_request=1
240: [02:40:00] <FrozenFire> Heh
241: [02:40:00] <Pyromanik> how to debug white page?
242: [02:40:00] <Pyromanik> ?debug_request does fuckall compared to what it used to
243: [02:40:00] <Pyromanik> ?debug shows correct
244: [02:41:00] <FrozenFire> 500 would be a server error
245: [02:41:00] <Pyromanik> ?debug_* returns info, but no page
246: [02:41:00] <Pyromanik> getting 500, no return
247: [02:41:00] <FrozenFire> As opposed to a PHP error
248: [02:41:00] <FrozenFire> (Normally)
249: [02:41:00] <irogue> i believe that is exactly what happened
250: [02:41:00] <irogue> [15:23] <FrozenFire> Otherwise it'll try to merge the remainder of the history behind the commit, that differs from the one you're trying to PR on
251: [02:42:00] <FrozenFire> Check your apache error log
252: [02:42:00] <Pyromanik> FrozenFire: hmm
253: [02:42:00] <Pyromanik> FrozenFire: unsure
254: [02:42:00] <FrozenFire> You don't happen to be using an nginx reverse proxy server, do you?
255: [02:42:00] * Pyromanik trundles off
256: [02:42:00] <Pyromanik> yes
257: [02:42:00] <Pyromanik> error.log!
258: [02:42:00] <Pyromanik> :<
259: [02:43:00] <Pyromanik> but...
260: [02:43:00] <FrozenFire> Then again, it might not show up either way, because it might only run for requests
261: [02:43:00] <FrozenFire> Always nice
262: [02:43:00] <Pyromanik> service nginx status tells me not running
263: [02:43:00] <Pyromanik> I dunno.
264: [02:43:00] <FrozenFire> ps aux | grep nginx
265: [02:44:00] <ApacheTiger> You guys have a great night..
266: [02:44:00] <FrozenFire> It's one of the most difficult to detect
267: [02:44:00] <FrozenFire> I've had to debug the nginx reverse proxy server request buffer size issue a few times
268: [02:44:00] <Pyromanik> you're welcome ApacheTiger
269: [02:44:00] <ApacheTiger> Thanks for all your guys help tonight.
270: [02:44:00] <FrozenFire> And type of server?
271: [02:44:00] <FrozenFire> What host?
272: [02:44:00] <FrozenFire> ApacheTiger, Should get a real IRC client, if you've not already ;)
273: [02:44:00] <Pyromanik> FrozenFire: yes and no
274: [02:45:00] <ApacheTiger> I have. :)
275: [02:45:00] <ApacheTiger> 9:45 PM here
276: [02:45:00] <ApacheTiger> Was up till 2:30 0r 3:00 Am last night.
277: [02:45:00] <Pyromanik> 'here' being... LA?
278: [02:45:00] <ApacheTiger> TN
279: [02:45:00] <ApacheTiger> LOL
280: [02:45:00] <Pyromanik> don't think we've ever had someoen from TN come in before
281: [02:45:00] <ApacheTiger> Sister lives in Indio, CA
282: [02:45:00] <Pyromanik> oh yup
283: [02:45:00] <Pyromanik> ApacheTiger: it's nearly 4pm wednesday
284: [02:45:00] <Pyromanik> it's the afternoon
285: [02:46:00] <ApacheTiger> bunch of rednecks and moonshiners here.
286: [02:46:00] <FrozenFire> Oklahomans
287: [02:46:00] <FrozenFire> Heh. Not nearly as bad of rednecks as the people I was talking to a few minutes ago, I'm sure. :P
288: [02:46:00] <ApacheTiger> LA as in Los Angeles?
289: [02:46:00] <Pyromanik> (I tend to ask fresh names for interest's sake)
290: [02:47:00] * ApacheTiger has left #silverstripe
291: [02:47:00] <FrozenFire> You can hear the cousin-blood in their voices
292: [02:47:00] <Pyromanik> Oklah OH MAN's
293: [02:47:00] <irogue> [15:46] <FrozenFire> You can hear the cousin-blood in their voices
294: [02:47:00] <ApacheTiger> thanks again
295: [02:47:00] <Pyromanik> ?
296: [02:47:00] <ApacheTiger> LMAO
297: [02:47:00] <ApacheTiger> you guys have a good night
298: [02:47:00] <irogue> that's not blood
299: [02:49:00] <Pyromanik> FrozenFire: oh
300: [02:49:00] <Pyromanik> there we are
301: [02:49:00] <Pyromanik> mod_fcgi
302: [02:49:00] <Pyromanik> interesting
303: [02:50:00] <FrozenFire> mod_fcgid?
304: [02:50:00] <irogue> i don't get it
305: [02:50:00] <Pyromanik> which?
306: [02:50:00] <FrozenFire> There's no mod_fcgi that I'm aware of
307: [02:50:00] <Pyromanik> I thought I was running mod_php
308: [02:50:00] <FrozenFire> There's mod_fastcgi
309: [02:50:00] <irogue> it's surprising how common that is now
310: [02:51:00] <Pyromanik> yeah, tehre is
311: [02:51:00] <irogue> the main argument i heard for apache over nginx was "cos mod_php"
312: [02:51:00] <irogue> if you're going to run fcgi anyway, why apache?
313: [02:51:00] <Pyromanik> there are 2 fast cgi implementations that share almost nothing in common apart from being implementations of fast cgi
314: [02:51:00] <Pyromanik> one is free, the other isn't quite as much.
315: [02:51:00] * ApacheTiger has joined #silverstripe
316: [02:52:00] <Pyromanik> new Object?
317: [02:52:00] <FrozenFire> Pyromanik, Oh god. Plesk.
318: [02:52:00] <Pyromanik> FrozenFire: IKR
319: [02:52:00] <ApacheTiger> Contact::create(array('field'=>'value'))
320: [02:52:00] <FrozenFire> Are you *sure* you're not running nginx as a reverse proxy?
321: [02:52:00] <Pyromanik> worst part is that most recent version uses nginx, but can't configure it properly
322: [02:52:00] <FrozenFire> You don't happen to be using MediaTemple, do you?
323: [02:52:00] <Pyromanik> FrozenFire: nope.
324: [02:52:00] <ApacheTiger> Okay, thought I was done being totally newbie, but how do i create a new object in code?
325: [02:52:00] <irogue> welcome back good sir tiger
326: [02:52:00] <Pyromanik> irogue: because plesk.
327: [02:53:00] <FrozenFire> So fucking hard to debug
328: [02:53:00] <FrozenFire> ApacheTiger, Object::create is indeed the "new" way
329: [02:53:00] <FrozenFire> I still use new Object
330: [02:53:00] <Pyromanik> nginx with plesk is purely for reverse proxy load balancing (ie, serving static content fast, passing to apache & mod_php for everything else)
331: [02:53:00] <FrozenFire> But Object::create supports Injector, iirc
332: [02:53:00] <Pyromanik> nz host
333: [02:53:00] <FrozenFire> MediaTemple sets their Plesk-based CentOS boxes up with an nginx reverse proxy by default
334: [02:53:00] <ApacheTiger> Am I right on that?
335: [02:54:00] <ApacheTiger> DataObject::create or Object::create
336: [02:54:00] <FrozenFire> ApacheTiger, So, it's personal preference, I suppose
337: [02:54:00] <FrozenFire> Anything that extends Object has ::create
338: [02:54:00] <FrozenFire> And most things in SS do
339: [02:54:00] <FrozenFire> Pyromanik, False
340: [02:54:00] <ApacheTiger> I need it to store in the database of course. after i create it do i need to call save or anything like that?
341: [02:55:00] <Pyromanik> FrozenFire: not if it's off.
342: [02:55:00] <FrozenFire> ApacheTiger, DataObject::write()
343: [02:55:00] <FrozenFire> And made me spend a few hours tracking it down and rewriting Plesk's default vhost nginx configuration template to support a larger request buffer
344: [02:55:00] <FrozenFire> And does
345: [02:55:00] <FrozenFire> Pyromanik, nginx will happily get in the way for all requests.
346: [02:56:00] <FrozenFire> Indeed
347: [02:56:00] <FrozenFire> Pyromanik, But it's often turned on by default. ;)
348: [02:56:00] <Pyromanik> FrozenFire: but as previously mentioned
349: [02:56:00] <Pyromanik> plesk can't configure it for shit
350: [02:57:00] <Pyromanik> and if you have over say...
351: [02:57:00] <FrozenFire> Didn't want to fuck around too much and break something
352: [02:57:00] <Pyromanik> 200 domains
353: [02:57:00] <Pyromanik> it fucking falls over sideways
354: [02:57:00] <FrozenFire> Heh
355: [02:57:00] <Pyromanik> going "TOO MANY CONFIG FILES"
356: [02:57:00] <Pyromanik> HALP
357: [02:57:00] <ApacheTiger> so $oObject = DataObject::create('ClassName', array( 'Field' => 'Value' ) ); $oObject->write();
358: [02:57:00] <FrozenFire> To be fair, if 200 domains rely on one server, you're doing ti wrong
359: [02:57:00] <FrozenFire> ApacheTiger, No
360: [02:57:00] <FrozenFire> Unfortunately, the server I was trying to work on wasn't my own
361: [02:57:00] <Pyromanik> you have no options other than using it for reverse proxy (ie can't use php-fpm and ignore apache)
362: [02:57:00] <FrozenFire> Was owned by a large American company who was running other sites on it
363: [02:58:00] <ApacheTiger> you said that
364: [02:58:00] <Pyromanik> ApacheTiger: use your classname
365: [02:58:00] <Pyromanik> MyClass::create()
366: [02:58:00] <FrozenFire> $obj = ClassName::create(array(...));
367: [02:58:00] <FrozenFire> $obj->write();
368: [02:58:00] <ApacheTiger> thanks
369: [02:58:00] <ApacheTiger> always use myclassname::
370: [02:58:00] <Pyromanik> yup
371: [02:58:00] <FrozenFire> Yep
372: [02:58:00] <Pyromanik> whatever class you want to create
373: [02:59:00] <FrozenFire> Yep
374: [02:59:00] <ApacheTiger> can i chain MyDataObject::create()->write();
375: [02:59:00] <Pyromanik> ContactPage::create, RelatedImage::create, etc
376: [02:59:00] <Pyromanik> FrozenFire: not to mention the out of the box config of nginx from plesk won't work with silverstripe
377: [02:59:00] <Pyromanik> because silverstripe dumps all the JS and CSS info into the headers, and nginx goes "HALP, HEADERS TOO BIG!"
378: [03:00:00] <Pyromanik> but that's not my issue
379: [03:00:00] <Pyromanik> yeah
380: [03:00:00] <Pyromanik> but for the most part
381: [03:00:00] <FrozenFire> Hence the nginx reverse proxy buffer size issue ;)
382: [03:00:00] <Pyromanik> my issue is that it cannot actually launch because it errors out trying to read config files
383: [03:00:00] <FrozenFire> Yeah, just saying, 500 error is often that, if it's not something else that's obvious
384: [03:00:00] <Pyromanik> I upped the buffer size
385: [03:00:00] <FrozenFire> Or all controllers?
386: [03:00:00] <Pyromanik> because plesk splits them out into every domain root
387: [03:00:00] <FrozenFire> It this one controller?
388: [03:01:00] <Pyromanik> mod_fcgid: stderr: PHP Fatal error: Call to a member function Image() on a non-object in
389: [03:01:00] <Pyromanik> and tail erro_log told me the anser
390: [03:01:00] <Pyromanik> FrozenFire: one controller
391: [03:02:00] <Pyromanik> eg. we have about 300 at last count
392: [03:02:00] <FrozenFire> Not sure what your issue is
393: [03:02:00] <FrozenFire> Is this an issue I'm likely to encounter with Plesk servers and SS3?
394: [03:02:00] <Pyromanik> the issue I've been describing is likely, yes.
395: [03:02:00] <FrozenFire> Oh, good. That means I'll never encounter it
396: [03:02:00] <Pyromanik> but only if the server you're using a has a lot of domains.
397: [03:02:00] * FrozenFire flashes shit-eating grin
398: [03:02:00] <Pyromanik> FrozenFire: my issue is poor coding.
399: [03:03:00] <FrozenFire> How about you don't do that. o.O
400: [03:04:00] <Pyromanik> why not?
401: [03:04:00] <Pyromanik> should be fine
402: [03:04:00] <Pyromanik> isn't.
403: [03:04:00] <irogue> sounds like bluehost/hostmonster/fastdomain
404: [03:04:00] <Pyromanik> nah
405: [03:04:00] <FrozenFire> 300 sites on a single server is a bad idea
406: [03:04:00] <Pyromanik> our own server
407: [03:04:00] <Pyromanik> most are low traffic brochure things
408: [03:05:00] <Pyromanik> not all are sites.
409: [03:05:00] <FrozenFire> At the very least that needs some sharding or something
410: [03:05:00] <Pyromanik> so in essence, we do.
411: [03:05:00] <Pyromanik> except that we don't really need one, and if we do the server is managed, so palm the issues off to someone else.
412: [03:05:00] <Pyromanik> probably wouldn't be a bad idea.
413: [03:05:00] <FrozenFire> Sounds like you need a qualified systems administrator. :P
414: [03:05:00] <Pyromanik> some are simply holding pages, some don't actually exist, some are redirects, etc.
415: [03:06:00] <Pyromanik> it's a cloud server
416: [03:06:00] <FrozenFire> That's even worse.
417: [03:06:00] <Pyromanik> can add more resources and stuff as needed
418: [03:06:00] <FrozenFire> A cloud server with 300 domains
419: [03:06:00] <Pyromanik> haha
420: [03:06:00] <Pyromanik> umad
421: [03:06:00] <FrozenFire> I'm disappointed.
422: [03:06:00] * Pyromanik cares little.
423: [03:06:00] <Pyromanik> it's the way stuff is done in this country.
424: [03:06:00] <Pyromanik> if it works it works.
425: [03:06:00] <ApacheTiger> You guys have saved me so much time. I love you guys.
426: [03:07:00] <Pyromanik> haha
427: [03:07:00] <irogue> Pyromanik has given up on caring about his company's shitty web servers
428: [03:07:00] <ApacheTiger> You guys or girls have a great night.
429: [03:07:00] <irogue> if he did he'd have pulled out all his hair by now
430: [03:07:00] <irogue> ApacheTiger: laters g!
431: [03:07:00] * ApacheTiger has left #silverstripe
432: [03:09:00] <Pyromanik> irogue: more a commentary on how business is run in NZ
433: [03:09:00] <Pyromanik> I'm not a sys admin
434: [03:09:00] <FrozenFire> Be the better developer
435: [03:09:00] <Pyromanik> if the fellow who sold me the server tells me it should run 300 sites just fine, then when it blows up in our face it's really blowing up in his face.
436: [03:10:00] <FrozenFire> Running a stable and well-configured server does not require being a sysadmin
437: [03:10:00] * Pyromanik shrugs
438: [03:10:00] <Pyromanik> hey
439: [03:10:00] <Pyromanik> running a server that designers can access use and adjust requires sacrifice of a few things
440: [03:10:00] <FrozenFire> I maintain all of my company's systems assets
441: [03:10:00] <Pyromanik> like a well configured server.
442: [03:10:00] <FrozenFire> No it doesn't.
443: [03:10:00] <Pyromanik> install plesk
444: [03:11:00] <Pyromanik> OH, shit, boom.
445: [03:11:00] <FrozenFire> No.
446: [03:11:00] <FrozenFire> Also, if you're running production off of the development server, shame on you.
447: [03:11:00] <Pyromanik> haha
448: [03:11:00] <Pyromanik> I run development off a local server.
449: [03:11:00] <FrozenFire> Even with it just being me, I have a whole staging process.
450: [03:12:00] <spronk> tbh i wouldn't load up anything with 300
451: [03:12:00] <Pyromanik> and processes
452: [03:12:00] <Pyromanik> but it takes time to build infrastructure
453: [03:12:00] <Pyromanik> I'm slowly getting stuff set up to move everyone over to git
454: [03:12:00] <FrozenFire> Development server houses our development domains, gitolite service and development database.
455: [03:12:00] <Pyromanik> and then there's the part where most of the team still FTP updates.
456: [03:12:00] <FrozenFire> All development happens there, gets pushed into the gitolite repositories, then deployed to staging on the production server
457: [03:13:00] <FrozenFire> Then once staging is complete, it gets deployed to the production domain
458: [03:13:00] <spronk> that's largely to minimise risk of security breaches etc
459: [03:13:00] <spronk> i'd stop at about 50
460: [03:13:00] <Pyromanik> and I'm not a sysadmin, I upload site, it works.
461: [03:13:00] <Pyromanik> only that servers cost a shitload of money here.
462: [03:13:00] <FrozenFire> You completely defeat the purpose of a cloud server by running 300
463: [03:13:00] <FrozenFire> Typically, each production server is a low-resource cloud server that houses one or two sites, max.
464: [03:13:00] <Pyromanik> FrozenFire: that's basically what happens here too.
465: [03:14:00] <Pyromanik> oh, my bad, $300
466: [03:14:00] <Pyromanik> convincing a client that they need to shell out $500 a month for their website...
467: [03:14:00] <Pyromanik> not so easy.
468: [03:14:00] <FrozenFire> I think you're thinking of VPS pricing.
469: [03:14:00] <FrozenFire> A cloud server to run a modest application would cost about $16/month
470: [03:15:00] <irogue> FrozenFire: if you don't mind hosting it in the US ;)
471: [03:16:00] <FrozenFire> http://ninefold.com/
472: [03:16:00] <FrozenFire> spronk, Not in the least.
473: [03:16:00] <Pyromanik> http://www.webdrive.co.nz/cloud/
474: [03:16:00] <FrozenFire> So it has to be physically hosted in New Zealand?
475: [03:16:00] <spronk> FrozenFire: individual servers are harder to manage than sharing a bunch of low bandwidth sites on one
476: [03:16:00] <Pyromanik> yeah, not getting non NZ based servers.
477: [03:16:00] <irogue> http://www.sitehost.co.nz/hosting/cloud-hosting
478: [03:16:00] <FrozenFire> And that's Australian
479: [03:16:00] <FrozenFire> Seems to be about 6.5c/hour
480: [03:17:00] * cnd_ has joined #silverstripe
481: [03:17:00] <irogue> FrozenFire: for data sovereignty purposes, most companies prefer it
482: [03:17:00] <irogue> and for ease of PCI DSS compliance
483: [03:17:00] <FrozenFire> Using something like Vagrant or Puppet, you could easily configure new servers for particular domains/projects.
484: [03:17:00] <irogue> i had an uphill battle to convince the boss that it was okay to host our site in the U.S.
485: [03:17:00] <FrozenFire> And then once you've configured them, you have an image you can replicate
486: [03:18:00] <spronk> then you've got to consider where you run your DNS
487: [03:18:00] <FrozenFire> CDN, you mean?
488: [03:18:00] <spronk> yeah, but you have to burden of IP address management
489: [03:18:00] <spronk> and administrative accounts
490: [03:18:00] <cnd_> CDN yes
491: [03:18:00] <FrozenFire> I assume everyone here has, even if they don't realize it.
492: [03:18:00] <FrozenFire> :P
493: [03:18:00] <FrozenFire> spronk, Wat
494: [03:18:00] <irogue> I think there was an S3 module for 2.4, not sure if it was kept
495: [03:18:00] <cnd_> hello, has anyone used a CND to store the assets ?
496: [03:18:00] <irogue> am in the process of moving it to AU though
497: [03:19:00] <FrozenFire> Done
498: [03:19:00] <cnd_> to use the S3 module ?
499: [03:19:00] <Pyromanik> fixed my 500
500: [03:19:00] <cnd_> so what is the best advice here ?
501: [03:19:00] <spronk> and how to manage that with respect to automatically spinning instances
502: [03:19:00] <irogue> but the upsides are worth it
503: [03:19:00] <irogue> i'm gonna have to agree, multiple servers are more work to maintain
504: [03:19:00] <FrozenFire> Load balancer, spin new instance of image into load balancer
505: [03:20:00] <cnd_> but i want all the files to go in to a CDN
506: [03:20:00] <FrozenFire> spronk, Most cloud hosts have an API that your load monitor can interface with
507: [03:20:00] <FrozenFire> cnd_, If you're using S3, yes.
508: [03:20:00] <FrozenFire> spronk, Depends on how you do that.
509: [03:20:00] <cnd_> i am not sure what i am going to use, i will do going for the easiest
510: [03:20:00] <cnd_> well i am using the SilverStripe upload / assets admin etc
511: [03:21:00] <Pyromanik> web servers are kinda designed that way.
512: [03:21:00] <spronk> yeah exactly
513: [03:21:00] <Pyromanik> cnd_: no idea, sorry
514: [03:21:00] <spronk> an API
515: [03:21:00] <cnd_> so the server which runs my app wont have to keep a lot of images etc
516: [03:21:00] <FrozenFire> cnd_, Honestly, if you're asking how to use a CDN, I don't know if a CDN is something you'll be able to make real use of.
517: [03:21:00] <Pyromanik> also, not seeing much of an issue with loading up a server provided it has the resources to keep on chugging.
518: [03:21:00] <FrozenFire> Offloading to a CDN requires a fair bit of coding
519: [03:22:00] <FrozenFire> Pyromanik, Single point of failure.
520: [03:22:00] <FrozenFire> It's not plug and play.
521: [03:22:00] <cnd_> alright, is there anyway i cam make a unix link to a CDN
522: [03:22:00] <FrozenFire> One site starts taking heavy traffic, every site goes down
523: [03:22:00] <Pyromanik> FrozenFire: single point of failure if all your servers are using the same host anywya.
524: [03:22:00] <FrozenFire> And then you don't have the resources in play to scale up
525: [03:22:00] <cnd_> so i can create a link for assets to point to a CND
526: [03:23:00] <irogue> and if using shared hosting + mod_php, the security aspect of ~300 people on one server is scary
527: [03:23:00] <FrozenFire> cnd_, That's not how it works.
528: [03:23:00] <FrozenFire> You have to redirect requests for assets to the CDN, so the HTTP transaction happens directly with the CDN
529: [03:23:00] <Pyromanik> and yes, cloud server: add more resources, problem solved
530: [03:23:00] <spronk> Pyromanik: what happens if one account gets compromised?
531: [03:23:00] <cnd_> *CDN
532: [03:24:00] <FrozenFire> Grab some config file from another site, wipe their database
533: [03:24:00] <Pyromanik> spronk: if one account gets compromised one would hope that it's not the root account.
534: [03:24:00] <FrozenFire> Otherwise your files are being routed through your web server, which defeats the point of a CDN entirely.
535: [03:24:00] <FrozenFire> Pyromanik, From the sounds of it, it wouldn't require root
536: [03:24:00] <spronk> Pyromanik: mm, but you can still do scary things with normal accounts
537: [03:24:00] <FrozenFire> Just one person deciding to poke their nose around
538: [03:24:00] <spronk> like DDOS the machine by filling up the disk
539: [03:24:00] <irogue> spronk: www-data!
540: [03:24:00] <spronk> mm, exactly
541: [03:25:00] <Pyromanik> no shell access
542: [03:25:00] <spronk> Pyromanik: php has shell access?
543: [03:25:00] <Pyromanik> separate account for each domain
544: [03:25:00] <Pyromanik> that's a point I guess
545: [03:25:00] <Pyromanik> you know how it is in NZ
546: [03:25:00] <spronk> absolute minimum for that kinda setup is suPHP
547: [03:25:00] <irogue> i started working on a secure shared host once
548: [03:25:00] <FrozenFire> No, not even that.
549: [03:25:00] <Pyromanik> spronk: accounts don't have login
550: [03:25:00] <FrozenFire> The utmost minimum for a legacy-style shared hosting configuration is chroot jails.
551: [03:26:00] <FrozenFire> Everything to do with the company being bad
552: [03:26:00] <FrozenFire> I'd say, it's nothing to do with NZ
553: [03:26:00] <Pyromanik> FrozenFire: yep.
554: [03:26:00] <irogue> it's really not just NZ
555: [03:26:00] <Pyromanik> not really, no.
556: [03:26:00] <spronk> then one of our sites got hacked
557: [03:26:00] <irogue> involving jails, nginx+php-fpm, webserver and php both running as each site's account, etc etc
558: [03:26:00] <FrozenFire> You're basically just slagging your own country as lazy and incompetent?
559: [03:26:00] <spronk> we did that at my old place
560: [03:26:00] <Pyromanik> no problem until there is.
561: [03:26:00] <spronk> :P
562: [03:26:00] <Pyromanik> FrozenFire: I'm saying that this is general mentality for business in NZ
563: [03:26:00] <spronk> i do
564: [03:26:00] <FrozenFire> Pyromanik, Are you managing the servers?
565: [03:26:00] <spronk> then we moved to wiredtree VPSs
566: [03:26:00] <irogue> it's the standard practice
567: [03:26:00] <spronk> took down all our clients
568: [03:27:00] <FrozenFire> They will not choose them of their own volition.
569: [03:27:00] <spronk> it's rock and a hard place
570: [03:27:00] <FrozenFire> Doesn't mean jack shit
571: [03:27:00] <FrozenFire> I started at this company about 8 months ago.
572: [03:27:00] <irogue> they're all *worse* :-P
573: [03:27:00] <FrozenFire> So, you have the responsibility to direct your employer toward the best practises.
574: [03:27:00] <Pyromanik> if by manage you mean if something goes wrong I call the host and get them to sort it out, yes.
575: [03:27:00] <irogue> americans host their important business sites/domains on hosts like bluehost/hostmonster/godaddy
576: [03:27:00] <Pyromanik> well
577: [03:27:00] <FrozenFire> Who is? Someone else in your company?
578: [03:27:00] <FrozenFire> So it's you.
579: [03:27:00] <Pyromanik> nope
580: [03:27:00] <Pyromanik> FrozenFire: $$$
581: [03:28:00] <FrozenFire> irogue, It was still cheaper.
582: [03:28:00] <spronk> you can explain away a day's downtime to 300 clients whose sites get 1 visit per day
583: [03:28:00] <Pyromanik> spronk: elaborate?
584: [03:28:00] <FrozenFire> And we did that.
585: [03:28:00] <irogue> $10/yr shared hosting plz
586: [03:28:00] <spronk> Pyromanik: i would definintely consider mapping clients to high vs low importance in downtime situations though
587: [03:28:00] <irogue> most companies i know wouldn't fork out for that
588: [03:28:00] <FrozenFire> So I said, this is what we have to use and do.
589: [03:28:00] <irogue> godaddy *dedicated* servers
590: [03:28:00] <FrozenFire> I was in the position of administrating systems.
591: [03:28:00] <irogue> they obviously didn't mind spending money then, FrozenFire
592: [03:28:00] <Pyromanik> oh god
593: [03:28:00] <FrozenFire> And storing credit card info in the database.
594: [03:28:00] <FrozenFire> Back then, they were using GoDaddy dedicated servers with Plesk
595: [03:28:00] <Pyromanik> $300 per ~ 5 websites doesn't sound like sound business approach.
596: [03:29:00] <FrozenFire> Switch the DNS over to the new IP
597: [03:29:00] <spronk> load balancers cost money
598: [03:29:00] <Pyromanik> FrozenFire: TTL?
599: [03:29:00] <irogue> company i used to work for we had ~100 domains on one server
600: [03:29:00] <spronk> FrozenFire: lies
601: [03:29:00] <Pyromanik> but they pay for it.
602: [03:29:00] <spronk> mm
603: [03:29:00] <FrozenFire> A DNS switch-over requires zero downtime.
604: [03:29:00] <irogue> ^ this
605: [03:29:00] <Pyromanik> we've not really had major clients before. We do have one we've bought a whole new server for, and they sit on that by themselves.
606: [03:29:00] <spronk> but that sorta downtime to clients with very high traffic sites is muuuch harder to justify
607: [03:29:00] <FrozenFire> If you have downtime, you're silly.
608: [03:29:00] <FrozenFire> spronk, Load balancer with the original host in it
609: [03:30:00] <spronk> also, don't forget ISP caching
610: [03:30:00] <Pyromanik> most of this shit is going over my head now
611: [03:30:00] <Pyromanik> see
612: [03:30:00] <spronk> mm
613: [03:30:00] <Pyromanik> lol
614: [03:30:00] <spronk> and telstraclear
615: [03:30:00] <Pyromanik> xtra
616: [03:30:00] <FrozenFire> And then point your DNS at the host directly if you're not needing a load balancer
617: [03:30:00] <spronk> telstraclear and their fucking transparent proxy..
618: [03:30:00] <FrozenFire> Then delete the load balancer.
619: [03:30:00] <Pyromanik> get people ringing up often going "why don't my emails send"
620: [03:30:00] <Pyromanik> turns out that SMTP.XTRA.CO.NZ
621: [03:30:00] <irogue> FUCKING XTRA
622: [03:30:00] <irogue> [16:30] <spronk> ISPs in NZ can and will cache for >24h
623: [03:30:00] <Pyromanik> I'm not a sysadmin.
624: [03:30:00] <spronk> regardless of your TTL
625: [03:30:00] <Pyromanik> that's the other reason.
626: [03:30:00] <spronk> ISPs in NZ can and will cache for >24h
627: [03:30:00] <FrozenFire> Then switch out the host in the load balancer for your new one
628: [03:30:00] <irogue> had 3 hours downtime, no customer even noticed
629: [03:30:00] <FrozenFire> No downtime
630: [03:31:00] <Pyromanik> you're arguing that I should grab a new server for every few clients. That's $300 a pop.
631: [03:31:00] <Pyromanik> per month.
632: [03:31:00] <FrozenFire> I'm Canadian. I use American hosting.
633: [03:31:00] <spronk> noone has per-usage-unit billing
634: [03:31:00] <spronk> Pyromanik: I would suggest VPS
635: [03:31:00] <FrozenFire> Why? Because it's cheaper, faster and more robust.
636: [03:31:00] <FrozenFire> Only if you're a nationalistic sanitary wipe.
637: [03:31:00] <spronk> there are zero true cloud providers in NZ
638: [03:31:00] * cnd_ quit (Quit: Page closed)
639: [03:31:00] <ajmitch> Pyromanik: you mean the black hole?
640: [03:31:00] <spronk> mm
641: [03:31:00] <Pyromanik> FrozenFire: shit costs much more here
642: [03:31:00] <FrozenFire> Ohnoes. You spent about $0.50 on a load balancer for a day
643: [03:31:00] <irogue> hahaha
644: [03:32:00] <spronk> VPS for each new "important" site
645: [03:32:00] <Pyromanik> spronk: for the most part, we haven't really had any 'important' sites.
646: [03:32:00] <spronk> FrozenFire: we only have 2 cables..
647: [03:32:00] <FrozenFire> irogue, I refuse to accept that you have significant speed issues crossing into Australia
648: [03:32:00] <spronk> = maximum profit, minimum risk
649: [03:32:00] <Pyromanik> used more than 100 Gb this calendar month? TOO BAD, NO MORE NETS FOR YOU BUDDY
650: [03:32:00] <spronk> stick 10-20 basic brochure nonimportant sites along with each important site
651: [03:32:00] <irogue> FrozenFire: same issue
652: [03:32:00] <FrozenFire> Seems to have several good cloud hosts
653: [03:32:00] <FrozenFire> irogue, Australia
654: [03:32:00] <Pyromanik> hell we still only get an alotted bandwidth on home internet connections.
655: [03:32:00] <irogue> FrozenFire: it can sometimes be a speed issue here
656: [03:33:00] <Pyromanik> 300 domains, not 300 sites.
657: [03:33:00] <Pyromanik> even then it's probably more like 280 or so
658: [03:33:00] <FrozenFire> I'm guessing no
659: [03:33:00] * FrozenFire wonders if you do off-site backups
660: [03:33:00] <FrozenFire> :P
661: [03:33:00] <irogue> during peak times, not unusual to find traffic in/out of the country limited to 1 Mbit/s on some ISPs
662: [03:33:00] <spronk> 300 is a seriously large number of sites to have go offline if something happened
663: [03:33:00] <Pyromanik> haha
664: [03:33:00] <Pyromanik> cept the one, which has it's own server.
665: [03:33:00] <spronk> even still, i'd segment into smaller groups
666: [03:33:00] <Pyromanik> It's worth considering I agree.
667: [03:34:00] <irogue> each ISP has a dedicated amount of bandwidth on the international cable, many have nowhere near enough (cos its so f'n expensive)
668: [03:34:00] <Pyromanik> FrozenFire: several times when I've rm'd what I shouldn' thave.
669: [03:34:00] <Pyromanik> 'off site'
670: [03:34:00] <FrozenFire> Tested the image?
671: [03:34:00] <Pyromanik> stored for 14 days
672: [03:34:00] <Pyromanik> FrozenFire: image taken every night of server
673: [03:34:00] <FrozenFire> Tried replicating it?
674: [03:34:00] <Pyromanik> (nfi where)
675: [03:35:00] <spronk> we're so small
676: [03:35:00] <spronk> internet should be cheap
677: [03:35:00] <Pyromanik> FrozenFire: so do we
678: [03:35:00] <irogue> during peak times i'll get ~300 KB/s to Australia vs 1.2 MB/s (line speed) within NZ
679: [03:35:00] <FrozenFire> And yet we manage to do *okay*
680: [03:35:00] <irogue> FrozenFire: um
681: [03:35:00] <Pyromanik> FrozenFire: canada is, like, 500x richer.
682: [03:35:00] <irogue> you're not seperated by sea from a big counrty
683: [03:35:00] <Pyromanik> 200+ ping to LA
684: [03:35:00] <Pyromanik> anything beyond LA and you see jumps up to 300
685: [03:35:00] <FrozenFire> Canada is, like, 500x bigger
686: [03:35:00] <spronk> 20% cheaper now brau
687: [03:35:00] * FrozenFire finds it sad that your tiny little country has such infrastructural issues
688: [03:35:00] <spronk> I FUCKING KNOW, RIGHT?
689: [03:36:00] <Pyromanik> FrozenFire: that's because back in the 80's the government sold our only telco to offshore investors, INCLUDING THE INFRASTRUCTURE
690: [03:36:00] <FrozenFire> And anyone who says it is, is silly.
691: [03:36:00] <irogue> "little bit" teehee
692: [03:36:00] <irogue> http://upload.wikimedia.org/wikipedia/commons/thumb/0/02/Southern_Cross_Cable_route.svg/375px-Southern_Cross_Cable_route.svg.png
693: [03:36:00] <Pyromanik> to which they turned around and did 0 mainentance for about 100 years
694: [03:36:00] <irogue> a company backed by a fuckload of big names tried to run a second cable, couldn't get anywhere near enough investment
695: [03:36:00] <FrozenFire> irogue, I'm talking about infrastructure in general.
696: [03:36:00] <FrozenFire> Going over a little bit of water isn't that big of a deal
697: [03:37:00] <Pyromanik> we have some of the most expensive telecommunications rates in the world
698: [03:37:00] <FrozenFire> I abandon that point entirely
699: [03:37:00] <Pyromanik> mobile phones, talk for an hour, costs about $100
700: [03:37:00] <FrozenFire> Jesus
701: [03:37:00] <FrozenFire> 2000km
702: [03:37:00] <FrozenFire> That being said, I had no idea how large the distance was between NZ and Australia
703: [03:37:00] <Pyromanik> and ran a monopoly
704: [03:37:00] <tankr> lol
705: [03:38:00] <Pyromanik> also, australian law
706: [03:38:00] <FrozenFire> Pyromanik, I know of neither of those things at all
707: [03:38:00] <irogue> [16:38] <spronk> irogue: let's face it, pacific fibre did a shit job of marketing
708: [03:38:00] <spronk> they should have said this: IF SCC HAS A PROBLEM, OUR ENTIRE COUNTRY IS FUCKED FOR AT LEAST 24 HOURS
709: [03:38:00] <irogue> hence why australia isn't really a viable "just host there"
710: [03:38:00] <Pyromanik> FrozenFire: I suppose you thought the AKL harbour bridge and the SYD harbour bridge were the same thing?
711: [03:38:00] <spronk> irogue: let's face it, pacific fibre did a shit job of marketing
712: [03:38:00] * congii has joined #silverstripe
713: [03:38:00] <irogue> yeah :P
714: [03:38:00] <FrozenFire> :P
715: [03:38:00] <irogue> they weren't marketing though
716: [03:39:00] <spronk> hmm
717: [03:39:00] <spronk> to investors
718: [03:39:00] <Pyromanik> FrozenFire: Auckland and Sydney. Pretty sure you know them.
719: [03:39:00] <spronk> they should've kickstarted it
720: [03:39:00] <spronk> :P
721: [03:39:00] <Pyromanik> spronk: hahahaha
722: [03:39:00] <irogue> a bunch of companies had said they'd have invested in paficif fibre if the government had done cornerstone investment as a sign of validity
723: [03:39:00] <irogue> they need large-scale investment
724: [03:39:00] <spronk> should found an NZ cloud company
725: [03:39:00] <FrozenFire> Man, onecloud is ghetto looking
726: [03:39:00] <FrozenFire> Pyromanik, I've heard of them, yes. :P
727: [03:40:00] <Pyromanik> bro4
728: [03:40:00] <spronk> irogue: that's kinda my point
729: [03:40:00] <spronk> they didn't sell it like life insurance
730: [03:40:00] <spronk> so govt was all
731: [03:40:00] <spronk> NAHH WE CAN GET AWAY WITH IT BROAEU
732: [03:40:00] <irogue> the government knows
733: [03:40:00] <irogue> but
734: [03:40:00] <FrozenFire> So hold on now, doesn't Rackspace have its own NZ infrastructure?
735: [03:40:00] <irogue> PRIVATE IS BETTER
736: [03:40:00] <spronk> FrozenFire: nope
737: [03:40:00] <irogue> FrozenFire: negative
738: [03:40:00] <spronk> FrozenFire: only sales and marketing
739: [03:40:00] <Pyromanik> FrozenFire: pretty much no one has infrastructure in nz
740: [03:40:00] <FrozenFire> Ah. Their site lead me to believe otherwise
741: [03:41:00] <irogue> rackspace do have some racks in other companies DCs
742: [03:41:00] <FrozenFire> :P
743: [03:41:00] * spronk would buy cloud services if they were available
744: [03:41:00] <FrozenFire> One of you guys should make your own cloud computing company, there.
745: [03:41:00] <spronk> even akamai has nothing here
746: [03:41:00] <irogue> yep
747: [03:41:00] <Pyromanik> yup
748: [03:41:00] <ajmitch> NZ doesn't have the population (compared to $$ amounts required) to justify putting stuff in
749: [03:41:00] <Pyromanik> but grouping is more of a possiblity
750: [03:41:00] <Pyromanik> no thx.
751: [03:41:00] <Pyromanik> so when you say "new server for everythign" then... yeah.
752: [03:41:00] <irogue> when it comes to internets, we're a bit fucked
753: [03:41:00] <FrozenFire> You guys got the short stick
754: [03:41:00] <FrozenFire> Jeeze. Even Rackspace's site is broken for NZ
755: [03:41:00] <Pyromanik> Rimu do, but that's in a datacenter that plonks offline all the time.
756: [03:42:00] <Pyromanik> good ones
757: [03:42:00] <Pyromanik> spronk: webdrive to 'cloud' too
758: [03:42:00] <spronk> the closest we can get is like.. digiweb and 50km separated VMware shit
759: [03:42:00] <irogue> yeah, 4 million people does not a good market for cloud computing make
760: [03:42:00] <FrozenFire> Fly a couple over
761: [03:42:00] <spronk> specifically a geo-distributed hosting engine, and a database engine
762: [03:42:00] <Pyromanik> FrozenFire: sysadmins are also hard to come by here
763: [03:43:00] <Pyromanik> keep 'working' in Canada.
764: [03:43:00] <irogue> haha
765: [03:43:00] <ajmitch> Pyromanik: assuming you want to get a 2nd mortgage for it
766: [03:43:00] <Pyromanik> it technically is cloud, just not like they do it elsewhere
767: [03:43:00] <Pyromanik> ajmitch: yeh.
768: [03:43:00] <FrozenFire> You know, I was like "NZ looks nice, maybe I'll move there some day"
769: [03:43:00] <FrozenFire> You've convinced me otherwise
770: [03:43:00] <FrozenFire> :P
771: [03:43:00] <Pyromanik> as I said before, starts at $300 a month and goes up
772: [03:43:00] <Pyromanik> FrozenFire: oh, it's a nice place to live.
773: [03:43:00] <Pyromanik> jsut...
774: [03:43:00] <FrozenFire> I don't work in Canada. :P
775: [03:43:00] <Pyromanik> err
776: [03:43:00] <Pyromanik> working 'in' canada
777: [03:43:00] <FrozenFire> I work in California
778: [03:43:00] <Pyromanik> whatevers
779: [03:44:00] <irogue> use a commercial ISP that have *way* more intl bandwidth than they need
780: [03:44:00] <Pyromanik> hell, don't even need that much anymore irogue
781: [03:44:00] <irogue> if you have enough money you can get good internet
782: [03:44:00] <spronk> as far as I'm concerned cloud solutions have to be more than just VPSs
783: [03:44:00] <Pyromanik> that said, depends on how you define 'good
784: [03:44:00] <Pyromanik> haha, work in california then
785: [03:45:00] <FrozenFire> Indeed
786: [03:45:00] <FrozenFire> I think that's what most people get confused about
787: [03:45:00] <spronk> also, http://securityblog.verizonbusiness.com/2013/01/14/case-study-pro-active-log-review-might-be-a-good-idea/
788: [03:45:00] <FrozenFire> Cloud is not ethereal VPS
789: [03:46:00] <FrozenFire> For instance, you have an application server, you have a database server, a DNS server, etc.
790: [03:46:00] <FrozenFire> It's something you build lightly with several different servers that handle specific things, and replicate them to scale
791: [03:46:00] <FrozenFire> Then you can scale those up as needed
792: [03:47:00] <FrozenFire> Rackspace is nice because it'll take care of the database and DNS as servers in a way that doesn't require you to set anything significant up
793: [03:47:00] <Pyromanik> spronk: webdrive's are. I did ask that when upgrading server recently.
794: [03:47:00] <FrozenFire> Even I'm not using CDN enough
795: [03:47:00] <FrozenFire> Also, CDN
796: [03:47:00] <FrozenFire> You can focus just on scaling your application server
797: [03:47:00] * ApacheTiger has joined #silverstripe
798: [03:47:00] <Pyromanik> they are actually clustered, not provisioned physical machines
799: [03:48:00] <irogue> right now our whole company's site is just running off a single 512MB Cloud Server + Cloud Database
800: [03:48:00] <Pyromanik> no cdn here.
801: [03:48:00] <FrozenFire> Too much throughput
802: [03:48:00] <FrozenFire> That's probably the biggest load on my application servers, is content distribution
803: [03:48:00] <irogue> heh
804: [03:48:00] <spronk> Pyromanik: webdrive's new cloud thing looks interesting
805: [03:49:00] <ApacheTiger> sorry to bust in here, but what do you use in place of mysql::escape()?
806: [03:49:00] <FrozenFire> Is it running well?
807: [03:50:00] <FrozenFire> If so, don't.
808: [03:50:00] <ApacheTiger> I am using a where clause and I have to.
809: [03:50:00] <FrozenFire> ApacheTiger, First, why?
810: [03:50:00] <FrozenFire> Are you writing SQL directly?
811: [03:50:00] <Pyromanik> ApacheTiger: nothing, we use the CRM.
812: [03:51:00] <ApacheTiger> MyDataObject->where();
813: [03:51:00] <Pyromanik> ORM **
814: [03:51:00] <FrozenFire> ApacheTiger, What you trying to "where"?
815: [03:51:00] <FrozenFire> Why?
816: [03:51:00] <ApacheTiger> i mean ->get()->where()
817: [03:51:00] <Pyromanik> ApacheTiger: your're looking for filter()
818: [03:51:00] <FrozenFire> Filter or exclude
819: [03:51:00] <ApacheTiger> I have a bunch of user conditions that they can choose fields and then operator and enter a value
820: [03:52:00] <Pyromanik> FrozenFire: it runs well, and as an example
821: [03:52:00] <Pyromanik> doc.silverstripe.org
822: [03:52:00] <Pyromanik> yeah, filter
823: [03:52:00] <FrozenFire> This is an X->Y question
824: [03:52:00] <ApacheTiger> Looked all over
825: [03:52:00] <FrozenFire> tankr, I'd hold off on even directing him there
826: [03:52:00] <Pyromanik> largest bandwidth at 5Gb, next at 0.5
827: [03:52:00] <tankr> ApacheTiger: maybe this topic would be useful: http://doc.silverstripe.com/framework/en/topics/security#sql-injection
828: [03:52:00] <ApacheTiger> the filter->()->exclude() kept giving me an error on line 245 when I used both together
829: [03:52:00] <Pyromanik> entirety of all sites have used only 8Gb this month.
830: [03:53:00] <Pyromanik> mmm
831: [03:53:00] <Pyromanik> it is
832: [03:53:00] <ApacheTiger> geez
833: [03:53:00] <FrozenFire> ApacheTiger, We're not trying to be dicks about it.
834: [03:53:00] <Pyromanik> ApacheTiger: X -> Y, as in please tell use X, not ask us Y
835: [03:53:00] <FrozenFire> You just are opening yourself up to a large level of insecurity by bypassing the ORM.
836: [03:53:00] <Pyromanik> not to mention doing stuff the hard way.
837: [03:53:00] <ApacheTiger> I don't think you are. i was just trying to explain
838: [03:54:00] <FrozenFire> ApacheTiger, Perhaps try PartialMatch
839: [03:54:00] <Pyromanik> then there's DB::Query
840: [03:54:00] <ApacheTiger> I had it coded the other way first. ->filter($aIncludes)->exclude($aExcludes) running through switches to build on it
841: [03:54:00] <FrozenFire> That should get all MyObject where that field partially matches that value
842: [03:54:00] <FrozenFire> And then, if your value is empty, it'll get all
843: [03:54:00] <FrozenFire> E.g. MyObject::get()->filter("Field:PartialMatch", $value)
844: [03:54:00] <Pyromanik> if you REALLLY REALLLLLLLY need raw sql (which is like, never)
845: [03:55:00] <ApacheTiger> that is what it was doing.
846: [03:56:00] <FrozenFire> Need something a *little* more specific
847: [03:56:00] <ApacheTiger> error on line 245 of mysqldatabase or something like that
848: [03:56:00] <FrozenFire> What is the error?
849: [03:56:00] <ApacheTiger> then it through errors
850: [03:56:00] <FrozenFire> Alright, so what is happening that's wrong?
851: [03:56:00] <ApacheTiger> It worked well until i had an exclude array
852: [03:56:00] <FrozenFire> Could you paste the code you're using?
853: [03:57:00] <ApacheTiger> then i just tried using the :not modifier on the partial match and it dient like that.
854: [03:57:00] <FrozenFire> Yeah, you can't combine ExactMatch or PartialMatch with Not
855: [03:57:00] <ApacheTiger> but I want to do NOT LIKE in my queries
856: [03:57:00] <FrozenFire> You might be using the wrong syntax
857: [03:58:00] <ApacheTiger> so i am down to ->get()->where()
858: [03:58:00] <FrozenFire> MyObject::get()->exclude("Field:PartialMatch", $value)
859: [03:59:00] <FrozenFire> That will resolve to, essentially SELECT ... FROM `MyObject` WHERE `Field` NOT LIKE '%$value%'
860: [03:59:00] <ApacheTiger> okay so not equal and partialmatch gets put in exclude and i tried that with the filter and it fails
861: [03:59:00] <ApacheTiger> I'll try again. I modified a lot of code working it back to the where() approach.
862: [04:00:00] <FrozenFire> It's a really bad idea. I do a *lot* of screwy stuff in SS, and I never resort to DataList::where
863: [04:00:00] <FrozenFire> Yeah. Just trust me in that you shouldn't use DataList::where
864: [04:01:00] <irogue> most definitely
865: [04:01:00] <irogue> except for the cloud database still not being particularly stable
866: [04:01:00] <FrozenFire> Which host is this?
867: [04:01:00] <irogue> i actually suspect rackspace have a cronjob set up to restart the db
868: [04:01:00] <irogue> [16:49] <FrozenFire> Is it running well?
869: [04:01:00] <Pyromanik> mm, generally if you find yourself not using the ORM, you're probably don't doing it right.
870: [04:02:00] <FrozenFire> Ah, yeah.
871: [04:02:00] * dnz- sees wall of text from FrozenFire, disregards everything as useless bullshit and detatches from screen
872: [04:02:00] <irogue> and its exact same time each day
873: [04:02:00] <irogue> which leads me to believe its a restart job
874: [04:02:00] <FrozenFire> I found the same thing with their cloud servers. They'll roll out new "versions" of their servers
875: [04:02:00] <Pyromanik> so what you're saying is that my server that's loaded up with sites is more stable than all the separate servers you've got spooled up because they're all on rackspace?
876: [04:02:00] <irogue> i've talked to rackspace, they reckon it's "normal behaviour"
877: [04:02:00] <FrozenFire> Might be worth backing up, deinstancing and reinstancing
878: [04:02:00] <irogue> so every day i get ~2min of db downtime
879: [04:02:00] <FrozenFire> It's getting better.
880: [04:02:00] <FrozenFire> Rackspace's cloud database was a bit iffy at first, for sure
881: [04:02:00] <irogue> which is right in the middle of the workday for us :P
882: [04:02:00] <irogue> at a time when people won't notice
883: [04:03:00] <irogue> FrozenFire: i know
884: [04:03:00] <FrozenFire> irogue, There's #rackspace if you want to ask questions
885: [04:03:00] * DigNZ quit (Quit: DigNZ)
886: [04:03:00] <FrozenFire> And existing servers remain those versions
887: [04:03:00] <FrozenFire> Might be better than the front-line support. :P
888: [04:03:00] <irogue> i also have a friend who works there :P
889: [04:04:00] <irogue> lol
890: [04:04:00] <FrozenFire> Neither have I. Yeah. :P
891: [04:04:00] <irogue> always strongly-accented americans
892: [04:04:00] <irogue> never had an outsourced person at rackspace
893: [04:04:00] <FrozenFire> "Okay. Is cloud database normal behaviour"
894: [04:04:00] <FrozenFire> Guess it's more of a characterization of incompetence in front-line support
895: [04:04:00] <FrozenFire> "Hello. This is Abed. Please to tell me your account identifier?"
896: [04:05:00] * tankr quit (Quit: Leaving.)
897: [04:05:00] * nickmolhoek quit (Quit: nickmolhoek)
898: [04:06:00] <irogue> yeah
899: [04:06:00] * irogue is front-line support :P
900: [04:06:00] <irogue> FrozenFire: btw http://www.greens.org.nz/press-releases/greens-launch-plan-invest-second-internet-cable
901: [04:08:00] <FrozenFire> I promise not to complain about Canadian internet again
902: [04:08:00] <FrozenFire> :P
903: [04:08:00] <ApacheTiger> Error at line 580 of /home/awakeningsoul/www/awakeningsoul.digitalresourcestn.com/framework/model/MySQLDatabase.php
904: [04:09:00] <ApacheTiger> $sKey .= 'LessThan';
905: [04:09:00] <ApacheTiger> break;
906: [04:09:00] <ApacheTiger> * @var DataList
907: [04:09:00] <ApacheTiger> */
908: [04:09:00] <ApacheTiger> $oTemplate = $this->EmailTemplate();
909: [04:09:00] <ApacheTiger> /**
910: [04:09:00] <ApacheTiger> * @var DataList
911: [04:09:00] <ApacheTiger> */
912: [04:09:00] <ApacheTiger> $oConditions = $this->EmailConditions();
913: [04:09:00] <ApacheTiger> $aIncludes = array();
914: [04:09:00] <ApacheTiger> $aExcludes = array();
915: [04:09:00] <ApacheTiger> foreach ( $oConditions as /* @var $oCondition EmailCondition */ $oCondition )
916: [04:09:00] <ApacheTiger> {
917: [04:09:00] <ApacheTiger> $sKey = $oCondition->ContactField;
918: [04:09:00] <ApacheTiger> switch ( $oCondition->ConditionOperator )
919: [04:09:00] <ApacheTiger> {
920: [04:09:00] <ApacheTiger> case EmailCondition::EC_OPERATOR_GREATERTHAN:
921: [04:09:00] <ApacheTiger> $sKey .= ':GreaterThan';
922: [04:09:00] <ApacheTiger> break;
923: [04:09:00] <ApacheTiger> case EmailCondition::EC_OPERATOR_LESSTHAN:
924: [04:09:00] <ApacheTiger> case EmailCondition::EC_OPERATOR_LIKE:
925: [04:09:00] <ApacheTiger> $sKey .= ':PartialMatch';
926: [04:09:00] <ApacheTiger> break;
927: [04:09:00] <ApacheTiger> default:
928: [04:09:00] <ApacheTiger> $sKey .= ':ExactMatch';
929: [04:09:00] <ApacheTiger> break;
930: [04:09:00] <ApacheTiger> }
931: [04:09:00] <ApacheTiger> switch ( $oCondition->ConditionAction )
932: [04:10:00] <ApacheTiger> case EmailCondition::EC_ACTION_EXCLUDE:
933: [04:10:00] <ApacheTiger> wrong way to do that?
934: [04:10:00] <FrozenFire> Way, way, way wrong way.
935: [04:10:00] <ApacheTiger> I apologize everyone
936: [04:10:00] <FrozenFire> http://www.sspaste.com/
937: [04:10:00] * instabil2 has joined #silverstripe
938: [04:10:00] <ApacheTiger> It works as long as the $aExcludes has no values
939: [04:10:00] <ApacheTiger> }
940: [04:10:00] <ApacheTiger> {
941: [04:10:00] <ApacheTiger> case EmailCondition::EC_ACTION_INCLUDE:
942: [04:10:00] <FrozenFire> ApacheTiger, Oh god
943: [04:10:00] <ApacheTiger> $aIncludes[$sKey] = $oCondition->FieldValue;
944: [04:10:00] <ApacheTiger> break;
945: [04:10:00] <FrozenFire> Pastebin
946: [04:10:00] <ApacheTiger> break;
947: [04:10:00] <FrozenFire> Abort
948: [04:10:00] <FrozenFire> Abort
949: [04:10:00] <ApacheTiger> $this->QueuedEmails()->removeAll();
950: [04:10:00] <ApacheTiger> }
951: [04:10:00] <ApacheTiger> $aInsert['Sent'] = 0;
952: [04:10:00] <ApacheTiger> $aInsert['EmailCampaignID'] = $this->ID;
953: [04:10:00] <ApacheTiger> $aInsert['ContactID'] = $oQueued->ID;
954: [04:10:00] <ApacheTiger> $aInsert['SentDate'] = '0000-00-00';
955: [04:10:00] <ApacheTiger> $aInsert['SentTime'] = '00:00:00';
956: [04:10:00] <ApacheTiger> ContactEmailQueued::create($aInsert)->write();
957: [04:10:00] <ApacheTiger> $aInsert = array();
958: [04:10:00] <ApacheTiger> {
959: [04:10:00] <ApacheTiger> foreach ( $oQueues as $oQueued )
960: [04:10:00] <FrozenFire> Abort
961: [04:10:00] <FrozenFire> Abort
962: [04:10:00] <ApacheTiger> $oQueues = Contact::get()->filter($aIncludes)->exclude($aExcludes);
963: [04:10:00] <ApacheTiger> }
964: [04:10:00] <ApacheTiger> sorry
965: [04:10:00] <FrozenFire> Abort
966: [04:10:00] <FrozenFire> Abort
967: [04:10:00] <FrozenFire> Abort
968: [04:10:00] <ApacheTiger> $aExcludes[$sKey] = $oCondition->FieldValue;
969: [04:10:00] <FrozenFire> Abort
970: [04:11:00] <FrozenFire> Never, ever paste more than two lines into IRC
971: [04:11:00] <FrozenFire> ;)
972: [04:12:00] <ApacheTiger> i think paste bin isn't loading
973: [04:12:00] <FrozenFire> Alternatively, pastebin.com
974: [04:13:00] <Pyromanik> sspaste.com pastie.org pastebin.com
975: [04:13:00] <Pyromanik> etc etc
976: [04:13:00] <ApacheTiger> LOL
977: [04:13:00] <ApacheTiger> http://pastebin.com/embed.php?i=GPawVhBS
978: [04:13:00] * Pyromanik has left #silverstripe
979: [04:13:00] <Pyromanik> home time
980: [04:14:00] <FrozenFire> Or maybe it's just how you pasted
981: [04:14:00] * instabil quit (Ping timeout: 260 seconds)
982: [04:14:00] <FrozenFire> You have a very weird indentation style
983: [04:14:00] <irogue> http://www.trademe.co.nz/Browse/Listing.aspx?id=547585883
984: [04:14:00] <FrozenFire> I think you mean http://pastebin.com/GPawVhBS
985: [04:14:00] <ApacheTiger> not right?
986: [04:15:00] <ApacheTiger> first line was weird
987: [04:15:00] <FrozenFire> Oh yeah, it's how you pasted, nevermind
988: [04:16:00] <ApacheTiger> I saw the missing colon on the LessThan operator, but my selection had an exact match on the last name and an exclude partial match on the first name
989: [04:16:00] <FrozenFire> What is the type of $sKey at first?
990: [04:17:00] <FrozenFire> Like, check.
991: [04:17:00] <ApacheTiger> $sKey is the FieldName
992: [04:17:00] <ApacheTiger> I append the match type to it.
993: [04:17:00] <FrozenFire> What is the value of $sKey at first?
994: [04:17:00] <ApacheTiger> it is a drop down field enum list
995: [04:17:00] <FrozenFire> Might be different than you expect.
996: [04:18:00] <ApacheTiger> Yes, it returns what is expected LastName.
997: [04:18:00] <FrozenFire> :P
998: [04:18:00] <FrozenFire> Good
999: [04:18:00] <ApacheTiger> it works perfect when i only filter
1000: [04:18:00] <ApacheTiger> uses same drop downs
1001: [04:18:00] <FrozenFire> Have you checked the value of $sKey? No? Why not?
1002: [04:19:00] <FrozenFire> So if you set the source as array("Foo", "Bar", "Baz"), you'll get 0, 1 and 2 back respectively.
1003: [04:19:00] <FrozenFire> Because the key of its source is what you get back as a value
1004: [04:19:00] <FrozenFire> DropdownField often confuses people
1005: [04:21:00] <ApacheTiger> Value of sKey = 'FirstName'
1006: [04:21:00] <FrozenFire> So you're still getting an error when you fix the colon on LessThan?
1007: [04:21:00] <ApacheTiger> No i get the actual field name.
1008: [04:22:00] <ApacheTiger> No, but I'll look into it.
1009: [04:22:00] <FrozenFire> Haha. That's a funny way to debug it
1010: [04:22:00] <ApacheTiger> $oMailer->sendPlain('bedge@digitalresourcestn.com', 'apache@digitalresourcestn.com', 'Value of $sKey', var_export( $sKey, true ) );
1011: [04:22:00] <FrozenFire> Are you aware of Debug::dump()?
1012: [04:23:00] <FrozenFire> I'm still flying blind
1013: [04:23:00] <FrozenFire> So, you haven't actually yet pasted your error message
1014: [04:23:00] <FrozenFire> You posted the stack trace
1015: [04:24:00] <ApacheTiger> But it does return the fields as expected so $aIncludes should be array('LastName:ExactMatch' => 'Jones') and my $aExcludes is array('FirstName:PartialMatch' => 'Joh')
1016: [04:26:00] <FrozenFire> And the error message is?
1017: [04:27:00] <ApacheTiger> 500 Error at line 580 o...model/MySQLDatabase.php
1018: [04:28:00] <ApacheTiger> IN POST /admin/email-campaigns/EmailCampaign/EditForm/field/EmailCampaign/item/1/ItemEditForm
1019: [04:28:00] <ApacheTiger> Line 580 in /home/awakeningsoul/www/awakeningsoul.digitalresourcestn.com/framework/model/MySQLDatabase.php
1020: [04:28:00] <ApacheTiger> Unknown column 'FirstName:PartialMatch' in 'where clause'
1021: [04:29:00] <ApacheTiger> Yes
1022: [04:29:00] <FrozenFire> Does the FirstName field exist?
1023: [04:29:00] <ApacheTiger> the PartialMatch is in the exclude
1024: [04:29:00] <FrozenFire> Are you sure it's not Firstname?
1025: [04:30:00] <ApacheTiger> 'FirstName' => 'Varchar(255)',
1026: [04:30:00] <FrozenFire> Alright, good
1027: [04:30:00] <ApacheTiger> sorry
1028: [04:31:00] <FrozenFire> Heh. Don't worry. I've been doing support for a *long* time
1029: [04:31:00] <FrozenFire> :P
1030: [04:31:00] <ApacheTiger> I don't mean to sound ungrateful or stress you out.
1031: [04:31:00] <ApacheTiger> It just doesn't seem to want to catch the PartialMatch filter in the exclude method
1032: [04:32:00] <FrozenFire> Do you happen to know what version of the framework you're running?
1033: [04:32:00] <ApacheTiger> fresh site less than a month old
1034: [04:32:00] <FrozenFire> Hrmm, that *should* work
1035: [04:32:00] <ApacheTiger> 3.0.3
1036: [04:32:00] <ApacheTiger> latest
1037: [04:33:00] <ApacheTiger> yeah, that is what i thought too.
1038: [04:33:00] <ApacheTiger> Here is the full query.
1039: [04:34:00] <ApacheTiger> SELECT DISTINCT "Contact"."ClassName", "Contact"."Created", "Contact"."LastEdited", "Contact"."FirstName", "Contact"."LastName", "Contact"."Address1", "Contact"."Address2", "Contact"."City", "Contact"."State", "Contact"."Zip", "Contact"."Country", "Contact"."Phone", "Contact"."Fax", "Contact"."Email", "Contact"."Source", "Contact"."ID", CASE WHEN "Contact"."ClassName" IS NOT NULL THEN "Contact"."ClassName" ELSE 'Contact'
1040: [04:34:00] <ApacheTiger> END AS "RecordClassName"
1041: [04:34:00] <FrozenFire> It's not parsing the filter for some reason
1042: [04:34:00] <FrozenFire> Yeah
1043: [04:34:00] <FrozenFire> Yeah
1044: [04:34:00] <ApacheTiger> and it uses the !=
1045: [04:34:00] <ApacheTiger> FROM "Contact"
1046: [04:34:00] <ApacheTiger> WHERE ("LastName" = 'Edge') AND ("FirstName:PartialMatch" != 'Nik')
1047: [04:34:00] <ApacheTiger> see it doesn't deal with the PartialMatch at all in the exclude
1048: [04:35:00] <ApacheTiger> and since :PartialMatch:Not won't work in the filter() I think ->where() would be fastest approach
1049: [04:35:00] <FrozenFire> :P
1050: [04:35:00] <FrozenFire> Welp, into the core I descend to take a look
1051: [04:35:00] <ApacheTiger> It's only a few fields to escape
1052: [04:36:00] <FrozenFire> 3.0.3 doesn't support exclude filters
1053: [04:36:00] <FrozenFire> Guh. Lucky you.
1054: [04:37:00] <FrozenFire> That's actually odd
1055: [04:37:00] <ApacheTiger> Nice
1056: [04:38:00] <ApacheTiger> and since :not doesn't work either because I tried adding :not if the action was exclude and it failed on that at a different location in mysqldatabase.php
1057: [04:38:00] <ApacheTiger> i think i am left with ->where(). what do you think?
1058: [04:38:00] <FrozenFire> Oh ho ho. We get to give simon_w a royal thrashing
1059: [04:38:00] <FrozenFire> :P
1060: [04:38:00] <FrozenFire> He's the one to blame
1061: [04:39:00] <FrozenFire> But that should've been cherry-picked into 3.0
1062: [04:39:00] <ApacheTiger> LOL
1063: [04:39:00] <ApacheTiger> he's on vacation isn't he?
1064: [04:39:00] <FrozenFire> But yeah, I hate to say it, because it really does suck, but yeah, you get to use DataList::where
1065: [04:39:00] <FrozenFire> Sorry for the run-around. :P
1066: [04:39:00] <FrozenFire> And yeah, he's on vacation
1067: [04:39:00] <ApacheTiger> no problems
1068: [04:39:00] <FrozenFire> https://github.com/silverstripe/sapphire/commit/2faf7d112d1d0a58724e393d08cecf0790f2e9b1 is where he fixed it in 3.1
1069: [04:40:00] <FrozenFire> Convert::raw2sql
1070: [04:40:00] <ApacheTiger> i really appreciate it.
1071: [04:40:00] <ApacheTiger> getting back to the code
1072: [04:40:00] <ApacheTiger> thanks
1073: [04:40:00] <ApacheTiger> what was the command to mysql_real_escape_string()
1074: [04:40:00] <ApacheTiger> okay thank
1075: [04:41:00] <ApacheTiger> I will know how to do it later.
1076: [04:41:00] <ApacheTiger> have a good night
1077: [04:41:00] <ApacheTiger> I do enjoy the adventure. It may not have worked but I learned a lot.
1078: [04:42:00] <FrozenFire> You too
1079: [04:43:00] <ApacheTiger> does that send to where I can see it in Firebug?
1080: [04:43:00] <ApacheTiger> what does the Debug:dump() do?
1081: [04:44:00] * BPower quit (Read error: Connection reset by peer)
1082: [04:44:00] * BPower_ has joined #silverstripe
1083: [04:44:00] <ApacheTiger> Never mind; I'll look it up later.
1084: [04:45:00] * ApacheTiger has left #silverstripe
1085: [04:45:00] <ApacheTiger> Later
1086: [04:49:00] * cloph quit (Read error: Connection reset by peer)
1087: [04:51:00] * cloph_away has joined #silverstripe
1088: [04:55:00] * Error404NotFound quit (Disconnected by services)
1089: [04:55:00] * Err404NotFound has joined #silverstripe
1090: [05:00:00] * pumpkin has joined #silverstripe
1091: [05:01:00] * pumpkin is now known as Guest18099
1092: [05:14:00] <Guest18099> What would be the best way to allow bulk image uploading that can still be managed by a grid field for a gallery?
1093: [05:17:00] * guci0 has joined #silverstripe
1094: [05:18:00] <FrozenFire> Or not
1095: [05:18:00] <FrozenFire> Your choice
1096: [05:18:00] <FrozenFire> Guest18099, UploadField supports multiple image upload
1097: [05:18:00] <FrozenFire> Then you can manage it afterwards using GridField
1098: [05:19:00] <Guest18099> am I going about this wrong somehow?
1099: [05:19:00] <Guest18099> Hmm I've followed the dataobject tutorial and when adding entries a record must be saved before files can be attached
1100: [05:20:00] <FrozenFire> You're not going wrong about it. Any sort of relation cannot be saved on an unsaved DataObject
1101: [05:21:00] <FrozenFire> In 3.1, I think there's a fix that allows it, but 3.1 is still in beta
1102: [05:22:00] <Guest18099> would their best option be to upload it using the files part of the admin
1103: [05:22:00] <Guest18099> So for someone who wants to upload lots of large images at a time and come back to it later to add in titles, descriptions etc
1104: [05:22:00] <FrozenFire> I've had the same problem. It's not an easy one to solve.
1105: [05:22:00] <Guest18099> then relate the image to records in the gridfield manager later
1106: [05:23:00] <FrozenFire> ApacheTiger, Round three?
1107: [05:23:00] <FrozenFire> :P
1108: [05:23:00] <Guest18099> awesome I look forward to it :)
1109: [05:23:00] * ApacheTiger has joined #silverstripe
1110: [05:23:00] <Guest18099> thankyou for confirming to me that I'm not just missing something lol
1111: [05:23:00] <FrozenFire> It really isn't just you. It's an ongoing problem that *hopefully* will be resolved in 3.1.
1112: [05:24:00] <ApacheTiger> where worked like a charm.
1113: [05:24:00] <FrozenFire> Is there a reason you need to detect the means of being written?
1114: [05:24:00] <ApacheTiger> Any way to tell if your onAfterWrite is being called by the CMS or by the FrontEnd or by BuildTask?
1115: [05:24:00] <ApacheTiger> i have my other working
1116: [05:24:00] <ApacheTiger> new issue
1117: [05:24:00] <ApacheTiger> LOL
1118: [05:25:00] <FrozenFire> I'll learn from my prior mistake and just say, is_a(Controller::curr(), "LeftAndMain")
1119: [05:25:00] <ApacheTiger> when the queue is running i want to set the email campaign sending flag to true
1120: [05:25:00] <ApacheTiger> yes, when i create the where conditions on the email campaign and i save the campaign the where conditions preselect the contacts and add them to a queue.
1121: [05:25:00] <FrozenFire> :P
1122: [05:26:00] <ApacheTiger> that requires writing back to the table before sending
1123: [05:26:00] <FrozenFire> Well, it might be best not to do that in the onAfterWrite, then.
1124: [05:26:00] <FrozenFire> Just set the sent flag to true in the controller, perhaps?
1125: [05:27:00] <ApacheTiger> Can't exactly see where else to write it. I want it done when the email campaign is saved, not for each condition
1126: [05:27:00] <FrozenFire> Well, I don't really know exactly how you're structuring this all
1127: [05:27:00] * Err404NotFound is now known as Error404NotFound
1128: [05:28:00] <FrozenFire> Typically I'd do it in whatever processing loop I've made
1129: [05:28:00] <ApacheTiger> I guess i could set the field to sending and then test for that. yep that works
1130: [05:29:00] <ApacheTiger> okay, they create an email template, then an email campaign, they upload contacts, choose conditions by which those contacts get added, when they save the email campaign it queries the contacts and puts them into an email campaign queued contacts table.
1131: [05:31:00] <ApacheTiger> my build task extended class that you helped me with last night fires off, looks for unsent campaigns, sets the flag to sending then loops through each queued contact setting its sent flag to true on send. But when i set the emailcampaign sending flag to true or sent flag to true i don't want the queued emails to be queued again.
1132: [05:32:00] <FrozenFire> I think you're getting bit by misuse of onBeforeWrite/onAfterWrite
1133: [05:32:00] <ApacheTiger> I just need to test for the value of sending and sent in onAfterUpdate
1134: [05:34:00] * liam quit (Quit: liam)
1135: [05:35:00] <FrozenFire> Default the campaign's "Sent" boolean to false
1136: [05:35:00] <FrozenFire> You add contacts to a many_many
1137: [05:35:00] <FrozenFire> You create an Email campaign
1138: [05:35:00] <FrozenFire> I'm not sure why writing should cause anything to get queued again
1139: [05:36:00] <ApacheTiger> How will i track individual contact to email campaign sends? on sending?
1140: [05:36:00] <FrozenFire> Not sure what you mean
1141: [05:36:00] <ApacheTiger> forget queuing them up at all
1142: [05:36:00] <FrozenFire> Then your task does EmailCampaign::get()->filter("Sent", false);
1143: [05:37:00] <ApacheTiger> Ahh the deep understanding
1144: [05:37:00] <FrozenFire> You want to track when you send an email to each contact?
1145: [05:37:00] <ApacheTiger> I want to be able to run campaign statistics
1146: [05:37:00] <FrozenFire> You can do many_many_extraFields
1147: [05:37:00] <ApacheTiger> yeah
1148: [05:37:00] <FrozenFire> static $many_many_extraFields = array("Contact" => array("Sent" => "Boolean"))
1149: [05:38:00] <FrozenFire> Then for each Contact you get, it attaches that field to it
1150: [05:38:00] <FrozenFire> Be sure not to misuse extraFields, though
1151: [05:38:00] <FrozenFire> And you can also $this->Contacts()->filter("Sent", false)
1152: [05:38:00] <ApacheTiger> Perfect
1153: [05:39:00] <ApacheTiger> LOL:
1154: [05:39:00] <FrozenFire> E.g. EmailCampaignContact
1155: [05:39:00] <FrozenFire> Which $has_one Contact and $db Sent, etc
1156: [05:39:00] <FrozenFire> Also $has_one Campaign, of course
1157: [05:39:00] <ApacheTiger> Got it; see why I keep coming back.
1158: [05:39:00] <FrozenFire> If you find you have more than two extra fields, that's a need for a relationship middleman object
1159: [05:39:00] <ApacheTiger> i need sent, senton
1160: [05:40:00] <FrozenFire> Hehe
1161: [05:40:00] <FrozenFire> I like architecting applications
1162: [05:40:00] <FrozenFire> Happy to help
1163: [05:41:00] <ApacheTiger> okay, i'm going to try to finish up tonight. once again, thanks for all your excellent advice.
1164: [05:42:00] * DigNZ has joined #silverstripe
1165: [05:42:00] <ApacheTiger> Do i just use the regular max execute commands or do i need something else in BuildTask?
1166: [05:43:00] <ApacheTiger> php directives
1167: [05:43:00] <FrozenFire> http://php.net/manual/en/function.set-time-limit.php
1168: [05:43:00] <FrozenFire> Not sure what you mean by max execute
1169: [05:43:00] <FrozenFire> Do you mean the max script time?
1170: [05:43:00] <ApacheTiger> yeah
1171: [05:44:00] <ApacheTiger> right, nothing special in Director or anything like that?
1172: [05:44:00] * ApacheTiger has left #silverstripe
1173: [05:44:00] <ApacheTiger> thanks
1174: [05:44:00] <ApacheTiger> k
1175: [05:44:00] <FrozenFire> Nah. No need to abstract something so simple.
1176: [05:44:00] <FrozenFire> Just don't set it to 0 (infinite)
1177: [05:59:00] * dendeffe has joined #silverstripe
1178: [06:00:00] * DigNZ quit (Ping timeout: 245 seconds)
1179: [06:10:00] * l8s has joined #silverstripe
1180: [06:30:00] * Guest18099 quit (Quit: Page closed)
1181: [06:30:00] * EPIK quit (Ping timeout: 260 seconds)
1182: [06:49:00] * ray has joined #silverstripe
1183: [06:50:00] * liam has joined #silverstripe
1184: [07:06:00] * Shrike_Finland has joined #silverstripe
1185: [07:06:00] * ray quit (Ping timeout: 245 seconds)
1186: [07:12:00] * Shrike_Finland quit (Read error: Connection reset by peer)
1187: [07:12:00] * Shrike_Finland1 has joined #silverstripe
1188: [07:20:00] * dendeffe quit (Quit: dendeffe)
1189: [07:36:00] * hubertusanton has joined #silverstripe
1190: [07:49:00] <l8s> i have a dataobject class managed using modeladmin.
1191: [07:49:00] <l8s> the dataobject has a $has_one relation.
1192: [07:49:00] <l8s> this relation is displayed as a field in the form, when i add or edit on of these dataobjects in modeladmin.
1193: [07:49:00] <l8s> i learned from reference, that modeladmin is largely driven by gridfield and for gridfields fields displayed in edit form are from dataobject::getcmsfields().
1194: [07:49:00] <l8s> the form shows all my fields added in getcmsfields(), but adds an additional field for this relation.
1195: [07:49:00] <l8s> how can i avoid the relation to be displayed in the form?
1196: [07:49:00] * g4b0 has joined #silverstripe
1197: [07:51:00] * dendeffe has joined #silverstripe
1198: [07:56:00] <g4b0> morning
1199: [08:02:00] * ratcat has joined #silverstripe
1200: [08:02:00] * wmk has joined #silverstripe
1201: [08:02:00] <wmk> good morning ;)
1202: [08:13:00] * liam quit (Quit: liam)
1203: [08:14:00] * blindNoob quit (Read error: Connection reset by peer)
1204: [08:14:00] * blindNoob has joined #silverstripe
1205: [08:16:00] * dobalina has joined #silverstripe
1206: [08:20:00] * zfmf has joined #silverstripe
1207: [08:26:00] * congii quit (Ping timeout: 245 seconds)
1208: [08:35:00] * liam has joined #silverstripe
1209: [08:42:00] * guci0 quit (Ping timeout: 245 seconds)
1210: [08:42:00] * Motoservo quit (Remote host closed the connection)
1211: [08:43:00] * openbees has joined #silverstripe
1212: [08:45:00] <g4b0> $record = DataObject::get('ClassName', "ClassName.ID=$element->ID")->First();
1213: [08:45:00] <g4b0> SS bug or my error?
1214: [08:45:00] <g4b0> Unknown column 'ClassName.ID' in 'where clause'
1215: [08:46:00] <l8s> g4b0: what type of dataobjects do you want to retrieve
1216: [08:46:00] <g4b0> ClassName is a Page children
1217: [08:47:00] <l8s> ClassNameID instead of ClassName.ID ?
1218: [08:48:00] <g4b0> mmm
1219: [08:48:00] <wmk> try with backticks: `ClassName`.`ID`
1220: [08:48:00] <g4b0> let's me try
1221: [08:49:00] <g4b0> sorry
1222: [08:49:00] <g4b0> Unknown column 'GalleryPageID' in 'where clause'
1223: [08:49:00] <g4b0> Unknown column 'GalleryPageID' in 'where clause'
1224: [08:49:00] <wmk> ;)
1225: [08:50:00] <g4b0> same problem
1226: [08:50:00] <g4b0> var_dump(ClassInfo::ancestry('GalleryPage'));
1227: [08:50:00] <g4b0> Unknown column 'GalleryPage.ID'
1228: [08:51:00] <g4b0> 'Object' => string 'Object' (length=6)
1229: [08:51:00] <g4b0> 'SiteTree' => string 'SiteTree' (length=8)
1230: [08:51:00] <g4b0> 'DataObject' => string 'DataObject' (length=10)
1231: [08:51:00] <g4b0> 'ViewableData' => string 'ViewableData' (length=12)
1232: [08:51:00] <g4b0> array (size=8)
1233: [08:51:00] <g4b0> 'GalleryPage' => string 'GalleryPage' (length=11)
1234: [08:51:00] <g4b0> 'PgsBaseLang' => string 'PgsBaseLang' (length=11)
1235: [08:51:00] <g4b0> 'PgsBase' => string 'PgsBase' (length=7)
1236: [08:51:00] <g4b0> 'Page' => string 'Page' (length=4)
1237: [08:52:00] <g4b0> maybe it's a SS bug when the inerith tree is too big?
1238: [08:52:00] <wmk> can you paste the Dataobject::get call?
1239: [08:53:00] <g4b0> off course
1240: [08:54:00] <g4b0> $record = DataObject::get($element->DoClass, "{$element->DoClass}ID=$element->DoID")->First();
1241: [08:54:00] <g4b0> $record = DataObject::get($element->DoClass, "ID=$element->DoID")->First();
1242: [08:54:00] <g4b0> $record = DataObject::get($element->DoClass, "$element->DoClass.ID=$element->DoID")->First();
1243: [08:54:00] <g4b0> $record = DataObject::get($element->DoClass, "`$element->DoClass`.`ID`=$element->DoID")->First();
1244: [08:54:00] <g4b0> no one works :(
1245: [08:55:00] <wmk> maybe it's just "ID", but why don't you use get_by_id instead? http://api.silverstripe.org/2.4/sapphire/model/DataObject.html#methodget_by_id
1246: [08:55:00] <wmk> you only need this one record...
1247: [08:55:00] <g4b0> just id says: Column 'ID' in where clause is ambiguous
1248: [08:55:00] <g4b0> just this record
1249: [08:55:00] <g4b0> yea
1250: [08:56:00] <g4b0> yes
1251: [08:56:00] <wmk> i bet get_by_id is your friend
1252: [08:56:00] * DigNZ has joined #silverstripe
1253: [08:56:00] <g4b0> let's me try :)
1254: [08:59:00] <kinglozzer> Morning all
1255: [08:59:00] * kinglozzer has joined #silverstripe
1256: [09:00:00] <openbees> Either I am gone mad or SIlverStripe ! I have a class Post .. Post has_one Member ("Member" => "Member") .... I am selecting some Post on a Page Controller "function selectedPost()"... now whenever I am trying to get this->Member() in Post class after calling selectedPost() it always gives me Logged-in Memebr :( Anyone know what the BEEP is going on here !
1257: [09:00:00] <g4b0> morning -4.5 in Italy :)
1258: [09:00:00] <g4b0> wmk: get_by_id seems working
1259: [09:00:00] <kinglozzer> Anyone from the UK in here enjoying the weather? It's -11C here
1260: [09:00:00] <wmk> morning
1261: [09:00:00] * liam quit (Quit: liam)
1262: [09:01:00] * DigNZ quit (Quit: DigNZ)
1263: [09:01:00] <wmk> g4b0, fine! glad i could help you
1264: [09:01:00] <g4b0> anyway it's a strange behaviour the one of DataObject::get
1265: [09:01:00] <openbees> afternoon .. 20 in India :)
1266: [09:02:00] <g4b0> thanks a lot
1267: [09:02:00] <wmk> openbees, maybe $this->selectedPost()->Member() ??
1268: [09:04:00] <openbees> yaah that's give correct answer if I am in page controller ... ! but I want this thing in Post class .. for some things !
1269: [09:05:00] <openbees> wmk: and also when I am using <% with selectedPost %> in template it gives me wrong value.
1270: [09:10:00] * popeshoe has joined #silverstripe
1271: [09:10:00] <l8s> openbees: would renaming the relation to PostMember be an option?
1272: [09:11:00] <openbees> yes that's works ... but we are going live today ... don't know why the fu** no realized this before ;(
1273: [09:12:00] * liam has joined #silverstripe
1274: [09:14:00] <l8s> this relation is displayed as a field in the form, when i add or edit on of these dataobjects in modeladmin.
1275: [09:14:00] <l8s> how can i avoid the relation to be displayed in the form?
1276: [09:14:00] <l8s> i have a dataobject class managed using modeladmin.
1277: [09:14:00] <l8s> the dataobject has a $has_one relation.
1278: [09:14:00] <l8s> i learned from reference, that modeladmin is largely driven by gridfield and gridfield displays fields in edit form from dataobject::getcmsfields().
1279: [09:14:00] <l8s> the form shows all my fields added in getcmsfields(), but adds an additional field for this relation.
1280: [09:18:00] <wmk> l8s, $fields->removeByName("FieldName") maybe?
1281: [09:18:00] <l8s> wmk: i'll try ..
1282: [09:21:00] <l8s> wmk: worked! thx
1283: [09:22:00] <wmk> l8s, fine
1284: [09:25:00] * MrGuits quit (Read error: Connection reset by peer)
1285: [09:26:00] * openbees quit (Read error: Connection reset by peer)
1286: [09:27:00] * MrGuits has joined #silverstripe
1287: [09:30:00] * priithansen has joined #silverstripe
1288: [09:35:00] * lobarvaz has joined #silverstripe
1289: [09:42:00] <g4b0> next problem: in onAfterWrite I need to call write()
1290: [09:43:00] <g4b0> Is there a way to avoid the loop
1291: [09:43:00] <g4b0> ?
1292: [09:43:00] <g4b0> maybe bypassing the next onAfterWrite?
1293: [09:49:00] * liam quit (Ping timeout: 255 seconds)
1294: [09:52:00] * liam has joined #silverstripe
1295: [09:56:00] * ratcat quit (Read error: Connection reset by peer)
1296: [09:58:00] <wmk> anyone has an idea why a googlemap (v2) works in firefox, but in ie and safari the "wrong api key" error occurs
1297: [10:07:00] <kinglozzer> I need some help with ArrayData, how can I convert this into something ArrayData can use: http://www.sspaste.com/paste/show/50f67b9abef3f
1298: [10:08:00] <kinglozzer> If I do 'new ArrayData($array)', then try to access, for example, 'title' in the template it just returns 'Array'
1299: [10:08:00] <l8s> g4b0: isn't onAfterWrite only called, when dataobject has changes or - at least in ss3 - if write is forced? see method write() in DataObject.php.
1300: [10:08:00] * ratcat has joined #silverstripe
1301: [10:10:00] <g4b0> boring, but functional
1302: [10:10:00] <g4b0> yep, but DataObject has changes :)
1303: [10:10:00] <g4b0> I solved with custom query
1304: [10:12:00] <l8s> kinglozzer: how do you access title in template?
1305: [10:13:00] <kinglozzer> $results = new ArrayData($array), then <% control Results %>$title<% end_control %>
1306: [10:13:00] <kinglozzer> I don't want to have to do $item['title'] = $item['title'][0]; for each field
1307: [10:29:00] <l8s> kinglozzer: foreach ($item as $k => $v) { $item[$k] = $v[0]; }
1308: [10:30:00] <kinglozzer> That would work, but some of them have more than one item in their arrays, so I'm gonna have to do it manually :(
1309: [10:33:00] <kinglozzer> Yep, I think it'd be better for me to do it manually anyway as I only need some of the fields. Just being lazy :P
1310: [10:33:00] <l8s> kinglozzer: like in [primaryCategory][0][categoryID][0] ?
1311: [10:35:00] <l8s> but if the situation ist always this (first level = associative, second level = indexed, third level = asscociative, fourth = indexed ...) you can make it recursive
1312: [10:36:00] * liam quit (Ping timeout: 276 seconds)
1313: [10:38:00] <l8s> $flatArray[$k] = $v[0]; }
1314: [10:38:00] <l8s> $v[0] = flattenArray($v[0]);
1315: [10:38:00] <l8s> }
1316: [10:38:00] <l8s> if (is_array($v[0]) {
1317: [10:38:00] <l8s> foreach ($flatArray as $k => $v) {
1318: [10:38:00] <l8s> $flatArray = $array[0];
1319: [10:38:00] <l8s> function flattenArray($array) {
1320: [10:38:00] <l8s> kinglozzer:
1321: [10:38:00] <l8s> }
1322: [10:38:00] <l8s> return $flatArray;
1323: [10:38:00] <l8s> }
1324: [10:39:00] <kinglozzer> Nice, thanks
1325: [10:39:00] <l8s> i mean in line 5: $ v[0] = flattenArray($v);
1326: [10:40:00] <l8s> kinglozzer: havent tested ...
1327: [10:48:00] * Emil_Blume has joined #silverstripe
1328: [10:52:00] * liam has joined #silverstripe
1329: [10:55:00] * micmania1 has joined #silverstripe
1330: [10:56:00] <micmania1> Does anybody have any experience with CMS javascript?
1331: [10:59:00] * lx-berlin has joined #silverstripe
1332: [11:02:00] * Err404NotFound has joined #silverstripe
1333: [11:02:00] * Error404NotFound quit (Disconnected by services)
1334: [11:07:00] * ratcat quit (Quit: who said I was leaving :P)
1335: [11:23:00] * micmania1 quit (Ping timeout: 245 seconds)
1336: [11:30:00] <zfmf> i have a custom form, in template i want to check if the name of field begins with variant how can i do this? i'm caling a method in mycustoform.php but i can't get the fieldname
1337: [11:44:00] <kinglozzer> zfmf: Why do you want to do that? You can manually specify a template for an individual field if you need to
1338: [11:45:00] <kinglozzer> E.g. $myVariantField = new TextField('MyVariant', 'My Variant'); $myVariantField->setTemplate('CustomFieldHolder');
1339: [11:46:00] <kinglozzer> That's for setting the actual field template, for setting the field holder template use: setFieldHolderTemplate()
1340: [11:48:00] <zfmf> hmmmm i have dynamically added fields for each product can i set on theese fields setfieldholdertemplate()?
1341: [11:49:00] <kinglozzer> Yes you should be able to
1342: [11:54:00] <zfmf> can you give me a hint how to do that here? http://sspaste.com/paste/show/50f694af9cbc8
1343: [12:00:00] <kinglozzer> Not 100% sure as I don't usually create a template for an action, but this should work http://sspaste.com/paste/show/50f6963782f56
1344: [12:03:00] * Emil_Blume quit (Quit: Leaving.)
1345: [12:05:00] * mrzero quit (Ping timeout: 255 seconds)
1346: [12:10:00] * mrzero quit (Changing host)
1347: [12:10:00] * mrzero has joined #silverstripe
1348: [12:10:00] * mrzero has joined #silverstripe
1349: [12:15:00] * dendeffe quit (Quit: dendeffe)
1350: [12:16:00] * howardgrigg has joined #silverstripe
1351: [12:32:00] * liam quit (Ping timeout: 245 seconds)
1352: [12:33:00] <hubertusanton> I get Too few arguments after saving dataobject from ModelAdmin in ss3, anyone had this problem before? http://sspaste.com/paste/show/50f69dfc4f74b
1353: [12:34:00] <kinglozzer> hubertusanton: Are you doing onBeforeWrite() or anything?
1354: [12:35:00] <hubertusanton> nope i dont, its just a normal modeladmin situation
1355: [12:35:00] <kinglozzer> How about your relationships? Are you sure they're set up correctly?
1356: [12:35:00] <hubertusanton> but its a warning written to screen in dev mode
1357: [12:36:00] <hubertusanton> BlogPageReaction has_one blogpage
1358: [12:36:00] <hubertusanton> blogpage has_many reaction
1359: [12:37:00] <kinglozzer> Well it's the sprintf() that's causing the problem, my guess is that one of the arguments is null (probably the second one)
1360: [12:38:00] <hubertusanton> the second one is the singular name of the dataobject
1361: [12:39:00] <kinglozzer> Can you edit the file and do var_dump($this->record->singular_name());die; before the sprintf() call?
1362: [12:39:00] <kinglozzer> Ah
1363: [12:39:00] <hubertusanton> which is there :) Blog Page Reaction it is
1364: [12:40:00] <hubertusanton> which means a custom locale string can 'break' the framework?
1365: [12:40:00] <hubertusanton> I think it is the fact that there is three times %s in the first string which expects one more parameter?
1366: [12:40:00] <kinglozzer> In the paste you sent me there are only two %s
1367: [12:41:00] <hubertusanton> which is dutch :)
1368: [12:41:00] <hubertusanton> %s %s %s Opgeslagen
1369: [12:41:00] <kinglozzer> That's what's causing it then
1370: [12:42:00] <hubertusanton> that will be my first one :)
1371: [12:42:00] <hubertusanton> so let's change the dutch locale string :)
1372: [12:42:00] <hubertusanton> thanks
1373: [12:42:00] <kinglozzer> Yep, you could submit a pull request for it too
1374: [12:48:00] * liam has joined #silverstripe
1375: [12:59:00] * liam quit (Quit: liam)
1376: [13:00:00] * Err404NotFound is now known as Error404NotFound
1377: [13:00:00] * liam quit (Client Quit)
1378: [13:00:00] * liam has joined #silverstripe
1379: [13:02:00] * jrthomer quit (Ping timeout: 245 seconds)
1380: [13:08:00] * howardgrigg quit (Remote host closed the connection)
1381: [13:14:00] * UndefinedOffset has joined #silverstripe
1382: [13:15:00] * jrthomer has joined #silverstripe
1383: [13:16:00] <priithansen> is there any fundamental difference to removeFieldFromTab vs removeByName ?
1384: [13:17:00] <kinglozzer> I don't think so, they both do the same thing
1385: [13:17:00] <kinglozzer> removeByName is easier?
1386: [13:18:00] <priithansen> they are both mentioned here http://doc.silverstripe.com/framework/en/topics/page-types#removing-inherited-form-fields-and-tabs in a fashion that kinda suggests that theres something different but maybe i'm over thinking it
1387: [13:19:00] <kinglozzer> You can also use removeByName to remove tabs
1388: [13:19:00] <kinglozzer> priithansen: If you look at removeFieldFromTab(), it just does removeByName(). The only difference is it checks if the tab exists, so if you do removeFieldFromTab('SomeTab', $field) and 'SomeTab' doesn't exist, it will be created
1389: [13:20:00] <priithansen> ah nice i'll keep using the byname then :)
1390: [13:21:00] * EPIK has joined #silverstripe
1391: [13:22:00] * dendeffe has joined #silverstripe
1392: [13:41:00] * MrGuits quit (Ping timeout: 246 seconds)
1393: [13:48:00] <dendeffe> With the exact same files and DB, TinyMCE's editor field won't load on my live server.
1394: [13:49:00] <dendeffe> The editor field is also not selectable
1395: [13:49:00] <dendeffe> The content is visible in the generated HTML, but I can't see it in the editor field
1396: [13:49:00] <dendeffe> Every file seems to load
1397: [13:50:00] <dendeffe> And I have no JS errors in my console
1398: [13:50:00] <kinglozzer> You probably already have but it's worth a shot: a flush?
1399: [13:50:00] * ivoba has joined #silverstripe
1400: [13:53:00] <dendeffe> kinglozzer: just did another dev/build?flush=all but that didn't help
1401: [13:53:00] <dendeffe> I did just notice that if there is a link in the editor field, I can hover over it and it becomes visible
1402: [13:54:00] <dendeffe> not selectable though
1403: [13:55:00] <kinglozzer> It's for an old version of SS but might be worth a try
1404: [13:55:00] <kinglozzer> dendeffe: Does this help? http://www.silverstripe.org/general-questions/show/9301
1405: [13:56:00] <kinglozzer> Actually it shouldn't make any difference as it's deprecated, sorry
1406: [13:58:00] <dendeffe> Yeah it that gives all kind of weirdness on my 3.0.3 install :)
1407: [13:59:00] <kinglozzer> Can you open the dev copy and live copy side-by-side and double check all the files are being loaded?
1408: [14:01:00] <dendeffe> ok, strangely the live copy only does 38 requests, while the dev version does 88
1409: [14:01:00] <kinglozzer> Hmm, htaccess all okay?
1410: [14:05:00] <dendeffe> I think so, just reuploaded it with no difference
1411: [14:07:00] <dendeffe> this is what the dev version loads http://pastie.org/5696449
1412: [14:07:00] <dendeffe> js wise
1413: [14:08:00] <dendeffe> http://pastie.org/5696453
1414: [14:08:00] <dendeffe> live version only loads this
1415: [14:10:00] <kinglozzer> dendeffe Are you in dev mode on the live one? If not you might not see some errors
1416: [14:12:00] <dendeffe> ah I now have an out of memory in the PHP log
1417: [14:12:00] <dendeffe> dev mode is on - don't see any errors also no errors in the PHP error log
1418: [14:15:00] <dendeffe> hmm I increased the memory limit in htaccess and now have 87 requests on live
1419: [14:15:00] <dendeffe> still one short
1420: [14:16:00] <dendeffe> strange, my dev version is now also showing the tiny mce problem :/
1421: [14:21:00] <dendeffe> changing to default theme solves it
1422: [14:21:00] <dendeffe> must be some of the styles that get imported
1423: [14:21:00] <dendeffe> OK, it's a theme issue
1424: [14:22:00] <dendeffe> yes - that's it! removing layout out of the requirements solves it
1425: [14:23:00] <kinglozzer> No problem, glad you got it sorted
1426: [14:23:00] <dendeffe> thanks for the help kinglozzer
1427: [14:30:00] <dendeffe> can I reenter the password in phpmyadmin?
1428: [14:30:00] <dendeffe> Another problem: after importing the db on live, the main user's login details won't work. I can only login now by setting Security::setDefaultAdmin
1429: [14:30:00] <dendeffe> Do I need to set the column to MD5 or something like that?
1430: [14:33:00] <dendeffe> I'll probably just read it through the backend
1431: [14:37:00] * Shrike_Finland1 quit (Quit: Leaving.)
1432: [14:41:00] <kinglozzer> If you set a default admin can you change the password?
1433: [14:42:00] * kinglozzer quit (Remote host closed the connection)
1434: [14:49:00] * OxFF1 has joined #silverstripe
1435: [15:03:00] * UndefinedOffset quit (Quit: Leaving.)
1436: [15:08:00] * UndefinedOffset has joined #silverstripe
1437: [15:08:00] * Emil_Blume has joined #silverstripe
1438: [15:27:00] * wmk quit (Quit: nice to meet you ;))
1439: [15:41:00] <webguest> hello, my loop on some dataobjects dont sort in the right order (although the SortOrder is set correctly with a value from 1 - 10)
1440: [15:41:00] <webguest> should i do something in the template to sort them?
1441: [15:41:00] <webguest> any idea's?
1442: [15:41:00] * webguest has joined #silverstripe
1443: [15:42:00] <webguest> uploaded using BulkUpload (gridfield)
1444: [15:42:00] <webguest> or in the php script?
1445: [15:47:00] <webguest> weird thing is that the DataObjects are sorted in the correct way in the cms
1446: [15:55:00] * ApacheTiger has joined #silverstripe
1447: [15:56:00] <ApacheTiger> FrozenFire are you online?
1448: [15:56:00] <ApacheTiger> Good morning, good afternoon, and good evening to all.
1449: [15:57:00] <ApacheTiger> I started using the SmtpMailer you suggested but I am at a loss on how to get From addresses to show up as "First Last"<me@somewhere.com>.
1450: [15:58:00] <ApacheTiger> All those suggestions you gave last night worked like a charm.
1451: [16:04:00] * OxFF1 quit (Read error: Connection reset by peer)
1452: [16:04:00] * OxFF2 has joined #silverstripe
1453: [16:06:00] <ApacheTiger> Does anyone here use SmtpMailer?
1454: [16:07:00] <ApacheTiger> has anyone here using SmtpMailer managed to get nicely formatted from and to addresses with names as well as email addresses?
1455: [16:10:00] * webguest quit (Ping timeout: 245 seconds)
1456: [16:13:00] * Nivery has joined #silverstripe
1457: [16:14:00] <ApacheTiger> does not work either.
1458: [16:14:00] <ApacheTiger> "First Name<email@somewhere.com>"
1459: [16:22:00] * Shrike_Finland has joined #silverstripe
1460: [16:23:00] * ApacheTiger has left #silverstripe
1461: [16:23:00] * catcher has joined #silverstripe
1462: [16:24:00] * ApacheTiger has joined #silverstripe
1463: [16:30:00] * UndefinedOffset quit (Quit: Leaving.)
1464: [16:31:00] * UndefinedOffset has joined #silverstripe
1465: [16:31:00] <FrozenFire> ApacheTiger, How are you instantiating Email?
1466: [16:31:00] <ApacheTiger> $oMailer = new SmtpMailer()
1467: [16:32:00] <ApacheTiger> $aHeaders = array( 'From' => '"First Last"<someone@somewhere.com>' ) doesn't work Either.
1468: [16:32:00] <FrozenFire> o.O
1469: [16:33:00] <FrozenFire> Just use Email
1470: [16:33:00] <FrozenFire> The silverstripe-smtp module by xeraa replaces the underlying mailer in SS. You always send email by using the Email class
1471: [16:34:00] <ApacheTiger> so i $oMailer = new Email(SmtpMailer);
1472: [16:34:00] <FrozenFire> http://doc.silverstripe.com/framework/en/topics/email
1473: [16:34:00] <FrozenFire> Nope
1474: [16:35:00] <FrozenFire> $email = new Email($from, $to, $subject); $email->setTemplate("MyEmailTemplate");
1475: [16:35:00] * g4b0 quit (Quit: Sto andando via)
1476: [16:35:00] <ApacheTiger> Thanks
1477: [16:36:00] <FrozenFire> Magically
1478: [16:36:00] <FrozenFire> $email->populateTemplate(array("Campaign" => $campaign, "Contact" => $contact));
1479: [16:36:00] <FrozenFire> $email->send();
1480: [16:36:00] <ApacheTiger> So, where does the SmtpMailer come into play?
1481: [16:36:00] <ApacheTiger> How does SS know what to use?
1482: [16:37:00] <ApacheTiger> The _config in the module folder I'm guessing?
1483: [16:37:00] <FrozenFire> Yes
1484: [16:37:00] <FrozenFire> It calls Email::set_mailer(new SmtpMailer());
1485: [16:37:00] <ApacheTiger> Okay, perfect.
1486: [16:38:00] <ApacheTiger> I already wrote the field replacement parts. Geez I could have saved more time.
1487: [16:39:00] <FrozenFire> This is, perhaps, a lesson in RTFM
1488: [16:39:00] <FrozenFire> Heh
1489: [16:40:00] <FrozenFire> http://lmgtfy.com/?q=silverstripe+email
1490: [16:40:00] <ApacheTiger> Email is under Testing
1491: [16:40:00] <ApacheTiger> No, my bad
1492: [16:40:00] <FrozenFire> :P
1493: [16:40:00] <FrozenFire> Despite SilverStripe's documentation being bad in terms of the API docs, its "tutorial" material is *excellent*
1494: [16:40:00] <ApacheTiger> the problem is finding it in the docs
1495: [16:42:00] <ApacheTiger> I won't take any more of your time. Thanks.
1496: [16:48:00] * ApacheTiger has left #silverstripe
1497: [16:50:00] * dendeffe quit (Quit: dendeffe)
1498: [17:16:00] * lx-berlin has left #silverstripe
1499: [17:33:00] * Emil_Blume quit (Ping timeout: 252 seconds)
1500: [17:39:00] * dobalina quit (Ping timeout: 260 seconds)
1501: [17:44:00] * Nivery quit (Quit: Nivery)
1502: [17:56:00] * lobarvaz has left #silverstripe
1503: [18:09:00] * ray has joined #silverstripe
1504: [18:23:00] * OxFF2 has left #silverstripe
1505: [18:25:00] * ivoba quit (Quit: Leaving)
1506: [18:32:00] <catcher> I need to mangle all instances of 'domain.com', which appears in many different DB fields, before they render. Ideas?
1507: [18:37:00] * Nivery has joined #silverstripe
1508: [18:44:00] <FrozenFire> catcher, Why?
1509: [18:45:00] <FrozenFire> This sounds like a "now you've got two problems" solution
1510: [18:54:00] * blindNoob is now known as blindMoe
1511: [18:55:00] <catcher> FrozenFire, I'm importing content that has hard-coded references to another domain, which will be going away soon.
1512: [18:55:00] <catcher> I want to break those references (mostly images) so they can be located by a non-dev.
1513: [18:58:00] * UndefinedOffset quit (Quit: Leaving.)
1514: [18:58:00] <FrozenFire> It sounds like you should be doing this in your import process?
1515: [18:59:00] <FrozenFire> Just did that with Wordpress
1516: [19:02:00] <FrozenFire> Writing a module for handling assets via Rackspace Cloud Files
1517: [19:02:00] * FrozenFire mutters obscene things at the whole file handling process in SS
1518: [19:02:00] <blindMoe> catcher: how many database tables?
1519: [19:02:00] <blindMoe> catcher: could just use REPLACE() in mysql to handle it
1520: [19:04:00] <FrozenFire> Really. Do not do that.
1521: [19:04:00] <FrozenFire> Don't do that.
1522: [19:04:00] <FrozenFire> Screwing with the database like that is a very bad idea.
1523: [19:05:00] <FrozenFire> If they're image references, then simply file_get_contents on the original URL, write it into your assets directory, create a new file for it, then rewrite the original link in the content with a [file_link] shortcode
1524: [19:06:00] <blindMoe> FrozenFire: I do it all the time when moving sites.. never had a problem with it
1525: [19:07:00] <blindMoe> using file_get_contents() and creating a script to loop through every entry is a huge waste of time compared to just copying the files over and replacing the domain
1526: [19:07:00] <blindMoe> most of the time it is just blog posts that have links in there...
1527: [19:07:00] <FrozenFire> Doing that is just shifting the issue by one step
1528: [19:07:00] <FrozenFire> Now you have hardcoded links to your own domain/path
1529: [19:08:00] <blindMoe> depends on what you replace the old domain to
1530: [19:08:00] <FrozenFire> And if you're using a lick of sense, that domain is not the production domain
1531: [19:09:00] <FrozenFire> That refers to the File in the database
1532: [19:09:00] <FrozenFire> And calls ->Link() on it
1533: [19:09:00] <blindMoe> yeah still doesn't seem any different than using file_get_contents and saving the new link
1534: [19:09:00] <FrozenFire> As well, when using hardcoded links, you don't get to use SS's image resampling functionality.
1535: [19:09:00] <FrozenFire> You're not using file_get_contents and saving the new link. You're saving a [file_link]
1536: [19:09:00] <blindMoe> FrozenFire: you don't know that he is talking about images
1537: [19:09:00] <FrozenFire> E.g. [file_link id=4]
1538: [19:10:00] <FrozenFire> They would just be File instead of Image
1539: [19:10:00] <FrozenFire> So when your files get moved, they're automatically updated in the content.
1540: [19:10:00] <blindMoe> I would imagine he is just talking about <a> links
1541: [19:10:00] <FrozenFire> That also then permits things like maintaining links
1542: [19:10:00] <FrozenFire> Also permitting you to resample it down to an optimal size
1543: [19:10:00] <blindMoe> _if_ he is refering to images :)
1544: [19:10:00] * SightUnseen has joined #silverstripe
1545: [19:10:00] <FrozenFire> Same with other files.
1546: [19:11:00] <FrozenFire> Yes. Either <a href="[file_link id=4]">foo</a> or [file_link id=4]foo[/file_link]
1547: [19:11:00] * SightUnseen has left #silverstripe
1548: [19:11:00] <FrozenFire> The latter associates the title and description from the database with the link
1549: [19:24:00] * UndefinedOffset has joined #silverstripe
1550: [19:29:00] * Pyromanik has joined #silverstripe
1551: [19:31:00] * gelignite has joined #silverstripe
1552: [19:33:00] * dendeffe has joined #silverstripe
1553: [19:33:00] <catcher> Yeah, it'd be rad to keep the domain out of the image references. I still need a quick way to identify which fields I need to update though - there are tons, and only about 50% of the sections are actually being used.
1554: [19:37:00] * DigNZ quit (Remote host closed the connection)
1555: [19:37:00] * DigNZ quit (Remote host closed the connection)
1556: [19:37:00] * nickmolhoek has joined #silverstripe
1557: [19:37:00] * nickmolhoek quit (Remote host closed the connection)
1558: [19:37:00] * DigNZ has joined #silverstripe
1559: [19:37:00] * nickmolhoek has joined #silverstripe
1560: [19:37:00] * DigNZ has joined #silverstripe
1561: [19:38:00] * DigNZ has joined #silverstripe
1562: [19:41:00] * nickmolhoek quit (Client Quit)
1563: [19:50:00] * ray quit (Ping timeout: 245 seconds)
1564: [19:58:00] * gelignite quit (Ping timeout: 252 seconds)
1565: [20:02:00] <catcher> Can you set a default image upload folder for an HTMLEditorField?
1566: [20:04:00] * gelignite has joined #silverstripe
1567: [20:05:00] * tankr has joined #silverstripe
1568: [20:30:00] <FrozenFire> Hrmm, there goes that idea.
1569: [20:30:00] * SightUnseen has joined #silverstripe
1570: [20:31:00] <FrozenFire> But no.
1571: [20:31:00] <FrozenFire> Was going to mount my cloud files container over the assets directory and set up a redirector that'd make requests for objects in the cloudfiles container go to the CDN
1572: [20:31:00] <FrozenFire> cloudfuse is buggy and can't mount individual containers
1573: [20:32:00] <FrozenFire> And it also has issues with file_exists()
1574: [20:32:00] * SightUnseen has left #silverstripe
1575: [20:35:00] * gelignite quit (Ping timeout: 248 seconds)
1576: [20:35:00] * tgfisher has joined #silverstripe
1577: [20:36:00] <FrozenFire> Do you mean target the form at an iframe?
1578: [20:36:00] <tgfisher> In SS 2.4, how can I have my form submit to the same page, but at an anchor location?
1579: [20:36:00] <FrozenFire> tgfisher, That question makes no sense in the context of a form
1580: [20:36:00] <tgfisher> i.e. /search#results
1581: [20:37:00] <FrozenFire> What are you trying to accomplish?
1582: [20:37:00] <FrozenFire> That question makes no sense in the context of a form
1583: [20:37:00] <tgfisher> it is a really large form, and i'd like to pull the user to the search results upon submission instead of having them only see the form
1584: [20:38:00] <tgfisher> layout is form on top, results on bottom
1585: [20:38:00] <FrozenFire> Still not following. Your form submits to an action
1586: [20:39:00] <FrozenFire> Usually, if I'm making a filter form, I'll have my form action extract the parameters for the search, rewrite them if necessary, then redirect to where I want them to go
1587: [20:39:00] <FrozenFire> That action does what it does, then redirects
1588: [20:39:00] * zfmf quit (Read error: Connection reset by peer)
1589: [20:40:00] <FrozenFire> Your redirect could include a fragment
1590: [20:43:00] <tgfisher> stepping away from how SS handles things, my form action should read: /search#results
1591: [20:44:00] <FrozenFire> Form::setFormAction
1592: [20:44:00] <tgfisher> is there a way to accomplish adding: #results onto the end of the FormAction
1593: [20:44:00] <tgfisher> that would take me to the anchor named #results on /search
1594: [20:45:00] <FrozenFire> $form->setFormAction($form->FormAction()."#results");
1595: [20:45:00] <FrozenFire> Bad idea, but okay.
1596: [20:45:00] <tgfisher> good deal
1597: [20:46:00] <tgfisher> nothing else really to it...
1598: [20:46:00] <tgfisher> not sure why it is a bad idea
1599: [20:46:00] <tgfisher> its a usability thing
1600: [20:46:00] <tgfisher> huge form, they searched, want to see results
1601: [20:46:00] <tgfisher> yet all they see is form
1602: [20:46:00] <FrozenFire> I'm remarking as to your design, not your intention.
1603: [20:47:00] <tgfisher> thanks for your help
1604: [20:52:00] <Pyromanik> is there an updated sitemap module?
1605: [20:53:00] <FrozenFire> And an include
1606: [20:53:00] <Pyromanik> or should I just lay my menus bare with a buttload of loops?
1607: [20:53:00] <FrozenFire> Two loops
1608: [20:54:00] <FrozenFire> <% loop Menu(1) %> ... <% loop Children %> <% include SiteMapItem %> <% end_loop %> <% end_loop %>
1609: [21:00:00] <Pyromanik> how to limit gridfield to a specified number of entries?
1610: [21:00:00] <Pyromanik> thx.
1611: [21:00:00] <Pyromanik> right
1612: [21:00:00] <Pyromanik> cool
1613: [21:00:00] <Pyromanik> next q
1614: [21:00:00] <Pyromanik> pastie would work best
1615: [21:02:00] * howardgrigg has joined #silverstripe
1616: [21:02:00] <FrozenFire> $gridField->getConfig()->getComponentByType("GridFieldPaginator")->setItemsPerPage($num);
1617: [21:09:00] <catcher> should I expect passwords to break when I mysqldump & mysql < import on another server?
1618: [21:09:00] * UndefinedOffset quit (Quit: Leaving.)
1619: [21:10:00] <FrozenFire> No
1620: [21:11:00] <FrozenFire> Or at least, that's how I understand it
1621: [21:11:00] <FrozenFire> Not unless you're missing an algorithm, that is
1622: [21:11:00] <FrozenFire> SS uses a bundled salt hashing format
1623: [21:11:00] <irogue> om nom nom salt
1624: [21:12:00] <catcher> hrm.
1625: [21:12:00] <irogue> FrozenFire: you are correct
1626: [21:12:00] <FrozenFire> SS should use ircmaxell's password_compat library, methinks
1627: [21:12:00] <catcher> Passwords for 2500 accounts work on my local machine, all seem to be broken on dev box, importing the db in its entirety.
1628: [21:12:00] * DigNZ quit (Quit: DigNZ)
1629: [21:13:00] <dendeffe> When saving an item in a grid field, I get this error http://pastie.org/5699367
1630: [21:13:00] <FrozenFire> catcher, I encountered that the other day
1631: [21:13:00] <FrozenFire> http://stackoverflow.com/questions/10758771/is-there-a-php-bcrypt-implementation-using-2y-instead-of-2a
1632: [21:13:00] <FrozenFire> Not sure what it is
1633: [21:13:00] <FrozenFire> I suspect that the bug is the $2y one
1634: [21:13:00] <catcher> sounds like it's going to be a medium-sized problem for me.
1635: [21:14:00] <FrozenFire> You should simply be able to update PHP
1636: [21:15:00] <catcher> will try that, ty
1637: [21:15:00] <dendeffe> The item does save however
1638: [21:15:00] <irogue> https://github.com/silverstripe/sapphire/blob/3.0/security/PasswordEncryptor.php#L140
1639: [21:15:00] <dendeffe> This is the code http://pastie.org/5699376
1640: [21:16:00] * tgfisher quit (Quit: tgfisher)
1641: [21:19:00] <FrozenFire> Oh
1642: [21:19:00] <Pyromanik> ie, add up to 3, no more.
1643: [21:19:00] <Pyromanik> FrozenFire: nah, I don't want to set a page limit, I want to set there to only ever be 3
1644: [21:19:00] * Motoservo has joined #silverstripe
1645: [21:19:00] <FrozenFire> So change the list you give it
1646: [21:20:00] <FrozenFire> Overload YourObject::Items()
1647: [21:20:00] <FrozenFire> Umm
1648: [21:20:00] <FrozenFire> What sort of list?
1649: [21:20:00] <Pyromanik> mmm, it's a relation.
1650: [21:20:00] <Pyromanik> $has_many
1651: [21:20:00] <FrozenFire> Restricting addition is hard
1652: [21:20:00] <Pyromanik> Items => Item
1653: [21:20:00] <FrozenFire> Why do you want to do this?
1654: [21:20:00] <Pyromanik> yeh, I'm thinking I might make a build rule
1655: [21:20:00] <FrozenFire> Nah. It can be accomplished two ways.
1656: [21:20:00] <Pyromanik> and then customise the GridFieldConfig
1657: [21:21:00] <FrozenFire> Or in validate, perhaps
1658: [21:21:00] <FrozenFire> Or, implement an onBeforeWrite in Item
1659: [21:21:00] <FrozenFire> In which case each new item would shove the last down the stack
1660: [21:21:00] <FrozenFire> And limit it to 3 return
1661: [21:22:00] <Pyromanik> TME
1662: [21:22:00] <FrozenFire> No idea what TME means
1663: [21:22:00] <FrozenFire> Check the number of items with the same YourObjectID, and throw a validation error if there are too many
1664: [21:26:00] <Pyromanik> ?
1665: [21:26:00] <Pyromanik> It's like TMI, but E stands for Effort.
1666: [21:26:00] <irogue> fuuuuuu
1667: [21:27:00] <Pyromanik> is usual
1668: [21:27:00] <irogue> hugely paying for it now
1669: [21:27:00] <irogue> did things in a stupid manner early in this system
1670: [21:29:00] <FrozenFire> I have no idea how that's too much effort.
1671: [21:29:00] <irogue> goddamn pricing
1672: [21:30:00] <Pyromanik> I want 3. Exactly. Not first three.
1673: [21:30:00] <Pyromanik> Because it's bad.
1674: [21:31:00] * FrozenFire sighs
1675: [21:31:00] <FrozenFire> public function validate() { $result = parent::validate(); if(self::get()->filter("MyObjectID", $this->MyObjectID)->exclude("ID", $this->ID)->Count() >= 3) { $result->error("Too many items, bitch!"); } return $result; }
1676: [21:31:00] <Pyromanik> anyway I figure it much easier to just not care.
1677: [21:31:00] <Pyromanik> maybe I'll put in a literal field that says "don't use more than 3"
1678: [21:31:00] <Pyromanik> FrozenFire: yup.
1679: [21:31:00] <FrozenFire> I hope I never come across your projects in my career
1680: [21:31:00] <Pyromanik> time's a wasting!
1681: [21:31:00] <FrozenFire> You're silly and lazy.
1682: [21:32:00] <FrozenFire> You would be very surprised.
1683: [21:32:00] <Pyromanik> haha
1684: [21:32:00] <Pyromanik> you won't.
1685: [21:32:00] <FrozenFire> Granted, the geographical gap between us reduced the likelihood to little, but still.
1686: [21:32:00] <FrozenFire> Companies outsource their shit to us all the time for us to fix bad programmers' code.
1687: [21:33:00] <Pyromanik> it's a point.
1688: [21:33:00] <Pyromanik> The company I work for outsources nothign.
1689: [21:35:00] <catcher> FrozenFire, PHP version issue indeed, yay for 2k+ passwords working.
1690: [21:35:00] <FrozenFire> Heh
1691: [21:36:00] <howardgrigg> hey everyone - any SilverStripe news we should cover in the upcoming SilverScoop episode?
1692: [21:36:00] <FrozenFire> Now I get to have the fun of screwing with that.
1693: [21:36:00] <FrozenFire> Not sure if it's a forwards-compatible bug
1694: [21:36:00] <FrozenFire> We deployed on a server that has that issue
1695: [21:37:00] <FrozenFire> howardgrigg, Haven't been listening for a bit, but I'd say the upcoming 3.1 stuff is pretty important
1696: [21:37:00] <FrozenFire> Since I didn't know of the bug at the time, and we only had like four users, we just reset all of the passwords
1697: [21:37:00] <FrozenFire> But once they start loading in members, if Plesk decides to upgrade their shit, they're maybe going to have a problem.
1698: [21:38:00] <howardgrigg> yea - it's our first show since the beta so we can cover that
1699: [21:39:00] <FrozenFire> I'd still be interested in getting involved in an episode or two, as well
1700: [21:40:00] <FrozenFire> Depending on the topic
1701: [21:41:00] <howardgrigg> Cool! I'm going to put up our 2013 episode list on the site but I think we've got a spot for a guest in a couple shows time
1702: [21:41:00] <howardgrigg> you can suggest a topic :)
1703: [21:42:00] <catcher> FrozenFire, it's forwards-compatible. PHP 5.10 has no trouble with PHP 5.5 SS passwords.
1704: [21:42:00] <FrozenFire> "How awesome FrozenFire is"
1705: [21:42:00] <FrozenFire> I'm great at talking about that
1706: [21:43:00] <FrozenFire> Great
1707: [21:43:00] <tankr> howardgrigg: <shameless self promotion> released new version of SwipeStripe :-) works with SS3
1708: [21:43:00] <FrozenFire> 5.3.10 and 5.3.5 respectively, by the way
1709: [21:43:00] <FrozenFire> :P
1710: [21:43:00] <FrozenFire> 5.5 is a massively different thing. :P
1711: [21:43:00] <catcher> right, right
1712: [21:43:00] <howardgrigg> oh cool tankr I didn't see that
1713: [21:44:00] <tankr> howardgrigg: sweet, yeah the new site is here: http://swipestripe.com/.
1714: [21:46:00] * Nivery quit (Quit: Nivery)
1715: [21:48:00] <ss23> simon_w changed his Twitter avatar from him at the OSS awards being all fancy and in a suit... to what looks like him drunk off his face or something, still wearing a suit, tie almost all the way off etc
1716: [21:50:00] <FrozenFire> Might've worked with something like that for SwipeStripe
1717: [21:50:00] <FrozenFire> tankr, A question you might be familiar with. Do you happen to know of any good inventory management systems (even non-PHP) that have a good API?
1718: [21:51:00] <tankr> FrozenFire: I haven't worked with any but I would like to integrate with http://www.vendhq.com/, think they look good and well backed
1719: [21:51:00] <FrozenFire> Got a six-figure project coming up pretty quick here that calls for a very sophisticated inventory management system, and I haven't a clue what'll fit the bill
1720: [21:52:00] <FrozenFire> vendhq looks like a POS system
1721: [21:52:00] <FrozenFire> Hard to make an assessment without having something to touch
1722: [21:52:00] <FrozenFire> I was looking at Ordoro
1723: [21:53:00] <FrozenFire> In this client's case, they're acting as a wholesaler to other companies, so there's no brick-and-mortar
1724: [21:54:00] <tankr> true, Ordoro looks interesting..
1725: [21:55:00] <FrozenFire> That being said, I can't find anything about an API
1726: [21:56:00] <tankr> ah, that might be a bit of a deal breaker haha. few integrations with shopping carts already though hmm
1727: [21:59:00] <FrozenFire> inFlow is what I'm looking at now
1728: [21:59:00] <FrozenFire> Seems promising
1729: [22:00:00] * UncleCheese has joined #silverstripe
1730: [22:01:00] <FrozenFire> That's surprising
1731: [22:01:00] <FrozenFire> Haha
1732: [22:01:00] <UncleCheese> so all of that was just something i just threw in
1733: [22:01:00] <UncleCheese> you know i've never used S3
1734: [22:01:00] <UncleCheese> no
1735: [22:01:00] <UncleCheese> oh, geez
1736: [22:01:00] <Zauberfisch> FrozenFire the S3 file stuff isn't that good I am afraid :S
1737: [22:01:00] <FrozenFire> There seems to be a few things hardcoded in UploadField which might cause difficulty there
1738: [22:01:00] <FrozenFire> UncleCheese, Howdy. Have you happened to get your S3File stuff working with SS3's UploadField?
1739: [22:02:00] <Zauberfisch> anyway, silverscoop is going live now
1740: [22:02:00] <FrozenFire> Basically, it'll involve a rewriterule which will direct assets requests to a controller which looks up the file on the cloud files container
1741: [22:02:00] <Pyromanik> off air
1742: [22:02:00] <Zauberfisch> tune in at http://silverscoop.org/live/
1743: [22:02:00] <FrozenFire> I'm actually implementing a module which handles Rackspace Cloud Files
1744: [22:02:00] <Zauberfisch> I used S3 for storing files in one of my recent projects, and I had a pretty bad time
1745: [22:02:00] <FrozenFire> I'm thinking of approaching it differently
1746: [22:02:00] <FrozenFire> Transparently, underneath SS
1747: [22:02:00] <UncleCheese> i think a dropbox integration with SS would be mint
1748: [22:03:00] <FrozenFire> If it finds it, then it'll redirect the request transparently to the CDN URL
1749: [22:03:00] <FrozenFire> If not, it'll pass through the local file if it's there
1750: [22:04:00] <Pyromanik> so rules out possibilities for fast serving existing flat files?
1751: [22:04:00] <Pyromanik> ups with the downs eh :<
1752: [22:04:00] <FrozenFire> Then it'll hook in an onAfterWrite to File which checks if the file exists on the CDN
1753: [22:04:00] * priithansen quit (Quit: priithansen)
1754: [22:04:00] <FrozenFire> And push it up if it's not there
1755: [22:05:00] <FrozenFire> Potentially with a task which syncs files both up and down
1756: [22:05:00] <Pyromanik> where are you now howardgrigg?
1757: [22:05:00] <Pyromanik> weren't you already in Aus?
1758: [22:05:00] <howardgrigg> Brisbane :)
1759: [22:05:00] <howardgrigg> I went back to NZ for 6 weeks
1760: [22:05:00] <Pyromanik> 'moving country' ?
1761: [22:06:00] <FrozenFire> I guess this could even be extended to a general CDNFileRedirector controller
1762: [22:09:00] <FrozenFire> Bugger. No API on inFlow either
1763: [22:10:00] <FrozenFire> That's ridiculous
1764: [22:10:00] <FrozenFire> How do all of these logistics softwares not have an API?
1765: [22:12:00] <Pyromanik> Composer just seemed way too green
1766: [22:12:00] <Pyromanik> I've tried that
1767: [22:12:00] <Pyromanik> (what they're talking about on silverscoop)
1768: [22:12:00] <Pyromanik> I had major issues
1769: [22:12:00] <Pyromanik> but
1770: [22:16:00] <Pyromanik> [Deprecated] Assigning the return value of new by reference is deprecated - GET /blog/ - Line 651 in [...]/framework/thirdparty/simplepie/simplepie.inc
1771: [22:17:00] <UncleCheese> Simplepie? Use RestfulServer!
1772: [22:18:00] <UncleCheese> https://github.com/silverstripe/sapphire/blob/3.0/api/RestfulService.php
1773: [22:21:00] <Pyromanik> also, can't use restfulservice, because I'm not the blog module.
1774: [22:21:00] <Pyromanik> or widget
1775: [22:21:00] <Pyromanik> UncleCheese: I'm wondering 2 things: why is it in core, why is it version 1.0 instead of something that works in php 5.3?
1776: [22:22:00] <Pyromanik> or whichever module the rss widget is in.
1777: [22:22:00] <UncleCheese> that's too bad
1778: [22:23:00] <Pyromanik> it is :<
1779: [22:23:00] <Pyromanik> yeh
1780: [22:23:00] <UncleCheese> simplepie is crap
1781: [22:24:00] <Pyromanik> mm, it's the blog module
1782: [22:25:00] <Pyromanik> so I'm wondering why it's in core :<
1783: [22:25:00] <Pyromanik> it seems that NOTHING else uses simplepie
1784: [22:27:00] <FrozenFire> Code rot
1785: [22:27:00] <Pyromanik> amputate!
1786: [22:27:00] <Pyromanik> indeed :(
1787: [22:30:00] <l8s> does anybody know how i can add linebreaks to a gridfield column?
1788: [22:31:00] <Pyromanik> oh
1789: [22:31:00] * Pyromanik shrugs
1790: [22:31:00] <Pyromanik> alter css
1791: [22:31:00] <Pyromanik> white-space
1792: [22:31:00] <Pyromanik> alter the output of your summary
1793: [22:31:00] <Pyromanik> add a <br /> at a guess
1794: [22:31:00] <UncleCheese> html is escaped :(
1795: [22:32:00] <FrozenFire> UncleCheese, HTML should only be escaped if using the default field formatting
1796: [22:32:00] <l8s> i know about css, i found old irc logs, but mh..
1797: [22:32:00] <FrozenFire> If you set the field formatting on the GridFieldDataColumns, you can supply HTML
1798: [22:33:00] <l8s> FrozenFire: how/where?
1799: [22:34:00] <l8s> is it setFieldCasting?
1800: [22:34:00] <Zauberfisch> https://twitter.com/SilverScoopShow
1801: [22:35:00] * dendeffe quit (Quit: dendeffe)
1802: [22:35:00] <UncleCheese> it's a lot of extra code
1803: [22:35:00] <UncleCheese> you can pass it a lambda, right?
1804: [22:35:00] <l8s> oh, next line, hehe, setfieldformatting()
1805: [22:35:00] <FrozenFire> $gridField->getConfig()->getComponentByType("GridFieldDataColumns")->setFieldFormatting(array("YourField" => function($val, $obj) { return $obj->getField("YourField"); }));
1806: [22:35:00] <FrozenFire> Indeed
1807: [22:36:00] <UncleCheese> nice and tidy :)
1808: [22:36:00] <UncleCheese> yeah
1809: [22:36:00] <l8s> ok, i have to meditate over this ...
1810: [22:37:00] <FrozenFire> $obj is the object of your DataList, to be clear
1811: [22:37:00] * UncleCheese quit (Quit: UncleCheese)
1812: [22:37:00] <FrozenFire> $val is the casted value, iirc
1813: [22:41:00] <l8s> mh, i don't really understand it. i thought maybe i can just define anything in my dataobjects static $casting array, which prevents removal of whitespaces and or br's
1814: [22:43:00] <l8s> ?
1815: [22:43:00] <l8s> FrozenFire: and do you mean "$val is the value to be casted" instead of "$val is the casted value"
1816: [22:44:00] <FrozenFire> Otherwise, use $obj
1817: [22:44:00] <FrozenFire> So if you just want to perform a simple transformation on it, you can use that
1818: [22:44:00] <FrozenFire> $val is the value which you would otherwise see in the column
1819: [22:46:00] <l8s> ok, i think now i understand, this is a callback function?
1820: [22:47:00] <FrozenFire> Yes
1821: [22:47:00] <FrozenFire> It's an anonymous function
1822: [22:47:00] <FrozenFire> http://ca1.php.net/manual/en/functions.anonymous.php
1823: [22:48:00] <l8s> but there has to be some way to use static $casting array in my dataobject, right?
1824: [22:49:00] <l8s> a callback entry there would be called in gridfield's method getCastedValue instead of the default casting
1825: [22:49:00] <FrozenFire> If you create a method that returns the formatted field, you can create a summary field with that method's name
1826: [22:49:00] <FrozenFire> Maybe
1827: [22:49:00] <FrozenFire> I've only used $casting once or twice
1828: [22:49:00] <FrozenFire> You could also use a $summary_field
1829: [22:50:00] <FrozenFire> It lets you determine exactly what you want.
1830: [22:50:00] <FrozenFire> That being said, GridField will probably still remove the HTML
1831: [22:50:00] <FrozenFire> That's why I suggest using the field formatting functionality
1832: [22:50:00] <l8s> i have a summary: static $summary_fields = array('Ratings');
1833: [22:50:00] <FrozenFire> And it'll use that as the column value
1834: [22:51:00] <l8s> and i have a function called getRatings, which returns four rating values
1835: [22:52:00] <FrozenFire> That'd be a perfect use-case for field formatting
1836: [22:53:00] <FrozenFire> You would get the field from the object, and format it using HTML
1837: [22:53:00] <l8s> but where would i do it using this anonymous function, i have no getcmsfields or so, because it is managed by modeladmin
1838: [22:54:00] <FrozenFire> You'd do it in your ModelAdmin
1839: [22:55:00] <FrozenFire> Use a switch..case on $this->modelClass
1840: [22:55:00] <FrozenFire> If it's your model class that you want to change the display of, then get the gridfield by name from the edit form's fields and modify the field formatting
1841: [22:55:00] <FrozenFire> Overload EditForm
1842: [22:59:00] <l8s> i don't want the modeladmin display changed, i want the gridfield display of a dataobject changed, thats managed by a modeladmin
1843: [22:59:00] <l8s> mh..
1844: [23:01:00] <FrozenFire> You have a ModelAdmin that manages your model
1845: [23:01:00] <FrozenFire> You want to display that gridfield differently.
1846: [23:01:00] <FrozenFire> It shows a gridfield
1847: [23:01:00] <FrozenFire> Not sure what you're talking about, then.
1848: [23:02:00] <l8s> yes, and i think, that exactly for this purpose is the static array $casting (see gridfields method getCastedValue($value, $castingDefinition)
1849: [23:03:00] <FrozenFire> Doubtful
1850: [23:03:00] <FrozenFire> Could be
1851: [23:03:00] <FrozenFire> Casting means changing its type to another DBField type
1852: [23:03:00] <l8s> my only problem is, when i define a method in dataobject, how is the syntax for denoting this function in $casting
1853: [23:03:00] <FrozenFire> No matter the type, the *formatting* of that type in GridField is not HTML
1854: [23:04:00] * tankr quit (Quit: Leaving.)
1855: [23:05:00] <l8s> mh, maybe i'm totally off the track...
1856: [23:07:00] <l8s> $gridField->getConfig()->getComponentByType("GridFieldDataColumns")->setFieldFormatting(array("YourField" => function($val, $obj) { return $obj->getField("YourField"); }));
1857: [23:08:00] <l8s> what if it is no db field but a function of the dataobject, only defined in $summary_fields
1858: [23:09:00] <FrozenFire> You can do whatever the heck you want in the formatting function
1859: [23:09:00] <l8s> yes, but what about outside: .. ->setFieldFormatting(array("YourField" => ..
1860: [23:09:00] <FrozenFire> Just return exactly what you want put in the column
1861: [23:09:00] <FrozenFire> $stuff = $obj->getStuff(); ... return $result;
1862: [23:10:00] <l8s> what is "YourField" if i only have $summary_fields = array('Rating')
1863: [23:10:00] <FrozenFire> Or more likely, RatingFormatted
1864: [23:10:00] <FrozenFire> Rating
1865: [23:11:00] <FrozenFire> The summary fields just ask the DataObject for whatever field or function return value
1866: [23:11:00] <FrozenFire> And then it tries to display it
1867: [23:11:00] <FrozenFire> If you name it Rating, it'll try to display the return value of that function elsewhere
1868: [23:11:00] <FrozenFire> If you're not careful, you'll try to display something that can't be displayed.
1869: [23:11:00] <FrozenFire> It's up to you.
1870: [23:17:00] <l8s> FrozenFire: if i overload updateEditForm in ExtendedModelAdmin, how do i retrieve the gridfield?
1871: [23:19:00] <FrozenFire> }
1872: [23:19:00] <FrozenFire> }
1873: [23:19:00] <FrozenFire> :P
1874: [23:19:00] <FrozenFire> function EditForm() { $form = parent::EditForm(); switch($this->modelClass) { case "YourModel": $gridField = $form->Fields()->dataFieldByName($this->modelClass); ...; break;
1875: [23:36:00] <l8s> FrozenFire: No error, but column is empty and firefox doesn't stop loading, maybe you can check my code: http://www.sspaste.com/paste/show/50f7392f04222
1876: [23:37:00] * catcher quit (Quit: Leaving)
1877: [23:38:00] <FrozenFire> Not entirely sure
1878: [23:38:00] <FrozenFire> Though, remove the casting
1879: [23:38:00] <FrozenFire> And I'm pretty sure you can specify the column title in the summary_fields
1880: [23:38:00] <FrozenFire> And really, I should've mentioned it before, perhaps what you just want to do is set the display fields
1881: [23:39:00] <l8s> display is working correctly
1882: [23:39:00] <FrozenFire> So for that gridfield, you'd do GridFieldDataColumns::setDisplayFields(array(...))
1883: [23:39:00] <FrozenFire> One of *those* fields would be FormattedRatings
1884: [23:39:00] <FrozenFire> It's hard to say exactly what you need
1885: [23:39:00] <l8s> no, display fields did only work if explizitly given and *not* for modeladmin
1886: [23:40:00] <l8s> only i dont want to show the single ratingcategory-fields in modeladmin's table list but all four values as four lines in one column
1887: [23:41:00] <l8s> my problem was, that i never was able to make linebreaks
1888: [23:42:00] <FrozenFire> <br />
1889: [23:42:00] <FrozenFire> So put line breaks
1890: [23:44:00] <FrozenFire> If you're putting "Text" as the casting of a field, it's for-sure going to be no HTML
1891: [23:44:00] <FrozenFire> You put them in your return value from the field formatting?
1892: [23:44:00] <FrozenFire> HTMLText is what you may want
1893: [23:44:00] <l8s> i had, but they vanished (i'm nearly sure) in gridfields method getCastedValue($value, $castingDefinition)
1894: [23:45:00] <l8s> but only prints them
1895: [23:45:00] <l8s> yes, but normal behaviour of gridfield doesn't make linebreaks for br'
1896: [23:46:00] <l8s> but do you know, why the current code doesn't show anything in this column
1897: [23:50:00] <FrozenFire> Hard to really say. I don't see all of your code. If you have something like FormattedRatings defined as a function on your object, that may be it
1898: [23:52:00] <l8s> but at the moment i var_dump everything ;-)
1899: [23:52:00] <l8s> no, formattedratings is commented at the moment, and everything i commented out, was working before and has nothing to do with the problem
1900: [23:56:00] <l8s> var_dump($obj->getField('RatingCategory1'));
1901: [23:56:00] <l8s> i'm sure, the anonymous function gets never called, because :
1902: [23:56:00] <l8s> does show the backend without any extra output
1903: [23:56:00] <l8s> die();
1904: [23:56:00] <l8s> echo "hallowelt";
1905: [23:57:00] <FrozenFire> Why that is, I haven't a clue
1906: [23:57:00] <FrozenFire> And you're overloading updateEditForm
1907: [23:57:00] <FrozenFire> I did tell you to overload EditForm
1908: [23:58:00] <FrozenFire> EditForm is part of LeftAndMain, which ModelAdmin extends

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