#silverstripe IRC Log

IRC log for 1 January 2013

All timestamps are in UTC.

1: [00:00:00] <C10ne> Get the job done, and it ends there
2: [00:01:00] <C10ne> I'm not mixing models, they just share "sort" filed, all models are their own
3: [00:02:00] <FrozenFire> It's not about reusability
4: [00:02:00] <FrozenFire> It's about maintainability.
5: [00:02:00] <FrozenFire> And... sanity.
6: [00:05:00] <C10ne> If you need to use it again, well... use it again.
7: [00:05:00] <C10ne> Again, depends what you're making. If you build just one site with one specific feature don't bother yourself with making it "sane"
8: [00:06:00] <FrozenFire> And even worse, someone else might have to fix it.
9: [00:06:00] <FrozenFire> That's a very bad position to take. If you're making something and you have a choice in the matter, always strive to make it maintainable.
10: [00:06:00] <FrozenFire> Because at the very least, you might come back to work on it at a later date and wonder WTF you were doing.
11: [00:07:00] <C10ne> Same here
12: [00:07:00] <FrozenFire> More often than not, I find that that other guy is me.
13: [00:08:00] <FrozenFire> So pay it forward
14: [00:08:00] <FrozenFire> :P
15: [00:08:00] * dendeffe quit (Quit: dendeffe)
16: [00:09:00] <C10ne> But, I'll make it maintainable, I just have to step out of SS way in order to build exact thing I need
17: [00:10:00] <FrozenFire> But it sounds like you're mixing and matching models in a list
18: [00:10:00] <FrozenFire> Not even talking about doing it a different way than SS
19: [00:10:00] <FrozenFire> I'm talking about having sane model interactions.
20: [00:10:00] <FrozenFire> If all of your items have a common descendant, fine
21: [00:10:00] <C10ne> Mainly, you (and me), as, say, SS developers get to fix Joomla stuff, or something like that
22: [00:10:00] <C10ne> :)
23: [00:11:00] <FrozenFire> :P
24: [00:11:00] * catcher wonders if it could've been finished, maintainably, by the end of this conversation
25: [00:11:00] <C10ne> Not like that, it's just that, for example, you have a news page with categories and news items
26: [00:12:00] <FrozenFire> It has drag and drop reordering, hierarchy, etc.
27: [00:12:00] <C10ne> and you can have items without categories, and sort them before or after a category
28: [00:12:00] <FrozenFire> So why aren't you using the blog module?
29: [00:12:00] <FrozenFire> Or really, that doesn't even matter.
30: [00:12:00] <FrozenFire> Just use the SiteTree in general
31: [00:13:00] <C10ne> no, it can be a lot of dataobjects with just title
32: [00:14:00] <FrozenFire> If there are a great many items, then simply put a limit on the children shown in the sitetree
33: [00:14:00] <C10ne> check out locu.com, log in (it's free and fast)
34: [00:14:00] <FrozenFire> I really don't want to. :P
35: [00:14:00] <C10ne> putting them in sitetree would make a real mess
36: [00:14:00] <FrozenFire> And no, it wouldn't be a mess in the sitetree
37: [00:15:00] <FrozenFire> And then place an ancillary GridField in the CMSFields
38: [00:15:00] <C10ne> Limit kills the sortability, you need to show them all in order to sort them all
39: [00:16:00] <FrozenFire> Not really
40: [00:17:00] <C10ne> Here's the answer: can I use SiteTree for dataobjects belonging to one page? That would be the answer
41: [00:18:00] <FrozenFire> You shouldn't use DataObjects as pages in your scenario
42: [00:18:00] <C10ne> Then it has to be as I planned
43: [00:19:00] <C10ne> I'll just build the interface
44: [00:26:00] <catcher> Outtie, happy new year y'all
45: [00:27:00] <FrozenFire> None of the SS guys at all
46: [00:27:00] <FrozenFire> :P
47: [00:27:00] <FrozenFire> WHO WILL ANSWER MY COMPLICATED ESOTERIC QUESTIONS NOW?!?
48: [00:27:00] <FrozenFire> Nor simon_w
49: [00:27:00] <FrozenFire> Was about to ping willr, then noticed he's not here
50: [00:27:00] <FrozenFire> Man, everyone's gone
51: [00:27:00] * catcher quit (Quit: Leaving)
52: [00:29:00] <C10ne> I will :)
53: [00:29:00] <FrozenFire> I need that SS3 DataObjectComments thing
54: [00:29:00] <FrozenFire> Aha, https://github.com/silverstripe/silverstripe-comments
55: [00:31:00] <FrozenFire> You're a wunderkind
56: [00:31:00] <C10ne> there, I did it without writing a single letter :D
57: [00:33:00] * FrozenFire smacks composer
58: [00:33:00] <C10ne> Composer is nice
59: [00:33:00] <FrozenFire> :P
60: [00:33:00] <FrozenFire> It did exactly what I told it to
61: [00:33:00] * FrozenFire unsmacks it
62: [00:33:00] <FrozenFire> Oh wait,
63: [00:33:00] <C10ne> :)
64: [00:34:00] <FrozenFire> So it updated it while it was working on installing the comments module
65: [00:34:00] <FrozenFire> Heh. I just forgot that I had changed my composer.json to include SS3.1.*
66: [00:35:00] <FrozenFire> I hope it's an update for the better
67: [00:36:00] <C10ne> I'll wait before I update, need to finish this,and then I'll play :)
68: [00:37:00] <FrozenFire> Lots of bugs still waiting to be ironed out
69: [00:37:00] <FrozenFire> I'm not even sure if I'll stick with 3.1
70: [00:38:00] <FrozenFire> 1920x1080
71: [00:38:00] <FrozenFire> I'm noticing that many of the bugs are simply related to me having a huge-ass resolution
72: [00:38:00] <FrozenFire> Well, not necessarily so huge, but fairly large and certainly larger than ordinary.
73: [00:39:00] <FrozenFire> So it's a height thing or something
74: [00:39:00] <FrozenFire> Funny enough, simply opening Chrome's inspector fixes it on most pages
75: [00:39:00] <C10ne> Same here
76: [00:39:00] <FrozenFire> Things stack wrong, mostly.
77: [00:39:00] <FrozenFire> I find that the CMS has a number of... sizing glitches at that size
78: [00:40:00] <C10ne> Stuff looks different across browsers
79: [00:40:00] <C10ne> But it's not my concern for now
80: [00:41:00] * ARNHOE quit (Quit: ARNHOE)
81: [00:43:00] <FrozenFire> Guh, SS really needs a good has_one editor field.
82: [00:49:00] <C10ne> a couple of things, in order to do what I want :)
83: [00:55:00] <FrozenFire> Uggh, I cannot for the life of me think of a good way to handle this has_one in the CMS
84: [00:55:00] * OomElvis has joined #silverstripe
85: [00:56:00] <FrozenFire> Ordinarily it'd be a many_many to the objects, which is *easy* to handle.
86: [00:56:00] <FrozenFire> It's a reference to a relational object which handles the association of a remote content source (a video CDN).
87: [00:56:00] <FrozenFire> There are going to be hundreds of potential objects.
88: [00:57:00] <FrozenFire> But a has_one has no built-in relationship management, such as listing and breaking
89: [01:00:00] <C10ne> yes,I go with many many to get the features I need, even if it's logically has one
90: [01:01:00] <FrozenFire> :P
91: [01:01:00] <C10ne> you can guess from out conversation that I don't do things the way they are meant to be done, but the way I need them to be done )
92: [01:02:00] <FrozenFire> Well, in this case, what I'm ending up doing is using a text field where the user can enter the GUID of the asset, and then have a setGUID method on the DO that redirects it to search for the respective relation and set it on the DO
93: [02:10:00] * DigNZ has joined #silverstripe
94: [02:16:00] * OomElvis quit (Ping timeout: 260 seconds)
95: [03:06:00] * Emil_Blume quit (Ping timeout: 244 seconds)
96: [03:07:00] * Emil_Blume has joined #silverstripe
97: [03:26:00] * Emil_Blume quit (Quit: Leaving.)
98: [03:27:00] * Snowman23 is now known as meankiwi
99: [03:35:00] * Motoservo has joined #silverstripe
100: [04:22:00] * cloph_away has joined #silverstripe
101: [04:23:00] * cloph_away1 quit (Ping timeout: 265 seconds)
102: [04:24:00] * ratcat quit (Quit: who said I was leaving :P)
103: [04:37:00] * Circlepuller_ quit (Ping timeout: 255 seconds)
104: [04:39:00] * meankiwi is now known as ss23
105: [04:46:00] * Circlepuller has joined #silverstripe
106: [04:46:00] * Circlepuller quit (Excess Flood)
107: [05:07:00] * howardgrigg quit (Remote host closed the connection)
108: [05:28:00] * howardgrigg has joined #silverstripe
109: [05:42:00] * DigNZ quit (Quit: DigNZ)
110: [06:32:00] * DigNZ has joined #silverstripe
111: [06:53:00] * Error404NotFound quit (Quit: User guilty of hitting the Big Red X...)
112: [06:59:00] * Error404NotFound has joined #silverstripe
113: [09:32:00] * DigNZ quit (Quit: DigNZ)
114: [10:00:00] * ray__ quit (Ping timeout: 245 seconds)
115: [12:13:00] * ARNHOE has joined #silverstripe
116: [12:14:00] * Zauberfisch quit (Ping timeout: 246 seconds)
117: [12:17:00] * Zauberfisch has joined #silverstripe
118: [13:39:00] <C10ne> anybody using translatable? I have some problems and questions...
119: [14:23:00] * openbees has joined #silverstripe
120: [14:24:00] <openbees> is there any limitation of $Top in included templates ?
121: [14:25:00] <openbees> like $Top.somelink is working fine just before including template and not working in included template ... there is no loop .. if in included template !
122: [15:20:00] * openbees quit (Quit: Leaving)
123: [16:55:00] * pex__ has joined #silverstripe
124: [17:12:00] * howardgrigg quit (Remote host closed the connection)
125: [18:00:00] * pex__ has left #silverstripe
126: [18:00:00] <FrozenFire> I feel like SS3's CMS has come with *less* debugging information
127: [18:01:00] <FrozenFire> Server-side errors, that is
128: [18:01:00] <FrozenFire> It should really log any errors to the console...
129: [18:07:00] <FrozenFire> Also having very weird issues with my EditForm
130: [18:08:00] <FrozenFire> In fact, it won't change anything
131: [18:08:00] <FrozenFire> I save it, and I get a blank page
132: [18:08:00] <FrozenFire> Then I refresh, and I get the original editform
133: [18:20:00] <FrozenFire> Hrmm, definitely my fault for some reason
134: [18:54:00] * Error404NotFound quit (Quit: User guilty of hitting the Big Red X...)
135: [18:55:00] * howardgrigg has joined #silverstripe
136: [18:57:00] * Error404NotFound has joined #silverstripe
137: [19:02:00] * lpalmieri quit (Read error: Connection reset by peer)
138: [19:03:00] * lpalmieri has joined #silverstripe
139: [19:08:00] * Error404NotFound quit (Remote host closed the connection)
140: [19:13:00] * lpalmieri quit (Read error: Connection reset by peer)
141: [19:29:00] * lpalmieri has joined #silverstripe
142: [19:32:00] * lpalmieri quit (Client Quit)
143: [19:46:00] * lpalmieri has joined #silverstripe
144: [19:53:00] * dendeffe has joined #silverstripe
145: [20:14:00] * pex__ has joined #silverstripe
146: [20:26:00] * howardgrigg quit (Remote host closed the connection)
147: [20:33:00] * dendeffe quit (Quit: dendeffe)
148: [20:34:00] * howardgrigg has joined #silverstripe
149: [20:55:00] * lpalmieri quit (Read error: Connection reset by peer)
150: [20:55:00] * lpalmieri has joined #silverstripe
151: [20:56:00] * lpalmieri quit (Client Quit)
152: [21:14:00] * ARNHOE quit (Quit: ARNHOE)
153: [21:14:00] * ARNHOE has joined #silverstripe
154: [21:18:00] * dendeffe has joined #silverstripe
155: [21:42:00] <C10ne> FrozenFire probably a bit late, but JS errors cause pages not to load/display blank
156: [21:42:00] <FrozenFire> Yeah, it was a rather different thing
157: [21:42:00] <FrozenFire> But still, SS could easily have produced an error for it
158: [21:43:00] <pex__> hi guys Happy New Year !! by the way :)
159: [21:50:00] <C10ne> Happy New Year
160: [21:50:00] <C10ne> Errors are pretty hard to catch
161: [21:54:00] * dendeffe quit (Quit: dendeffe)
162: [21:55:00] * nhorstmeier has joined #silverstripe
163: [22:12:00] * nhorstmeier quit (Remote host closed the connection)
164: [22:20:00] <FrozenFire> C10ne, Not in the least
165: [22:20:00] <FrozenFire> SS already catches them
166: [22:21:00] <FrozenFire> Which, for form submissions, is useless
167: [22:21:00] <FrozenFire> It just doesn't have the functionality to log them in the Javascript console for AJAX requests.
168: [22:21:00] <FrozenFire> It just logs the fact of an error
169: [22:24:00] <pex__> do You know how can I remove item from menu in SS3?
170: [22:25:00] <pex__> i try CMSmenu::remove_menu_item() but wont work
171: [22:26:00] <C10ne> Which item?
172: [22:27:00] <pex__> help
173: [22:27:00] <C10ne> Could have guessed, it can't be removed with remove menu item
174: [22:27:00] <pex__> hmm, any other option to remove it?
175: [22:27:00] <C10ne> you have to edit /framework/admin/code/LeftAndMain.php
176: [22:28:00] <FrozenFire> pex__, There's a field on each SiteTree item
177: [22:28:00] <C10ne> find the part that starts with CMSMenu::add_link(...
178: [22:28:00] <C10ne> and comment it out
179: [22:28:00] <FrozenFire> It's in Settings
180: [22:29:00] <FrozenFire> Not sure why you'd need to use code to accomplish that
181: [22:29:00] <pex__> yes Frozen
182: [22:29:00] <FrozenFire> Oh wait, you're talking about sidebar items in the CMS?
183: [22:30:00] <pex__> i dont like mess with core
184: [22:30:00] <C10ne> Yeah, it says in the file
185: [22:30:00] <C10ne> can???t be done in cms/_config.php as locale is not set yet
186: [22:30:00] <pex__> hmm
187: [22:30:00] <C10ne> So I guess this is the only way
188: [22:30:00] <pex__> ok so framework/admin/code/LeftAndMain.php?
189: [22:31:00] <C10ne> yes, line 173 and on
190: [22:31:00] <C10ne> doesn't work for the Help item
191: [22:31:00] <FrozenFire> CMSMenu::remove_menu_item($code)
192: [22:31:00] <pex__> thx guys
193: [22:31:00] <pex__> core dont like me :D
194: [22:33:00] <C10ne> That's what I meant hard to catch
195: [22:33:00] <FrozenFire> It should
196: [22:33:00] <pex__> i try this way but nothing hapenned
197: [22:33:00] <FrozenFire> CMSMenu::remove_menu_item("Help");
198: [22:33:00] <FrozenFire> There's nothing magical in the code to make it permanent, that I can tell
199: [22:33:00] <C10ne> about errors, handling is nice, but sometimes it just shows notice in the upper right, and it dissapears too fast
200: [22:34:00] <FrozenFire> I'm talking about the menu
201: [22:35:00] <C10ne> I haven't found other way of removing it
202: [22:35:00] <C10ne> I don't know why, but the help item seams hard coded and added directly
203: [22:36:00] <FrozenFire> Just hide it
204: [22:36:00] <FrozenFire> Well, the simplest way is CSS
205: [22:36:00] <pex__> i found some solutions in net but from '08 '09, try every and nothing. It's seems to be common problem
206: [22:37:00] <C10ne> I managed to build that upload field I was making, need a few more tweaks
207: [22:37:00] <FrozenFire> I typically have an Extension on LeftAndMain that includes an onAfterInit so I can load in whatever extra CSS I need
208: [22:38:00] <pex__> FrozenFire : i have to think about something like that
209: [22:49:00] * howardgrigg quit (Remote host closed the connection)
210: [22:56:00] * howardgrigg has joined #silverstripe
211: [22:57:00] <pex__> i use Modelamin as CRUD interface, I have two related DO (1:many)
212: [22:57:00] <pex__> mabye You can help me with other problem
213: [22:58:00] <pex__> when i edit object i got Dropdown for relation, but i got indexes there not names
214: [22:58:00] <pex__> how can i change this?
215: [23:01:00] <FrozenFire> new DropdownField("RelationID", "Relation Name", $this->Relation()->map("ID", "Title")->toArray())
216: [23:01:00] <FrozenFire> Alternatively, if you'd just wanting the original interface without defining your own CMSFields, simply change your DataObject::getTitle()
217: [23:02:00] <pex__> ok yes, but where? i have to write GETCMSFields()?
218: [23:02:00] <pex__> now i dont have
219: [23:05:00] <pex__> ok so i simply need GetCMSFields like in SS2.4 right?
220: [23:06:00] <FrozenFire> Yes, usually
221: [23:06:00] <FrozenFire> SS sort of sucks at scaffolding a form from its fields
222: [23:08:00] <pex__> right
223: [23:08:00] <pex__> thanks again
224: [23:44:00] <pex__> FrozenFire: i belive i dont understand it - where have i add getCMSFields function - in class extending ModelAdmin?
225: [23:45:00] <pex__> in normal Page i now how it works but in model admin dont
226: [23:45:00] <FrozenFire> No, you add it to your DataObject
227: [23:46:00] <pex__> i try but i get an error :(
228: [23:47:00] <FrozenFire> Paste it and I can
229: [23:47:00] <pex__> mabye i do it wrong - could you look?
230: [23:48:00] <pex__> i test it on simple DO without relation
231: [23:48:00] <pex__> http://sspaste.com/paste/show/50e375bc110bd
232: [23:48:00] <pex__> i dont know to which tab i have to return it
233: [23:49:00] <FrozenFire> No
234: [23:49:00] <FrozenFire> First and foremost, what the hell is that? :P
235: [23:49:00] <FrozenFire> function GETCMSFields_forPopup() {
236: [23:49:00] <FrozenFire> _forPopup does not exist
237: [23:49:00] <FrozenFire> function getCMSFields() {
238: [23:50:00] <pex__> i tried both method
239: [23:50:00] <FrozenFire> Wait, what are you doing with gridfield?
240: [23:50:00] <pex__> or wait, this was for tests
241: [23:51:00] <pex__> ?
242: [23:51:00] <pex__> ok
243: [23:51:00] <FrozenFire> If you're trying to modify the GridField that displays the results in ModelAdmin, then that's not how.
244: [23:51:00] <FrozenFire> What is your end goal?
245: [23:51:00] <pex__> mabye i explain, i was confuse myself :(
246: [23:51:00] <FrozenFire> I don't even understand what you're trying to do at this point.
247: [23:52:00] <pex__> i try to do two things
248: [23:53:00] <pex__> for now its just dbfield name 'name'
249: [23:53:00] <pex__> first of all change header of grid field column in model admin for managed DO
250: [23:54:00] <pex__> second of all i wish change in item edit dropdownfield like i said before , change mapping from index to Title
251: [23:54:00] <FrozenFire> E.g. public static $field_labels = array("Name" => "MyColumnName");
252: [23:54:00] <FrozenFire> On your DataObject, you would use static $field_labels
253: [23:55:00] <FrozenFire> For that, you would do: public function getCMSFields() { $fields = new FieldList(new TabSet("Root")); $fields->addFieldsToTab("Root.Main", array(new TextField("Name"), new DropdownField("RelationID", "Relation Name", $this->Relation()->map("ID", "Title")->toArray()))); return $fields; }
254: [23:58:00] <pex__> first solution works perfect, i'm trying second one :)
255: [23:59:00] <pex__> so you're saying there is no more _forPopup function?

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