#silverstripe IRC Log

IRC log for 2 January 2014

All timestamps are in UTC.

1: [00:34:01] * mobiusnz1 has joined #silverstripe
2: [00:37:50] * mobiusnz quit (Ping timeout: 245 seconds)
3: [00:38:12] * mobiusnz1 quit (Client Quit)
4: [00:42:26] * UncleCheese quit (Quit: UncleCheese)
5: [00:51:58] * duramater quit ()
6: [01:24:56] * mobiusnz has joined #silverstripe
7: [01:43:48] * Azure has joined #silverstripe
8: [02:47:03] * joelpittet has joined #silverstripe
9: [02:49:26] * mobiusnz quit (Quit: Leaving.)
10: [02:56:38] * mobiusnz has joined #silverstripe
11: [03:03:48] * mobiusnz quit (Quit: Leaving.)
12: [03:32:00] * mobiusnz has joined #silverstripe
13: [04:19:51] * DigNZ has joined #silverstripe
14: [04:21:57] * DigNZ quit (Client Quit)
15: [04:22:15] * cloph_away quit (Read error: Operation timed out)
16: [04:22:45] * openbees has joined #silverstripe
17: [04:22:49] * cloph_away has joined #silverstripe
18: [04:24:21] * joelpittet quit ()
19: [04:49:20] * openbees quit (Quit: Leaving)
20: [05:49:42] * UncleCheese has joined #silverstripe
21: [06:41:36] * Error404NotFound has joined #silverstripe
22: [07:40:08] * Shrike_Finland quit (Quit: Leaving.)
23: [08:03:05] * ss23 quit (Ping timeout: 272 seconds)
24: [08:09:25] * ss23 has joined #silverstripe
25: [08:47:32] * kinglozzer has joined #silverstripe
26: [09:14:49] * UncleCheese quit (Quit: UncleCheese)
27: [09:17:21] * mobiusnz quit (Quit: Leaving.)
28: [09:26:26] * Marvanni has joined #silverstripe
29: [09:30:28] <Marvanni> Hm, when I want to return a Form in a json response, I need to add ->forTemplate() twice ?
30: [09:30:31] <Marvanni> $this->Form()->forTemplate()->forTemplate()
31: [09:31:37] <Marvanni> when I do $this->Form()->forTemplate() i get HTMLText as a return value instead?
32: [09:31:46] <Marvanni> is this intended behavior?
33: [09:45:56] <Zauberfisch23> HTMLText? thats odd
34: [09:46:48] <Zauberfisch23> https://github.com/silverstripe/silverstripe-framework/blob/3.1/forms/Form.php#L1315
35: [09:47:00] <Zauberfisch23> this does not look like an HTMLText object
36: [09:47:06] <Zauberfisch23> renderWith should return a string
37: [09:48:23] <Zauberfisch23> I do custom forms quiet often, and have not run into that issue
38: [09:49:27] <Zauberfisch23> the only thing that is rather anoying is that the way forms are validated changed a couple of times in the past month
39: [09:49:34] <Zauberfisch23> so I had to fix forms with every update
40: [09:50:43] <Zauberfisch23> actually, seems validation has gotten a major api change again
41: [09:51:00] <Zauberfisch23> or I am missing something
42: [09:51:10] <Marvanni> if I use a 'hard' return $form->forTempalte(); it renders the html, but not in a json_encode() array
43: [09:51:22] <Marvanni> but if I use $form->formHtmlContent() it renders fine
44: [09:51:43] <Marvanni> after I fixed this
45: [09:51:44] <Marvanni> https://github.com/silverstripe/silverstripe-framework/pull/2751
46: [09:51:46] <Zauberfisch23> what do you mean with json_encode array?
47: [09:51:50] * micmania1 has joined #silverstripe
48: [09:52:15] <Marvanni> return json_encode(array('form' => $form->formHtmlContent()));
49: [09:53:03] <Zauberfisch23> well, the reason why $form->forTempalte() works is probably because you use it as a string
50: [09:53:09] <Zauberfisch23> so when you use $form->forTempalte()
51: [09:53:17] <Zauberfisch23> then in fact you use $form->forTempalte()->__toString()
52: [09:53:27] <Marvanni> guess so, __toString ..
53: [09:53:30] <Zauberfisch23> which is for HTMLText the same as $form->forTempalte()->forTemplate()
54: [09:53:30] <Marvanni> yes :)
55: [09:53:49] <Zauberfisch23> but, still, the question remains: why is it a htmltext in the first place
56: [09:53:54] <Marvanni> it looks a bit akward if you see it in code...
57: [09:54:02] <Marvanni> guess its casted somewhere
58: [09:54:10] <Zauberfisch23> I can think of no reason why the form should return a object
59: [09:54:25] <Zauberfisch23> what ss version are you on?
60: [09:56:58] <Marvanni> latest
61: [09:57:15] <Marvanni> I think its this rule in Viewable data:
62: [09:57:44] <Marvanni> hm no...
63: [09:58:58] <Marvanni> hm SSViewer process :
64: [09:58:59] <Marvanni> * @return HTMLText Parsed template output.
65: [09:59:12] <Marvanni> return DBField::create_field('HTMLText', $output, null, array('shortcodes' => false));
66: [09:59:39] * Shrike_Finland has joined #silverstripe
67: [10:00:16] <Marvanni> so I stick with $this->Form()->formHtmlContent()
68: [10:00:51] <Marvanni> and instead of $(formElem).replaceWith(data.form);
69: [10:01:03] <Marvanni> $(formElem).html(data.html);
70: [10:02:17] <Zauberfisch23> odd, I was not aware that ssviewer returns htmltext
71: [10:03:02] <Zauberfisch23> ahh, I see, it was added 'recently'
72: [10:03:03] <Zauberfisch23> https://github.com/silverstripe/silverstripe-framework/commit/743a186c3248d62ce001e6c40fed2123da10b54c
73: [10:03:07] <Zauberfisch23> march this year
74: [10:03:18] <Zauberfisch23> *last year
75: [10:03:20] <Zauberfisch23> ..
76: [10:03:21] <Zauberfisch23> ...
77: [10:03:26] <Marvanni> ;)
78: [10:04:09] <Zauberfisch23> Marvanni: I would support a pull request for a __toString() method on form
79: [10:04:17] <Marvanni> ah and dhensby mentioned the same issue with the json return :)
80: [10:04:46] <Zauberfisch23> public function __toString() { return $this->forTemplate()->__toString(); }
81: [10:04:54] <Marvanni> (string)$form->forTemplate()
82: [10:05:00] <Zauberfisch23> or that
83: [10:05:30] <Zauberfisch23> but with the to string method you then could do
84: [10:05:33] <Zauberfisch23> (string)$form
85: [10:06:05] <Zauberfisch23> afk
86: [10:06:10] <Marvanni> no that won't work
87: [10:06:21] <Marvanni> will return the class name
88: [10:18:06] * mobiusnz has joined #silverstripe
89: [10:22:23] * mobiusnz quit (Ping timeout: 240 seconds)
90: [11:00:10] <Marvanni> Is this bad? : $form->loadDataFrom(Convert::raw2xml($_GET));
91: [11:20:05] * ssNewbie has joined #silverstripe
92: [11:20:43] <ssNewbie> What is the best way to get an image using Book::get()->filter
93: [11:22:17] <Marvanni> how is the image attached?
94: [11:22:40] <ssNewbie> I have a book page
95: [11:23:10] <ssNewbie> and I 'CoverImage' => 'Image',
96: [11:32:26] <Marvanni> $book->CoverImage()
97: [11:36:32] <ssNewbie> perfect i am getting it now
98: [11:36:35] <ssNewbie> Thanks :)
99: [11:41:27] * ssNewbie quit (Quit: Page closed)
100: [12:04:23] * Error404NotFound quit (Quit: User guilty of hitting the Big Red X...)
101: [12:11:26] * mr12juul12 has joined #silverstripe
102: [12:11:28] <mr12juul12> http://codes4free.net/?ref=ocb0GUfQc
103: [12:11:45] * mr12juul12 quit (Client Quit)
104: [12:21:31] * mobiusnz has joined #silverstripe
105: [12:26:12] * mobiusnz quit (Ping timeout: 272 seconds)
106: [12:26:17] * Marvanni_ has joined #silverstripe
107: [12:26:48] * Marvanni quit (Ping timeout: 245 seconds)
108: [12:36:26] * Marvanni_ quit (Quit: Marvanni_)
109: [12:39:29] * Marvanni has joined #silverstripe
110: [13:07:08] * micmania1 quit (Ping timeout: 272 seconds)
111: [13:20:13] * UndefinedOffset has joined #silverstripe
112: [13:22:12] * mobiusnz has joined #silverstripe
113: [13:27:15] * mobiusnz quit (Ping timeout: 272 seconds)
114: [13:28:08] * torstein has joined #silverstripe
115: [13:47:44] * Shrike_Finland quit (Quit: Leaving.)
116: [14:21:29] * dendeffe has joined #silverstripe
117: [14:25:11] <dendeffe> I upgraded my web server and had to upgrade a few legacy SilverStripe sites to 2.4.13 - However, now there seems to be a .htaccess problem - all links SS generates for the menus have index.php (although removing index.php works fine)
118: [14:25:37] <dendeffe> Also: accessing another app I have installed in a subdirectory doesn't work anymore
119: [14:25:58] * micmania1 has joined #silverstripe
120: [14:26:25] <dendeffe> trying to acces that app redirects me to the home page
121: [14:27:04] <Marvanni> Is mod_rewrite enabled?
122: [14:28:38] <dendeffe> Yes it is
123: [14:28:59] <dendeffe> the URL without index.php also works properly
124: [14:29:16] <dendeffe> This is the .htaccess http://www.sspaste.com/paste/show/52c574636c9a9
125: [14:30:06] <dendeffe> index.php issue only seems to happen on the home page
126: [14:30:36] <dendeffe> If I go to http://www.defunkt.nu/portfolio/, it's in none of the URLs
127: [14:30:52] <Marvanni> I posted mine in the comments…
128: [14:30:52] <Marvanni> http://www.sspaste.com/paste/show/52c574636c9a9
129: [14:30:56] <Marvanni> ho...
130: [14:31:02] <Marvanni> its a 3.x htaccess...
131: [14:31:17] <Marvanni> can you check with phpinfo if the mod is enabled?
132: [14:32:06] <dendeffe> Yes, mod_rewrite is enabled http://www.defunkt.nu/info.php
133: [14:34:50] <dendeffe> I think this might be the same problem (not resolved though) http://www.silverstripe.org/installing-silverstripe/show/24748
134: [14:40:02] <Marvanni> sry… I can't dive deeper in it… don't see what could be wrong
135: [14:41:28] <dendeffe> No, thanks. I'm moving the other app onto it's own server now so I can at least access it again. Will investigate the index.php issue further afterwards. As the non index.php keeps working, it's not that urgent I guess
136: [15:24:02] * mobiusnz has joined #silverstripe
137: [15:24:25] * dendeffe quit (Ping timeout: 272 seconds)
138: [15:28:13] * mobiusnz quit (Ping timeout: 240 seconds)
139: [15:28:28] * micmania1 quit (Ping timeout: 248 seconds)
140: [15:34:38] * catcher has joined #silverstripe
141: [15:36:57] * micmania1 has joined #silverstripe
142: [15:45:33] * Marvanni_ has joined #silverstripe
143: [15:46:35] * henkpoley has joined #silverstripe
144: [15:47:00] * Marvanni quit (Ping timeout: 245 seconds)
145: [15:58:37] * Marvanni has joined #silverstripe
146: [15:59:23] * Marvanni_ quit (Ping timeout: 246 seconds)
147: [16:24:39] * mobiusnz has joined #silverstripe
148: [16:29:39] * mobiusnz quit (Ping timeout: 272 seconds)
149: [16:38:49] * nhorstmeier has joined #silverstripe
150: [16:38:57] * nhorstmeier has left #silverstripe
151: [16:39:27] * henkpoley quit (Quit: henkpoley)
152: [16:45:04] <micmania1> anyone got a simple solution for replace spaces with tabs for all files in a directory?
153: [16:47:08] <micmania1> ah! found how to do it in sublime :)
154: [17:17:27] * kinglozzer quit ()
155: [17:25:15] * mobiusnz has joined #silverstripe
156: [17:25:29] * henkpoley has joined #silverstripe
157: [17:29:30] * mobiusnz quit (Ping timeout: 245 seconds)
158: [17:30:11] * Friebel has joined #silverstripe
159: [17:32:21] <Friebel> Hi there! Anybody knows if there is a build in way to set Silverstripe databasetable-names to lowercase? (to avoid the stupid mySQL case-insensitive problem using innoDB tables)?
160: [17:32:54] <Friebel> (I mean stupid WINDOWS mySQL case-insensitive problem)
161: [17:36:08] <Friebel> What I'd like to have is a nice workflow to easely transfer a Silverstripe database as .SQL from a local Windows machine to a remote Linux hosting (with only phpmyadmin), but cannot figure out how to solve this issue, 'cause lower_case_table_names = 2' doesn't seem to work on InnoDB databases....
162: [17:36:17] <Friebel> help would be very much appreciated!
163: [17:45:51] <Marvanni> https://github.com/smindel/silverstripe-dbplumber/blob/master/code/FixLowercaseTableNamesTask.php
164: [18:09:08] <Friebel> thanks marvanni, trying it out at the moment
165: [18:09:31] * mojo5000 has joined #silverstripe
166: [18:13:26] * ezero quit (Ping timeout: 240 seconds)
167: [18:23:42] * coldhand quit (Ping timeout: 246 seconds)
168: [18:25:34] * coldhand has joined #silverstripe
169: [18:25:57] * ezero has joined #silverstripe
170: [18:27:55] * Motoservo quit (Quit: Over & out.)
171: [18:49:26] * dendeffe has joined #silverstripe
172: [18:58:23] * henkpoley quit (Quit: henkpoley)
173: [18:59:36] * mojo5000 quit (*.net *.split)
174: [19:03:35] <catcher> Anyone use varnish with SS?
175: [19:05:32] * mojo5000 has joined #silverstripe
176: [19:15:37] * mobiusnz has joined #silverstripe
177: [19:20:40] * Marvanni has left #silverstripe
178: [19:21:56] * oddnoc has joined #silverstripe
179: [19:36:27] * dendeffe quit (Quit: dendeffe)
180: [19:37:35] * Friebel quit (Ping timeout: 272 seconds)
181: [19:43:22] * Shrike_Finland has joined #silverstripe
182: [19:46:11] * DigNZ has joined #silverstripe
183: [19:47:19] * violetina has joined #silverstripe
184: [20:28:43] * UncleCheese has joined #silverstripe
185: [20:30:06] * Shrike_Finland quit (Quit: Leaving.)
186: [20:33:18] * jrthomer quit (Quit: Leaving...)
187: [20:53:10] * oddnoc quit (Quit: bye!)
188: [21:13:07] * UndefinedOffset quit (Quit: Leaving.)
189: [21:17:59] * SphereSilverNL has joined #silverstripe
190: [21:18:13] <SphereSilverNL> Happy new year folks!
191: [21:18:56] <SphereSilverNL> How're ya'll doing?
192: [21:20:04] * mojo5000 quit (Remote host closed the connection)
193: [21:23:39] * mojo5000 has joined #silverstripe
194: [21:26:15] * travis-ci has joined #silverstripe
195: [21:26:16] <travis-ci> [travis-ci] silverstripe/silverstripe-framework#1747 (3.1 - 98c01a3 : Will Rossiter): The build passed.
196: [21:26:16] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-framework/compare/1c6bea9bb570...98c01a34f63d
197: [21:26:16] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-framework/builds/16280630
198: [21:26:16] * travis-ci has left #silverstripe
199: [21:29:13] * mojo5000 quit (Remote host closed the connection)
200: [21:32:53] * willr has joined #silverstripe
201: [21:35:12] <Azure> hm... How do I set the upload folder name for a gridfield record editor?
202: [21:36:24] <willr> The UploadField will be part of the getCMSFields for the Record class. So you'd need to set it on the UploadField
203: [21:38:20] * SphereSilverNL quit (Read error: Connection reset by peer)
204: [21:39:05] * SphereSilverNL has joined #silverstripe
205: [21:57:52] * willr quit (Quit: willr)
206: [22:12:18] <Azure> Hm
207: [22:16:04] <Azure> $gridFieldConfig->getComponentByType('ImageUpload')->setConfig('folderName', 'hpgallery'); doesn't appear to work.
208: [22:22:59] * EasyCo quit (Ping timeout: 246 seconds)
209: [22:24:37] * EasyCo_ has joined #silverstripe
210: [22:27:53] <catcher> Having trouble with RequiredFields via getCMSValidator. The constructor sets the protected 'required' property, but it's unset by the time the php() method is called..
211: [22:28:01] * Avroceptyr quit (Quit: leaving)
212: [22:28:13] <catcher> Anyone have info on that? (SS3.1.2)
213: [22:30:32] <Azure> (Same with just "Upload" instead of "ImageUpload".)
214: [22:33:18] * EasyCo_ quit (Ping timeout: 246 seconds)
215: [22:35:51] * EasyCo_ has joined #silverstripe
216: [22:44:39] * SphereSilverNL quit (Ping timeout: 240 seconds)
217: [22:46:53] * SphereSilverNL has joined #silverstripe
218: [22:47:57] <SphereSilverNL> And this internet sucks just as hard
219: [22:49:24] * SphereSilverNL quit (Client Quit)
220: [22:58:29] * catcher quit (Quit: Leaving)
221: [23:05:38] * EasyCo_ quit (Ping timeout: 264 seconds)
222: [23:06:27] * EasyCo_ has joined #silverstripe
223: [23:23:56] * mojo5000 has joined #silverstripe
224: [23:25:01] <Azure> Not sure what then.
225: [23:25:37] * Azure quit (Quit: My MBP went to sleep.)
226: [23:30:52] * Azure has joined #silverstripe

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