#silverstripe IRC Log

IRC log for 14 January 2013

All timestamps are in UTC.

1: [00:47:00] * chillu quit (Quit: chillu)
2: [01:08:00] <dnz-> rly even lift
3: [01:08:00] <dnz-> DYEL
4: [01:11:00] * nickmolhoek quit (Quit: nickmolhoek)
5: [02:14:00] * AshKyd has joined #silverstripe
6: [02:17:00] * liar3switch2 has joined #silverstripe
7: [02:19:00] * liar3switch quit (Ping timeout: 260 seconds)
8: [02:29:00] * aznain has joined #silverstripe
9: [02:32:00] <aznain> When I create a field of type File for upload ... where does it save data into database ... I want to show filename with extension as name ... $Title just showing the name ... Where can i get full list of variable available ...
10: [02:35:00] <dnz-> http://api.silverstripe.org/trunk/sapphire/filesystem/File.html i guess you're on 3.0
11: [02:35:00] <dnz-> http://api.silverstripe.org/2.4/sapphire/filesystem/File.html
12: [02:36:00] <aznain> yes I am on 3
13: [02:37:00] <dnz-> $MyFileObject.Method
14: [02:37:00] <aznain> Thanks .. one more question, can I call these function in template ?
15: [02:37:00] <dnz-> yes
16: [02:37:00] <dnz-> just call it like
17: [02:38:00] <aznain> thanks a lot .. let me have look
18: [02:38:00] <dnz-> if you need to pass a value you can still do it too
19: [02:38:00] <dnz-> its all in the docs ;)
20: [02:38:00] <dnz-> tho with images for exmaple theres aliases for things like scale / resize etc
21: [02:47:00] <aznain> <% if $document %> <% loop document %> <a href="$URL">$Title $document.getFileExtension($Filename)</a><br /> <% end_loop %> <% end_if %>
22: [02:47:00] <aznain> can u please have a look what's wrong
23: [02:50:00] * willr_ quit (Quit: willr_)
24: [02:51:00] <dnz-> wot
25: [02:51:00] <aznain> got it .. thanks anyway
26: [02:51:00] <dnz-> ;p
27: [03:20:00] * Motoservo quit (Quit: Shhh. I'm trying to get some sleep here.)
28: [03:24:00] <ss23> dnz-: http://i.imgur.com/6izwr.jpg http://i.imgur.com/Vp6Ek.jpg http://i.imgur.com/04igW.jpg
29: [03:25:00] <dnz-> haha
30: [03:25:00] <ss23> haha
31: [03:25:00] <dnz-> ill bust my horsehead out for it
32: [03:25:00] <dnz-> i think we're having a meeting here today + webcamz
33: [03:25:00] <ss23> you know it
34: [03:25:00] <ss23> chur
35: [03:25:00] <dnz-> tite son. tite
36: [03:26:00] <ss23> I'm going to crawl into peoples rooms at night with the pig mask one
37: [03:26:00] <ss23> on
38: [03:26:00] <dnz-> ahah, i hope noone makes you squueel!
39: [04:04:00] * DigNZ quit (Quit: DigNZ)
40: [04:05:00] * Zauberfisch quit (Ping timeout: 246 seconds)
41: [04:06:00] * AshKyd quit (Ping timeout: 260 seconds)
42: [04:08:00] * DigNZ has joined #silverstripe
43: [04:08:00] * DigNZ quit (Remote host closed the connection)
44: [04:08:00] * DigNZ has joined #silverstripe
45: [04:09:00] * DigNZ quit (Client Quit)
46: [04:15:00] * Zauberfisch has joined #silverstripe
47: [04:28:00] * irogue quit ()
48: [04:53:00] * cloph_away1 has joined #silverstripe
49: [04:54:00] * cloph_away quit (Ping timeout: 276 seconds)
50: [04:57:00] * ratcat quit (Ping timeout: 256 seconds)
51: [04:58:00] * EPIK quit (Ping timeout: 276 seconds)
52: [05:11:00] * dendeffe has joined #silverstripe
53: [05:24:00] * SightUnseen has joined #silverstripe
54: [05:30:00] * AshKyd has joined #silverstripe
55: [05:30:00] * SightUnseen has left #silverstripe
56: [05:40:00] * Motoservo has joined #silverstripe
57: [05:43:00] <congii> hello
58: [05:43:00] * congii has joined #silverstripe
59: [05:45:00] <congii> anybody available? i would like to ask something re SS3
60: [05:47:00] <congii> anybody have an idea or a link to point me in the right direction... i need to create validation for a dataobject record and check if that record already exist before adding the record... I use getCMSValidator to check for required field.. my problem is with checking like for example country, if I add New Zealand and that record already exist, i need to notify the user that it already exist
61: [05:55:00] * AshKyd quit (Ping timeout: 256 seconds)
62: [05:58:00] <FrozenFire> congii, Overload the method validate
63: [05:59:00] <FrozenFire> public function validate() { $result = parent::validate(); if(self::get()->filter("SomeUniqueField", $this->getField("SomeUniqueField"))->exists()) { $result->error("Another object already exists with the same SomeUniqueField"); } return $validate; }
64: [06:00:00] <congii> hi, thanks. let me experiment on that.
65: [06:03:00] <congii> i got this error: ERROR [Notice]: Undefined variable: validate
66: [06:04:00] <congii> should it be return $result; ?
67: [06:05:00] <congii> It worked! I just changed the return $result :)
68: [06:08:00] <congii> one last thing, how about removing the Add button in the dataobject managed by ModelAdmin? Also removing the delete icon on each record on the grid?
69: [06:08:00] <aznain> in which page $Link for page is saved
70: [06:09:00] <aznain> sorry i mean in which database table
71: [06:11:00] <aznain> ???
72: [06:12:00] * AshKyd has joined #silverstripe
73: [06:12:00] <congii> country table
74: [06:16:00] <DesignerX> hi, I have MyPage has_one MyWidgetArea . I need MyWidget to access fields & methods from MyPage , how can I do that ?
75: [06:17:00] * Devver quit (Client Quit)
76: [06:17:00] * Devver has joined #silverstripe
77: [06:18:00] <DesignerX> congii: Hi, so you looking to make a dbField to be unique on your object ?
78: [06:18:00] * ssPirate has joined #silverstripe
79: [06:20:00] <congii> yes, just the content. FrozenFire's code seems to work..
80: [06:20:00] * AshKyd quit (Ping timeout: 264 seconds)
81: [06:20:00] <DesignerX> congii: & return an errror message to the user if not unique ? I would look at the Member:: class for an example as they have the E-Mail field unique .. I will paste if I get anything
82: [06:20:00] <DesignerX> ah kk,
83: [06:20:00] <DesignerX> I remember there was a way to just set a field as unique
84: [06:20:00] <congii> yes pls do. so i can also differentiate :)
85: [06:21:00] <DesignerX> :)
86: [06:21:00] * AshKyd has joined #silverstripe
87: [06:23:00] <DesignerX> cloph_away1: protected static $unique_identifier_field = 'Email';
88: [06:23:00] <DesignerX> try it
89: [06:27:00] <congii> yes, i updated the code to: public function validate() { $result = parent::validate(); if (self::get()->filter("Title", $this->getField("Title"))->exists()) { if (!$this->ID) { $result->error("The country {$this->Title} already exist."); } } return $result; }
90: [06:27:00] <DesignerX> congii: just reading FrozenFire code, looks good too ..
91: [06:28:00] <congii> because if you don't if (!$this->ID) when you edit the record it won't save
92: [06:29:00] <DesignerX> I just got to that error now :)
93: [06:30:00] <priithansen> congii: about the add new button in model admin http://www.sspaste.com/paste/show/50f3a5b48d7e4
94: [06:31:00] <congii> thats fast. thanks. let me check on that too..
95: [06:31:00] <DesignerX> congii: I thoiugh there was a way to set an array of Unique fields .. guess I will have to create this method on my CustomDataObejct which I subclass instead of DataObject
96: [06:31:00] <congii> i tried that unique Id but ts does not validate, you still have to make a validation somewhere down the line.
97: [06:32:00] <congii> i was looking into adding record log of add/edit/delete made by the users
98: [06:32:00] <congii> what else did you add up in your customdataobject?
99: [06:32:00] <FrozenFire> Yeah, return $result and check the ID indeed. Hadn't thought of the latter when I wrote it, and the former was silly of me. :P
100: [06:32:00] <DesignerX> so far not much, I have a todo list for it .. but my CustomPage is loaded :)
101: [06:33:00] <FrozenFire> congii, SiteTree already has edit logging
102: [06:33:00] <FrozenFire> You can see it in the versions information on the CMS
103: [06:33:00] <FrozenFire> Each modification is logged, and you can compare versions
104: [06:37:00] <congii> hmm.. FrozenFire, not page. on the dataobject...
105: [06:38:00] <congii> no problem FrozenFire, it solved my problem with few tweaks :)
106: [06:39:00] <FrozenFire> congii, Page/SiteTree are DataObjects
107: [06:39:00] <priithansen> anyone used widgets recently?
108: [06:40:00] * aznain quit (Ping timeout: 245 seconds)
109: [06:40:00] <FrozenFire> They have the Versioned extension
110: [06:41:00] <priithansen> If two different widgets in one widgetarea then second ones <% loop %> doesn't show anything
111: [06:42:00] <congii> priithansen, i tried your code but it does not remove the Add Country at the top.. the button above the export and print in modeladmin.. is that for version 3
112: [06:43:00] <FrozenFire> priithansen, https://github.com/silverstripe/silverstripe-widgets/blob/master/templates/WidgetArea.ss
113: [06:43:00] <priithansen> congii: had it working with $config->addComponent(new GridFieldSortableRows('SortOrder')); thought it might work for removing things too
114: [06:43:00] <congii> FrozenFire, hmm.. i'm gonna look into that and find docs.. the access log i have in mind is that we monitor the users when they login/log out as well as monitor what tables/records they are adding/edited/deleted.. then we can have a report summary of those logs
115: [06:44:00] <congii> should i get and return $config too?
116: [06:45:00] <FrozenFire> congii, http://api.silverstripe.org/trunk/framework/security/Security.html#methodset_login_recording
117: [06:46:00] <FrozenFire> That is, do not include your logging in the DataObjects themselves.
118: [06:46:00] <FrozenFire> Include that logging in the controller
119: [06:46:00] <FrozenFire> congii, Do not internally log modifications
120: [06:49:00] <FrozenFire> No
121: [06:49:00] <congii> ok. what I was thinking is add the logging onBeforeWrite
122: [06:50:00] <FrozenFire> Believe me, don't do that
123: [06:50:00] <FrozenFire> You will cause major errors
124: [06:50:00] <FrozenFire> And will likely flood your database.
125: [06:51:00] <congii> really? any idea what is the best thing to do? I'm new at silverstripe although I'm a PHP developer but still new to the SS infrastructure and SS way of doing things :)
126: [06:51:00] <FrozenFire> Logging should be implemented in your model admin
127: [06:53:00] <FrozenFire> Why do you need logging, in the first place?
128: [06:53:00] <FrozenFire> Unless you have a policy reason to have them, don't bother.
129: [06:53:00] <FrozenFire> Audit trails come at a cost of complexity and implementation time.
130: [06:54:00] <FrozenFire> Versioned will give you that much.
131: [06:54:00] <congii> the login/logout monitoring can be used for accounting for time spent on the system
132: [06:54:00] <congii> because we need to monitor who did what and when just in case some erroneous data entry has been made by various encoders
133: [06:55:00] <FrozenFire> Very rarely does anyone hit the log out button
134: [06:55:00] <FrozenFire> Usually logging out is a matter of the session expiring.
135: [06:55:00] <FrozenFire> There's no such thing as log out monitoring. It wouldn't make sense.
136: [06:55:00] <FrozenFire> As for login monitoring, Security has that built in
137: [06:56:00] <FrozenFire> If you need to log hours, set up a timeclock system
138: [06:56:00] <FrozenFire> Such as toggl.com
139: [06:56:00] <congii> i agree.. but it can be set as policy so that users are forced to logout or no payroll :)
140: [06:56:00] <FrozenFire> That would be enormously stupid, and whoever made that policy would be stupid.
141: [06:56:00] <FrozenFire> :P
142: [06:57:00] <DesignerX> about the uniqueField code above , adding if (!$this->ID) { means if the object alreay exists it will not validate/give error ?
143: [06:57:00] <congii> well.. depends. ok let me check on that versioned extension
144: [06:58:00] <congii> if there is no ID its a new record
145: [06:59:00] <congii> cool!
146: [06:59:00] <FrozenFire> DesignerX, The better solution would be if(self::get()->filter(array("SomeUniqueField" => $this->getField("SomeUniqueField"), "ID:Not" => $this->ID))->exists()) { $result->error("Another object already exists with the same SomeUniqueField"); }
147: [07:04:00] * DigNZ has joined #silverstripe
148: [07:05:00] <DesignerX> FrozenFire: do you get an error with that code ?
149: [07:05:00] <congii> i checked that code.. but, like for scenario. There are countries Canada, Thailand, Australia... if I add Canada it says it exist.. but if I edit Thailand and change the name to Canada.. it accepts it causing duplicate
150: [07:05:00] <DesignerX> IN POST /
151: [07:05:00] <DesignerX> FrozenFire: ....There are no Not comparisator
152: [07:05:00] * DigNZ quit (Client Quit)
153: [07:06:00] <FrozenFire> DesignerX, Odd. What version of SS?
154: [07:06:00] <DesignerX> 3.0.2
155: [07:06:00] <FrozenFire> You could instead use ->exclude("ID", $this->ID)
156: [07:06:00] * Zauberfisch quit (Ping timeout: 246 seconds)
157: [07:07:00] <DesignerX> then time to update
158: [07:07:00] <FrozenFire> :Not is just simpler
159: [07:07:00] <FrozenFire> Might only be 3.0.3+
160: [07:08:00] * ratcat has joined #silverstripe
161: [07:08:00] * ratcat quit (Client Quit)
162: [07:08:00] * ratcat has joined #silverstripe
163: [07:09:00] <priithansen> FrozenFire sorry I can't see WidgetArea.ss is called for widgetarea and WidgetHolder.ss for every widget but is there a solution there for having multiple widgets with their own loop's?
164: [07:09:00] <FrozenFire> priithansen, Typically you should not loop over WidgetArea
165: [07:10:00] * ssPirate quit (Quit: Page closed)
166: [07:10:00] <FrozenFire> Just place it in your page
167: [07:10:00] <FrozenFire> E.g. $WidgetArea
168: [07:10:00] <FrozenFire> It'll handle iterating over each WidgetController
169: [07:11:00] <priithansen> Hm maybe we aren't talking about the same thing I have widgets with $many_many items and I'm looping these items
170: [07:11:00] <DesignerX> priithansen: checkout the widgets module & the widgets/template , it will explain alot of thinbks to u
171: [07:11:00] <FrozenFire> Ah
172: [07:11:00] <FrozenFire> As opposed to their contents
173: [07:11:00] <FrozenFire> Thought you were talking about displaying your widgets themselves.
174: [07:11:00] <DesignerX> priithansen: I been working with widgets for the past 2 days , I though I had to loop over $MyWidgetAre too :D
175: [07:12:00] <priithansen> both widgets work as expected and even work if two of the same kind are on one area
176: [07:12:00] <FrozenFire> What issue are you getting?
177: [07:13:00] <DesignerX> priithansen: out of the 2 diffrent widgets, will both stop working ? or just one ? & which one ?
178: [07:13:00] <priithansen> showing info like widget $Title works
179: [07:13:00] <priithansen> but two different widgets won't loop their many_many's if on same area
180: [07:14:00] <congii> FrozenFire, where do you access the login logs when you turn on static set_login_recording
181: [07:14:00] <priithansen> yep everything works alone as expected
182: [07:14:00] <priithansen> the second one's loop won't work
183: [07:14:00] <priithansen> if third widget is again same as the first that one works
184: [07:14:00] <FrozenFire> Not sure what you mean by same area
185: [07:14:00] <DesignerX> priithansen: will it work alone ?
186: [07:15:00] <congii> oh found it.. under loginattempt table
187: [07:16:00] <priithansen> I'll install fresh ss3.0.3 with blog module and will see what that does. If that works then I'll do a fresh one with minimum code for my widgets and see from there
188: [07:16:00] <FrozenFire> Yeah. Probably shows up under SecurityAdmin
189: [07:17:00] * Zauberfisch has joined #silverstripe
190: [07:17:00] <FrozenFire> Might not be any existing interface
191: [07:17:00] <congii> not its not showing up on SecurityAdmin... i added a modeladmin
192: [07:17:00] <FrozenFire> Might also be under the Member's profile
193: [07:17:00] <DesignerX> priithansen: that is strange .. but anyways, u have many_many to a widget, will the GridField fit in CMS ?
194: [07:17:00] <FrozenFire> That'll work too
195: [07:17:00] <FrozenFire> It's not a common thing to use, I don't think
196: [07:18:00] <priithansen> DesingerX: I'm using ListboxField which has it's own quirks
197: [07:20:00] <priithansen> actually it doesn't even have to be many_many just looping over a function that gets some DataObject behaves the same
198: [07:21:00] <DesignerX> priithansen: try duplicating the 1st widgets (the one that works ) & change it a bit. if it works then there is an error in your 2nd widget .
199: [07:21:00] <FrozenFire> Can you verify the existence of the relations in your database, independent of the Widget interface?
200: [07:21:00] <FrozenFire> Widget's CMS interface is really bad.
201: [07:22:00] <DesignerX> FrozenFire: true
202: [07:23:00] <DesignerX> FrozenFire: I was looking to controll WidgetAre using ModelAdmin then has_one + dropdown() on the page to select Widgetarea
203: [07:26:00] <FrozenFire> They're just not a streamlined
204: [07:26:00] <FrozenFire> Yeah, you can certainly construct alternative interfaces for building widget areas
205: [07:27:00] <FrozenFire> as**
206: [07:32:00] * congii quit (Quit: Page closed)
207: [07:33:00] * congii has joined #silverstripe
208: [07:34:00] <DesignerX> updated to ss3.0.3 & I get Fatal error: Class 'GridFieldPageCount' not found in W:\xampp\htdocs\_my_projects\SS3\SS3Loaded\framework\forms\gridfield\GridFieldConfig.php on line 186
209: [07:35:00] <FrozenFire> ;)
210: [07:35:00] <FrozenFire> Did you /dev/build?
211: [07:35:00] <DesignerX> good idea !
212: [07:37:00] <DesignerX> There are no Not comparisator
213: [07:37:00] <FrozenFire> Weird
214: [07:37:00] <DesignerX> still same error
215: [07:38:00] <FrozenFire> I'd not recommend it, though
216: [07:38:00] <FrozenFire> But comes with some stuff I need, and I have the wherewithall to patch the bugs I need to patch
217: [07:38:00] <FrozenFire> I use 3.1 most of the time, so I may be completely off-base. :P
218: [07:38:00] <FrozenFire> Buggy as all hell. :(
219: [07:39:00] <DesignerX> bugs only get found if someone uses the CMS :D
220: [07:39:00] <DesignerX> I may use 3.1 for some test & see what new magic it has
221: [07:40:00] <FrozenFire> Mostly ORM and CMS stylistic changes, in terms of apparent stuff
222: [07:41:00] <DesignerX> so u dont see it in the way
223: [07:41:00] <FrozenFire> Not that I can figure out, anyways.
224: [07:41:00] <FrozenFire> Comes with a "preview" pane for pages
225: [07:41:00] <FrozenFire> Unfortunately.
226: [07:41:00] <DesignerX> :(
227: [07:41:00] <FrozenFire> Gets in the way, more often than not
228: [07:41:00] <DesignerX> can u set default to off ?
229: [07:41:00] <FrozenFire> Not as of yet
230: [07:42:00] <FrozenFire> It's especially bad when your design isn't responsive
231: [07:42:00] <FrozenFire> And I have a higher resolution monitor
232: [07:42:00] <DesignerX> bad bad bad :(
233: [07:42:00] <FrozenFire> Indeed
234: [07:42:00] <FrozenFire> Even on my monitor, the preview pane is only about 500px wide
235: [07:43:00] <FrozenFire> So fixed-width designs in the 1000px+ range are bad
236: [07:43:00] * dendeffe quit (Quit: dendeffe)
237: [07:43:00] <DesignerX> lolz , I will not use ss3 till its offff
238: [07:43:00] <DesignerX> my semi responsive designes are based on 960px
239: [07:44:00] <DesignerX> using any CSS framework ?
240: [07:44:00] <DesignerX> just making the move to LessCSS so alot of owrk on my hands + getting some widgets done
241: [07:44:00] <FrozenFire> Yeah, I usually base my primary layout on the dimensions of the original comp (e.g. 960, 1000 or 1024px)
242: [07:44:00] <FrozenFire> And then add max-width media queries for smaller viewports
243: [07:44:00] <FrozenFire> Nah
244: [07:45:00] <DesignerX> it has some nice easy to use calsses .. but I may end up copying some of the code & making my own
245: [07:45:00] <FrozenFire> Primarily for mix-ins
246: [07:45:00] <FrozenFire> I might toss something like LESS into my toolkit, though
247: [07:45:00] <DesignerX> used to, now I use YAML CSS
248: [07:45:00] <FrozenFire> Other than normalize.css, I design by hand
249: [07:46:00] <DesignerX> Less is a must for me .. with nested selecters already my CSS files look 1/2 the orignla size & more logical
250: [07:46:00] <FrozenFire> I actually quite enjoy the time I spend doing front-end, nowadays
251: [07:46:00] <FrozenFire> Now it's a nice detour from the regular architectural development I do
252: [07:46:00] <FrozenFire> I used to hate it
253: [07:47:00] <DesignerX> netbean
254: [07:47:00] <FrozenFire> Nah. I'll never use an IDE
255: [07:47:00] <DesignerX> why not ? it doesnt have auto complete for less files
256: [07:47:00] <FrozenFire> Cramps my style
257: [07:47:00] <FrozenFire> Yeah, nested selectors would also be big for me
258: [07:47:00] <FrozenFire> Though I suspect I'll have to switch editors for that
259: [07:47:00] <FrozenFire> GEdit already has a hate on for media queries being nested
260: [07:48:00] <FrozenFire> And yeah, I have a weird memory that way. I've always been able to assimilate large quantities of identifiers
261: [07:48:00] <DesignerX> :D
262: [07:48:00] <FrozenFire> I don't use autocomplete
263: [07:48:00] <DesignerX> sp u memorieze all the code? all method names ?
264: [07:48:00] <FrozenFire> All I care for is automatic indentation and syntax highlighting
265: [07:49:00] <FrozenFire> I do use the docs for a reference quite often, but there's no getting around that, even with autocomplete.
266: [07:49:00] <DesignerX> trying to learn the "standard" way of naming my methods, variables & classes
267: [07:49:00] <FrozenFire> I can remember parameter orders most of the time, though
268: [07:49:00] <FrozenFire> Eh, there are multiple standards.
269: [07:50:00] <DesignerX> I can hover over a class or function & get all phpDocs about it in a popup :D
270: [07:50:00] <FrozenFire> Yeah, unfortunately, SilverStripe's docblocks are useless
271: [07:50:00] <FrozenFire> :P
272: [07:51:00] <DesignerX> gtg .. back in few hours . :D ... We counting on you to fix ss3.1 for us :D c ya
273: [07:52:00] <FrozenFire> Heh. As much as I use SS, I don't contribute a great lot back
274: [07:52:00] <FrozenFire> Nature of the beast, focusing so heavily on getting client work done. :P
275: [07:56:00] * DesignerX quit (Ping timeout: 272 seconds)
276: [07:59:00] * Shrike_Finland has joined #silverstripe
277: [08:06:00] * needinfo has joined #silverstripe
278: [08:06:00] <needinfo> Hello, everyone
279: [08:07:00] <needinfo> inside custom function (mysite/code/file.php) how can I get current active ThemeDir ?
280: [08:07:00] <FrozenFire> Howdy
281: [08:08:00] <FrozenFire> SSViewer::current_theme()
282: [08:09:00] <FrozenFire> Or, SSViewer::get_theme_folder() if you want a path
283: [08:10:00] <FrozenFire> Is there a particular reason why you want to know the theme directory, though?
284: [08:10:00] <FrozenFire> Try to keep your controller separate from your view (theme/template)
285: [08:10:00] <needinfo> I have an input which is a number and would like to generate that number of images :)
286: [08:11:00] <FrozenFire> Nah, that's not how you would do it.
287: [08:11:00] <needinfo> please advice me
288: [08:11:00] <needinfo> so I define a function, and loop consutrcting HTML with simple <img src="WHERE IS MY FOLDER/image.ext">
289: [08:11:00] * dobalina has joined #silverstripe
290: [08:12:00] <FrozenFire> Well, for one, don't include those images in your theme, unless you have a very good reason to.
291: [08:12:00] <FrozenFire> They should be "assets"
292: [08:12:00] <needinfo> I am used only to basic templating of SS, nothing more, so trying to get the things done my way
293: [08:12:00] <FrozenFire> Well, I recommend learning to do it the right way. ;)
294: [08:13:00] <FrozenFire> Ah
295: [08:13:00] <needinfo> it's one image, like star. I have a rate within an item from 1 to 5, so I would like that count of stars to be drawn :)
296: [08:13:00] <needinfo> in this case I only have one image :)
297: [08:13:00] <FrozenFire> Yeah, so don't put your HTML together in your controller.
298: [08:14:00] <FrozenFire> Instead, do something like public function RatingStars() { return ArrayList(array_fill(0, $this->Rating, "1")); }
299: [08:14:00] <needinfo> I will be back after 10 minutes, hope you, FrozenFire will be here :) brb
300: [08:15:00] <FrozenFire> Then use CSS to make the star using a background-image
301: [08:15:00] <FrozenFire> Although just doing something like <span class="star"></span> would be better
302: [08:15:00] <FrozenFire> Then in your template <% loop RatingStars %><img src="$ThemeDir/images/star.png"><% end_loop %>
303: [08:16:00] * dendeffe has joined #silverstripe
304: [08:24:00] * bjrN has joined #silverstripe
305: [08:25:00] <bjrN> If someone can help me with the payment module for 2.4.*
306: [08:27:00] <bjrN> Im making a payment method for quickpay.dk or epay.dk , now its java, but i would like to use curl but im a bit lost, nothing is working, and when i get accepturl or cancel url the functions is not working so no page is comming
307: [08:29:00] <priithansen> mother of boobies FrozenFire the culprit was blank line in the end of mywidget.php file
308: [08:31:00] <FrozenFire> priithansen, Don't place ?> at the end of your files
309: [08:31:00] <priithansen> and now It works with plenty of newlines as well
310: [08:31:00] <priithansen> Hm I don't
311: [08:31:00] <FrozenFire> That's why.
312: [08:32:00] <priithansen> what the hell
313: [08:32:00] <FrozenFire> o.O
314: [08:34:00] <priithansen> nope It just ignores the loop tag for second widget
315: [08:39:00] * AshKyd quit (Ping timeout: 248 seconds)
316: [08:40:00] <needinfo> I have read all the tutorials of SS, however would like to know more about internals. where could I look ?
317: [08:40:00] <needinfo> FrozenFire, excellent advice. Thanks!
318: [08:40:00] * chillu has joined #silverstripe
319: [08:44:00] <bjrN> post as ssl form
320: [08:44:00] <bjrN> Some got any experince creating a PaystationHostedPayment for curl ??
321: [08:45:00] <congii> whew can't seem to remove the Add action in the DataObject managed under ModelAdmin.. anyone who can show/point mo to good code sample for SS3 ? thanks
322: [08:45:00] <needinfo> FrozenFire, I am using 2.4.7 release, so ArrayList is not there. What's the alternative? Loop definition can be made with <% control
323: [08:47:00] * Zauberfisch quit (Ping timeout: 246 seconds)
324: [08:49:00] <simon_w> needinfo, DataObjectSet
325: [08:51:00] <priithansen> congii the code works for me I can remove the Add button from modeladmin gridfield
326: [08:52:00] <priithansen> in ss 3.0.2
327: [08:53:00] * Zauberfisch has joined #silverstripe
328: [08:54:00] <priithansen> Damn widgets it doesn't get any simpler then this and still doesn't work http://www.sspaste.com/paste/show/50f3c626d6e2d < as soon as I add both widgets the last last ones loop won't even get called
329: [09:00:00] <congii> priithansen, where did you put it under modeladmin or the dataobject
330: [09:01:00] <priithansen> thats the whole file mysite/code/ServiceAdmin.php
331: [09:02:00] <priithansen> manages dataobject in Service.php
332: [09:05:00] <congii> is this how you did it? http://www.sspaste.com/paste/show/50f3ca49da840
333: [09:08:00] <priithansen> seems to same jep
334: [09:11:00] <congii> did you add add_extension in _config.php
335: [09:13:00] <priithansen> indeed I did Object::add_extension('ServiceAdmin', 'ServiceAdminExtension');
336: [09:13:00] * popeshoe has joined #silverstripe
337: [09:13:00] <priithansen> sorry about that thought there was something more to it but didn't look in the config file
338: [09:14:00] <congii> hehe let me try
339: [09:15:00] <congii> priithansen, man perfect!
340: [09:16:00] * kinglozzer has joined #silverstripe
341: [09:16:00] <kinglozzer> I have a site that's just gone live, when it hits a 500 error page, all the hrefs point to my local server. Have I missed a config item somewhere?
342: [09:17:00] <simon_w> kinglozzer, save and publish the 500 page in the CMS
343: [09:18:00] <dendeffe> I'm getting this error on a site I moved from a live server to my local setup http://pastie.org/5681960
344: [09:18:00] <dendeffe> Any ideas?
345: [09:19:00] <simon_w> kinglozzer, you uploaded the cached output
346: [09:19:00] <simon_w> You haven't set the theme properly?
347: [09:19:00] <kinglozzer> simon_w: That's solved it, thanks! What was the problem there?
348: [09:21:00] <simon_w> assets
349: [09:21:00] <kinglozzer> Ah, I remember now it generates flat files for the error pages. Where are they stored, out of interest?
350: [09:22:00] <simon_w> You'll probably also want to do the same to the 404 page
351: [09:22:00] <kinglozzer> Adding that to my 'go-live' checklist, thanks again
352: [09:23:00] * zfmf has joined #silverstripe
353: [09:24:00] * qlex has joined #silverstripe
354: [09:24:00] <congii> priithansen, it works man, i even removed the GridFieldDeleteAction button however, when you view the record, the delete option is still there :) i want it to be view only.
355: [09:25:00] <simon_w> congii, remove the edit button too
356: [09:25:00] * qlex says hi
357: [09:26:00] <congii> oh.. the GridFieldEditAction? I cant see it in the API
358: [09:27:00] <simon_w> the GridFieldEditButton
359: [09:27:00] <priithansen> Wouldn't public function canDelete($member = null) { return null; } < in dataobject make deleting impossible?
360: [09:27:00] <congii> i cant see it here http://api.silverstripe.org/trunk/framework/gridfield/GridFieldAddNewButton.html#var$buttonName
361: [09:28:00] <simon_w> and add a GridFieldViewButton
362: [09:28:00] <qlex> has anyone tried HeidiSQL open source tool to manipulate databases for SS ?
363: [09:28:00] <dendeffe> simon_w the local site seems to try and get the online template files.
364: [09:29:00] <congii> how to add? addComponent?
365: [09:29:00] <qlex> im trying to export a ss db from live environemtn and straight away import it to a testing environment db and whichever tool i use (mysql administrator, phpmyadmin, heidisql) im getting incorrect encoding characaters on destination db
366: [09:29:00] <qlex> i know its a bit offtopic, but i think that only happens to me with SS installations
367: [09:30:00] <zfmf> hi, what doing wrong here? http://sspaste.com/paste/show/50f3d00a82a91 im getting ERROR [User Deprecated]: Form->securityTokenEnabled is deprecated. Use Form->getSecurityToken()->isEnabled() instead. Called from Form->__construct.
368: [09:31:00] <dendeffe> thanks for the ehlp
369: [09:31:00] <congii> Got it $config->addComponent(new GridFieldViewButton("View"));
370: [09:31:00] <dendeffe> ok - another flush=all cleared it
371: [09:31:00] <dendeffe> weird had done one before
372: [09:32:00] <dendeffe> help
373: [09:37:00] <simon_w> zfmf, well, what does the call stack say is causing it?
374: [09:41:00] * lx-berlin has joined #silverstripe
375: [09:42:00] <zfmf> simon_w: i added it to sspaste (comments)
376: [09:45:00] <simon_w> zfmf, and what version are you running?
377: [09:46:00] <simon_w> zfmf, also, you should be passing $controller, $name not $this, __FUNCTION__ to parent::__construct()
378: [09:47:00] <zfmf> 3.0.3
379: [09:48:00] <zfmf> with controller,name it works
380: [09:48:00] <zfmf> your right thanks :)
381: [10:08:00] <dendeffe> I can't login to admin, even with setting Security::setDefaultAdmin
382: [10:09:00] <dendeffe> Security::check_default_admin also returns true
383: [10:24:00] <bjrN> anyone got experince with the payment module?
384: [10:24:00] <bjrN> posting a ssl form via curl??
385: [10:33:00] <dendeffe> what is the equivalent of Object::add_extension('SiteTree', 'Translatable'); for SS3?
386: [10:35:00] <dendeffe> ok, I'll work form here :) https://github.com/silverstripe/silverstripe-translatable/blob/master/docs/en/index.md
387: [10:42:00] * SightUnseen has joined #silverstripe
388: [10:46:00] * AshKyd has joined #silverstripe
389: [10:49:00] * SightUnseen quit (Ping timeout: 255 seconds)
390: [10:50:00] * AshKyd quit (Ping timeout: 252 seconds)
391: [10:53:00] * liar3switch2 quit (Quit: Nettalk6 - www.ntalk.de)
392: [10:55:00] * liar3switch has joined #silverstripe
393: [10:58:00] <g4b0> what's wrong in http://pastebin.com/ftLqH5Sj ?
394: [10:58:00] * g4b0 has joined #silverstripe
395: [10:58:00] <g4b0> hi all
396: [10:58:00] <g4b0> PHP Fatal error: Call to a member function setForm() on a non-object in /home/g4b0/Develop/cxxx/framework/forms/FieldList.php on line 423
397: [11:03:00] * Cgull has joined #silverstripe
398: [11:03:00] <Cgull> hello, does anyone know a good tutorial develop modules in ss3?
399: [11:16:00] * SightUnseen has joined #silverstripe
400: [11:17:00] <kinglozzer> Cgull: It's pretty simple, just create your module in your mysite folder, then move everything relating to your module into a new folder, create an _config.php (it's always needed to detect the module) and you're done. Find some modules and use them as examples.
401: [11:22:00] <Cgull> Thank you kinglozzer,
402: [11:23:00] * hubertusanton quit (Quit: hubertusanton)
403: [11:23:00] <Cgull> I am new to ss and I need to develop a module, a tutorial would have helped
404: [11:23:00] <Cgull> but that doesn't really help me much
405: [11:24:00] <kinglozzer> I don't know of any 'tutorials' as such, http://doc.silverstripe.org/framework/en/topics/module-development there's some documentation there
406: [11:25:00] * SightUnseen quit (Ping timeout: 255 seconds)
407: [11:26:00] <Cgull> yes, I saw this link, didn't understand much of it, maybe I'll try your others suggestion of installing a module and try to follow it
408: [11:26:00] * hubertusanton has joined #silverstripe
409: [11:28:00] <qlex> could any1 tell me how is it possible that SS powered website has correct encoding (polish characters display correctly) but after export (mysql admin, phpmyadmin, heidiSQL) the dump file has incorrect encoding ?
410: [11:30:00] <liar3switch> qlex: how can you tell it isn't encoded correctly
411: [11:35:00] <qlex> using heidiSQL, upon export, im telling it to upload (without interfering with encoding setting) to my development server's db and they get incorrect
412: [11:35:00] <qlex> also, when trying to do this two-stage: export first to file, import then..(when also editing the file with notepad++ i can see starnge characters)
413: [11:36:00] <liar3switch> qlex: did you change the dump between export and import (saving in notepad++)?
414: [11:37:00] <kinglozzer> Does anyone know if there's a list of jQuery.entwine events anywhere?
415: [11:39:00] <qlex> check original: www.ztm.poznan.pl and my copy: www.goeuropa.tk
416: [11:39:00] <qlex> both attempts results in the same.
417: [11:39:00] <qlex> liar3switch: nope. heidiSQL exported a file which i then straight away loaded to my db. the second option that i used was to set it to upload it straight away to my db
418: [11:46:00] <liar3switch> qlex: what happens, if you explicitly configure utf8 during ex- and import?
419: [11:51:00] * Cgull quit (Quit: Page closed)
420: [11:51:00] * SightUnseen has joined #silverstripe
421: [11:51:00] <qlex> encoding is by default utf-8, but collaction is either utf8_unicode_ci or utf8_swedish_ci
422: [11:52:00] <qlex> but it can take a moment
423: [11:52:00] <qlex> let me try again and export and import straight away and explictely configure utf-8 and unicode collation
424: [11:53:00] <qlex> changed to utf8_polish_ci
425: [11:53:00] <qlex> collation
426: [11:53:00] <qlex> and charset utf-8 unicode (utf8)
427: [11:53:00] <qlex> droping database and tables before inserting data also
428: [11:55:00] <qlex> liar3switch: done
429: [11:55:00] <qlex> still the same
430: [11:55:00] <qlex> /dev/build?flush=all would help ?
431: [11:58:00] <qlex> no help
432: [11:58:00] <qlex> still wrong characters :(
433: [11:58:00] <qlex> well, content of mysite, themes etc i have just copied over from clients server
434: [11:58:00] <liar3switch> qlex: do you _config.php's on both sides contain: MySQLDatabase::set_connection_charset('utf8');
435: [11:58:00] * dendeffe quit (Quit: dendeffe)
436: [11:58:00] <qlex> let me login to ftp and double check
437: [11:59:00] <qlex> setlocale(LC_TIME, i18n::get_locale() . ".utf8");
438: [11:59:00] <qlex> i18n::set_locale('pl_PL');
439: [11:59:00] * wmk has joined #silverstripe
440: [11:59:00] <qlex> MySQLDatabase::set_connection_charset('utf8');
441: [11:59:00] <qlex> Translatable::set_default_locale('pl_PL');
442: [11:59:00] <qlex> these are all my l18n settings
443: [12:00:00] <kinglozzer> simon_w: If I add javascript to the CMS using Requirements::javascript() in getCMSFields(), it doesn't get loaded until I do a hard refresh - if I open the CMS and click to edit a page, the extra JS isn't loaded. Bug or pilot error?
444: [12:00:00] <liar3switch> no, not l18n, try and add this to your development server _config.php: MySQLDatabase::set_connection_charset('utf8');
445: [12:01:00] * SightUnseen quit (Ping timeout: 252 seconds)
446: [12:04:00] <qlex> MySQLDatabase::set_connection_charset('utf8');
447: [12:04:00] <qlex> liar3switch: i already have that
448: [12:04:00] <qlex> pasted in before:
449: [12:04:00] <kinglozzer> chillu if you're available can you answer my question about javascript in the CMS above?
450: [12:06:00] * congii quit (Ping timeout: 245 seconds)
451: [12:07:00] <liar3switch> qlex: then i'm at a loss, sorry
452: [12:09:00] <qlex> liar3switch: im puzzled - dont know why this happens
453: [12:10:00] <qlex> i specifically tried not to open/interfere with sql file with editor, as i heard this can cause problems
454: [12:10:00] <qlex> would there be a command i could use - getting to clients server through ssh?
455: [12:10:00] <qlex> that i could grab the file thogiuh command line and then log in to my server using ssh and import
456: [12:11:00] * DesignerX has joined #silverstripe
457: [12:12:00] <liar3switch> qlex: do you have ssh-access?
458: [12:13:00] * AshKyd has joined #silverstripe
459: [12:16:00] <qlex> so to grab the db, i can only use mysql administrator (official mysql tool) or heidisql type of tools
460: [12:16:00] * zfmf quit (Ping timeout: 252 seconds)
461: [12:16:00] <qlex> hmm, on a second thought - i might not have ssh access to my clients hosting :(
462: [12:16:00] <qlex> not using phpmyadmin
463: [12:18:00] <liar3switch> qlex: with ssh you could use command "mysql" with the option --default-character-set=utf8
464: [12:19:00] <liar3switch> i don't know mysql administrator but i think when you can export using mysql administrator, there has to be this option somewhere too
465: [12:20:00] <liar3switch> and on your development-server (commandline access assumed) you can import the dump using: mysql --default-character-set=utf8 -u<your-username> -p<your-password> -h<your-host> <your-database> < dump.sql
466: [12:20:00] * AshKyd quit (Quit: Lost terminal)
467: [12:23:00] <kinglozzer> The URL mysite.com/mypagetype/data causes a 500 error, when anything except 'data' causes a 404. Anyone know why?
468: [12:29:00] <liar3switch> kinglozzer: fixing a 500 error without additional infos isn't that simple, maybe you can check your error logs...
469: [12:31:00] <kinglozzer> "The method 'getviewer' does not exist on 'PageType'", it only happens for the URL 'data' despite having no allowed actions. I just wondered what was special about 'data'
470: [12:31:00] * SightUnseen has joined #silverstripe
471: [12:34:00] <chillu> kinglozzer: What action do you perform in the CMS UI where you'd expect to get the JS loaded? Is it in the X-Include-JavaScript header?
472: [12:35:00] * bjrN quit (Ping timeout: 245 seconds)
473: [12:36:00] <kinglozzer> chillu: I need it loaded when editing a page, it's code used to initialise Google Maps. How do I check that?
474: [12:36:00] <chillu> Look in your browser's dev tools for the HTTP header information coming back from the ajax response
475: [12:37:00] <kinglozzer> Which one? I have 105 requests on Firebug 'net' tab
476: [12:37:00] * SightUnseen quit (Ping timeout: 240 seconds)
477: [12:37:00] <chillu> the Requirements::javascript() call contains a *.js path or URL, correct? We don't support inline javascript loaded through ajax
478: [12:37:00] * Emil_Blume has joined #silverstripe
479: [12:38:00] <kinglozzer> Yes it's *.js
480: [12:38:00] <kinglozzer> X-Controller CMSPageEditController - That one?
481: [12:40:00] <kinglozzer> chillu: Ah found it, GET treeview I believe? It's not in there
482: [12:41:00] <chillu> Filter to XHR requests. Its the GET to admin/pages/edit/show/...
483: [12:43:00] <kinglozzer> Strange, there isn't one. only /admin/pages/treeview. Let me try in Chrome
484: [12:44:00] * guci0 has joined #silverstripe
485: [12:44:00] <guci0> Hi there
486: [12:45:00] <kinglozzer> chillu: GET /ss/admin/pages/edit/show/3, doesn't have an X-Include-Javascript header
487: [12:46:00] <kinglozzer> Yep
488: [12:46:00] <chillu> and its a 200 status code?
489: [12:48:00] <kinglozzer> chillu: Okay I've found it now, but my script isn't in there
490: [12:49:00] <chillu> And you're sure that specific line of code is called? Can you put a die('here') straight after?
491: [12:51:00] <kinglozzer> Yep, it's definitely being called
492: [12:51:00] <kinglozzer> I'm loading two scripts - one is maps.googleapis.com/maps/api etc, one is loading a script locally. The google maps api script is in the include-javascript header but is never added to the page source.
493: [12:54:00] <kinglozzer> chillu: The maps api doesn't end *.js, it's http://maps.googleapis.com/maps/api/js?key=MYKEY&sensor=false. Could this be the problem?
494: [12:57:00] <chillu> BTW, when asking questions, please always include at least your core SS version.
495: [12:57:00] <chillu> are you using Requirements::combine_files() with this path? (you shouldn't)
496: [12:57:00] <chillu> That shouldn't matter because it starts with http:// so its not trying to look for an internal file
497: [13:00:00] <chillu> Don't think that'll make a difference, but always better to be updated, yep
498: [13:00:00] <kinglozzer> chillu: No I'm not using combine_files(), it's 3.0.1, I thought it was 3.0.3 so will try upgrading (need to do it anyway)
499: [13:03:00] * SightUnseen has joined #silverstripe
500: [13:03:00] <kinglozzer> No it hasn't solved it :(
501: [13:04:00] <kinglozzer> If I look at the page source, when I first visit the '/edit/show/3' page neither script is present. If I then to cmd + r to refresh, they both appear in amongst all the other .js files
502: [13:05:00] <discorpia> if you need to press cmd+r to refresh in order to see them it sounds like you're having cache issues
503: [13:06:00] <kinglozzer> It's strange, it's making a request for the Google Maps api script, 200 response code, it just never adds it to page source
504: [13:06:00] <discorpia> (incognito/privacy mode is among the best ways to rule out browser caching)
505: [13:06:00] <kinglozzer> Thanks discorpia I'll try that
506: [13:08:00] <kinglozzer> Nope, same problem :(
507: [13:09:00] <kinglozzer> chillu: I was also hoping to use Requirements::javascriptTemplate() to avoid hard-coding some IDs, but that's not too important.
508: [13:10:00] <ec8or_> +1 for incognito mode for troubleshooting cache/cookie issues
509: [13:10:00] <chillu> discorpia: the refresh is simply a matter of requesting a page via ajax as opposed to non-ajax, so that's consistent with the Req::javascript() issue
510: [13:12:00] * SightUnseen quit (Ping timeout: 276 seconds)
511: [13:12:00] <chillu> kinglozzer: If the script uses document.write(), that won't fly either. Try new LiteralField('MyScript', '<script type??? src="http://maps???"'))
512: [13:12:00] <chillu> Or have a look how similar google maps plugins have solved this - shouldn't be drastically different between 2.x and 3.x modules either
513: [13:13:00] <kinglozzer> Nope it doesn't. I'm looking at jquery.ondemand.js, where it loads in the javascript. The script is in there, so going to try to find out why it's not appended to the HTML
514: [13:16:00] <kinglozzer> It's being pushed correctly to 'newJsIncludes'
515: [13:18:00] * Guits has joined #silverstripe
516: [13:19:00] * UndefinedOffset has joined #silverstripe
517: [13:19:00] <Guits> can i get the level of a page in the cms?
518: [13:26:00] <discorpia> chillu: ah
519: [13:31:00] * qlex1 has joined #silverstripe
520: [13:32:00] * qlex1 has left #silverstripe
521: [13:33:00] * qlex quit (Ping timeout: 255 seconds)
522: [13:35:00] * dendeffe has joined #silverstripe
523: [13:37:00] * Shrike_Finland quit (Quit: Leaving.)
524: [13:40:00] * SightUnseen has joined #silverstripe
525: [13:50:00] * SightUnseen quit (Ping timeout: 252 seconds)
526: [14:08:00] <DesignerX> liar3switch: hi, u still here ?
527: [14:16:00] * SightUnseen has joined #silverstripe
528: [14:26:00] <priithansen> DesignerX: You said earlier that you use widgets a lot? Do you make controllers for these widgets as well?
529: [14:27:00] * SightUnseen quit (Ping timeout: 240 seconds)
530: [14:27:00] <DesignerX> priithansen: "starting" & no controllers so far, most of them are small things like gallery, testimonials & few small things ..
531: [14:28:00] <priithansen> My earlier problem got solved with putting the loop function to widget_controller. Without that couldn't make two different widgets work together
532: [14:29:00] <priithansen> just a sec i'll find the paste
533: [14:29:00] <DesignerX> kk
534: [14:29:00] <priithansen> basically just two widgets one loops Members and other Pages wouln't work
535: [14:29:00] <priithansen> http://www.sspaste.com/paste/show/50f3c626d6e2d
536: [14:29:00] <DesignerX> https://gist.github.com/
537: [14:29:00] <DesignerX> ah , can i see the code ? I can learn from that
538: [14:30:00] <priithansen> that's the simplest I could make it and that still didn't work If both widgets where active
539: [14:31:00] <priithansen> widget Title would render ok but the loop would be always empty for second widget if two different widgets where used
540: [14:32:00] * lx-berlin has left #silverstripe
541: [14:32:00] <DesignerX> priithansen: at line 11 , souldnt that be return Page::get(); ?
542: [14:32:00] <priithansen> moved the loop feeder function to class LatestNewsWidget_Controller extends Widget_Controller { } and seems to have solved the problem. Though no example I have seen so far has used controller for that
543: [14:53:00] * mrn has joined #silverstripe
544: [14:53:00] * SightUnseen has joined #silverstripe
545: [14:54:00] <DesignerX> priithansen: thanks for the tip, I plan to make a "ChidrenPages" widget which gets children pages of the current page or from a page selected in a dropdown list so your tip will be handy :)
546: [14:56:00] <priithansen> SS is like a roller coaster just as everything seems to be fling along something like this comes along and steals the whole day
547: [14:59:00] <DesignerX> lolz
548: [14:59:00] * lx-berlin has joined #silverstripe
549: [15:00:00] <DesignerX> everytime we have a probl;em like this we should post in the forums making it easy for other ppl to google it
550: [15:02:00] <priithansen> jean the information is rather scattered around the internets
551: [15:03:00] * SightUnseen quit (Ping timeout: 252 seconds)
552: [15:07:00] <DesignerX> hhh.. I love my GF ....
553: [15:08:00] <DesignerX> GridField that is
554: [15:09:00] <priithansen> :)
555: [15:09:00] <DesignerX> now, just added a function to my CustomDataObejct , protected $unique_fields = array('Title', 'SubTitle'); will auto validate my fields to be unique :D
556: [15:21:00] <priithansen> couldn't that be use http://api.silverstripe.org/3.0/forms/fields-formattedinput/AjaxUniqueTextField.html ?
557: [15:25:00] <DesignerX> priithansen: didnt work for me
558: [15:30:00] <priithansen> ah never tried it myself
559: [15:30:00] * SightUnseen has joined #silverstripe
560: [15:32:00] * PigeonFriend quit ()
561: [15:39:00] <mrn> Hi all, i'm editing my page from the backend using a MultiSelectField. When i click "Save and publish" i get what looks like my rendered "Page.ss" template, but as plain text.
562: [15:39:00] <mrn> Has anyone has any issues similar to this?
563: [15:41:00] * SightUnseen quit (Ping timeout: 272 seconds)
564: [15:42:00] * terryapodaca has joined #silverstripe
565: [15:55:00] * ARNHOFF has joined #silverstripe
566: [16:05:00] * feejin has joined #silverstripe
567: [16:07:00] <DesignerX> mm hi, wanan sharte you code ?
568: [16:07:00] * SightUnseen has joined #silverstripe
569: [16:08:00] * dd_ has joined #silverstripe
570: [16:09:00] <dd_> hello. I need to modify MemberLoginForm.php's forgotPassword function, is this possible with DataExtension?
571: [16:13:00] * zfmf has joined #silverstripe
572: [16:18:00] * DesignerX quit (Ping timeout: 255 seconds)
573: [16:19:00] * SightUnseen quit (Ping timeout: 248 seconds)
574: [16:20:00] * dendeffe quit (Quit: dendeffe)
575: [16:28:00] * dd_ quit (Quit: Page closed)
576: [16:34:00] * g4b0 quit (Quit: Sto andando via)
577: [16:34:00] * webguest has joined #silverstripe
578: [16:34:00] <webguest> Please, does any one want to help me with my retina htaccess file? Cant merge them cause i have incuffient htaccess experience. http://www.silverstripe.org/general-questions/show/21795 - havent had a reply in almost a month..
579: [16:40:00] <feejin> Is that SS3? Looks different to my htaccess
580: [16:42:00] <feejin> Well, it breaks my site because retinaimages.php doesn't exist, but no server errors.
581: [16:42:00] <feejin> This works: http://www.sspaste.com/paste/show/50f4355553f71
582: [16:45:00] * SightUnseen has joined #silverstripe
583: [16:46:00] * catcher has joined #silverstripe
584: [16:48:00] <webguest> feejin, thx ill try in a bit
585: [16:55:00] * SightUnseen quit (Ping timeout: 264 seconds)
586: [17:04:00] <terryapodaca> nodejs...someone just told me to use that for my Web Service (API)
587: [17:05:00] <terryapodaca> anyone here have any experience with nodejs
588: [17:16:00] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/sapphire/compare/fd80c4fb3e1f...703c10aa0eaf
589: [17:16:00] * travis-ci has joined #silverstripe
590: [17:16:00] * travis-ci has left #silverstripe
591: [17:16:00] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/sapphire/builds/4145303
592: [17:16:00] <travis-ci> [travis-ci] silverstripe/sapphire#1166 (3.1 - 703c10a : Ingo Schommer): The build passed.
593: [17:20:00] * feejin quit (Remote host closed the connection)
594: [17:21:00] * kinglozzer quit (Remote host closed the connection)
595: [17:22:00] * SightUnseen has joined #silverstripe
596: [17:33:00] * dobalina quit (Ping timeout: 264 seconds)
597: [17:34:00] * SightUnseen quit (Ping timeout: 260 seconds)
598: [17:40:00] * wmk quit (Quit: nice to meet you ;))
599: [17:47:00] * chillu quit (Quit: chillu)
600: [17:54:00] * Emil_Blume quit (Ping timeout: 244 seconds)
601: [18:03:00] * webguest quit (Ping timeout: 245 seconds)
602: [18:04:00] <FrozenFire> I wish Debug had a faculty for showing messages when debugging is enabled, instead of having to check if $request->getVar("debug")
603: [18:04:00] <FrozenFire> That way you could just do something like Debug::message("Foodles"); and it would only show if debugging was enabled
604: [18:05:00] * needinfo quit (Ping timeout: 245 seconds)
605: [18:17:00] <catcher> If the message is as fun as "Foodles", it should probably display on live sites too.
606: [18:28:00] <lx-berlin> can i have multiple has_many relations between 2 classes ?
607: [18:29:00] <catcher> that looks an awful lot like a has_one though.
608: [18:29:00] <lx-berlin> public static $has_one = array('GSTC' => 'Document', 'GSPC' => 'Document'); ?
609: [18:29:00] <catcher> lx-berlin, sure
610: [18:30:00] <lx-berlin> 'LocationsGSTC' => 'Location',
611: [18:30:00] <FrozenFire> catcher, He's talking about the reverse relationship
612: [18:30:00] <lx-berlin> public static $has_many = array(
613: [18:30:00] <lx-berlin> 'LocationsGPTC' => 'Location',
614: [18:30:00] <lx-berlin> );
615: [18:31:00] <lx-berlin> this should work ?
616: [18:31:00] <FrozenFire> lx-berlin, You can customize your relationship getter
617: [18:31:00] <lx-berlin> this would be the other side of the relation (relation is between location and document)
618: [18:32:00] <lx-berlin> thanks
619: [18:32:00] <lx-berlin> FrozenFire: you mean, just this relation will not work ?
620: [18:32:00] <lx-berlin> ok, i will try to add this LocationsGSTC()
621: [18:32:00] <FrozenFire> E.g. public function LocationsGSTC() { return Location::get()->filter("GSTCID", $this->ID); }
622: [18:32:00] <FrozenFire> lx-berlin, It's indeed ambiguous
623: [18:33:00] <FrozenFire> That being said, it will add the difficulty that you will not be able to filter on that relation reliably.
624: [18:34:00] <FrozenFire> You may instead want to use a many_many, which is better-defined.
625: [18:34:00] <lx-berlin> hmm, ok
626: [18:35:00] <lx-berlin> or can i get rid of the many_many ? just use both has_one ?
627: [18:35:00] <catcher> yeah, the many_many will create the join table with the relation name
628: [18:36:00] <lx-berlin> what about just defining: public static $has_one = array('GSTC' => 'Document', 'GSPC' => 'Document'); ? is this enough for silverstripe to work with ?
629: [18:37:00] <catcher> lx-berlin, does a 1-to-1 relationship work for your objects?
630: [18:38:00] <lx-berlin> no
631: [18:38:00] <lx-berlin> i will try to dev/build with just this configuration
632: [18:38:00] * SightUnseen has joined #silverstripe
633: [18:40:00] <FrozenFire> It's not that SS won't accept it in practise.
634: [18:40:00] <FrozenFire> It's that SS has no way of knowing which has_one relates to which has_many
635: [18:40:00] <FrozenFire> So you might end up getting the wrong relation
636: [18:41:00] <lx-berlin> i think its worth to try out :)
637: [18:45:00] * guci0 quit (Ping timeout: 245 seconds)
638: [18:49:00] * SightUnseen quit (Ping timeout: 276 seconds)
639: [18:50:00] <ec8or_> http://pockettactics.com/2013/01/14/just-enjoying-the-view-sir-the-battle-for-hill-218/
640: [19:06:00] * MrGuits has joined #silverstripe
641: [19:09:00] * Guits quit (Ping timeout: 244 seconds)
642: [19:15:00] * SightUnseen has joined #silverstripe
643: [19:16:00] * gelignite has joined #silverstripe
644: [19:23:00] * Guits has joined #silverstripe
645: [19:26:00] * SightUnseen quit (Ping timeout: 246 seconds)
646: [19:27:00] * MrGuits quit (Ping timeout: 276 seconds)
647: [19:29:00] * DigNZ has joined #silverstripe
648: [19:29:00] * DigNZ quit (Remote host closed the connection)
649: [19:30:00] * DigNZ has joined #silverstripe
650: [19:36:00] * irogue has joined #silverstripe
651: [19:42:00] <ApacheTiger37> I have dates and times I would like to format nicer.
652: [19:42:00] <LoveDuckie> from the page definition?
653: [19:42:00] <LoveDuckie> How would I call the db values from the page controller
654: [19:42:00] <LoveDuckie> Hi, I was wondering if someone could answer my question real quick
655: [19:42:00] <ApacheTiger37> Can anyone tell me if there is a way to format $summery_fields?
656: [19:42:00] * LoveDuckie has joined #silverstripe
657: [19:42:00] * ApacheTiger37 has joined #silverstripe
658: [19:43:00] <FrozenFire> LoveDuckie, When your controller is initialized, it's customized with the associated page
659: [19:43:00] <LoveDuckie> Oh, sorry... didn't mean to interrupt
660: [19:43:00] <FrozenFire> So you can call any value or method on the Page from the Page_Controller
661: [19:44:00] <FrozenFire> If Page $db includes "Foo", then Page_Controller can do $this->Foo
662: [19:44:00] <FrozenFire> ApacheTiger37, Format in what way?
663: [19:44:00] <ApacheTiger37> Default is 14:00 I would like 02:00 PM.
664: [19:45:00] <FrozenFire> Specifically that format, or just nicer? There are several formatting methods on the Date and Time objects
665: [19:46:00] <ApacheTiger37> I tries $summery_fields = array ( 'StartDate.Nice' => 'Start Date' ) but it created error.
666: [19:47:00] <FrozenFire> You're aware that it's $summary_fields, yes?
667: [19:47:00] <LoveDuckie> Thanks for that FrozenFire
668: [19:47:00] <LoveDuckie> I was making the call to the variable without the $this->
669: [19:47:00] <ApacheTiger37> LOL
670: [19:48:00] <LoveDuckie> I was wondering if you knew if I could output the db value as HTML at the same time too?
671: [19:48:00] * dendeffe has joined #silverstripe
672: [19:48:00] <FrozenFire> LoveDuckie, What type of field is it?
673: [19:48:00] <ApacheTiger37> Checked, yes, I spelled it summary_fields
674: [19:48:00] <LoveDuckie> at the moment, it's simply printing as text.
675: [19:49:00] <ApacheTiger37> That isn't gong to work in the CMS auto-genrated grid.
676: [19:49:00] <ApacheTiger37> is there a summary_fields decorator or something?
677: [19:49:00] <LoveDuckie> Text.
678: [19:49:00] <FrozenFire> ApacheTiger37, A solution, I believe, is to do something like public function MyDateFormatted() { return $this->dbObject("MyDate")->Nice(); }
679: [19:49:00] <ApacheTiger37> can I override a method to display the summary_fields?
680: [19:49:00] <FrozenFire> Then $summary_fields = array("MyDateFormatted" => "MyDate")
681: [19:49:00] * travis-ci has joined #silverstripe
682: [19:49:00] <travis-ci> [travis-ci] silverstripe/silverstripe-cms#185 (3.1 - f9504ee : Andrew O'Neil): The build passed.
683: [19:49:00] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-cms/compare/f674af0c73f9...f9504ee983f1
684: [19:49:00] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-cms/builds/4145550
685: [19:49:00] * travis-ci has left #silverstripe
686: [19:50:00] <ApacheTiger37> okay i missed the second line my apolotgies
687: [19:50:00] <FrozenFire> Yes it will
688: [19:51:00] <ApacheTiger37> That helps in so many ways! Thanks sir.
689: [19:51:00] <FrozenFire> LoveDuckie, If it has HTML, it should be HTMLText
690: [19:52:00] <LoveDuckie> OK, sorry I was unaware of that datatype. I'll go about changing it now.
691: [19:53:00] <LoveDuckie> That works great, thanks FrozenFire :)
692: [19:54:00] * nickmolhoek has joined #silverstripe
693: [19:54:00] * nickmolhoek has joined #silverstripe
694: [19:54:00] * nickmolhoek quit (Remote host closed the connection)
695: [19:54:00] * SightUnseen has joined #silverstripe
696: [19:55:00] <ApacheTiger37> Is there any way to make a searchable field that is a date field use the jquery calendar popup in the search sidebar?
697: [19:55:00] * dendeffe quit (Quit: dendeffe)
698: [19:57:00] <FrozenFire> Because of things like the hour, minute and second
699: [19:57:00] <FrozenFire> Date fields are very hard to search by
700: [19:57:00] <FrozenFire> Because you can't just do $this->Date == $date
701: [19:58:00] <lx-berlin> LoveDuckie: but you loose the posibility to order by this column afaik
702: [19:59:00] * dendeffe has joined #silverstripe
703: [20:00:00] <ApacheTiger37> i figured date fields were just date, time was just time, and datetime was both.
704: [20:00:00] <ApacheTiger37> Do date fields are still stored as date and time?
705: [20:01:00] <FrozenFire> In SS, yes, but in your DBMS, no.
706: [20:01:00] <ApacheTiger37> Well I assume SS uses strtotime to convert to DB style dates.
707: [20:02:00] <FrozenFire> :P
708: [20:02:00] <ApacheTiger37> so the dates ahve to be yyyy-mm-dd before matching?
709: [20:02:00] <FrozenFire> Nope
710: [20:02:00] <FrozenFire> You assume wrongly
711: [20:03:00] <FrozenFire> This is why working with date filtering is so difficult
712: [20:03:00] <FrozenFire> You have to filter for a range, as opposed to filtering for a matched date
713: [20:04:00] <ApacheTiger37> now i'm confused.
714: [20:04:00] <ApacheTiger37> SS uses the int timestamp
715: [20:04:00] <FrozenFire> It does not
716: [20:05:00] * SightUnseen quit (Ping timeout: 252 seconds)
717: [20:05:00] <FrozenFire> Or maybe it's ISO 8601
718: [20:05:00] <FrozenFire> If I recall correctly, the format it stores internally is RFC 2822
719: [20:05:00] <ApacheTiger37> I'm going to have to play i guess.
720: [20:05:00] <FrozenFire> So you should be. :P
721: [20:06:00] <ApacheTiger37> ISO I think
722: [20:07:00] <ApacheTiger37> That should go back to yyyy-mm-dd for year, hh:ii:ss for time.
723: [20:07:00] <FrozenFire> You have to do something like ->filter(array("Date:GreaterThan" => "Y-m-dT0:0:0+00:00", "Date:LessThan" => "Y-m-dT24:59:59+00:00"))
724: [20:08:00] <FrozenFire> Or 23, rather
725: [20:08:00] <pn> hello there
726: [20:08:00] * pn has joined #silverstripe
727: [20:08:00] <FrozenFire> If I recall correctly
728: [20:08:00] <lx-berlin> argh, another bug in SS. When you save a record of a class in modeladmin you always see this "Saved Product #29" again in each modeladmin
729: [20:08:00] <ApacheTiger37> I will definitely look at it. Are you using MySQL?
730: [20:09:00] <FrozenFire> lx-berlin, DataObject::getTitle()
731: [20:09:00] <FrozenFire> I'm using MySQL, yes
732: [20:09:00] <LoveDuckie> That's fine lx-berlin, I'm using it just for the html output for a youtube embed
733: [20:10:00] <pn> how do I debug it?
734: [20:10:00] <pn> JS console is empty, apache error logs are empty
735: [20:10:00] <pn> it looks like this: http://f.cl.ly/items/0E323Q1B3c310g3X0B1A/error.png
736: [20:10:00] <pn> when trying to upload a photo I'm getting the following error: "SyntaxError: Unexpected token E"
737: [20:11:00] <FrozenFire> :P
738: [20:11:00] <lx-berlin> FrozenFire: its ok to see #29. But if i switch to another modeladmin (e.g. locations) i dont want to see this message "Saved Product #29" again :)
739: [20:11:00] <ApacheTiger37> I just started using SS. I love it, but the documentation is slacking some. Still I know it is free and all.
740: [20:11:00] <FrozenFire> lx-berlin, It's saved in the Form's session
741: [20:11:00] <FrozenFire> ApacheTiger37, Yep. The documentation is really bad. I've been using it for all of my work for over 8 months now, and I still shake my fist at the documentation daily
742: [20:12:00] <lx-berlin> so the session should be reset when i go back to the grid
743: [20:12:00] <FrozenFire> Just unset that session value, if you so care
744: [20:12:00] <FrozenFire> Not reset, no
745: [20:12:00] <FrozenFire> What that value is likely to be, I'm not sure
746: [20:17:00] <FrozenFire> Err
747: [20:17:00] <ApacheTiger37> can I do ->filter(array('StartDate'=>'date_format(StartDate,"%Y-%m-%d") as StartDate'))
748: [20:17:00] * zfmf has left #silverstripe
749: [20:18:00] <FrozenFire> :P
750: [20:18:00] <FrozenFire> I suppose, yeah
751: [20:18:00] <FrozenFire> Err
752: [20:18:00] <ApacheTiger37> yep time to pay the syntax
753: [20:18:00] * SightUnseen has joined #silverstripe
754: [20:18:00] <FrozenFire> But not with that syntax
755: [20:18:00] * FrozenFire is confused just reading it
756: [20:19:00] <FrozenFire> You really do have to use the range
757: [20:19:00] <ApacheTiger37> I appreciate it. I added it to my notes.
758: [20:19:00] <FrozenFire> No, now that I've figured out what you mean, that's not how you could do it
759: [20:19:00] <FrozenFire> Using MySQL-specific syntax in a filter is going to be painful
760: [20:19:00] * SightUnseen has left #silverstripe
761: [20:20:00] <ApacheTiger37> I will need it alot.
762: [20:21:00] <ApacheTiger37> so ->filter( array( 'Start ) )
763: [20:21:00] <ApacheTiger37> so what you have in the array associate value is actually a value holder, not the value.
764: [20:21:00] <ApacheTiger37> I see
765: [20:23:00] <FrozenFire> You as well
766: [20:23:00] <ApacheTiger37> thanks again sir
767: [20:23:00] <FrozenFire> Each key of the filter is a field, with an optional search filter
768: [20:23:00] <ApacheTiger37> have a great day
769: [20:24:00] <ApacheTiger37> 8 months
770: [20:24:00] <ApacheTiger37> you bald yet?
771: [20:24:00] <ApacheTiger37> i understand. i would have pulled my hair out on matching dates.
772: [20:25:00] <FrozenFire> It's just... esoteric
773: [20:25:00] <FrozenFire> It gets better
774: [20:25:00] <FrozenFire> I have very long hair. :P
775: [20:26:00] <FrozenFire> Once you figure it out, it makes things really fast
776: [20:26:00] <ApacheTiger37> I've created about 5 sites in three weeks using it.
777: [20:26:00] <ApacheTiger37> it is very fast.
778: [20:26:00] <ApacheTiger37> just getting into writing some more complex cron job works in this latest site.
779: [20:26:00] <FrozenFire> The way I describe SS is that it's really, really, really fast as long as you are doing what it has built-in ways of doing.
780: [20:27:00] <FrozenFire> If you stray from that path, you pay a heavy toll.
781: [20:27:00] <ApacheTiger37> I thought using wget on the servers local machine. I need to send email templates.
782: [20:27:00] <FrozenFire> Depends on what you're doing with it
783: [20:27:00] <ApacheTiger37> do you suggest bypassing the queued jobs module?
784: [20:28:00] <FrozenFire> Well, you can invoke it directly
785: [20:28:00] <ApacheTiger37> It's hard when you aren't sure of its capabilities and inner workings though.
786: [20:28:00] <FrozenFire> A bit dated, but http://deadlytechnology.com/silverstripe/scheduled-tasks/
787: [20:28:00] <ApacheTiger37> I try not to stray away from what it is built to do.
788: [20:29:00] <ApacheTiger37> I was hoping to have a single file and then include some secret inner file that loads all the stuff without the front-end controller.
789: [20:29:00] <FrozenFire> BuildTask
790: [20:29:00] <FrozenFire> If you need to implement your task with its own scheduling (as opposed to being executed alongside all other Hourly, Daily, etc tasks), then extend BuildTask
791: [20:30:00] <ApacheTiger37> well, i don't want to
792: [20:30:00] <FrozenFire> I have https://github.com/TheFrozenFire/silverstripe-cli-module
793: [20:30:00] <FrozenFire> Don't stray out of the MVC structure, unless you have a very good reason.
794: [20:30:00] <FrozenFire> Which I use in some circumstances (when I need to write free-form scripts, for imports and whatnot)
795: [20:31:00] <ApacheTiger37> so it will include the dataobjects and database config without implementing the controller?
796: [20:32:00] <FrozenFire> Yes
797: [20:32:00] <FrozenFire> Just don't call anything that involves a controller or rendering
798: [20:32:00] <FrozenFire> Because it'll shit bricks
799: [20:32:00] <FrozenFire> :P
800: [20:32:00] <FrozenFire> It's also not exactly perfect in terms of invocation
801: [20:32:00] <FrozenFire> You include the bootstrap.php file, then do $c = new Controller(); $c->pushCurrent();
802: [20:33:00] <ApacheTiger37> got you
803: [20:33:00] <ApacheTiger37> just don't call render
804: [20:33:00] <FrozenFire> Or doing Debug::dump
805: [20:33:00] <FrozenFire> It's doing things like calling $page->renderWith(...) that will give you problems.
806: [20:33:00] <FrozenFire> Manipulating the model from such a script is okay.
807: [20:33:00] <ApacheTiger37> So if i call a model that is a page and not just a DataObject then it'll pass out.
808: [20:33:00] <FrozenFire> That just gives it a controller context for some fringe cases.
809: [20:34:00] <FrozenFire> But, I still recommend using a BuildTask if you're implementing a scheduled task.
810: [20:34:00] <FrozenFire> Anything that involves a controller in such a script is a bad idea. :P
811: [20:34:00] <FrozenFire> Because it's explicitly a controllerless environment
812: [20:34:00] <ApacheTiger37> None of what I am doing will be but it is good to know in future projects.
813: [20:34:00] <ApacheTiger37> how does buildtask tie in with cron?
814: [20:34:00] <FrozenFire> You just call that controller, and it executes it processing function
815: [20:35:00] <FrozenFire> Whatever that function is.
816: [20:35:00] <FrozenFire> It'll basically let you make "requests" of the site without having to use HTTP
817: [20:35:00] <FrozenFire> SS's framework has a cli-script.php that you can call using your cronjob
818: [20:35:00] <FrozenFire> Using wget if you need
819: [20:35:00] <ApacheTiger37> using wget like I was planning?
820: [20:36:00] <FrozenFire> The same as you would access it from HTTP
821: [20:36:00] <ApacheTiger37> how do i pass in what to run? say /mysite/code/SendEmail.php
822: [20:37:00] <FrozenFire> php /path/to/project/sapphire/cli-script.php /YourBuildTask
823: [20:37:00] <FrozenFire> BuildTask is a type of controller
824: [20:37:00] <ApacheTiger37> so SendEmail.php extends BuildTask?
825: [20:37:00] <FrozenFire> SendEmail extends BuildTask, yes
826: [20:38:00] <ApacheTiger37> MyBuildTask/MyAction
827: [20:38:00] <FrozenFire> You can name controllers directly for requests
828: [20:38:00] <ApacheTiger37> BuildTask has functions like Controllers that are actions?
829: [20:39:00] <FrozenFire> All things that extend Controller do
830: [20:39:00] <FrozenFire> The default action is called run()
831: [20:39:00] <ApacheTiger37> Thank you so much. You have made my day.
832: [20:39:00] <FrozenFire> http://api.silverstripe.org/trunk/framework/dev/BuildTask.html#methodrun
833: [20:40:00] <FrozenFire> It gives you a chance to do things that all actions need to do
834: [20:40:00] <FrozenFire> For instance, if a controller is not accessible except by admins, you would do your permission checking there
835: [20:40:00] <ApacheTiger37> I would have figured init();
836: [20:40:00] <FrozenFire> init is called on all controllers before the request is processed
837: [20:40:00] <ApacheTiger37> so parent::init() calls run() in child?
838: [20:41:00] <FrozenFire> Director will instantiate your controller, call init on it, then call handleRequest on it, if I recall correctly
839: [20:41:00] <FrozenFire> Call parent::init() first
840: [20:41:00] <FrozenFire> handleRequest, by default, reads in the various URL handlers and whatnot, and directs the request to the appropriate action
841: [20:41:00] <ApacheTiger37> do i need to do all my stuff in init before I call parent::init?
842: [20:42:00] <FrozenFire> It sets up some important stuff
843: [20:42:00] <FrozenFire> Init is called completely separately from the request handling
844: [20:42:00] <FrozenFire> It doesn't itself call the action
845: [20:42:00] <FrozenFire> It's called, then the request handler is called afterwards
846: [20:42:00] <ApacheTiger37> so init is called and then run.
847: [20:43:00] <FrozenFire> Yes
848: [20:43:00] <ApacheTiger37> excellent, thank you again.
849: [20:44:00] <FrozenFire> BuildTask executes directly
850: [20:44:00] <ApacheTiger37> does buildtask also create a table to add tasks to?
851: [20:44:00] <ApacheTiger37> similar to queued jobs?
852: [20:44:00] <FrozenFire> No
853: [20:44:00] <ApacheTiger37> good
854: [20:44:00] <ApacheTiger37> thanks
855: [20:45:00] <FrozenFire> It's basically just a way of calling a chunk of code from within the confines of the standard MVC pattern
856: [20:45:00] <FrozenFire> You can also find it in your /dev/tasks menu
857: [20:45:00] <ApacheTiger37> exactly what i wanted. something light weight.
858: [20:46:00] <ApacheTiger37> so the SendEmailTask goes in the /mysite/code directory and the cli-script.php knows to look there for the controller
859: [20:47:00] <FrozenFire> There is a class called Director which will take a given request, and figure out where it needs to be sent to.
860: [20:47:00] <FrozenFire> In a very loose sense, yes.
861: [20:48:00] <FrozenFire> It'll then pass the request off to that
862: [20:48:00] <FrozenFire> One of its ways of directing a request is to look for a class which extends Controller that has the name of the given request (e.g. SendEmailTask)
863: [20:48:00] <ApacheTiger37> excellent
864: [20:49:00] <FrozenFire> Well, up that point, it's pretty standard routed MVC stuff
865: [20:49:00] <ApacheTiger37> I was planning on tearing apart the QueuedJobs module to see what they were doing. Now I get it. More love to SS.
866: [20:49:00] <FrozenFire> Heh
867: [20:50:00] <ApacheTiger37> Yes, but I love all the other stuff done with the database and the CMS modeladmin that allows my clients to setup the stuff that needs to be done so easily.
868: [20:51:00] <ApacheTiger37> Not like ZF
869: [20:51:00] <FrozenFire> https://github.com/silverstripe/sapphire/blob/3.0/_config/routes.yml is a good reference for the standard routes, by the way.
870: [20:52:00] <ApacheTiger37> I cannot say thank you enough. I'll let you get back to work. Great information today.
871: [20:52:00] <FrozenFire> And yeah, that's why I use SS
872: [20:52:00] <FrozenFire> Happy to help
873: [20:53:00] <FrozenFire> And the ORM is, despite evidence to the contrary, very nice
874: [20:53:00] <FrozenFire> It's very easy to throw together a very slick interface for data management via the CMS
875: [20:53:00] * instabil has joined #silverstripe
876: [20:55:00] <ApacheTiger37> I still struggle with understanding the ORM, but I will get the hang of it. I'm so use to writing straight SQL.
877: [20:55:00] <FrozenFire> ORMs in general are... tricky
878: [20:55:00] <FrozenFire> Yeah
879: [20:56:00] <ApacheTiger37> that is why i am trying not to reinvent the box as I go.
880: [20:56:00] <FrozenFire> But they make things a lot faster to get done
881: [20:56:00] <FrozenFire> I rarely write SQL directly any more
882: [20:56:00] <ApacheTiger37> I agree.
883: [20:56:00] <FrozenFire> Using a good database abstraction layer means that you can move to a different DBMS on the fly
884: [20:57:00] <ApacheTiger37> where you from?
885: [20:57:00] <ApacheTiger37> US
886: [20:57:00] <ApacheTiger37> Knoxville, TN
887: [20:57:00] <FrozenFire> BC, Canada. And yourself?
888: [20:57:00] <ApacheTiger37> Great Smoky Mountains
889: [20:58:00] <FrozenFire> I live in a fairly sub-tropical region
890: [20:58:00] <ApacheTiger37> We've had a really warm winter.
891: [20:58:00] <ApacheTiger37> Is it cold up there?
892: [20:59:00] <FrozenFire> British Columbia is very much representative of its name, in terms of climate and scenery
893: [20:59:00] <FrozenFire> I think we had one day of snow, and then a little sprinkle of it afterwards
894: [20:59:00] <FrozenFire> Very mild
895: [20:59:00] * priithansen quit (Quit: priithansen)
896: [21:00:00] <FrozenFire> Very wet, and pretty damn warm and rugged
897: [21:00:00] <FrozenFire> For Canada, anyways.
898: [21:00:00] <ApacheTiger37> lol, well enjoy the rest of your warm and wet day.
899: [21:01:00] <ApacheTiger37> It is just the same here.
900: [21:01:00] <ApacheTiger37> later
901: [21:01:00] <FrozenFire> You as well
902: [21:03:00] <ApacheTiger37> Sorry, one more question. The run method is looking for a request object. Where does that get instantiated and of what class?
903: [21:04:00] <FrozenFire> All actions are passed an SS_HTTPRequest object
904: [21:04:00] <FrozenFire> Nope
905: [21:04:00] <ApacheTiger37> so I just pass the $_REQUEST
906: [21:05:00] <FrozenFire> It will be called automatically by the TaskRunner
907: [21:05:00] <ApacheTiger37> so i define a method run with $request parameter.
908: [21:05:00] <FrozenFire> Yes
909: [21:05:00] <ApacheTiger37> got it.
910: [21:05:00] <FrozenFire> You're not calling run yourself
911: [21:06:00] <FrozenFire> Not sure what you mean
912: [21:06:00] <ApacheTiger37> then how do different actions use run?
913: [21:07:00] <ApacheTiger37> wouldn't the different actions be different runs?
914: [21:07:00] <ApacheTiger37> so run doesn't get called if you pass an action like /sendEmailTask/myAction?
915: [21:07:00] <FrozenFire> run is essentially your index action
916: [21:07:00] <FrozenFire> It's what is called when you don't otherwise indicate an action
917: [21:08:00] <ApacheTiger37> Any other catches?
918: [21:08:00] <ApacheTiger37> Do I have it all?
919: [21:08:00] <FrozenFire> It does not
920: [21:08:00] <ApacheTiger37> perfect
921: [21:09:00] <FrozenFire> Otherwise it will slow to a crawl with database writes
922: [21:09:00] <FrozenFire> For instance, if in your task you are marking something to indicate the email has been sent (to prevent duplicate emails), you would want a transaction
923: [21:09:00] <FrozenFire> Not in this instance, but if you're doing a lot of database writes at once, you should use a transaction.
924: [21:09:00] <ApacheTiger37> will do
925: [21:10:00] * liam has joined #silverstripe
926: [21:10:00] <FrozenFire> Transactions are started using DB::getConn()->transactionStart();
927: [21:10:00] <ApacheTiger37> is there DataObject->beginTransaction()
928: [21:10:00] <FrozenFire> And are committed using DB::getConn()->transactionEnd();
929: [21:10:00] <ApacheTiger37> DataObject()->commitTransaction?
930: [21:10:00] <FrozenFire> You do transactions on the database link scope
931: [21:10:00] <ApacheTiger37> okay, cool
932: [21:10:00] <FrozenFire> Not on the individual DataObject scope
933: [21:11:00] <ApacheTiger37> perfect
934: [21:11:00] <ApacheTiger37> Have you contributed much code to SS?
935: [21:12:00] * chillu has joined #silverstripe
936: [21:12:00] <ApacheTiger37> Seems like you know it quite well.
937: [21:12:00] <FrozenFire> I've done a few PRs when I have an issue I need fixed on every project I work on
938: [21:12:00] <FrozenFire> I'd like to contribute more, but my time is spread pretty thin
939: [21:13:00] <ApacheTiger37> EVERY PROJECT??? you are starting to scare me.
940: [21:13:00] <FrozenFire> I do a very large amount of work using SS, and the work I do is rather complicated
941: [21:13:00] <FrozenFire> So I end up breaking it in a hundred different ways, and having to learn how to unbreak it
942: [21:13:00] <FrozenFire> :P
943: [21:13:00] * UndefinedOffset quit (Quit: Leaving.)
944: [21:13:00] <FrozenFire> ?
945: [21:14:00] <ApacheTiger37> I'll try to make sure I take that approach as well.
946: [21:14:00] <ApacheTiger37> you said you have to fix stuff in every project you do.
947: [21:14:00] <FrozenFire> Yeah, so if I find a bug that I end up having to work around a bunch of times, I push my fix upstream
948: [21:14:00] <ApacheTiger37> cool
949: [21:16:00] * ApacheTiger37 quit (Quit: Page closed)
950: [21:17:00] <FrozenFire> Is there a way to turn that off, yet?
951: [21:17:00] * travis-ci has joined #silverstripe
952: [21:17:00] <travis-ci> [travis-ci] silverstripe/silverstripe-cms#187 (3.1 - 93bee94 : Ingo Schommer): The build passed.
953: [21:17:00] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-cms/compare/f9504ee983f1...93bee9422a4d
954: [21:17:00] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-cms/builds/4145583
955: [21:17:00] * travis-ci has left #silverstripe
956: [21:17:00] * FrozenFire notices that chillu is working on the preview stuff
957: [21:19:00] <chillu> To remove the panel completely? Not yet, and it would only make sense if we implement an alternative UI for switching between draft/live at least. Do you find it too slow? Or taking too much room?
958: [21:19:00] <FrozenFire> It does not work for about 50% of the projects I work on, because not all designs are responsive.
959: [21:20:00] <FrozenFire> It should be configurable on a per-project and per-user basis
960: [21:20:00] <FrozenFire> And yes, it takes a lot of room
961: [21:21:00] * dendeffe quit (Quit: dendeffe)
962: [21:22:00] <FrozenFire> Another annoying thing I'm noticing is that the CMS design is starting to break very obviously at higher resolutions
963: [21:22:00] <FrozenFire> Seems to be some bad front-end design choices relating to scaling
964: [21:23:00] <FrozenFire> But it usually loads broken
965: [21:23:00] <FrozenFire> That is, things are being sized with Javascript or something
966: [21:23:00] <FrozenFire> If I resize the viewport down and then back up, the display fixes
967: [21:23:00] <liam> hey any mac users here?
968: [21:25:00] <FrozenFire> Perhaps ask your question relating to such systems. I'm sure a few people are familiar with apple stuff
969: [21:27:00] <liam> just wandering what the best setup is for silverstripe development with regards to php/web server/mysql?
970: [21:27:00] * liam__ has joined #silverstripe
971: [21:27:00] * liam quit (Read error: No route to host)
972: [21:27:00] * liam__ is now known as liam
973: [21:27:00] <FrozenFire> chillu, http://i.imgur.com/pWP5I.png There's a good example of it being broken.
974: [21:28:00] <catcher> liam, I set up our designers on MAMP
975: [21:28:00] <FrozenFire> Might ask in #phpc about that
976: [21:28:00] <chillu> FrozenFire: That stuff is *hard*. We're doing our best. Feel free to help :)
977: [21:29:00] <catcher> liam, very easy to get up & running
978: [21:29:00] <liam> ok thanks ill have a look at it.
979: [21:30:00] <FrozenFire> Styling using Javascript is a very bad idea
980: [21:30:00] <FrozenFire> Well, a lot of it seems to be bad development practises, honestly.
981: [21:32:00] <FrozenFire> Some of these issues are so... odd, I don't even know what the solution is
982: [21:36:00] <chillu> Well, then lets start with the issues that you do know about, and submit pull requests
983: [21:40:00] <FrozenFire> By chance, are you able to replicate the .ui-tabs-nav stacking thing?
984: [21:41:00] <FrozenFire> Though I'm not entirely clear on how the UI scales
985: [21:41:00] <FrozenFire> I figure the solution to that is .ui-tabs.cms-tabset-primary .ui-tabs-nav, .ui-tabs .ui-tabs-nav.cms-tabset-nav-primary, .ui-tabs .cms-content-header-tabs .ui-tabs-nav { white-space: nowrap; max-height: 39px; }
986: [21:43:00] * ARNHOFF quit (Read error: Connection reset by peer)
987: [21:49:00] * liam quit (Ping timeout: 248 seconds)
988: [21:50:00] * EPIK has joined #silverstripe
989: [22:00:00] <chillu> FrozenFire There's a lot of testing work between guessing a solution, and committing it to core - so that's where you can help :)
990: [22:00:00] * Motoservo quit (Remote host closed the connection)
991: [22:03:00] * Motoservo has joined #silverstripe
992: [22:24:00] * liam has joined #silverstripe
993: [22:36:00] * liam quit (Ping timeout: 248 seconds)
994: [22:42:00] * liar3switch quit (Quit: Nettalk6 - www.ntalk.de)
995: [23:02:00] * LoveDuckie quit (Quit: HydraIRC -> http://www.hydrairc.com <- s0 d4Mn l33t |t'z 5c4rY!)
996: [23:03:00] * Zauberfisch quit (Read error: Connection reset by peer)
997: [23:10:00] * Zauberfisch has joined #silverstripe
998: [23:11:00] * gelignite quit (Quit: http://bit.ly/nkczDT)
999: [23:16:00] * congii has joined #silverstripe
1000: [23:18:00] * Zauberfisch quit (Read error: Connection reset by peer)
1001: [23:25:00] * congii quit (Ping timeout: 245 seconds)
1002: [23:36:00] * Emil_Blume has joined #silverstripe
1003: [23:37:00] * Zauberfisch has joined #silverstripe
1004: [23:50:00] * lx-berlin has left #silverstripe

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