#silverstripe IRC Log

IRC log for 1 January 2015

All timestamps are in UTC.

1: [00:19:51] * jrthomer_ quit (Quit: Leaving...)
2: [00:22:20] * simon__w is now known as simon_w
3: [00:48:12] * hailwood quit (Remote host closed the connection)
4: [00:55:28] * Kingy is now known as Kingy[a]
5: [00:56:28] * UncleCheese has joined #silverstripe
6: [01:20:58] * jenniferaslan quit (Quit: jenniferaslan has left the room)
7: [01:40:22] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
8: [02:29:51] * spronk2 has joined #silverstripe
9: [02:47:57] * spronk2 quit (Quit: I may need a longer sleep timer...)
10: [04:14:09] * cloph_away has joined #silverstripe
11: [04:14:17] * cloph quit (Ping timeout: 240 seconds)
12: [04:21:29] * jrthomer has joined #silverstripe
13: [06:24:40] * Kingy[a] is now known as Kingy
14: [06:38:03] * Kingy is now known as Kingy[a]
15: [07:06:42] * keroberros is now known as gtfo-hmirr
16: [07:34:14] * gtfo-hmirr is now known as tmro
17: [08:32:18] * UncleCheese has joined #silverstripe
18: [09:04:08] * Azure quit (Quit: My MBP went to sleep.)
19: [10:31:50] * r_hector has joined #silverstripe
20: [10:36:21] * gt86jay has joined #silverstripe
21: [10:37:17] <gt86jay> Hi, i'm having some difficulty with Model Admin stuff and SummaryFields
22: [10:37:22] <gt86jay> Can anyone help here?
23: [10:37:57] <ezero> whats up gt86jay
24: [10:38:01] <gt86jay> I've got public static $summary_fields = array( 'ModelFamily.Manufacture.Name', 'ModelFamily.Name', 'Name' );
25: [10:38:35] <gt86jay> However on that model admin page the link existing is trying to then search based on those summary fields. But obviously ModelFamily.Name isn't actually a column name in the Database.
26: [10:39:00] <ezero> create a method called Name() on ModelFamily ?
27: [10:40:25] <gt86jay> So i've got a model admin called 'Cars' Then 3 data objects. The ModelAdmin is working as expected with the summary fields showing the model names and manufacture names. The problem being I end up with the error...
28: [10:40:34] <gt86jay> 20 Unknown column 'ModelFamily.Manufacture.Name' in 'field list' - When searching in Link Exsisting
29: [10:41:53] <ezero> when do u get that error?
30: [10:42:02] <ezero> ModelFamily has_one Manufacturer ?
31: [10:42:55] <gt86jay> I get the error when literally starting to type in the Link Existing field. So it's trying to do the search to populate the dropdown.... My model is ...
32: [10:43:07] <gt86jay> ModelFamily has_one manufacture
33: [10:43:17] <gt86jay> ModelFamily has_many Models
34: [10:43:18] <ezero> i see
35: [10:43:59] <gt86jay> all is working fine for the model point of view, and all the summary fields work fine. It's just this link_existing field that's not working as expected.
36: [10:44:09] <ezero> so Manufacturer has a Name field tho right?
37: [10:44:17] <gt86jay> Yeah,
38: [10:44:23] <gt86jay> $db
39: [10:45:48] <ezero> thats really strange
40: [10:46:17] <ezero> im curious what would happen if you did create a method called Name() on Manufacturer class
41: [10:46:32] <ezero> and return $this->Name;
42: [10:47:23] <gt86jay> I'm just setting up a pastebin with the models in....
43: [10:47:32] <ezero> also LinkExisting works fine if you take away ModelFamily.Manufacture.Name from the $summary_fields
44: [10:47:51] <gt86jay> http://pastebin.com/3e2KQGCH
45: [10:48:11] <gt86jay> Yeah Link exsisting was working fine without doing any ModelFamily.Manufacture.Name and only using summary fields on that one model.
46: [10:48:26] <gt86jay> The error seems to be when trying to use summary fields that are of a relationship rather than a db field
47: [10:50:04] <ezero> there is another way around it
48: [10:50:10] <ezero> what you can do is
49: [10:50:44] <ezero> 'ModelFamily.GetManufactureName' add that to the summary_fields and remove ModelFamily.Manufacturer.Name
50: [10:50:48] <ezero> then write a method inside
51: [10:50:51] <ezero> ModelFamily
52: [10:51:05] <ezero> that returns the Name of the relationship
53: [10:51:54] <gt86jay> Yeah I see. I'll give it a go. Thanks for the help.
54: [10:52:13] <gt86jay> It seems odd that you can use stuff like Manufacture.Name on the summary field, but then it breaks the link-existing field
55: [10:52:30] <ezero> it is odd yes
56: [10:52:38] <ezero> im sorry im not being much help but just thinking out loud
57: [10:53:14] <gt86jay> Sure. No problem. I'd kinda got to a lost end with it myself. I might pop it on the support forums and see what people say. Might actually be a bug in the way SS handles the link-field
58: [10:53:56] <ezero> it very much sounds like it!
59: [10:54:17] <ezero> unless both of us are not very familiar with how summary_fields work
60: [10:54:39] <ezero> in terms of ORM and how deep relationships it supports
61: [10:55:32] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
62: [10:55:53] <gt86jay> Yeah, I'm not sure how it all works from the core point of view. But IMO if it seems to work, and the physical fronted looks right and no errors are thrown. Then i'd expect the other stuff around it to work.
63: [10:56:13] <gt86jay> If summary fields with scaffolded names breaks something it should just throw an error all together. Rather than look like it works.
64: [10:58:55] <ezero> yeah
65: [10:58:59] <ezero> maybe using the word Model :P
66: [10:59:02] <ezero> inside the class names
67: [10:59:16] <gt86jay> Ahh that's a fair point. Might be a reserved word or something
68: [11:00:42] <ezero> yea
69: [11:01:19] <ezero> although it would be horribly broken if that was the case i'd think
70: [11:04:10] <gt86jay> Yeah, This half works, which is what's so annoying. From a UX point of view it works. The summary fields work, it lists the data. Just the Link-Existing field tries to do a search on the summary fields which aren't there in the database.
71: [11:05:21] <gt86jay> It seems to be a problem going up 2 levels.
72: [11:05:27] <gt86jay> ModelName.Name works fine.
73: [11:05:30] <ezero> yeah must be
74: [11:05:32] <gt86jay> ModelName.Manufacture.Name doesn't
75: [11:05:32] <ezero> thats what i thought
76: [11:05:35] <ezero> maybe create a method
77: [11:05:48] <gt86jay> Yeah no working on that now. Just thought i'd try and find at which point breaks it.
78: [11:05:54] <gt86jay> now*
79: [11:10:10] <gt86jay> So once i've made the method in ModelFamily how do I then set that as a Summary Field?
80: [11:10:15] <gt86jay> summary field seems to want string values
81: [11:37:23] * babak quit (Quit: Connection closed for inactivity)
82: [11:41:49] * gt86jay quit (Ping timeout: 246 seconds)
83: [12:06:23] * toddmorey quit (Ping timeout: 240 seconds)
84: [12:31:45] * r_hector quit (Quit: Leaving.)
85: [13:41:52] * gelignite has joined #silverstripe
86: [13:54:22] * SomeNickUsedByMe has joined #silverstripe
87: [13:55:32] <SomeNickUsedByMe> Hello one question, i have an Integer Variable which i want to put in the template inside a style="", thats no problem but I want to add "px" directly to the number, how can i do that
88: [13:59:17] <SomeNickUsedByMe> Ok I could make a text field, but then the user can input invalid values
89: [14:01:01] <SomeNickUsedByMe> got it: {$variable}px
90: [14:45:19] <nontgor> SomeNickUsedByMe: Have come across that one before and that is the solution :)
91: [14:56:00] * Azure has joined #silverstripe
92: [15:19:38] * DimiStripe has joined #silverstripe
93: [16:22:07] * cloph_away quit (Remote host closed the connection)
94: [16:25:59] * cloph_away has joined #silverstripe
95: [16:29:22] * jayashleysmith has joined #silverstripe
96: [16:30:22] <jayashleysmith> I need some help with routing.
97: [16:30:36] <jayashleysmith> I want a URL of /something/ID/OtherID
98: [16:30:46] <jayashleysmith> But My $Action I don't want to show in the URL
99: [16:30:58] <jayashleysmith> for example my route is 'parts//$Action/$CarURL/$PartURL': 'Product_Controller'
100: [16:31:10] <jayashleysmith> but I want my URL to be /parts/CarURL/PartURL
101: [16:31:22] <jayashleysmith> as it'll be more friendly. Is this possible?
102: [16:46:19] * jayashleysmith quit (Ping timeout: 246 seconds)
103: [16:48:58] * Uitto has left #silverstripe
104: [17:02:19] * DimiStripe quit (Quit: DimiStripe)
105: [17:16:48] * Azure quit (Quit: My MBP went to sleep.)
106: [17:30:56] <SomeNickUsedByMe> Hmm sometimes I wonder if it's worth the extra work to support Non-JS Browsers/Users
107: [18:12:19] * oetiker_ has joined #silverstripe
108: [18:12:55] * oetiker_ quit (Read error: Connection reset by peer)
109: [18:43:07] * Shrike_Finland has joined #silverstripe
110: [19:29:16] * catcher has joined #silverstripe
111: [19:30:26] * catcher quit (Client Quit)
112: [19:31:08] * Snowman23 is now known as ss23
113: [20:30:24] * lerni_ has joined #silverstripe
114: [20:41:35] * lerni_ quit ()
115: [20:53:11] * DimiStripe has joined #silverstripe
116: [21:47:05] * jayashleysmith has joined #silverstripe
117: [21:47:07] <jayashleysmith> How can I now set Page Title
118: [21:47:13] <jayashleysmith> From a controller?
119: [21:47:27] <jayashleysmith> I want to set a dynamic page title based on some controller logic.
120: [21:47:40] <jayashleysmith> something like $this->setTitle = "Page Title"
121: [21:48:11] * babak has joined #silverstripe
122: [21:49:32] * SomeNickUsedByMe quit (Quit: Leaving)
123: [21:52:51] * Shrike_Finland quit (Quit: Leaving.)
124: [21:59:47] * cloph has joined #silverstripe
125: [22:00:51] * Kolin_ has joined #silverstripe
126: [22:01:07] * discorpia has joined #silverstripe
127: [22:03:14] * Kingy^ has joined #silverstripe
128: [22:05:45] * cloph_away quit (Ping timeout: 256 seconds)
129: [22:05:46] * Kingy[a] quit (Ping timeout: 256 seconds)
130: [22:05:47] * Kolin quit (Ping timeout: 256 seconds)
131: [22:05:47] * discorpi1 quit (Ping timeout: 256 seconds)
132: [22:05:48] * Eliseth quit (Ping timeout: 256 seconds)
133: [22:08:40] * jayashleysmith quit (Ping timeout: 246 seconds)
134: [22:23:04] * UncleCheese has joined #silverstripe
135: [22:32:03] * Azure has joined #silverstripe
136: [22:55:27] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
137: [23:03:21] * Azure quit (Quit: My MBP went to sleep.)
138: [23:06:12] * UncleCheese has joined #silverstripe
139: [23:08:42] <simon_w|work> Sigh, debugging a DoS is a pain
140: [23:16:15] * Azure has joined #silverstripe
141: [23:59:44] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)

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