#silverstripe IRC Log

IRC log for 15 November 2013

All timestamps are in UTC.

1: [00:13:33] <Stomach> urgh
2: [00:13:42] <Stomach> dev/build is falling over at ErrorPage on a live server
3: [00:13:49] <Stomach> and not showing any errors, even in dev mode
4: [00:13:52] <Stomach> :S
5: [00:14:03] <ss23> If live site, linky?
6: [00:14:14] <ss23> simon_w: uh
7: [00:14:16] <ss23> Stomach*
8: [00:14:19] <ss23> Stomach: assets is writable?
9: [00:14:27] <ss23> remember that dev/build needs to be able to write to assets/
10: [00:14:40] <Stomach> yeah assets is writeable
11: [00:14:45] <Stomach> 777'd that fucker
12: [00:15:04] <ss23> rm the error pages and see if it recreates it?
13: [00:16:55] <ss23> QOTD: <cjb> "@github: we put the 'central' in 'decentralized revision control system'"
14: [00:17:30] <guzzlefry> Does anyone have a sample Member import excel file thing?
15: [00:17:45] <Stomach> hmm its not creating the error pages
16: [00:17:52] <guzzlefry> Client is having a hell of a time getting the date to format properly.
17: [00:17:58] <Stomach> might be a permissions issue for apache
18: [00:19:01] <Stomach> but i have user:apache on the directory
19: [00:19:03] <Stomach> golly gosh
20: [00:20:19] <Stomach> guzzlefry: why not just export the current members as an example?
21: [00:20:33] * spronk2 has joined #silverstripe
22: [00:21:42] <guzzlefry> Stomach: Because Excel is raping the formatting. :/
23: [00:21:49] <Stomach> oh
24: [00:21:52] <Stomach> :(
25: [00:29:01] <guzzlefry> yay
26: [00:29:03] <guzzlefry> excel tables
27: [00:31:01] <Colin[pi]> looking through old code of mine... "OH GOD, WHY"
28: [00:32:13] <Stomach> huzzah, can access everything but the actual site
29: [00:32:19] <Stomach> lolol 500's
30: [00:33:05] <ss23> Does someone wanna help debug a bug I have?! :D
31: [00:33:19] <Colin[pi]> not really
32: [00:33:19] <Colin[pi]> :P
33: [00:34:31] <ss23> https://gist.github.com/ss23/7477077
34: [00:34:34] <ss23> suspect model admin issue?
35: [00:35:38] <guzzlefry> Need more devs in here! :P
36: [00:35:59] * ss23 looks at simon_w
37: [00:36:06] <ss23> It sure would be grand if someone helped me <3
38: [00:36:06] <Colin[pi]> $filterClass
39: [00:36:06] <Colin[pi]> "Mailing List"
40: [00:36:20] <Colin[pi]> [Warning] Unknown class passed as parameter
41: [00:36:32] <guzzlefry> ss23: He isn't a SS-dev is he?
42: [00:36:43] <ss23> Yeah, what does this mean / why this happen / how 2 fix?
43: [00:36:45] <ss23> I've not used modeladmin
44: [00:36:58] <ss23> guzzlefry: He is core dev, doesn't work for SilverStripe LTD though
45: [00:37:05] <Colin[pi]> ss23: look at the modeladmin extension where it has the filters for the searchable fields
46: [00:37:17] * tankr has joined #silverstripe
47: [00:37:24] <guzzlefry> oh
48: [00:37:30] <Colin[pi]> it's got "Mailing List" as a filter class which is wrong, obviously
49: [00:37:39] <ss23> what is this / where is it?
50: [00:37:54] <Colin[pi]> in the class that extends ModelAdmin (newsletteradmin?)
51: [00:38:51] <Colin[pi]> actually
52: [00:38:55] <Colin[pi]> no it's in the model object
53: [00:39:00] <Colin[pi]> Newsletter
54: [00:39:05] <Colin[pi]> $searchable_fields
55: [00:39:20] <Colin[pi]> you'll see things like: 'Reference'=>array('field'=>'TextField','title'=>'Reference','filter'=>'PartialMatchFilter'),
56: [00:39:31] <Colin[pi]> that filter part appears to be wrong
57: [00:40:33] <guzzlefry> Does anyone know how to remove a required field from the validator?
58: [00:42:47] <Colin[pi]> remove it's name from the list of required fields?
59: [00:43:00] <guzzlefry> hm
60: [00:43:16] <guzzlefry> Right now I'm trying to figure out how to get the validator.
61: [00:43:36] * Pyromanik has joined #silverstripe
62: [00:44:15] <Pyromanik> The best thing about this Saturday is
63: [00:44:25] <Pyromanik> I recovered from my hangover quite quickly.
64: [00:44:35] <guzzlefry> \o/
65: [00:44:41] <antmas> ;__; ffff
66: [00:44:43] * willr has joined #silverstripe
67: [00:44:56] <antmas> where are these messages generated from?
68: [00:44:59] <Pyromanik> I lied, the best thing about this Saturday is that it's Friday!
69: [00:45:10] <Pyromanik> antmas: which message?
70: [00:45:49] <guzzlefry> ugh
71: [00:45:55] <antmas> Pyromanik: when you edit a page, and attempt to go to another page, you should get a message box with something like 'are you sure etc'... but all mine are blank :<
72: [00:46:07] <ss23> TY GUIS
73: [00:46:09] <ss23> FIXED Colin[pi]
74: [00:46:15] <Colin[pi]> YAY
75: [00:46:16] <Pyromanik> antmas: because no locale.
76: [00:46:25] * willr quit (Client Quit)
77: [00:46:30] <Pyromanik> what to do? you're fucked from 3.2 on.
78: [00:46:33] <Pyromanik> but!
79: [00:47:09] <antmas> Pyromanik: you mean no locale is set?
80: [00:47:22] <antmas> also
81: [00:47:24] <Pyromanik> you can do: LeftAndMain::require_javascript($project.'/lang/'.i18n::get_locale().'.js')
82: [00:47:36] <antmas> Pyromanik: you missed something VERY important earlier
83: [00:47:40] <Pyromanik> antmas: no I mean CMS is derp and doesn't en_NZ
84: [00:47:47] <antmas> http://www.youtube.com/watch?v=TvLZxG6pB6U
85: [00:47:59] <Colin[pi]> no DONT
86: [00:48:03] <antmas> DO IT
87: [00:48:27] * willr has joined #silverstripe
88: [00:48:52] <Pyromanik> well what the fuck else is it going to do all day swimming around the same fucking shit tank?
89: [00:49:03] <antmas> lol
90: [00:49:39] <antmas> Pyromanik: where would I be using that line ^^^^LeftAndMain?
91: [00:49:40] <Pyromanik> oh, and also with the above code copy and paste en_GB.yml from CMS to mysite/lang
92: [00:49:51] <Pyromanik> antmas: _config.php
93: [00:50:01] <antmas> Pyromanik: right
94: [00:50:03] <antmas> derp
95: [00:50:14] <Pyromanik> and name en_GB to en_NZ or whatever your locale is, etc.
96: [00:50:28] <Pyromanik> time to go biking!
97: [00:51:11] <Pyromanik> also poster is retarded, self masturbates is a tautology
98: [00:51:20] * UncleCheese has joined #silverstripe
99: [00:51:29] <antmas> it's not actually masturbation either
100: [00:51:35] <antmas> it's necrophilia right?
101: [00:51:44] <Pyromanik> well...
102: [00:52:05] <Pyromanik> dunno. but what has been see cannot be unseen.
103: [00:52:29] <antmas> :D
104: [00:52:32] <Pyromanik> chive will fix it! xD
105: [00:52:49] <antmas> <3 chive
106: [00:54:33] <Pyromanik> right, time to go cycle.
107: [00:54:35] * Pyromanik has left #silverstripe
108: [00:55:42] <guzzlefry> halp!
109: [00:57:21] <guzzlefry> So I save a user, the password expiry is generated in the database automagically.
110: [00:57:23] <antmas> hmmm
111: [00:57:40] <antmas> LeftAndMain::require_javascript($project.'/lang/'.i18n::get_locale().'.js') gives me a compass error :(
112: [00:57:42] <guzzlefry> But, it doesn't show up on the editform.
113: [00:57:49] <guzzlefry> I'll refresh several times and nothing.
114: [00:59:13] <guzzlefry> well now it isn't. 0.o
115: [00:59:19] <antmas> anyone? ^
116: [01:04:41] <Stomach> arrrrrghggghhh the whole thing was the wrong version php-common /rageout smoke time
117: [01:04:59] <antmas> guis
118: [01:05:03] <antmas> halp :(
119: [01:05:05] <guzzlefry> i dunno!
120: [01:05:09] <guzzlefry> I'm in the same boat. :P
121: [01:05:18] <guzzlefry> well, different ocean
122: [01:05:20] <guzzlefry> but same boat! :P
123: [01:05:23] <antmas> guzzlefry: with blank messages?
124: [01:05:24] <antmas> oh
125: [01:05:37] <guzzlefry> with SilverStripe being difficult and no help in sight. :P
126: [01:05:39] * SightUnseen has joined #silverstripe
127: [01:05:43] <antmas> lol
128: [01:05:45] * SightUnseen has left #silverstripe
129: [01:05:52] <guzzlefry> It's funny.
130: [01:06:17] <guzzlefry> I thought using SilverStripe's Member functionality as a backend for mod_auth would be simple.
131: [01:06:20] * Bollig|DesignCty has joined #silverstripe
132: [01:06:34] <guzzlefry> I could have coded up more or less barebones PHP to do this in half the time. :/
133: [01:09:25] <pippy> if silverstripe's form keeps on remembering old validation errors
134: [01:09:36] <pippy> is there an easy way to earse them, then do the checking?
135: [01:09:56] <guzzlefry> In what context?
136: [01:10:16] <guzzlefry> CMS or front-end?
137: [01:10:16] * Bollig|DesignCty quit (Client Quit)
138: [01:10:35] <pippy> front-end
139: [01:12:05] <pippy> I was thinking about clearing the form name session varibles after the form had been rendered
140: [01:12:23] <willr> ss should be doing that for you
141: [01:12:31] <antmas> is there anything obviously wrong here? LeftAndMain::require_javascript($project.'/lang/'.i18n::get_locale().'.js')
142: [01:12:35] <willr> how are you pushing the form out..
143: [01:12:54] <guzzlefry> I had to do some funky stuff when creating my own Form template.
144: [01:12:57] <pippy> willr:
145: [01:12:57] <pippy> public function Form() {
146: [01:12:57] <pippy> if($this->NoForm) return null;
147: [01:12:57] <pippy> return new ApplicationForm($this, 'Form');
148: [01:12:58] <pippy> }
149: [01:13:27] <pippy> $NoForm is only true when debugging
150: [01:14:20] <pippy> ah
151: [01:14:31] <pippy> willr: i think you're right
152: [01:14:41] <pippy> i'm overridding the fortemplate function
153: [01:15:03] <pippy> there is no $this->clearMessage(); in my overridden fortemplate function
154: [01:21:55] <antmas> come back pyro :P
155: [01:22:00] * UncleCheese quit (Quit: UncleCheese)
156: [01:30:20] <antmas> :O
157: [01:30:29] <antmas> oh man, no semicolon
158: [01:30:34] <antmas> i has a sad
159: [01:30:45] <willr> It's friday and sunny, I would doubt pyro's coming back. Beer o'clock perhaps
160: [01:31:39] <antmas> willr: heh, noted.
161: [01:36:09] <antmas> so this is what I get when I make an edit, then just choose another page without saving etc http://imgur.com/T0yLVSo
162: [01:36:24] <antmas> is this something that is configured through locale?
163: [01:39:46] * guzzlefry has left #silverstripe
164: [02:03:14] * UncleCheese has joined #silverstripe
165: [02:27:52] <willr> Way to remove an extension via YAML? Or is it only Object::remove_extension
166: [02:30:44] <UncleCheese> i don't think so, willr… it's one of the problems with the merge behaviour in config arrays
167: [02:31:00] <UncleCheese> it it were a map, you could do it..
168: [02:31:22] <willr> or could have something like Requirements with a blocked_extensions
169: [02:31:23] <UncleCheese> extensions: { MemberExtension: true }
170: [02:31:42] <UncleCheese> yeah, that might be a better solution
171: [02:31:58] <UncleCheese> i really wish there were a way to overwrite arrays rather than merge them
172: [02:32:05] <willr> As much as I cringe saying that anything in requirements is worth copying :D
173: [02:32:05] <simon_w> { 'Versioned(Stage, Live, Archived)': true } really looks great :p
174: [02:47:08] * antmas quit (Quit: Page closed)
175: [02:51:17] <willr> UncleCheese, the guys here have just discovered display logic and are happy as 2 year olds
176: [02:51:37] <UncleCheese> yeah, that module is one of my faves
177: [02:51:45] <irogue23> http://www.speedtest.net/my-result/3101902114
178: [02:51:49] <UncleCheese> just committed to that about 30 minutes ago, actually
179: [02:52:12] <UncleCheese> now supports wrapping anything in display logic, not just common form fields
180: [02:52:20] <willr> Yeah James here sent you a PR or something that he's mucked up. I'll beat him for you
181: [02:52:29] <UncleCheese> hmm
182: [02:52:47] <UncleCheese> don't have any PRs
183: [02:56:33] <willr> teh noobs.
184: [02:56:43] * zippy__ quit (Ping timeout: 272 seconds)
185: [02:57:25] <UncleCheese> have you seen the mock data module?
186: [02:57:30] <UncleCheese> The guys here love that one
187: [03:05:29] * guzzlefry has joined #silverstripe
188: [03:09:10] <guzzlefry> 2013-05-16 6e0e356 Added beforeExtending, afterExtending, and beforeUpdateCMSFields to allow user code better control over interaction with extending methods (Damian Mooyman) <-- wasn't someone asking for that a few days ago?
189: [03:11:21] <simon_w> Oh man, Sriram opened a pull request
190: [03:13:48] <guzzlefry> Is that bad?
191: [03:14:15] <simon_w> We didn't get along that well during high school
192: [03:14:23] <simon_w> Year younger than me and rather annoying
193: [03:14:34] <guzzlefry> :P
194: [03:14:44] <guzzlefry> Do all of your New Zealanders know each other? :P
195: [03:14:46] <guzzlefry> you*
196: [03:14:57] <willr> it's a small town
197: [03:15:10] <guzzlefry> ah
198: [03:15:16] <simon_w> It's like how everyone in Sydney knows everyone
199: [03:15:29] <guzzlefry> I thought Sydney was rather large?
200: [03:15:40] <simon_w> Same population as NZ
201: [03:17:52] <guzzlefry> So, I had a question (surprise! :P)
202: [03:18:15] <guzzlefry> Is it possible to remove Email from the required fields on the Member edit form via a DataExtension?
203: [03:20:55] <simon_w> Home time!
204: [03:21:14] * simon_w quit (Quit: This computer has gone to sleep)
205: [03:21:39] * DigNZ quit (Quit: DigNZ)
206: [03:28:52] <UncleCheese> guzzlefry: looks like you're going to have a hard time with that
207: [03:29:05] <UncleCheese> Member_validator is not decoratable
208: [03:29:10] * nickmolhoek quit (Read error: No route to host)
209: [03:29:32] <guzzlefry> okay :/
210: [03:29:52] <UncleCheese> If it's really something you want to do, you can use the Injector to inject a custom member class
211: [03:29:54] <guzzlefry> UncleCheese: What about autopopulating the Email to avoid it? Or is it too late by the time the extension runs?
212: [03:30:04] <UncleCheese> and subclass Member, and overload the getValidator() method
213: [03:30:23] <UncleCheese> sure, you could use onBeforeWrite
214: [03:30:38] <UncleCheese> ah, actually that won't fire if the validator fails
215: [03:30:50] <guzzlefry> need onBeforeValidate :P
216: [03:30:57] <UncleCheese> mmm…
217: [03:31:19] <UncleCheese> just decorate $defaults on Member
218: [03:31:59] <guzzlefry> Well, they also have to be unique right?
219: [03:32:20] <guzzlefry> I thought $defaults could only be constant literals.
220: [03:48:05] * wracu quit (Ping timeout: 250 seconds)
221: [03:50:56] * Kolin_ has joined #silverstripe
222: [03:52:03] * coldhand_ has joined #silverstripe
223: [03:52:38] * Kolin quit (*.net *.split)
224: [03:52:39] * coldhand quit (*.net *.split)
225: [03:55:34] * willr quit (Quit: willr)
226: [03:58:27] <guzzlefry> I think I might be able to populate the Email field in updateCMSFields...
227: [04:03:21] <guzzlefry> $fields->getByName("Root.Main.Email"); <-- needed the tab added
228: [04:10:10] * coldblooded01 quit (Quit: coldblooded01)
229: [04:18:02] <guzzlefry> ah
230: [04:18:32] <guzzlefry> I just figured out a use-case for the injector. I can use that to maintain my fix on Member.php between composer updates.
231: [04:18:34] <guzzlefry> \o/
232: [04:24:24] * UncleCheese quit (Quit: UncleCheese)
233: [04:27:03] <guzzlefry> Looked through the docs...How do I inject a custom member class?
234: [04:28:04] * Martin____ has joined #silverstripe
235: [04:29:14] <Martin____> Does anyone know if it is possible to install Silverstripe outside of the web root?
236: [04:31:59] <ss23> Martin____: Not without hax by default etc
237: [04:34:01] <guzzlefry> Martin____: Why do you want to?
238: [04:35:45] * Martin____ quit (Ping timeout: 250 seconds)
239: [04:35:53] <guzzlefry> :/
240: [04:37:01] * aravinda has joined #silverstripe
241: [04:41:02] * cloph_away quit (Ping timeout: 240 seconds)
242: [04:41:03] * cloph has joined #silverstripe
243: [04:44:49] * peter_ss quit (Read error: Connection reset by peer)
244: [04:46:53] * peter_ss has joined #silverstripe
245: [04:50:59] * spronk2 quit (Quit: spronk2)
246: [05:07:35] * simon_w has joined #silverstripe
247: [05:07:51] * simon_w quit (Client Quit)
248: [05:09:32] * vonker has joined #silverstripe
249: [06:15:37] * guzzlefry has left #silverstripe
250: [06:20:20] * Nimle has joined #silverstripe
251: [06:20:49] <Nimle> Hi, in ss 3.1.2 what is the best way to load a css to the admin area without touching the core folders?
252: [06:22:01] * ajshort has joined #silverstripe
253: [06:22:43] * EasyCo has joined #silverstripe
254: [06:23:23] <EasyCo> When using the Email class. Can you send ArrayData to for the $body param? or do you need to send something rendered?
255: [06:28:57] <EasyCo> Ahh needed to use populateTemplate instead
256: [06:28:59] <EasyCo> All good
257: [06:30:33] * Shrike_Finland has joined #silverstripe
258: [06:31:53] * Nimle quit (Ping timeout: 250 seconds)
259: [06:33:04] * aravinda quit (Quit: Page closed)
260: [06:35:30] * vonker quit (Quit: Leaving)
261: [06:54:49] * spronk2 has joined #silverstripe
262: [07:35:10] * DesignerX has joined #silverstripe
263: [07:36:45] * zippy__ has joined #silverstripe
264: [07:44:32] * lerni has joined #silverstripe
265: [07:55:45] * NobrainerWeb has joined #silverstripe
266: [07:56:50] * iamss has joined #silverstripe
267: [08:08:01] <iamss> Hi Guys!
268: [08:08:27] <iamss> do we have a function ready for SS2.4 that allows upload photo via http or url?
269: [08:25:06] * Shrike_Finland1 has joined #silverstripe
270: [08:25:06] * Shrike_Finland quit (Read error: Connection reset by peer)
271: [08:30:50] <willmorgan> iamss: Not built-in. But I have something... https://github.com/willmorgan/silverstripe-facebookprofilepicturefield/blob/master/code/RemoteUpload.php
272: [08:31:35] <iamss> nice willmorgan! thanks
273: [08:32:13] <willmorgan> if you care about performance, then change the validator file size check (HEAD request) to a standard GET with CURLOPT_NOBODY set
274: [08:32:29] <willmorgan> it's marginally faster
275: [08:42:07] * ARNHOE has joined #silverstripe
276: [08:44:08] * spronk2 quit (Quit: spronk2)
277: [08:44:53] * chillu has joined #silverstripe
278: [08:45:48] <ss23> chillu: Can you confirm https://github.com/silverstripe-labs/silverstripe-newsletter/pull/59#issuecomment-28552998 if you get bored today? Is opensource, not for a client
279: [08:46:58] <chillu> ss23 ewww newsletter ;) OK, merged
280: [08:50:01] <marvanni> is there a reason that CMSSettingsController Breadcrumbs Link is NULL?
281: [08:50:27] <marvanni> if I have a GridField attached to SiteConfig, I can't click the settings links, only the back button
282: [08:50:46] <marvanni> setting Link to $this->Link() solves it..
283: [08:51:49] <marvanni> ah : Breadcrumbs($unlinked = false)
284: [08:51:58] <marvanni> but this $unlinked is not used...
285: [08:54:19] <ss23> chillu: Ah! I wasn't sure if it should be merged, I could've merged it. Just wasn't sure if what he said was right
286: [08:54:56] <chillu> it doesn't do any harm either way
287: [08:55:48] <ss23> coool
288: [09:03:33] * Stomach quit (Ping timeout: 248 seconds)
289: [09:05:07] * zfmf has joined #silverstripe
290: [09:05:32] <marvanni> @chillu do I need special permissions on transifex to make corrections on existing translations?
291: [09:05:47] * kinglozzer has joined #silverstripe
292: [09:06:01] <chillu> marvanni: You need to apply as a translator for a specific language and module, but that should be auto-approved if I've set it up correctly :)
293: [09:06:02] * EasyCo quit (Quit: EasyCo)
294: [09:06:14] <marvanni> I noticed some typo's in Dutch tranlations and some are wrong 'English' Dutch
295: [09:06:21] <chillu> Only new languages need manual approval, which is unavoidable given how transifex operates
296: [09:06:42] <marvanni> well i was able to add new, but I could not find an edit button
297: [09:12:37] <marvanni> it works now.. might be a browser hickup...
298: [09:55:35] <marvanni> ah... ss 3.1 allows me to install modules in a custom subfolder?
299: [10:03:27] * Motoservo has joined #silverstripe
300: [10:06:26] <marvanni> not with composer...
301: [10:09:06] * Kolin_ is now known as Kolin
302: [10:25:02] <marvanni> define('MODULES_DIR', 'modules'); ?
303: [10:26:01] <kinglozzer> marvanni: It's not used for anything
304: [10:26:06] <kinglozzer> Which is a shame :(
305: [10:27:18] * micmania1 has joined #silverstripe
306: [10:27:53] <marvanni> yes
307: [10:28:01] <marvanni> i can set installer-paths in composer
308: [10:28:07] <marvanni> which just works fine...
309: [10:28:21] <marvanni> all the code templates are found
310: [10:28:58] <marvanni> i think, not sure, that only Requirements::css/javascript() need to search for modules/jsorcss as well
311: [10:29:30] <marvanni> http://sspaste.com/paste/show/5285f583d80e8
312: [10:29:36] <marvanni> this does what i want
313: [10:30:06] <marvanni> there is a long debate in the 2.4 era
314: [10:30:07] <marvanni> https://groups.google.com/forum/#!topic/silverstripe-dev/6qdRkCDliEg
315: [10:30:53] <micmania1> Am I going crazy? To add a member to a group its Member->Groups()->add(Group) right?
316: [10:33:23] <kinglozzer> micmania1: I think so, I've only ever used Member->addToGroupByCode() but that should work as far as I know
317: [10:33:30] <marvanni> yes
318: [10:34:02] <micmania1> I'm trying to run a cli script and its just stopping whenever I run it. No errors or anything.
319: [10:34:03] <marvanni> on a Page i have this
320: [10:34:04] <marvanni> $this->EditorGroups()->add($group);
321: [10:34:46] <marvanni> which is more or less the same
322: [10:37:17] * Motoservo quit (Quit: Shhh. I'm trying to get some sleep here.)
323: [10:39:14] <marvanni> ok one change in Requirements and i think it works just fine to set a custom module install path
324: [10:39:27] <marvanni> protected function path_for_file($fileOrUrl) {
325: [10:39:37] <marvanni> if(Director::fileExists($fileOrUrl)) {
326: [10:39:46] <marvanni> if I add this
327: [10:39:47] <marvanni> } elseif(Director::fileExists(MODULES_DIR . '/'.$fileOrUrl)) {
328: [10:39:52] <marvanni> works just fine...
329: [10:44:24] <marvanni> hm\
330: [10:44:26] <kinglozzer> marvanni: You shouldn't need to do that
331: [10:44:48] <kinglozzer> When you call Requirements::javascript() you should pass the correct path into that, then there'll be no need to edit Requirements
332: [10:44:57] <marvanni> im just testing
333: [10:45:33] <kinglozzer> Most modules will, in _config.php, do something like: define('MY_MODULE_DIR'); and then use Requirements::javascript(MY_MODULE_DIR . 'javascript/foo.js');
334: [10:45:34] <marvanni> but requirements checks for the path you set, 3d party modules wont have the module_path prefix
335: [10:45:57] <marvanni> but what im testing is this
336: [10:46:20] <marvanni> modules/mymodule, modules/othermodule et
337: [10:46:23] <micmania1> I found the problem. I was setting the ParentID to the wrong thing, which just so happened to be the same as the newly created ID so it was getting stuck in a loop.
338: [10:46:31] <micmania1> and breath...
339: [10:47:48] <marvanni> if I create custom backend for requirements, I think it will work....
340: [10:47:54] <marvanni> it should
341: [10:48:32] <kinglozzer> Ah I see
342: [10:48:34] <marvanni> so I can have a folder structure like : cms, framework, themes, mysite, modules
343: [10:48:54] <marvanni> and all composer installed thirdparty modules go in one folder
344: [10:49:17] <marvanni> and the rest of the root I can use for project modules
345: [10:50:44] <marvanni> so I just need to write a modules module, which creates a modules folder with a _config and a RequirementsBackend, set composer to install modules in the modules folder and I guess it works pluggand play
346: [10:50:48] <marvanni> you still get it ?
347: [10:50:56] <marvanni> me talking to myself.... again :)
348: [10:51:33] <zippy__> noop
349: [10:51:52] <zippy__> plug and pray
350: [10:51:57] <marvanni> hehe
351: [10:52:01] <marvanni> you might be right
352: [10:53:01] <marvanni> coffee break, let me think this over... in s 2.4 is was a bitch, but now with composer and such it sould work
353: [10:53:03] <marvanni> h
354: [10:53:04] <marvanni> brb
355: [10:55:19] * spronk2 has joined #silverstripe
356: [11:00:22] * iamss quit (Quit: Page closed)
357: [11:01:57] * micmania1 quit (Ping timeout: 248 seconds)
358: [11:03:13] * micmania2 has joined #silverstripe
359: [11:03:28] * hubertus has joined #silverstripe
360: [11:03:59] <hubertus> translatable keeps concatating locale in admin, anybody had this issue too?
361: [11:04:16] <hubertus> http://site/admin/pages/edit/show/222?locale=nl_NL&locale=nl_NL&locale=nl_NL&locale=nl_NL&locale=nl_NL&locale=nl_NL&locale=nl_NL
362: [11:06:18] <micmania2> Filesystem::sync() - does that create any folders that are in the database, but not on disk?
363: [11:11:29] <marvanni> don't think so, at least not for files
364: [11:12:41] <DesignerX> micmania2: hi, it only updates the database as far as I know
365: [11:13:50] <DesignerX> Is there a way to have GriedField on the front end ? cant find much info about this
366: [11:16:41] * spronk has left #silverstripe
367: [11:16:54] * spronkey quit (Quit: Leaving)
368: [11:16:55] * travis-ci has joined #silverstripe
369: [11:16:55] <travis-ci> [travis-ci] silverstripe/silverstripe-framework#1554 (3.1 - bd5fdf1 : Ingo Schommer): The build passed.
370: [11:16:55] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-framework/compare/dbf051483772...bd5fdf1f1964
371: [11:16:55] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-framework/builds/14017418
372: [11:16:55] * travis-ci has left #silverstripe
373: [11:19:07] * Plopinou has joined #silverstripe
374: [11:19:14] <Plopinou> hi guys
375: [11:19:15] * spronk2 quit (Quit: spronk2)
376: [11:19:59] <Plopinou> i have a little question about localization in template
377: [11:20:27] <Plopinou> i don't succeed to make it work
378: [11:20:54] <Plopinou> i have a link like that <a class="surgris" href="javascript: OnClick=document.formulaire.submit();" id="formulaire">form</a>
379: [11:21:22] <Plopinou> i wanna localize the "form"
380: [11:21:48] <Plopinou> i try to replace it by <% sprintf(_t(FORM','form2')) %>
381: [11:22:08] <Plopinou> <a class="surgris" href="javascript: OnClick=document.formulaire.submit();" id="formulaire"><% sprintf(_t(FORM','form2')) %></a>
382: [11:22:13] <marvanni> you don't need sprintf
383: [11:22:21] <Plopinou> i try without too
384: [11:22:41] <marvanni> and you need to set your key to something like Site.FORM
385: [11:24:00] <Plopinou> i have this in my fr_FR.php : $lang['fr_FR']['thisPage']['FORM'] = 'formulaireFR';
386: [11:24:27] <Plopinou> this on my template : <a class="surgris" href="javascript: OnClick=document.formulaire.submit();" id="formulaire">_t('thisPage.FORM','form2')</a>
387: [11:25:02] <marvanni> your in 2.4?
388: [11:25:05] <Plopinou> yep
389: [11:25:39] <Plopinou> the _t() function seems to be not executed
390: [11:25:54] <Plopinou> i tried with the <% %> bracets
391: [11:26:00] * travis-ci has joined #silverstripe
392: [11:26:00] <travis-ci> [travis-ci] silverstripe/silverstripe-cms#657 (3.1 - 34c8fb2 : Ingo Schommer): The build passed.
393: [11:26:00] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-cms/compare/c3b7afbdb19d...34c8fb22cb27
394: [11:26:00] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-cms/builds/14017463
395: [11:26:00] * travis-ci has left #silverstripe
396: [11:26:01] <Plopinou> same result
397: [11:26:21] <marvanni> try to put this in your Page:init()
398: [11:26:22] <marvanni> i18n::set_locale(Translatable::get_current_locale());
399: [11:27:06] * spronk has joined #silverstripe
400: [11:27:08] <Plopinou> the page.php or the file where i'm trying to do this ?
401: [11:27:42] <marvanni> Page_Controller, so all other Pages will have the correct locale for i18n
402: [11:28:23] <Plopinou> i have that already : if($this->dataRecord->hasExtension('Translatable')) {
403: [11:28:23] <Plopinou> i18n::set_locale($this->dataRecord->Locale);
404: [11:28:23] <Plopinou> }
405: [11:28:33] <Plopinou> i try to replace by yours
406: [11:29:11] <marvanni> where do you jave fr_FR.php?
407: [11:29:43] <Plopinou> in the module where i'm working on
408: [11:29:52] <marvanni> in a lang folder?
409: [11:29:54] <Plopinou> yep
410: [11:30:04] <marvanni> sspaste it
411: [11:30:50] * joelpittet quit (Remote host closed the connection)
412: [11:31:39] <Plopinou> http://www.sspaste.com/paste/show/52860409a6380
413: [11:31:48] <Plopinou> here is my fr_FR.php
414: [11:32:02] <marvanni> but global $lang; on top
415: [11:32:44] <Plopinou> here is my Page.php http://www.sspaste.com/paste/show/5286044a4b77f
416: [11:33:42] <marvanni> should work
417: [11:34:16] <Plopinou> yeah that's why i don't understand xD
418: [11:34:22] * chillu quit (Quit: chillu)
419: [11:34:42] <marvanni> but this on top of you lang file
420: [11:34:43] <marvanni> global $lang;
421: [11:36:01] <Plopinou> i have it here is my entire fr_FR.php : http://www.sspaste.com/paste/show/528605188f40c
422: [11:39:23] <marvanni> and you flush=all and run dev/dev build after your changes?
423: [11:39:26] <Plopinou> here is the begining of my .ss : http://www.sspaste.com/paste/show/528605d13f3f4
424: [11:39:53] <marvanni> <% _t('thisPage.FORM','form2') %>
425: [11:40:20] * zfmf has left #silverstripe
426: [11:41:19] <Plopinou> hum
427: [11:41:24] * zippy__ quit (Quit: zippy__)
428: [11:41:37] <Plopinou> seems that miss dev/build was indeed needed
429: [11:41:39] <Plopinou> thx dude
430: [11:42:18] <Plopinou> it works now :)
431: [11:42:23] <Plopinou> thx for your help
432: [11:42:25] * chillu has joined #silverstripe
433: [11:44:39] <marvanni> np
434: [11:53:08] <kinglozzer> Grrrrrrrr http://status.zensupport.co.uk/active/13/3245
435: [12:03:17] * micmania2 quit (Ping timeout: 248 seconds)
436: [12:04:13] * micmania2 has joined #silverstripe
437: [12:07:02] * Alexwijn has joined #silverstripe
438: [12:07:05] <Alexwijn> Hi, I tried the following code: http://www.sspaste.com/paste/show/52860c565d5a7
439: [12:07:17] <Alexwijn> But I can't see the contents of the template
440: [12:07:21] <Alexwijn> It's blank
441: [12:09:13] * peter_ss has left #silverstripe
442: [12:11:01] <marvanni> ok, if you like to help me testing this with your modules :)
443: [12:11:02] <marvanni> https://github.com/axyr/silverstripe-modulefolder
444: [12:13:22] <Alexwijn> That sounds nice
445: [12:14:09] <Alexwijn> If I fixed the above issue, I'm happy to help you
446: [12:14:17] <Alexwijn> Need to get everything running before tomororw
447: [12:17:44] <kinglozzer> Alexwijn: Do you mean $tab->setTemplate() ?
448: [12:18:37] <kinglozzer> renderWith() won't do anything
449: [12:19:35] <Alexwijn> Still no contents
450: [12:21:04] <kinglozzer> What exactly are you trying to do?
451: [12:22:58] <Alexwijn> I want to create a custom tab
452: [12:23:01] <Alexwijn> With my own contents
453: [12:23:27] <Alexwijn> The user can edit sliders there
454: [12:23:41] <Alexwijn> But the slider is too complex to use the regluary fields
455: [12:23:45] <Alexwijn> So I want to create my own pag
456: [12:23:46] <Alexwijn> e
457: [12:23:53] <Alexwijn> And use hidden input fields
458: [12:24:08] <Alexwijn> And when clicking save those input fields values will be inserted/saved to the database
459: [12:24:40] * timc_ has joined #silverstripe
460: [12:25:03] <kinglozzer> Alexwijn: Try my comment: http://www.sspaste.com/paste/show/52860c565d5a7
461: [12:25:39] <timc_> Hi guys
462: [12:25:44] <kinglozzer> Or just $fields->addFieldToTab('Root.Main', new LiteralField('MyContents', $this->renderWith('CMSLayerSlider')));
463: [12:25:55] <timc_> Need some help with Director:forceSSL()
464: [12:26:18] <timc_> Seems to send me into an infinite redirect loop
465: [12:26:23] <Alexwijn> That did the trick, kinglozzer
466: [12:26:24] <Alexwijn> thanks
467: [12:26:42] <kinglozzer> timc_: Do you have an .htaccess rule that could be redirecting back to 'http' ?
468: [12:27:07] <timc_> Nope. I'm running on ngnix
469: [12:27:31] <Alexwijn> kinglozzer, but all the values that I will post to the site using the standard save button will be saved to the database right
470: [12:27:58] <kinglozzer> Assuming the input names match what they should be, yeah
471: [12:28:03] <Alexwijn> ok
472: [12:28:22] <kinglozzer> Sorry timc_, I have no experience of nginx :/
473: [12:28:38] <Alexwijn> timc_c
474: [12:28:38] <Alexwijn> http://www.sspaste.com/paste/show/5286116f6201f
475: [12:28:43] <Alexwijn> Adjust to your needs
476: [12:28:45] <Alexwijn> Its my config
477: [12:29:01] <Alexwijn> You also need to add your SS config
478: [12:29:05] <Alexwijn> That site is not using SS just yet
479: [12:33:25] <Alexwijn> Use this if you want SS in it
480: [12:33:25] <Alexwijn> if (!-f $request_filename) {
481: [12:33:26] <Alexwijn> rewrite ^(.*)$ /framework/main.php?url=$1&$3 last;
482: [12:33:26] <Alexwijn> }
483: [12:33:55] <timc_> Thanks Alexwijn - I'll give it a go
484: [12:34:02] <Alexwijn> Sure, np
485: [12:34:28] <Alexwijn> I think the best is using the nginx way than let it handling it with SS
486: [12:55:12] * Marvanni_ has joined #silverstripe
487: [12:59:13] * Marvanni_ quit (Client Quit)
488: [13:00:22] <Alexwijn> Hi Marvanni
489: [13:00:42] <Alexwijn> oh dear
490: [13:00:43] <marvanni> yo
491: [13:00:51] <Alexwijn> oh, I thought you left :)
492: [13:01:07] <marvanni> that was my laptop signing off
493: [13:01:12] <Alexwijn> ah ok
494: [13:03:21] <Alexwijn> I'm cleaning up my room:)
495: [13:03:38] <Alexwijn> You don't know what I found everytime :)
496: [13:03:43] <Alexwijn> Lost things and all
497: [13:04:21] <marvanni> I guess I don't want to know :)
498: [13:04:48] <Alexwijn> I found some mentos :)
499: [13:04:53] <Alexwijn> Still sealed
500: [13:09:49] <Alexwijn> Jeeezzz...what a dust :)
501: [13:11:25] * zfmf has joined #silverstripe
502: [13:17:34] * UndefinedOffset has joined #silverstripe
503: [13:20:12] * joelpittet has joined #silverstripe
504: [13:24:45] * joelpittet quit (Ping timeout: 265 seconds)
505: [13:32:54] * micmania2 has left #silverstripe
506: [13:32:59] * micmania2 has joined #silverstripe
507: [13:51:23] * Colin[pi]_2 has joined #silverstripe
508: [13:51:29] * Colin[pi] quit (Write error: Broken pipe)
509: [14:03:10] * travis-ci has joined #silverstripe
510: [14:03:10] <travis-ci> [travis-ci] silverstripe/silverstripe-cms#658 (3.1 - e444b35 : Sriram Venkatesh): The build passed.
511: [14:03:10] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-cms/compare/34c8fb22cb27...e444b359ec3f
512: [14:03:10] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-cms/builds/14022834
513: [14:03:10] * travis-ci has left #silverstripe
514: [14:11:35] * DesignerX quit (Ping timeout: 272 seconds)
515: [14:12:50] <micmania2> kinglozzer, did you get a chance to look at the bitbucket stuff I sent you?
516: [14:18:47] <kinglozzer> micmania2: I had a quick look on Wednesday night (I think it was Wednesday)
517: [14:18:58] <kinglozzer> Haven't had a chance to clone it or anything yet to play around properly
518: [14:19:26] <micmania2> ah right. I'm a bit busy atm like so won't be able to get back on it for a bit.
519: [14:20:08] <micmania2> but i'll get an email over to you at some point with some info (ie ideas/plan etc)
520: [14:20:23] <micmania2> and if you have any ideas just hoy them in the mix
521: [14:22:18] <kinglozzer> Okay, sounds good
522: [14:30:23] * chillu quit (Quit: chillu)
523: [14:38:55] * NobrainerWeb quit (Quit: NobrainerWeb)
524: [14:55:45] <Alexwijn> How to remove a tab?
525: [14:57:47] <Alexwijn> nvm found it
526: [14:58:27] <Alexwijn> does anyone know a better checkbox layout?
527: [15:00:06] <Alexwijn> nvm foind that one too :)
528: [15:01:29] * Shrike_Finland1 quit (Ping timeout: 244 seconds)
529: [15:02:41] * Shrike_Finland has joined #silverstripe
530: [15:08:29] <Alexwijn> Is it possible to have dynamic tabs?
531: [15:08:55] <Alexwijn> Also have a plus sign at the end of it
532: [15:08:57] <Alexwijn> to make a new tab
533: [15:09:06] * joelpittet has joined #silverstripe
534: [15:13:36] * joelpittet quit (Ping timeout: 246 seconds)
535: [15:13:47] * Plopinou quit ()
536: [15:15:32] * catcher has joined #silverstripe
537: [15:20:32] <marvanni> travis.ci will install all modules that are in composer right?
538: [15:22:21] <marvanni> ah i can add - composer require
539: [15:23:03] * sekjal has joined #silverstripe
540: [15:53:25] * lerni quit (Quit: lerni)
541: [15:59:59] <timc_> Alexwijn - I ended up needing a few more tweaks in my Nginx conf
542: [16:00:07] <Alexwijn> Alright
543: [16:00:15] <timc_> but seems to be working now
544: [16:00:20] <Alexwijn> Good to hear
545: [16:00:23] <timc_> thanks for you help!
546: [16:00:24] * hubertus quit (Remote host closed the connection)
547: [16:00:29] <Alexwijn> No problem
548: [16:04:29] <willmorgan> SilverStripe OpAuth 1.1 released
549: [16:04:40] <willmorgan> https://github.com/BetterBrief/silverstripe-opauth
550: [16:06:01] <catcher> cool!
551: [16:12:43] <catcher> looks slick. Looking forward to having a need to use it.
552: [16:14:00] <Alexwijn> Does anyone know a good module that installs a URL Field where you can also select current pages and set a custom url
553: [16:14:36] <marvanni> https://www.google.nl/search?q=silverstripe+url+field
554: [16:15:05] <micmania2> Alexwijn: nope, but if you find one let me know ;)
555: [16:15:18] <Alexwijn> marvanni, as if i did not tried that
556: [16:15:34] <marvanni> https://github.com/chillu/silverstripe-urlfield
557: [16:15:38] <marvanni> first result?
558: [16:15:45] <kinglozzer> Alexwijn: As in one where you can pick either a SiteTree object to link to, or enter a custom URL? Just build one yourself, fairly easy with entwine
559: [16:16:00] <kinglozzer> I might even have an example
560: [16:16:01] <Alexwijn> marvanni, that is only a validator
561: [16:16:21] <marvanni> ah yes I see it now. I thought it had a switch
562: [16:16:46] <Alexwijn> marvanni, and if you do something like that, then do it in style: http://bit.ly/17XBsPF
563: [16:16:54] <micmania2> It shouldn't be too hard to rip off the one in the CMS
564: [16:16:59] <marvanni> well, I use the display logic module and add a has_one Page and ExternalLink
565: [16:17:02] <marvanni> hold on
566: [16:17:18] <Alexwijn> But it also need to accept regulary url's
567: [16:17:22] <Alexwijn> to external sites
568: [16:19:22] <marvanni> http://sspaste.com/paste/show/5286478386e06
569: [16:19:52] <Alexwijn> I did not know "->isEqualTo" exists
570: [16:20:18] <marvanni> its a module display_ logic
571: [16:20:24] <Alexwijn> ic
572: [16:20:34] <marvanni> https://github.com/unclecheese/silverstripe-display-logic
573: [16:20:37] <Alexwijn> And it insert javascript too?
574: [16:20:38] <marvanni> you need that
575: [16:21:36] <kinglozzer> https://gist.github.com/kinglozzer/7487105
576: [16:21:36] <marvanni> try it, my example creates an optionset which diplays the treedropdown or a textfield based on the selected linktype
577: [16:22:00] <kinglozzer> Alexwijn ^^ mine is pretty-much the same as what display logic does
578: [16:22:05] <Alexwijn> :)
579: [16:22:14] <Alexwijn> I'll into this
580: [16:22:15] <Alexwijn> thankls
581: [16:22:58] <Alexwijn> I'm doing now what all programmers hate
582: [16:23:13] <Alexwijn> Converting data from excel to a simple array....a key-value pair
583: [16:23:53] <marvanni> you have phpexcel?
584: [16:24:07] <Alexwijn> no
585: [16:24:24] <Alexwijn> It is 2 seperated columns
586: [16:24:24] <marvanni> works nice to read/write excel files
587: [16:24:30] <Alexwijn> and it has two lists inside of one sheets
588: [16:24:38] <Alexwijn> and it does not have the keys
589: [16:24:43] <Alexwijn> I need to fill that one in to
590: [16:25:34] <Alexwijn> I managed to get most things with the replace function
591: [16:25:44] <Alexwijn> but the quotes and the key needs inserted manually
592: [16:26:51] * Shrike_Finland quit (Quit: Leaving.)
593: [16:27:07] <catcher> looks like map() can't handle a function as the Key (first) field, only the Title (second). Anything else out there?
594: [16:30:25] * ARNHOE quit ()
595: [16:36:38] <marvanni> $list->map('Field', 'OtherField'); should give an array
596: [16:37:29] * Liquide has joined #silverstripe
597: [16:39:11] <catcher> marvanni, I need 'Field' to be a function result from the object. map('Field', 'Function') works, but map('Function', 'Field') does not (the keys end up as integers)
598: [16:40:30] <marvanni> no, that wont work
599: [16:40:59] <marvanni> you will need to do a foreach yourself
600: [16:41:04] <kinglozzer> catcher: If map('Field', 'Function') works, can you just do that and swap the array keys with values? :P
601: [16:41:37] <catcher> I did the foreach, but that's a clever idea kinglozzer!
602: [16:41:54] <kinglozzer> ArrayLib::invert() might do it
603: [16:41:56] <kinglozzer> Not sure
604: [16:42:00] <catcher> better document it if I do though, or I'll be pretty confused in 6 months. :-P
605: [16:43:23] <kinglozzer> catcher array_flip()
606: [16:43:45] <catcher> right, thanks
607: [16:58:01] * joelpittet has joined #silverstripe
608: [17:02:27] * joelpittet quit (Ping timeout: 246 seconds)
609: [17:11:04] * kinglozzer quit ()
610: [17:13:27] <sekjal> marvanni: sorry to bug you again, but do you know how to set the Title Header for a column when using a callback in GridFieldEditableColumns?
611: [17:23:02] <sekjal> nvm, figured it out
612: [17:36:43] <Alexwijn> What is wrong with the following code
613: [17:36:44] <Alexwijn> $mainTab = $fields->findOrMakeTab('Root.Main');
614: [17:36:44] <Alexwijn> foreach($mainTab->Fields() as $field)
615: [17:36:44] <Alexwijn> {
616: [17:36:44] <Alexwijn> $field->setTitle(_t('Slide.' . strtoupper($fields->Title()), $fields->Title()));
617: [17:36:44] <Alexwijn> }
618: [17:40:05] <marvanni> $tab->Fields();
619: [17:40:20] <Alexwijn> Is that incorrect?
620: [17:40:50] <marvanni> hm, yeah looks ok..
621: [17:40:53] <marvanni> nto sure
622: [17:41:05] <Alexwijn> because I get the error that the Title function does not exist
623: [17:41:16] <Alexwijn> But it does exists in my db array
624: [17:41:21] <Alexwijn> oeps
625: [17:41:24] <Alexwijn> I mean the field
626: [17:41:47] <Alexwijn> Is there an other way to get the title of a field
627: [17:41:50] <Alexwijn> even if you did not set it yet
628: [17:45:32] <catcher> Alexwijn, $fields->Title() as opposed to $field
629: [17:46:03] <Alexwijn> Why?
630: [17:46:29] <Alexwijn> I don't want all fields ahving the same title
631: [17:46:38] <catcher> $fields is probably a list, which can't have a title
632: [17:47:18] <Alexwijn> yes
633: [17:47:20] <Alexwijn> that why the foreach
634: [17:48:06] <catcher> The $fields list in fact has no function called Title().
635: [17:48:21] <Alexwijn> Well I'm not calling it on the fields
636: [17:48:30] <catcher> $field->setTitle(_t('Slide.' . strtoupper($fields->Title()), $fields->Title()));
637: [17:48:31] <catcher> sure you are
638: [17:48:32] <Alexwijn> I call it on the field inside those fields
639: [17:48:52] <Alexwijn> Oh crap
640: [17:48:54] <Alexwijn> Did not notice that
641: [17:50:55] * timc_ quit (Ping timeout: 250 seconds)
642: [17:53:06] <Alexwijn> I'm using this code:
643: [17:53:06] <Alexwijn> $layersTab = $fields->findOrMakeTab('Root.Layers', 'Layers');
644: [17:53:07] <Alexwijn> $layersTab->push(new LiteralField('Content', $this->renderWith('CMSLayerSlider')));
645: [17:53:13] <Alexwijn> That template also contains a table
646: [17:53:26] <Alexwijn> But if I got that table inside that template the cms got messed up
647: [17:54:05] <Alexwijn> So if I remove the <table> from the ss file, everything works just fine
648: [17:54:16] <Alexwijn> Is it not allowed to have tables in ss files for cms?
649: [17:56:38] * joelpittet has joined #silverstripe
650: [17:59:03] <Alexwijn> Found the problem
651: [17:59:14] <Alexwijn> he does not like if one of the input fields has the name style in it
652: [18:00:21] * joelpitt_ has joined #silverstripe
653: [18:02:02] * willmorgan quit (Quit: Ciao mateys.)
654: [18:04:18] * joelpittet quit (Ping timeout: 272 seconds)
655: [18:26:55] <Alexwijn> How to manually process the data that has been posted?
656: [18:26:58] <Alexwijn> At the CMS Panel
657: [18:27:17] <Alexwijn> I want that SS process the standard fields that he knows
658: [18:27:21] <Alexwijn> And the rest I want to process
659: [18:28:22] <Alexwijn> Anyone?
660: [18:31:54] <Alexwijn> Or is it possbile to use a differnt form class
661: [18:32:02] <Alexwijn> that Extends from CMSForm?
662: [18:32:08] <Alexwijn> And if so, how?
663: [18:36:11] <Alexwijn> I guess I need to use a custom GridField
664: [18:36:18] <Alexwijn> Does anyone know what function I need to adjust
665: [18:36:23] <Alexwijn> To process the data that I post
666: [18:39:46] <Alexwijn> Nobody got any clue?
667: [18:51:55] * zfmf has left #silverstripe
668: [19:13:47] <Alexwijn> I'm trying to work with GridFieldDetailForm_ItemRequest
669: [19:14:01] <Alexwijn> But when I try to save something it does not execute doSave
670: [19:14:08] <Alexwijn> Does anyone what it is for, that function?
671: [19:14:11] <Alexwijn> know*
672: [19:15:03] <Alexwijn> I'm starting to think that I'm talking to myself since nobody (want to) reply
673: [19:17:36] * joelpittet has joined #silverstripe
674: [19:18:33] <catcher> Alexwijn, it's Saturday in NZ, and I've never done what you're asking :) I'd have to dig into the core the same way you would.
675: [19:18:59] * joelpitt_ quit (Ping timeout: 260 seconds)
676: [19:21:59] <Alexwijn> Did you ever worked with a multiple selection dropbox?
677: [19:26:52] <shakesoda> I sure would have appreciated it if the guy with all the access to this server wasn't harder to contact than the dead
678: [19:27:11] <shakesoda> or, at least, if the mysql permissions were sloppier so I could create my own damned database.
679: [19:28:18] <catcher> shakesoda, that's why the internet invented XSS
680: [19:28:58] <catcher> Alexwijn, I use ListboxField with the multi option, which is killer.
681: [19:29:15] <Alexwijn> I tried that too
682: [19:29:20] <Alexwijn> but he does not display my data
683: [19:29:23] <Alexwijn> I saved
684: [19:29:30] <Alexwijn> And after I refresh it does not display
685: [19:29:56] <shakesoda> catcher: it's not about getting into the existing databases, I can do that easily enough.
686: [19:30:20] <Alexwijn> And when I use xDebug, I'm unable to find the field
687: [19:31:11] <catcher> shakesoda, but that ruins my joke.
688: [19:31:21] <shakesoda> :P
689: [19:31:40] <catcher> Alexwijn, can you share the code for your listbox setup?
690: [19:32:58] <Alexwijn> http://www.sspaste.com/paste/show/528674e51ef4a
691: [19:34:42] <catcher> Alexwijn, You're feeding listbox an array, it needs an SS_List
692: [19:34:56] <Alexwijn> I can select everything just fine
693: [19:35:15] <Alexwijn> It is just the reading part
694: [19:35:32] * ajmitch_ quit (*.net *.split)
695: [19:35:37] <catcher> Yeah, turns out I'm lying.
696: [19:37:03] <Alexwijn> Also with the code i gave you he says: "the method 'transitions2d' does not exist on 'Slide'"
697: [19:37:30] * ajmitch has joined #silverstripe
698: [19:40:20] <Alexwijn> Any suggestion?
699: [19:41:11] <catcher> Alexwijn, first, it looks like you're saving the ID of the transition to the DB, rather than the text. Is that what you want?
700: [19:41:24] <Alexwijn> yes
701: [19:41:35] <Alexwijn> The number that I gave as key is correct
702: [19:41:42] <Alexwijn> I need that number at the frontend
703: [19:42:00] <catcher> Alexwijn, why use a Text field instead of an Int then?
704: [19:42:15] <Alexwijn> For what?
705: [19:42:22] <Alexwijn> Transitions2D?
706: [19:42:25] <catcher> yep
707: [19:42:34] <Alexwijn> Because it is a multiple options
708: [19:42:57] <catcher> The multi interfaces w/ has_many or many_many
709: [19:43:02] <Alexwijn> What I debugged out of it he receive it save it as "5,67,1,35"
710: [19:43:08] <Alexwijn> So the comma is the sperator
711: [19:43:12] <Alexwijn> And that is a string
712: [19:43:19] <Alexwijn> And since I have a lot of options I choose the text version
713: [19:43:34] <catcher> gotcha - so the data is saving properly?
714: [19:43:53] <Alexwijn> Got nothing in the databse
715: [19:43:58] <Alexwijn> It's still Null
716: [19:45:40] <catcher> If you want to stick with the ORM, your best bet is probably to created a Transition class, subclass it with 2D and 3D classes, and use an actual many_many relationship.
717: [19:45:56] <Alexwijn> But those options are static
718: [19:46:21] <Alexwijn> "No associative arrays allowed multiple=true"
719: [19:46:22] * SightUnseen has joined #silverstripe
720: [19:46:28] <Alexwijn> My head is going to explode
721: [19:46:30] <catcher> Alexwijn, no laws against static data in the DB.
722: [19:46:44] <Alexwijn> SS is keep getting random
723: [19:46:54] <Alexwijn> Same code now got that error
724: [19:46:57] <catcher> You'll have a rough go using fields that are designed to work with the ORM when you're not using the ORM.
725: [19:48:16] <Alexwijn> What is the best way to create a static dataobject
726: [19:48:19] <Alexwijn> overriding get?
727: [19:48:26] <catcher> You may be better off using a custom listbox multi and overriding the methods you need.
728: [19:48:43] <Alexwijn> Why is everything so hard about SS :(
729: [19:50:23] <catcher> Alexwijn, you're just trying to do some non-SS stuff with it, so you'll have to do some custom coding.
730: [19:55:54] * EasyCo has joined #silverstripe
731: [19:56:12] * EasyCo quit (Client Quit)
732: [20:03:17] <Alexwijn> catcher, so how can i make a static dataobject
733: [20:03:25] <Alexwijn> So no data will be stored in the database
734: [20:04:24] * willr has joined #silverstripe
735: [20:07:36] <catcher> Alexwijn, it's all OOP, objects are class instantiations. Can't instantiate a dataobject without a class.
736: [20:08:26] <catcher> You can declare a static class property, or create a method to return a datastructure like you're doing now.
737: [20:10:15] <Alexwijn> Why return $this->Transitions2D the contents of getTransitions2D()
738: [20:13:39] <Alexwijn> Finnaly fixed
739: [20:13:42] <Alexwijn> changed the function name
740: [20:13:45] <Alexwijn> and everything is fine
741: [20:16:11] <Alexwijn> How to add a validator to the form btw?
742: [20:19:50] <Alexwijn> Found it :)
743: [20:24:17] * SightUnseen has left #silverstripe
744: [20:24:38] * SightUnseen has joined #silverstripe
745: [20:24:43] * SightUnseen has left #silverstripe
746: [20:32:37] <Alexwijn> I'm getting the following error: the method 'valid' does not exist on 'RequiredFields'
747: [20:32:51] <Alexwijn> http://www.sspaste.com/paste/show/528682eede443
748: [20:33:00] <Alexwijn> That function is in my dataobject
749: [20:33:04] <Alexwijn> I get that error when saving
750: [20:34:37] * Motoservo has joined #silverstripe
751: [21:07:34] * UndefinedOffset quit (Quit: Leaving.)
752: [21:14:53] * willr quit (Quit: willr)
753: [21:16:02] * Error404NotFound has joined #silverstripe
754: [21:22:27] * sekjal quit (Quit: Leaving)
755: [21:22:51] * Error404NotFound quit (Ping timeout: 246 seconds)
756: [21:24:36] * Motoservo quit (Quit: Shhh. I'm trying to get some sleep here.)
757: [21:32:42] * willr has joined #silverstripe
758: [22:32:50] * Colin[pi]_2 quit (Ping timeout: 265 seconds)
759: [22:41:28] * catcher quit (Quit: Leaving)
760: [22:51:26] * gcoderre has joined #silverstripe
761: [22:53:39] * gcoderre quit (Client Quit)
762: [23:09:24] * Liquide quit ()
763: [23:33:00] <Alexwijn> I added this to my dataobject
764: [23:33:03] <Alexwijn> public function getCMSValidator()
765: [23:33:04] <Alexwijn> {
766: [23:33:04] <Alexwijn> return new RequiredFields('Title');
767: [23:33:04] <Alexwijn> }
768: [23:33:13] <Alexwijn> But I'm still able to fill in nothing into the Title field

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