#silverstripe IRC Log

IRC log for 1 March 2014

All timestamps are in UTC.

1: [00:41:53] * willr quit (Quit: willr)
2: [00:47:52] * willr has joined #silverstripe
3: [00:47:53] * willr quit (Client Quit)
4: [01:02:10] * NewLinuxUser is now known as DesignerX
5: [01:03:41] <DesignerX> hi, is it possible to add Models to an existing Model Admin page through extentions ?
6: [01:15:41] <ss23> simon_w|air: I'm hungry, bring me food
7: [01:19:24] * BPower has joined #silverstripe
8: [01:23:06] <simon_w|air> DesignerX, no
9: [01:23:24] * ss23 notes simon_w|air didn't say no to him yet...
10: [01:28:21] <simon_w|air> ss23, well, I'm thinking of getting subway if you want to come along
11: [01:31:05] <ss23> :(
12: [01:31:07] <ss23> I don't wanan go outside
13: [01:31:09] <ss23> haven't showered
14: [01:31:38] <simon_w|air> Nor have I :p
15: [01:31:46] <simon_w|air> Also, you'd need to come to Karori
16: [01:34:25] <ss23> TOO FAR AWAY! :(
17: [01:36:03] * babak quit (Quit: Connection closed for inactivity)
18: [02:01:33] * BPower quit (Remote host closed the connection)
19: [02:02:11] <simon_w|air> No food for you then!
20: [03:12:25] * gelignite quit (Quit: http://bit.ly/nkczDT)
21: [03:53:35] * Joe_______ has joined #silverstripe
22: [04:15:34] * babak has joined #silverstripe
23: [04:19:53] * howardgrigg quit (Remote host closed the connection)
24: [04:28:58] * Joe_______ quit (Ping timeout: 245 seconds)
25: [04:57:12] * cloph has joined #silverstripe
26: [04:57:32] * cloph_away quit (Ping timeout: 252 seconds)
27: [05:20:51] * howardgrigg has joined #silverstripe
28: [05:25:13] * howardgrigg quit (Ping timeout: 240 seconds)
29: [05:30:54] * howardgrigg has joined #silverstripe
30: [05:35:29] * howardgrigg quit (Ping timeout: 252 seconds)
31: [06:02:32] * [lewellyn] quit (Remote host closed the connection)
32: [06:10:57] * SightUnseen has joined #silverstripe
33: [06:11:45] * SightUnseen has left #silverstripe
34: [06:13:08] * lewellyn has joined #silverstripe
35: [06:21:48] * howardgrigg has joined #silverstripe
36: [06:26:05] * howardgrigg quit (Ping timeout: 252 seconds)
37: [07:22:49] * howardgrigg has joined #silverstripe
38: [07:23:38] * howardgr_ has joined #silverstripe
39: [07:23:38] * howardgrigg quit (Read error: Connection reset by peer)
40: [07:28:01] * howardgr_ quit (Ping timeout: 240 seconds)
41: [07:39:56] * howardgrigg has joined #silverstripe
42: [08:52:34] * Shrike_Finland has joined #silverstripe
43: [09:01:52] * Liquide has joined #silverstripe
44: [09:31:42] * Liquide quit ()
45: [10:05:09] * NobrainerWeb has joined #silverstripe
46: [10:05:20] <NobrainerWeb> Hello
47: [10:05:57] <NobrainerWeb> Still looking for help regarding writing a sort order to a many_many relation: http://www.sspaste.com/paste/show/530e55e465c16
48: [10:06:52] <NobrainerWeb> I think it boils down to me not knowing how to get the pageID of the page a DataObject is on in the onBeforeWrite method - any help anyone?
49: [10:15:21] <NobrainerWeb> I have created a paste of the relevant code: http://www.sspaste.com/paste/show/5311afc8e4030
50: [10:18:30] * gelignite has joined #silverstripe
51: [10:32:07] <Zauberfisch> NobrainerWeb: check out the docs of the gridfieldextensions module
52: [10:32:09] <Zauberfisch> https://github.com/ajshort/silverstripe-gridfieldextensions/blob/master/docs/en/index.md#orderable-rows
53: [10:32:19] <Zauberfisch> ajshort has a sort of solution to it
54: [10:32:57] <NobrainerWeb> Zauberfisch: no i don't think so
55: [10:33:07] <NobrainerWeb> Zauberfisch: he has a solution for a has_one relation
56: [10:33:37] <Zauberfisch> not sure
57: [10:35:12] <NobrainerWeb> Zauberfisch: the example he has is for a has_one and works fine. But i need to set the sort order of the DO being written to the amount of DO related to the same page + 1 (i want newly added DO to be added to the bottom of the list)
58: [10:36:48] <NobrainerWeb> Also as far as i can tell the gfextension module enforces the same sort order of many_many data objects across relations :-(
59: [10:39:12] * howardgrigg quit (Remote host closed the connection)
60: [10:39:39] * howardgrigg has joined #silverstripe
61: [10:43:36] * howardgrigg quit (Ping timeout: 240 seconds)
62: [10:56:22] <Zauberfisch> NobrainerWeb: the solution would still work I think
63: [10:56:31] <Zauberfisch> because its +1 of the highest count
64: [10:56:36] <Zauberfisch> so its globaly the last
65: [10:56:46] <Zauberfisch> no, actually
66: [10:56:56] <Zauberfisch> it would always be 1
67: [10:57:08] <Zauberfisch> because Sort is in the many_many_extraField
68: [10:57:11] <Zauberfisch> now I see
69: [10:57:14] <NobrainerWeb> yes
70: [10:57:21] <Zauberfisch> then you would need to query the relation table
71: [10:57:26] <NobrainerWeb> yes
72: [10:57:54] <NobrainerWeb> but i can't find the id of the page that the DO are related to, so i can't count
73: [10:57:55] <Zauberfisch> hmmm
74: [10:58:18] <Zauberfisch> well, with many_many there is no "parent"
75: [10:58:27] <Zauberfisch> because of the nature of many_many
76: [10:58:36] <Zauberfisch> so your aproach will not work out
77: [10:58:45] <NobrainerWeb> how would SS know what ID to add to the relation table then?
78: [10:59:04] <Zauberfisch> it knows on a gridfield level
79: [10:59:09] <Zauberfisch> but not on the record level
80: [10:59:17] <Zauberfisch> so you would need to hook into the gridfield
81: [11:00:01] <NobrainerWeb> any pointers to where i start? i'm totally clueless
82: [11:01:45] <Zauberfisch> have to restart
83: [11:01:47] <Zauberfisch> brb
84: [11:02:09] <NobrainerWeb> ok :-)
85: [11:02:18] <NobrainerWeb> on a PC ;-)?
86: [11:04:00] <Zauberfisch> yeah
87: [11:04:33] <Zauberfisch> would love to run linux on this device, but bloody HP doesn't me to :/
88: [11:05:49] <Zauberfisch> hmmm
89: [11:05:50] <Zauberfisch> so
90: [11:05:58] <Zauberfisch> how would I solve it
91: [11:06:27] <Zauberfisch> are you using the orderable row module from ajshort or from UndefinedOffset?
92: [11:06:32] <NobrainerWeb> i just don't get how the relation table can get the right PageID after save - for that to happen the damn value needs to be there - but where?
93: [11:06:35] <NobrainerWeb> ajshirts
94: [11:06:40] <NobrainerWeb> lol
95: [11:06:43] <Zauberfisch> very good
96: [11:06:45] <NobrainerWeb> ajshorts
97: [11:06:53] <NobrainerWeb> yes, i like the look and feel better
98: [11:07:01] <NobrainerWeb> but the other one actually works
99: [11:07:18] <Zauberfisch> ajshorts module has a better implementation
100: [11:08:08] <NobrainerWeb> maybe - but then again, the damn thing does not handle the initial sort value, and as far as i can tell, it sets the same sort value across many many relations
101: [11:08:26] <NobrainerWeb> but i really wanna go with it
102: [11:08:49] <NobrainerWeb> i use the other stuff from that module and as mentioned before, it looks better
103: [11:09:36] <NobrainerWeb> hmm could i actually use default value ?
104: [11:10:05] * howardgrigg has joined #silverstripe
105: [11:14:37] * howardgrigg quit (Ping timeout: 264 seconds)
106: [11:16:52] <Zauberfisch> I had a briefe look at the source
107: [11:16:59] <Zauberfisch> I can see to possible solutions
108: [11:17:10] <Zauberfisch> but both are a a bit of work
109: [11:19:01] <Zauberfisch> so, option 1:
110: [11:20:20] <Zauberfisch> subclass the GridFieldAddNewButton and the GridFieldAddExistingAutocompleter and overwrite the method that adds the record to the relation
111: [11:20:27] <Zauberfisch> its like this:
112: [11:20:35] <Zauberfisch> $list->add($item);
113: [11:20:38] <Zauberfisch> and you replace that with:
114: [11:22:11] <Zauberfisch> $list->add($item, array('SortOnManyManyRelation' => $list->max('SortOnManyManyRelation') + 1);
115: [11:22:21] <Zauberfisch> option 2:
116: [11:24:12] <Zauberfisch> subclass the GridFieldOrderableRows, and overwite the list "getter", and if items in that list have a sort of 0, set it to count + 1
117: [11:24:24] <Zauberfisch> (actually max + 1 again)
118: [11:25:12] <NobrainerWeb> Zauberfisch: option 1, is that modifying core?
119: [11:26:05] <Zauberfisch> both do not modify the core nor the module
120: [11:26:12] <Zauberfisch> I would never suggest to do that
121: [11:27:26] <NobrainerWeb> i mean, if i go with 2, perhaps it was something that ajshort would update his module with?
122: [11:27:41] <NobrainerWeb> would/could
123: [11:28:45] <NobrainerWeb> Zauberfisch:
124: [11:28:49] <NobrainerWeb> woops
125: [11:29:07] <Zauberfisch> hmmm, I am not sure how well option 2 would work
126: [11:29:12] <Zauberfisch> 1 is "cleaner"
127: [11:29:25] <Zauberfisch> lunch time
128: [11:29:32] <Zauberfisch> be back later
129: [11:30:07] <NobrainerWeb> ok, thank you very much for your time
130: [11:30:09] <NobrainerWeb> :-)
131: [11:30:57] * howardgrigg has joined #silverstripe
132: [12:01:37] <Zauberfisch> hmmm, now that I think about it, it is actually cleaner adding it to the sortable class
133: [12:04:25] <NobrainerWeb> Zauberfisch: Looking at framework/forms/gridfield/GridFieldAddExistingAutocompleter.php i guess i have to modify the getManipulatedData method? But what do i need to look at in framework/forms/gridfield/GridFieldAddNewButton? Or should i actually look into the handleItem of framework/forms/gridfield/GridFieldDetailForm.php?
134: [12:04:51] <NobrainerWeb> Zauberfisch: ok, perhaps i should have look at that then :-)
135: [12:13:25] * NobrainerWeb quit (Quit: NobrainerWeb)
136: [12:14:52] * NobrainerWeb has joined #silverstripe
137: [12:24:41] * DesignerX quit (Ping timeout: 252 seconds)
138: [12:40:16] * NobrainerWeb quit (Quit: NobrainerWeb)
139: [13:58:48] * howardgrigg quit (Remote host closed the connection)
140: [14:56:49] * Shrike_Finland quit (Quit: Leaving.)
141: [14:59:45] * howardgrigg has joined #silverstripe
142: [15:04:28] * howardgrigg quit (Ping timeout: 252 seconds)
143: [15:09:53] * howardgrigg has joined #silverstripe
144: [15:14:00] * Shrike_Finland has joined #silverstripe
145: [15:14:37] * howardgrigg quit (Ping timeout: 264 seconds)
146: [15:35:13] * Shrike_Finland quit (Quit: Leaving.)
147: [15:39:35] * Sj0hn has joined #silverstripe
148: [15:41:00] * howardgrigg has joined #silverstripe
149: [16:16:03] * babak quit (Quit: Connection closed for inactivity)
150: [16:56:28] * howardgrigg quit (Remote host closed the connection)
151: [16:56:54] * howardgrigg has joined #silverstripe
152: [17:01:25] * howardgrigg quit (Ping timeout: 264 seconds)
153: [17:14:06] * why has joined #silverstripe
154: [17:14:11] <why> hi all
155: [17:14:30] * why is now known as Guest36392
156: [17:15:28] <Guest36392> Short question: I've two DataoObjects: Course and Person. Course has_many Persons and Person has_one Course. Now set return canEdit false for Coures. In the ModelAdmin I see Course-Values as read only but the Perons entries are empty
157: [17:15:30] <Guest36392> any clue why ?
158: [17:27:21] * howardgrigg has joined #silverstripe
159: [17:31:54] * howardgrigg quit (Ping timeout: 252 seconds)
160: [18:07:25] * howardgrigg has joined #silverstripe
161: [18:12:04] * howardgrigg quit (Ping timeout: 252 seconds)
162: [18:13:58] * Guest36392 quit (Ping timeout: 245 seconds)
163: [18:23:00] * bubaphex has joined #silverstripe
164: [18:37:12] * bubaphex quit (Ping timeout: 240 seconds)
165: [18:38:38] * howardgrigg has joined #silverstripe
166: [18:49:39] * bubaphex has joined #silverstripe
167: [19:09:37] * babak has joined #silverstripe
168: [19:25:04] * guzzlefry has joined #silverstripe
169: [19:54:00] * howardgrigg quit (Remote host closed the connection)
170: [19:54:27] * howardgrigg has joined #silverstripe
171: [19:57:11] * rdemidov has joined #silverstripe
172: [19:58:25] * howardgrigg quit (Ping timeout: 240 seconds)
173: [20:04:18] * rdemidov quit (Ping timeout: 252 seconds)
174: [20:12:00] * bubaphex quit (Ping timeout: 252 seconds)
175: [20:21:30] * NobrainerWeb has joined #silverstripe
176: [20:24:52] * bubaphex has joined #silverstripe
177: [20:27:56] * howardgrigg has joined #silverstripe
178: [20:28:18] * NobrainerWeb quit (Quit: NobrainerWeb)
179: [20:32:01] * howardgrigg quit (Ping timeout: 240 seconds)
180: [20:45:31] * NobrainerWeb has joined #silverstripe
181: [21:02:04] * NobrainerWeb quit (Quit: NobrainerWeb)
182: [21:04:57] * howardgrigg has joined #silverstripe
183: [21:08:01] * bubaphex quit (Ping timeout: 264 seconds)
184: [21:09:13] * howardgrigg quit (Ping timeout: 252 seconds)
185: [21:22:52] * DesignerX has joined #silverstripe
186: [21:24:55] * SightUnseen has joined #silverstripe
187: [21:25:36] * SightUnseen has left #silverstripe
188: [21:35:45] * howardgrigg has joined #silverstripe
189: [21:58:03] * willr has joined #silverstripe
190: [22:35:18] * joshkosmala has joined #silverstripe
191: [22:37:22] <joshkosmala> trying to get SS3 up and running on Mavericks. Have either some permission/ownership or AllowOverride problems. Who has a native amp stack running on a fresh 10.9 install (phpMyAdmin, mySQL working fine... SilverStripe files are in ~/Sites/silverstripe directory and can be seen in file browser, but I can not see them when browsing localhost) TY
192: [22:38:56] <willr> Joshy.. DocumentRoot is set to your Sites folder ?
193: [22:39:10] <willr> check your httpd.conf file
194: [22:39:32] <joshkosmala> DocumentRoot "/Users/joshkosmala/Sites"
195: [22:40:44] <willr> If you're trying to use the built in stuff http://osxdaily.com/2012/09/02/start-apache-web-server-mac-os-x/ might help
196: [22:42:26] <joshkosmala> Shot. I used http://coolestguidesontheplanet.com/get-apache-mysql-php-phpmyadmin-working-osx-10-9-mavericks/
197: [22:42:44] <joshkosmala> Snippets of httpd.conf: http://pastie.org/8815762
198: [22:42:56] <joshkosmala> Will look at that tut now
199: [22:43:59] <joshkosmala> If I create a new dir in Finder, I can browse it, but using composer or .zip to install SS is invisible
200: [22:44:31] <joshkosmala> Could you please confirm permissions for a ~/Sites folder? All it's children are _www:_www and 755
201: [22:45:34] <willr> Yeah folders should be 755/ files 644 I do believe
202: [22:51:02] <willr> Files will also not be shown if Directory listing is turned off
203: [23:00:23] <joshkosmala> willr you are the bomb
204: [23:00:50] <joshkosmala> I had started looking in to your suggestion but didn't realise FollowSymLinks was "Directory listing"
205: [23:01:10] <joshkosmala> 12 hours later, amp stack is running through composer. Yayah. Shot!
206: [23:07:58] <willr> good shit. Yeah I don't use the inbuilt stuff myself, all homebrew packages
207: [23:19:52] * willr quit (Quit: willr)
208: [23:26:45] * joshkosmala quit (Quit: joshkosmala)
209: [23:36:47] * joshkosmala has joined #silverstripe
210: [23:42:59] * DimiStripe quit (Quit: Page closed)
211: [23:54:06] * joshkosmala quit (Quit: joshkosmala)

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