#silverstripe IRC Log

IRC log for 29 April 2013

All timestamps are in UTC.

1: [00:01:00] * chillu quit (Quit: chillu)
2: [00:23:00] <Pyromanik> <?php function _1554452717($i){$a=Array('VVRGL'.'Tg=',''.'V'.'VRG'.'LT ... etc
3: [00:29:00] <OldTom> that's a new one on me
4: [00:30:00] <OldTom> usually unserialize(base64_decode(...))
5: [00:56:00] * timsnadden_ quit (Ping timeout: 245 seconds)
6: [00:56:00] * Colin[pi] has joined #silverstripe
7: [01:00:00] * timsnadden_ has joined #silverstripe
8: [01:07:00] <Pyromanik> OldTom: lots of that in there
9: [01:24:00] * robert_ quit (Changing host)
10: [01:24:00] * robert_ has joined #silverstripe
11: [01:24:00] * robert_ has joined #silverstripe
12: [01:32:00] <unsignedint> which makes it impossible to install any of the ecommerce modules
13: [01:32:00] <unsignedint> Another quick question: How come silverstripe/payment 0.3 isnt available on packagist.org anymore? Both ecommerce modules depend on it (0.3) and theres definitely a branch for it in the git repository
14: [01:32:00] * robert_ has left #silverstripe
15: [01:32:00] <unsignedint> packagist is only showing 0.4+
16: [01:35:00] <unsignedint> oh, im guessing its because theres no composer.json in the 0.3 branch. why do the ecommerce modules reference it when it could never have worked?
17: [01:40:00] * priithansen quit (Quit: priithansen)
18: [01:47:00] * timsnadden_ quit (Quit: timsnadden_)
19: [01:52:00] * gelignite quit (Quit: http://bit.ly/nkczDT)
20: [02:38:00] * mobiusnz quit (Quit: Leaving.)
21: [03:26:00] * SightUnseen has joined #silverstripe
22: [03:26:00] * SightUnseen has left #silverstripe
23: [03:40:00] * Colin[pi] quit (Ping timeout: 258 seconds)
24: [03:47:00] * cloph_away1 has joined #silverstripe
25: [03:48:00] * cloph_away quit (Ping timeout: 245 seconds)
26: [03:53:00] * timsnadden has joined #silverstripe
27: [04:12:00] * timsnadden quit (Quit: timsnadden)
28: [04:44:00] * henkpoley has joined #silverstripe
29: [04:50:00] * Pyromanik quit (Quit: leaving)
30: [05:00:00] * Zauberfisch|idle quit (Read error: Connection reset by peer)
31: [05:01:00] * Zauberfisch|idle has joined #silverstripe
32: [05:25:00] * willr_ quit (Quit: willr_)
33: [05:28:00] <simon_w> unsignedint, if you're using 2.4, I strongly recommend against trying to using composer, especially for modules
34: [05:28:00] * mobiusnz has joined #silverstripe
35: [05:38:00] * wmk has joined #silverstripe
36: [05:51:00] * Shrike_Finland quit (Quit: Leaving.)
37: [06:11:00] * MrGuits has joined #silverstripe
38: [06:11:00] * Guits quit (Read error: Connection reset by peer)
39: [06:17:00] * maknz has joined #silverstripe
40: [06:17:00] * maknz quit (Changing host)
41: [06:17:00] * maknz has joined #silverstripe
42: [06:18:00] * guci0 has joined #silverstripe
43: [06:31:00] * zfmf has joined #silverstripe
44: [06:36:00] * chillu has joined #silverstripe
45: [06:50:00] * Liquide quit ()
46: [06:53:00] * Colin[pi] has joined #silverstripe
47: [07:02:00] * Shrike_Finland has joined #silverstripe
48: [07:03:00] * mobiusnz quit (Quit: Leaving.)
49: [07:09:00] * SightUnseen has joined #silverstripe
50: [07:11:00] * SightUnseen has left #silverstripe
51: [07:13:00] * howardgrigg has joined #silverstripe
52: [07:14:00] * Zauberfisch|idle quit (Ping timeout: 246 seconds)
53: [07:17:00] * Zauberfisch|idle has joined #silverstripe
54: [07:19:00] * mobiusnz has joined #silverstripe
55: [07:26:00] * SightUnseen has joined #silverstripe
56: [07:27:00] * SightUnseen has left #silverstripe
57: [07:31:00] * Zauberfisch quit (Remote host closed the connection)
58: [07:39:00] * osterlaus has joined #silverstripe
59: [07:40:00] * NobrainerWeb has joined #silverstripe
60: [07:40:00] * NobrainerWeb quit (Client Quit)
61: [07:40:00] * NobrainerWeb has joined #silverstripe
62: [07:41:00] <NobrainerWeb> Hi :-) How do i get the currently selected themes directory from PHP?
63: [07:44:00] * travis-ci has joined #silverstripe
64: [07:44:00] <travis-ci> [travis-ci] silverstripe/sapphire#2094 (3.1 - 5ca9db5 : Ingo Schommer): The build passed.
65: [07:44:00] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/sapphire/compare/8f6451612b9d...5ca9db5e5e53
66: [07:44:00] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/sapphire/builds/6719670
67: [07:44:00] * travis-ci has left #silverstripe
68: [07:47:00] * SticksM quit (Read error: Connection reset by peer)
69: [07:54:00] * Zauberfisch has joined #silverstripe
70: [07:58:00] * waveydave has joined #silverstripe
71: [07:58:00] <mursal> Hi
72: [07:58:00] * mursal has joined #silverstripe
73: [07:59:00] * osterlaus quit (Quit: Leaving.)
74: [08:00:00] * g4b0 has joined #silverstripe
75: [08:01:00] * mursal quit (Client Quit)
76: [08:02:00] * gelignite has joined #silverstripe
77: [08:02:00] * Zauberfisch quit (Read error: Connection reset by peer)
78: [08:03:00] * Zauberfisch has joined #silverstripe
79: [08:04:00] * henkpoley quit (Quit: henkpoley)
80: [08:06:00] * popeshoe has joined #silverstripe
81: [08:08:00] <travis-ci> [travis-ci] silverstripe/silverstripe-cms#344 (master - c0302bc : Ingo Schommer): The build has errored.
82: [08:08:00] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/silverstripe-cms/compare/2227ed3629fb...c0302bc24d84
83: [08:08:00] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/silverstripe-cms/builds/6720179
84: [08:08:00] * travis-ci has left #silverstripe
85: [08:08:00] * travis-ci has joined #silverstripe
86: [08:11:00] <g4b0> how can I add a javascript file in backend through LeftAndMain extra_requirements_javascript ?
87: [08:15:00] <travis-ci> [travis-ci] silverstripe/sapphire#2095 (master - 8f3c0b5 : Ingo Schommer): The build passed.
88: [08:15:00] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/sapphire/compare/2e227ef6ec2f...8f3c0b57ba8c
89: [08:15:00] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/sapphire/builds/6720191
90: [08:15:00] * travis-ci has left #silverstripe
91: [08:15:00] <NobrainerWeb> g4b0: i just looked in the sortablegridfield module, he does the following: Requirements::javascript(SORTABLE_GRIDFIELD_BASE . '/javascript/GridFieldSortableRows.js');
92: [08:15:00] <NobrainerWeb> Perhaps you can figure it out by looking into his code
93: [08:15:00] * travis-ci has joined #silverstripe
94: [08:16:00] <NobrainerWeb> Anyone? How do i get the currently selected themes directory from PHP?
95: [08:18:00] * priithansen has joined #silverstripe
96: [08:24:00] * howardgrigg quit (Remote host closed the connection)
97: [08:25:00] <g4b0> thanks NobrainerWeb
98: [08:27:00] <g4b0> but I think that's the old way
99: [08:28:00] <Zauberfisch> NobrainerWeb $this->ThemeDir()
100: [08:29:00] <NobrainerWeb> Zauberfisch: I tried, but it always just gives me "mysite"
101: [08:29:00] <NobrainerWeb> I have in the siteconfig, do i need to set it in the _config? i will try
102: [08:29:00] <Zauberfisch> or if themes are disabled
103: [08:29:00] <Zauberfisch> it rethruns mysite if no theme is set
104: [08:29:00] <Zauberfisch> NobrainerWeb could it be that this is because you have not selected a theme at all?
105: [08:29:00] <Zauberfisch> this method is available on any object that extends ViewableData
106: [08:30:00] <Zauberfisch> NobrainerWeb it should also work via siteconfig, if it doesn't, I think its a bug
107: [08:31:00] * travis-ci has left #silverstripe
108: [08:31:00] <travis-ci> [travis-ci] silverstripe/sapphire#2096 (3.1 - 36855b8 : Will Rossiter): The build passed.
109: [08:31:00] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/sapphire/compare/5ca9db5e5e53...36855b89e064
110: [08:31:00] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/sapphire/builds/6720610
111: [08:31:00] * travis-ci has joined #silverstripe
112: [08:42:00] <NobrainerWeb> Zauberfisch: I have "simple" set in both siteconfig and _config but i still just get "mysite".
113: [08:43:00] <Zauberfisch> NobrainerWeb how are you setting it?
114: [08:43:00] <Zauberfisch> and what ss version are you using?
115: [08:45:00] * henkpoley has joined #silverstripe
116: [08:45:00] <NobrainerWeb> Where do i get the version number?
117: [08:45:00] <NobrainerWeb> I think it's 3.0.5
118: [08:45:00] <NobrainerWeb> SSViewer::set_theme('simple');
119: [08:46:00] <NobrainerWeb> i downloaded from silverstripe.org a few days ago
120: [08:47:00] <Zauberfisch> hmmm
121: [08:48:00] <Zauberfisch> yes, it should be 3.0.5
122: [08:48:00] <NobrainerWeb> Ok, i guess it's a bug then
123: [08:48:00] <Zauberfisch> yeah, sounds like it
124: [08:48:00] <Zauberfisch> no idea than
125: [08:49:00] <Zauberfisch> so everything changed there
126: [08:49:00] <Zauberfisch> in 3.1 which is in beta now, the current theme is stored in config rather than in SSViewer
127: [08:49:00] <Zauberfisch> but there is no point in submitting a bug report for it if you ask me
128: [08:53:00] * silverstripehoor has joined #silverstripe
129: [08:53:00] <NobrainerWeb> ok, i will wait and see what happens
130: [08:53:00] <NobrainerWeb> Perhaps i should test with 3.1 then
131: [08:54:00] <NobrainerWeb> Creating a module, so damn happy about the result :o) Now i just need to move hardcoded stuff and such
132: [08:55:00] <NobrainerWeb> Next step, learning how to share the stuff via github
133: [08:59:00] <Zauberfisch> NobrainerWeb building a module?
134: [09:00:00] <NobrainerWeb> ahh ok
135: [09:00:00] <Zauberfisch> and modules most modules that work in 3.0 do not work in 3.1
136: [09:00:00] <NobrainerWeb> Yes, simple one though but very usefull
137: [09:00:00] <Zauberfisch> you should certainly use 3.1, because from 3.0.5 to 3.1 a lot changes
138: [09:00:00] <Zauberfisch> so if you write the module from start for 3.1 you save yourself the migration work
139: [09:00:00] <NobrainerWeb> Will test asap
140: [09:01:00] <NobrainerWeb> even on my local machine ss3 is very slow
141: [09:01:00] <Zauberfisch> there is 1 problem, for most modules its not possible to have it compatible with 3.1 and 3.0
142: [09:01:00] <NobrainerWeb> will do, not done any project in ss 3 yet since i have had many problems with install and performance
143: [09:02:00] <NobrainerWeb> Thanks for info :-)
144: [09:02:00] <Zauberfisch> and I think, 3.0 is at least as buggy as 3.1, so I use 3.1 because it has more features
145: [09:03:00] <Zauberfisch> alright, have to go, cya later
146: [09:03:00] * Zauberfisch quit (Remote host closed the connection)
147: [09:05:00] * silverstripehoor quit (Ping timeout: 245 seconds)
148: [09:06:00] * Silverstripe has joined #silverstripe
149: [09:07:00] <NobrainerWeb> There is no problem with the ThemDir function, it's just that i tried to use it in a wrong context
150: [09:11:00] <Silverstripe> good day (or for new zealand good night :) ): I want only the UNIQUE (DISTINCT) result of the datamodels get() function. Is there a build in Silverstripe function for that? (or do I have to use SQL Query instead?)
151: [09:12:00] <Silverstripe> *...actually what I want is to group on the value of a column)
152: [09:15:00] * WillM is now known as willmorgan
153: [09:15:00] * WillM has joined #silverstripe
154: [09:18:00] * willmorgan is now known as WillM
155: [09:19:00] * WillM is now known as willmorgan
156: [09:19:00] * gelignite quit (Quit: http://bit.ly/nkczDT)
157: [09:21:00] <zfmf> when i have has_many on a dataextension did i need has_one on the childclass?
158: [09:21:00] <willmorgan> hey chillu, despite the build error (github timeout) do you have any thoughts on this fix to your cms issue? https://github.com/silverstripe/sapphire/pull/1814
159: [09:22:00] <willmorgan> beauty
160: [09:22:00] <chillu> I'm just working on the GH timeout actually, getting us set up with oath tokens in travis
161: [09:23:00] * mobiusnz quit (Quit: Leaving.)
162: [09:23:00] <willmorgan> zfmf: can you paste code?
163: [09:23:00] <willmorgan> at pastebin or smth
164: [09:25:00] <zfmf> http://www.sspaste.com/paste/show/517e3c8b72784
165: [09:29:00] <zfmf> 3
166: [09:29:00] <zfmf> ^^
167: [09:29:00] <zfmf> not classess tables :)
168: [09:29:00] <willmorgan> zfmf: and is this version 2.4 or 3.0?
169: [09:29:00] <zfmf> ok on many_many i dont have to add belongs_many_many to the child class its generating the classes , but on has_many nothing changes on the database
170: [09:30:00] <willmorgan> zfmf: use extraStatics in your DataExtension
171: [09:30:00] <willmorgan> http://api.silverstripe.org/3.0/source-class-DataExtension.html#119-133
172: [09:31:00] <willmorgan> it relies on has_one for the extra column that makes the function work
173: [09:31:00] <willmorgan> has_many doesn't actually do anything to the schema builder, it just provides an extra method on the class to access the relationship based on the table/relationship naming convention
174: [09:32:00] <Silverstripe> nobody used DISTINCT in datamodel results?
175: [09:32:00] <willmorgan> likewise for belongs_many_many - it just looks up the many_many relation and then gets the reverse
176: [09:32:00] <willmorgan> hopefully that helps?
177: [09:34:00] <zfmf> willmorgan: ok thanks
178: [09:34:00] * howardgrigg has joined #silverstripe
179: [09:39:00] * howardgrigg quit (Ping timeout: 264 seconds)
180: [09:40:00] * zfmf quit (Read error: Connection reset by peer)
181: [09:40:00] * zfmf has joined #silverstripe
182: [09:58:00] * henkpoley quit (Quit: henkpoley)
183: [10:04:00] * dangerdan has joined #silverstripe
184: [10:05:00] <dangerdan> was working fine moments ago, i've updated the site and run a /dev/build, now it doesnt work :\
185: [10:05:00] <dangerdan> where do i begin debugging if BasicAuth::protect_entire_site() stops working?
186: [10:07:00] * robert___ has joined #silverstripe
187: [10:09:00] * Silverstripe quit (Ping timeout: 245 seconds)
188: [10:11:00] * howardgrigg has joined #silverstripe
189: [10:13:00] * mobiusnz has joined #silverstripe
190: [10:15:00] * howardgrigg quit (Ping timeout: 256 seconds)
191: [10:22:00] * kinglozzer has joined #silverstripe
192: [10:23:00] * mobiusnz quit (Read error: No route to host)
193: [10:36:00] * dangerdan quit (Ping timeout: 245 seconds)
194: [10:37:00] * robert___ has left #silverstripe
195: [10:49:00] * mobiusnz has joined #silverstripe
196: [10:56:00] * mobiusnz quit (Ping timeout: 258 seconds)
197: [11:18:00] * henkpoley has joined #silverstripe
198: [11:23:00] * henkpoley quit (Ping timeout: 256 seconds)
199: [12:11:00] * howardgrigg has joined #silverstripe
200: [12:16:00] * howardgrigg quit (Ping timeout: 272 seconds)
201: [12:21:00] * Zauberfisch has joined #silverstripe
202: [12:25:00] * Colin[pi] quit (Ping timeout: 276 seconds)
203: [12:25:00] * howardgrigg has joined #silverstripe
204: [12:29:00] * howardgrigg quit (Ping timeout: 255 seconds)
205: [12:40:00] * NobrainerWeb quit (Quit: NobrainerWeb)
206: [12:44:00] * jrthomer has joined #silverstripe
207: [12:59:00] * UncleCheese has joined #silverstripe
208: [13:01:00] * waveydave quit (Read error: Operation timed out)
209: [13:08:00] * feejin has joined #silverstripe
210: [13:19:00] * Shrike_Finland quit (Quit: Leaving.)
211: [13:25:00] * lx-berlin_ has joined #silverstripe
212: [13:38:00] * lx-berlin_ has left #silverstripe
213: [13:43:00] * gelignite has joined #silverstripe
214: [14:00:00] * OldTom is now known as OldTomBarman
215: [14:06:00] * DesignerX has joined #silverstripe
216: [14:07:00] <DesignerX> hi guys.. If I created a basic functioin & I think it should be added to the code of SS, what should I do ? and where can i ask for features ?
217: [14:09:00] <feejin> There's a Google group for core development, probably in there
218: [14:16:00] * osterlaus has joined #silverstripe
219: [14:43:00] * henkpoley has joined #silverstripe
220: [14:43:00] * osterlaus has left #silverstripe
221: [14:44:00] * henkpoley quit (Read error: Connection reset by peer)
222: [14:45:00] * henkpoley has joined #silverstripe
223: [14:48:00] * henkpoley quit (Client Quit)
224: [14:53:00] * guci0 quit (Ping timeout: 245 seconds)
225: [14:59:00] * UncleCheese quit (Quit: UncleCheese)
226: [15:03:00] * UncleCheese has joined #silverstripe
227: [15:17:00] * feejin quit (Remote host closed the connection)
228: [15:18:00] <willmorgan> DesignerX: what is it?
229: [15:18:00] <Zauberfisch> DesignerX talking about features and implementing them is done in the google mailing list
230: [15:19:00] <Zauberfisch> DesignerX bug reports can be done on github
231: [15:19:00] <Zauberfisch> DesignerX but there is already a thing for MaxHeight+MaxWidth
232: [15:19:00] <Zauberfisch> changing the code can be done by forking on github and then submitting a pull request
233: [15:19:00] <DesignerX> willmorgan: few things, like MaxHeight & MaxWidht on images, & a way to get all templates from a specific path (other then Main & Layout templates )
234: [15:19:00] <willmorgan> hmm
235: [15:19:00] <willmorgan> do you have your code up as a fork on github?
236: [15:20:00] <Zauberfisch> RatioSize(200,200) will make it 200,200 if possible, but if its 100,50 it will scale it to 200,100
237: [15:20:00] <Zauberfisch> sort of
238: [15:20:00] <Zauberfisch> so it keeps the images ratio
239: [15:21:00] <Zauberfisch> you don't need the github client
240: [15:21:00] <DesignerX> nah .. still havnt got GitHub to work on windows , may run it in a Linux VM but need to work on file permisstions when sharing the folders from windows to linux VM
241: [15:21:00] <Zauberfisch> DesignerX git on windows should be rather easy
242: [15:21:00] <Zauberfisch> you can just use msysgit
243: [15:22:00] <Zauberfisch> http://msysgit.github.io/
244: [15:24:00] <DesignerX> kk I will be sure to check it out .. I also worked something to set & check for "Unique Fields" on an object, so no 2 object can have the same value for the set fields.. not sure if this should be added too
245: [15:25:00] <Zauberfisch> DesignerX but there are very strict rules regarding adding code to code
246: [15:26:00] <Zauberfisch> you need to follow the silverstripe coding conventions
247: [15:26:00] <Zauberfisch> otherwise your code will not be accepted, they try to keep silverstripe as clean as possible
248: [15:26:00] <Zauberfisch> there needs to be a valid use case for your code
249: [15:26:00] <Zauberfisch> there need to be unit tests for your code
250: [15:27:00] <DesignerX> my code is not that advance , its small function that I think could be part of the CMS, I will check the docs & see what needs to be done
251: [15:27:00] <Zauberfisch> and they don't want to add features that might not be used
252: [15:29:00] <DesignerX> also, I need an advice on publising code/modules : I have decorated DataObject & few other core classes (with very small amount of code ) & my modules & projects use these extra code. but when it comes to publising & sharing my code , should I expect others to decorate core classes too?
253: [15:46:00] <Zauberfisch> that depends
254: [15:46:00] * cloph_away1 is now known as cloph
255: [15:46:00] <Zauberfisch> and there is nothing wrong with that
256: [15:46:00] <Zauberfisch> some very popular modules do it
257: [15:46:00] <Zauberfisch> as long as its done right
258: [15:48:00] <Zauberfisch> if there is another good way to do it without a decorator then it should probably done that way
259: [15:48:00] <Zauberfisch> and if there is a reason for doing it
260: [15:55:00] * UncleCheese quit (Quit: UncleCheese)
261: [15:59:00] * UncleCheese has joined #silverstripe
262: [16:01:00] <DesignerX> Zauberfisch: Thanks .. its 2 am & feeling sleepy :( , any chance if you have some extra time in the next day or two to have a look at some code I have ? already uploaded here, let me know what you think : http://www.sspaste.com/paste/show/517e97e3b17e5
263: [16:04:00] <DesignerX> GN
264: [16:04:00] <Zauberfisch> DesignerX taking a quick look over it I think none of those methods will make it into core
265: [16:04:00] * g4b0 quit (Quit: Sto andando via)
266: [16:04:00] <Zauberfisch> unless you have a really good argument for it
267: [16:05:00] <Zauberfisch> that could be a method to add to director
268: [16:05:00] <Zauberfisch> cleanDomain - maybe, but idk
269: [16:06:00] <DesignerX> Zauberfisch: then best option is provide these as modules/ class extentions then anyone wanna use my plugins has to download this "core" files which provde the extra functions ?
270: [16:06:00] <Zauberfisch> and if you want that to get into core you need to change the classes anyway
271: [16:06:00] * PigeonFriend has joined #silverstripe
272: [16:06:00] * kinglozzer quit (Remote host closed the connection)
273: [16:06:00] <PigeonFriend> DesignerX: I'm hearing som interesting things about some stuff you want in core? can I have the pastie link?
274: [16:06:00] <Zauberfisch> Helper is not a name that would be allowed for a class name
275: [16:07:00] <PigeonFriend> DesignerX: Yer, you may want to look at this: http://docs.silverstripe.org/framework/en/3.1/misc/contributing
276: [16:07:00] <willmorgan> http://www.sspaste.com/paste/show/517e97e3b17e5
277: [16:07:00] <Zauberfisch> DesignerX is there any reason why you extend DataObject?
278: [16:07:00] <willmorgan> then people can comment on it and give feedback on a line by line basis
279: [16:07:00] <willmorgan> DesignerX can you put this as a gist please
280: [16:07:00] <willmorgan> hmm
281: [16:08:00] <DesignerX> sure .. Zauberfisch just gave me a link to make things work on windows, so I will work on it ASAP :D
282: [16:08:00] <PigeonFriend> and also at https://github.com/silverstripe/sapphire/blob/3.1/core/ArrayLib.php for library classes
283: [16:10:00] <PigeonFriend> also http://doc.silverstripe.org/framework/en/trunk/misc/coding-conventions, you may want to pay special attention to http://doc.silverstripe.org/framework/en/trunk/misc/coding-conventions#naming-conventions
284: [16:12:00] <willmorgan> first thing is it should not be a dataobject
285: [16:12:00] <willmorgan> i did a search for $this in the file and it matched no results
286: [16:13:00] <willmorgan> okay, cool
287: [16:13:00] <willmorgan> if you make it an extension so that the methods run on the object instance that would be a start
288: [16:13:00] <DesignerX> willmorgan: most of the functions will be moved to class decorators or to a new class with a better name
289: [16:13:00] <DesignerX> :D read my mind
290: [16:13:00] * OldTomBarman quit (Quit: leaving)
291: [16:13:00] <willmorgan> you're doing a lot by URLSegment
292: [16:13:00] <willmorgan> do you think it would be better to maybe identify pages by their class type?
293: [16:14:00] <willmorgan> URLSegments are CMS editable, and are liable to change
294: [16:14:00] <Zauberfisch> agreed, I don't use URLSegment at all
295: [16:15:00] <Zauberfisch> I can't have a website breaking down because the client changed the URL
296: [16:15:00] <willmorgan> but yeah
297: [16:15:00] <willmorgan> it looks like you have some good ideas but the execution needs a bit of improvement
298: [16:16:00] <DesignerX> the ones that use URLSegmnet mostly use by me to create a quick demo site with the available page names. I just quickly create the pages & let the client edit them, small business clients dont wanna see a home page & do the rest them selves :(
299: [16:19:00] <DesignerX> I used them in a task so I get the default pages done & the client does the rest.. but I guess with improvments it could be used for more ?
300: [16:19:00] <willmorgan> there's little code difference in doing it by class name instead of urlsegment, but there are many benefits of doing so
301: [16:21:00] <DesignerX> willmorgan: any specific functions ?
302: [16:24:00] <PigeonFriend> DesignerX: have you ever used default_records?
303: [16:24:00] <PigeonFriend> that's a much faster way of doing it
304: [16:24:00] <willmorgan> i would review what PigeonFriend said and follow those links
305: [16:25:00] <PigeonFriend> Also, function parameters called $array are not descritive and PHP doc that is just a copy of the function declaration are also not helpful
306: [16:25:00] <PigeonFriend> they should be descriptive in both instances
307: [16:27:00] <PigeonFriend> DesignerX: you can only do it by the day, i think
308: [16:27:00] <DesignerX> this part *
309: [16:27:00] <DesignerX> true .. btw, how can I save a direct link to this pat of the chat log ?
310: [16:28:00] <DesignerX> ah ok, I will just past this page then :D , alot of useful ifo here
311: [16:29:00] <PigeonFriend> coz I've seen two things that i think are broken
312: [16:29:00] <PigeonFriend> Also, DesignerX: did you test any of this code?
313: [16:30:00] <DesignerX> ok, most of them yes, I knwo createmember(), findOrMakePageByURLSegment() and findOrMakePageByTitle() could be done better
314: [16:31:00] <willmorgan> use default_records for that sorta thing
315: [16:33:00] <DesignerX> I have that for the Content & few other fields.. but for some of my clients I get the name of pages & products to create the demo site with more useable data for the client , not just random page names which basic PC uer find confusing ( yes, I am still stuck with some of these clients )
316: [16:34:00] <DesignerX> I have that " default_records " for the content & ... *
317: [16:36:00] <DesignerX> and, I plan to improve this so I can create pages quickly using php, ready with title & content so I dont have to use the CMS
318: [16:41:00] <DesignerX> for now, good night everyone.. 2:30 am WIll be back tomorrow with more questions :D
319: [16:42:00] * PigeonFriend quit ()
320: [16:46:00] * DesignerX quit (Ping timeout: 258 seconds)
321: [16:46:00] * UncleCheese quit (Quit: UncleCheese)
322: [16:53:00] * chillu quit (Quit: chillu)
323: [17:00:00] * zfmf has left #silverstripe
324: [17:00:00] * Colin[pi] has joined #silverstripe
325: [17:22:00] * osterlaus has joined #silverstripe
326: [17:22:00] * osterlaus quit (Client Quit)
327: [17:26:00] * Zauberfisch quit (Remote host closed the connection)
328: [17:30:00] * UncleCheese has joined #silverstripe
329: [17:33:00] * willmorgan quit (Ping timeout: 264 seconds)
330: [17:50:00] * Zauberfisch has joined #silverstripe
331: [17:58:00] * Zauberfisch_ has joined #silverstripe
332: [18:01:00] * Zauberfisch quit (Ping timeout: 258 seconds)
333: [18:01:00] * Zauberfisch_ is now known as Zauberfisch
334: [18:16:00] * azureKni_ has joined #silverstripe
335: [18:30:00] * UncleCheese has left #silverstripe
336: [18:31:00] * Nivery has joined #silverstripe
337: [18:32:00] * azureKni_ has left #silverstripe
338: [18:54:00] * Shrike_Finland has joined #silverstripe
339: [19:09:00] * henkpoley has joined #silverstripe
340: [19:09:00] * Shrike_Finland quit (Quit: Leaving.)
341: [19:14:00] * Zauberfisch|idle quit (Ping timeout: 246 seconds)
342: [19:14:00] * Zauberfisch|idle has joined #silverstripe
343: [19:18:00] <NobrainerWeb> Hello
344: [19:18:00] * NobrainerWeb has joined #silverstripe
345: [19:20:00] <NobrainerWeb> Can someone explain to me why on a Page has_many relation, on on editing the DataObject in CMS, there is a drop down with all pages in? Because selecting the page does not save a new pageID in the Database
346: [19:22:00] * henkpoley has joined #silverstripe
347: [19:22:00] * henkpoley quit (Read error: Connection reset by peer)
348: [19:26:00] * chillu has joined #silverstripe
349: [19:36:00] <Nivery> getting the URL???could not be turned into a media resource when trying to embed youtube videos using the Insert Media functionality. vimeo videos work fine. anyone else had this problem?
350: [19:39:00] <FrozenFire> Talk to simon_w
351: [19:39:00] * FrozenFire mutters things under his breath
352: [19:39:00] <FrozenFire> That'd be oEmbed
353: [19:41:00] <Nivery> i will ask again when he's on IRC, heh
354: [19:41:00] <Nivery> thanks
355: [19:42:00] <FrozenFire> He's here
356: [19:43:00] <FrozenFire> Or at least, probably will be shortly
357: [19:44:00] <FrozenFire> Hrmm, can't get the summary_fields working on a DataObject
358: [19:46:00] <FrozenFire> Weird. Had to /dev/build
359: [19:49:00] * henkpoley quit (Quit: henkpoley)
360: [19:55:00] <simon_w> FrozenFire, should just need to flush to reload the config
361: [19:55:00] <simon_w> NobrainerWeb, the default getCMSFields() includes a drop down for the has_one. Just remove it.
362: [19:55:00] <simon_w> Nivery, which URL?
363: [19:56:00] <simon_w> Nivery, try the actual page
364: [19:56:00] <FrozenFire> Nope. Flushed and it still didn't reload.
365: [19:56:00] <NobrainerWeb> simon_w: Yes i did that, but i actually hoped you could change the relation via the drop down, is that possible?
366: [19:56:00] <FrozenFire> Might've needed ?flush=all
367: [19:56:00] <NobrainerWeb> Moving a DO from one page to another
368: [19:56:00] <Nivery> simon_w, i've tried a couple without success
369: [19:56:00] <FrozenFire> I ended up doing /dev/build?flush=all
370: [19:56:00] <Nivery> here's one test i used: http://youtu.be/6CSiU0j_lFA
371: [19:57:00] <simon_w> NobrainerWeb, nope. GridField saves the DO by adding it to the RelationList, which sets the has_one's ID
372: [19:57:00] <NobrainerWeb> ok thanks
373: [19:58:00] <Nivery> simon_w, that doesn't produce the error message but also doesn't work??? the embedded video has a placeholder picture with an X through it
374: [20:05:00] <terryapodaca> has anyone tried ss3.1 beta3 yet?
375: [20:05:00] <FrozenFire> Nobody
376: [20:05:00] * Defraz has joined #silverstripe
377: [20:05:00] * terryapodaca has joined #silverstripe
378: [20:06:00] <terryapodaca> well that stinks
379: [20:06:00] <terryapodaca> I was playing along
380: [20:06:00] <FrozenFire> /s, if it wasn't obvious
381: [20:06:00] <FrozenFire> Absolutely nobody.
382: [20:06:00] <terryapodaca> nobody?
383: [20:06:00] <FrozenFire> :P
384: [20:07:00] <Defraz> Hey all! Got a quick question. Tried to google the answer but to no avail. I have an install of silverstrip 2.x going and I have a directory created off the root of the main SS install and it says it isn't ther ewhen I go to http://www.blahblah.com/Files Files being my subdirectory. I just have some files in there. I am sure it has somethign to do with the .htaccess in the root SS directory.
385: [20:07:00] <Defraz> is there an exemption rule I can write
386: [20:07:00] <simon_w> Nivery, if you mean http://ss3.demo.silverstripe.org/framework/images/default_media.png, that just means it can't load the thumbnail
387: [20:07:00] <FrozenFire> I use it in production
388: [20:07:00] <terryapodaca> how 'beta' is it and should I not use it
389: [20:07:00] * wmk quit (Ping timeout: 272 seconds)
390: [20:08:00] <simon_w> Can't remember if you need the leading /
391: [20:08:00] <terryapodaca> k...i have three new sites and wanted to make sure i could use it without too much (if any) hassle
392: [20:08:00] <FrozenFire> Do you need it?
393: [20:08:00] <Defraz> Thanks
394: [20:08:00] <Defraz> That is what I was looking for!!!
395: [20:08:00] <simon_w> Defraz, RewriteCond %{REQUEST_URI} !^/Files/
396: [20:09:00] <FrozenFire> The default .htaccess already has a condition that it not match a file
397: [20:09:00] <FrozenFire> https://github.com/silverstripe/silverstripe-installer/blob/3.0/.htaccess#L34
398: [20:09:00] <simon_w> FrozenFire, folder.
399: [20:09:00] <FrozenFire> Shouldn't need that
400: [20:10:00] <FrozenFire> Don't support file listings.
401: [20:10:00] <Nivery> the dimensions also show up strangely -- 100X100
402: [20:10:00] <FrozenFire> That's a bad idea.
403: [20:10:00] <simon_w> Yes, but just hitting the folder won't
404: [20:10:00] <Defraz> But I just want them to see the directory structure
405: [20:10:00] <Defraz> Yea it is a folder.
406: [20:10:00] <FrozenFire> If the file exists in the folder, it should work
407: [20:10:00] <Nivery> simon_w, that is the image -- but then on the page it shows a text link to the video (http://www.youtube.com/watch?v=6CSiU0j_lFA) instead of the embedded video
408: [20:10:00] <Defraz> not have to build an index.html.
409: [20:11:00] <simon_w> Need the same thing to get index.* working
410: [20:14:00] <Defraz> Okay that worked like a charm! Thank you so much.
411: [20:14:00] <simon_w> Nivery, when adding it, do you get the title showing up like http://s.geek.nz/p/4x?
412: [20:17:00] * Defraz quit (Quit: ~ Trillian Astra - www.trillian.im ~)
413: [20:17:00] * gelignite quit (Quit: http://bit.ly/nkczDT)
414: [20:17:00] <Nivery> simon_w, the space where the title would be is blank
415: [20:18:00] <simon_w> And the URL shows up in the field properly?
416: [20:19:00] <Nivery> after hitting Edit, I can see the correct URL in the URL field (http://www.youtube.com/watch?v=6CSiU0j_lFA)
417: [20:20:00] <simon_w> And which version are you running?
418: [20:24:00] <Nivery> 3.0.5
419: [20:26:00] * mobiusnz has joined #silverstripe
420: [20:28:00] <NobrainerWeb> I tried class MyModule_Controller extends DataExtension but no luck
421: [20:28:00] <NobrainerWeb> i have just used MyModule extends DataExtension to extend page with fields - all good. But i also need to add a Requirements::themedCSS('mycssfile'); to the Page controller via DataExtension, but i don't know how to do this, any help?
422: [20:30:00] <simon_w> NobrainerWeb, contentControllerInit() in MyModule
423: [20:30:00] * terryapodaca quit (Read error: Connection reset by peer)
424: [20:33:00] <simon_w> Nivery, do you have SSH access to the server? (I just tried http://www.youtube.com/watch?v=6CSiU0j_lFA on a local 3.0.5 checkout, worked fine)
425: [20:35:00] <Nivery> simon_w, i do??? sounds like it's my problem, let me look into it a little more
426: [20:35:00] <NobrainerWeb> simon_W: thank you, i had to leave out parent::init(); as it failed - or would i use some kind of $this->owner->parent::init();?
427: [20:36:00] <NobrainerWeb> ok thank you again
428: [20:36:00] <simon_w> NobrainerWeb, you're not writing a init() method, you don't need to call parent::init()
429: [20:47:00] * SightUnseen has joined #silverstripe
430: [20:48:00] * SightUnseen has left #silverstripe
431: [20:54:00] * simon_w heads off for the day
432: [21:02:00] * Nivery quit (Quit: Nivery)
433: [21:06:00] <FrozenFire> It keeps installing the cms and framework in a corrupt way
434: [21:06:00] <FrozenFire> Dude... did someone fuck the silverstripe installer?
435: [21:08:00] <FrozenFire> And so on and so forth
436: [21:08:00] <FrozenFire> Like, it creates framework/admin/admin
437: [21:08:00] <FrozenFire> And framework/api/api
438: [21:08:00] <FrozenFire> Fortunately I'm versioning using git and could do git clean -df
439: [21:08:00] <FrozenFire> But I suspect today's going to be a hair on fire day for people who are not.
440: [21:10:00] <FrozenFire> Weird
441: [21:10:00] <FrozenFire> I had a classmap that was causing it to install corruptly.
442: [21:10:00] <FrozenFire> Nevermind.
443: [21:10:00] <FrozenFire> It was a composer issue...?
444: [21:13:00] <dangerdan_> is there anyway i can rewrite this so that the check box actually appears as a third field in the first visibility section http://i.imgur.com/J9r6qLz.png
445: [21:13:00] * dangerdan_ has joined #silverstripe
446: [21:14:00] * NobrainerWeb quit (Quit: NobrainerWeb)
447: [21:17:00] <FrozenFire> http://api.silverstripe.org/master/class-FieldList.html#_insertAfter
448: [21:17:00] <FrozenFire> Insert it after ShowInSearch
449: [21:21:00] <dangerdan_> nice one :)
450: [21:24:00] * Jeremy_ is now known as clodeindustrie
451: [21:24:00] * Jeremy_ has joined #silverstripe
452: [21:25:00] * clodeindustrie quit (Client Quit)
453: [21:28:00] <priithansen> This automatic hourly translations staging is no longer true? http://doc.silverstripe.org/framework/en/trunk/misc/translation-process#download-translations-from-getlocalization-com
454: [21:32:00] * Cam_ has joined #silverstripe
455: [21:32:00] * terryapodaca has joined #silverstripe
456: [21:32:00] * Cam_ quit (Client Quit)
457: [21:33:00] * willr_ has joined #silverstripe
458: [21:37:00] * SightUnseen has joined #silverstripe
459: [21:38:00] * SightUnseen has left #silverstripe
460: [21:47:00] * SightUnseen1 has joined #silverstripe
461: [21:48:00] * SightUnseen2 has joined #silverstripe
462: [21:49:00] * travis-ci has joined #silverstripe
463: [21:49:00] <travis-ci> [travis-ci] silverstripe/sapphire#2098 (3.1 - caaf5a2 : Ingo Schommer): The build passed.
464: [21:49:00] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/sapphire/compare/36855b89e064...caaf5a2d78d6
465: [21:49:00] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/sapphire/builds/6740392
466: [21:49:00] * travis-ci has left #silverstripe
467: [21:49:00] * SightUnseen1 quit (Read error: Connection reset by peer)
468: [21:50:00] * Pyromanik has joined #silverstripe
469: [21:50:00] <Pyromanik> so
470: [21:51:00] <Pyromanik> twitter derping unauthenticated api
471: [21:51:00] <Pyromanik> does ss have module for fetching a single latest tweet lying around somewhere?
472: [21:51:00] * SightUnseen2 has left #silverstripe
473: [21:52:00] <FrozenFire> Pyromanik, Use Javascript.
474: [21:53:00] <Pyromanik> but you can't use JS anymore
475: [21:53:00] <Pyromanik> v1 of the api is going down the tubes
476: [21:53:00] <Pyromanik> in...
477: [21:53:00] <Pyromanik> OAuth is now required for all request
478: [21:53:00] <Pyromanik> 8 days
479: [21:53:00] <FrozenFire> Wat
480: [21:53:00] <FrozenFire> Don't do it server-side
481: [21:53:00] <Pyromanik> FrozenFire: yeah
482: [21:54:00] <FrozenFire> Oh man.
483: [21:54:00] <Pyromanik> since we pump out about 4 a week.
484: [21:54:00] <Pyromanik> which, reading this, means I need to register every website as an application.
485: [21:54:00] <Pyromanik> which seems 100% retarded.
486: [21:55:00] <Pyromanik> FrozenFire: https://dev.twitter.com/blog/api-v1-retirement-final-dates
487: [21:56:00] <Pyromanik> the only thing that will remain is https://dev.twitter.com/docs/api/1/get/statuses/oembed
488: [21:56:00] <FrozenFire> Yep
489: [21:57:00] <travis-ci> [travis-ci] silverstripe/sapphire#2099 (master - 4879c9c : Ingo Schommer): The build passed.
490: [21:57:00] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/sapphire/builds/6740409
491: [21:57:00] * travis-ci has left #silverstripe
492: [21:57:00] <Pyromanik> which seems like it might do the trick
493: [21:57:00] <FrozenFire> Yeah. Just mentioned it to the boss. That's beyond retarded, and will affect oh-so-many sites we've done
494: [21:57:00] <FrozenFire> Including our own website
495: [21:57:00] <Pyromanik> yeh
496: [21:57:00] <Pyromanik> ikr
497: [21:57:00] <Pyromanik> worse yet, you've got 8 days to fix all of them.
498: [21:57:00] * travis-ci has joined #silverstripe
499: [21:57:00] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/sapphire/compare/8f3c0b57ba8c...4879c9c8908b
500: [21:58:00] * SightUnseen has joined #silverstripe
501: [22:00:00] * dangerdan_ quit (Ping timeout: 245 seconds)
502: [22:02:00] <FrozenFire> :P
503: [22:02:00] <Pyromanik> FrozenFire: I came across the issue by doing as you said: http://tweet.seaofclouds.com/
504: [22:02:00] <FrozenFire> Yep. That's what we use everywhere
505: [22:02:00] <FrozenFire> Including our own website
506: [22:03:00] <Pyromanik> FrozenFire: so am I reading right in that I have to register an app account and then use oauth server side to grab information?
507: [22:03:00] <Pyromanik> or am I confused?
508: [22:04:00] <FrozenFire> I've no idea yet, but my assumed flow would be that your Javascript would call to an endpoint on your server to get an oAuth token
509: [22:04:00] <Pyromanik> and there doesn't seem to be a shortcut URL to get a user's most recent status
510: [22:04:00] * SightUnseen quit (Ping timeout: 245 seconds)
511: [22:04:00] <FrozenFire> And then you would make your request client-side using that token
512: [22:04:00] <Pyromanik> can only get statuses by ID, which is fairly useless.
513: [22:05:00] * Pyromanik is not so clear on the specifics of oAuth
514: [22:05:00] <Pyromanik> oh yeh, that seems more reasonable.
515: [22:05:00] <FrozenFire> https://dev.twitter.com/docs/auth/application-only-auth
516: [22:05:00] <FrozenFire> It'd be application-only authentication
517: [22:06:00] <FrozenFire> Hrmm, though, actually, no. You wouldn't pass out the token
518: [22:06:00] <Pyromanik> https://dev.twitter.com/docs/auth/oauth#v1-1
519: [22:07:00] <FrozenFire> :P
520: [22:07:00] <FrozenFire> I think that you'll indeed have to start passing the data through your server
521: [22:07:00] <Pyromanik> seems like it'd be far easier to simply scrape the f'n html
522: [22:07:00] <Pyromanik> well, some amount of datas, maybe not the end result data, but at least an auth token
523: [22:07:00] * SightUnseen has joined #silverstripe
524: [22:07:00] <FrozenFire> Which is silly
525: [22:08:00] <FrozenFire> Nope. Whole kit and kaboodle.
526: [22:08:00] <FrozenFire> Or whatever that phrase is.
527: [22:09:00] <FrozenFire> Because giving your application token out to clients would compromise your API access.
528: [22:09:00] <Pyromanik> https://dev.twitter.com/apps
529: [22:09:00] <Pyromanik> FrozenFire: dont' think that's how oauth works.
530: [22:09:00] <Pyromanik> have to register a new app and link it to a twitter account per site
531: [22:09:00] <Pyromanik> yeah, derp
532: [22:10:00] <FrozenFire> You request a token using your consumer key and secret
533: [22:10:00] <FrozenFire> But that oAuth token is still like a password.
534: [22:10:00] <FrozenFire> You use the token to authenticate requests.
535: [22:10:00] <FrozenFire> I have a pretty good idea how it works
536: [22:11:00] <Pyromanik> iirc there are different levels of token you can grant
537: [22:11:00] <Pyromanik> yeah, but you only give out the token
538: [22:11:00] <Pyromanik> which is specific to each user
539: [22:11:00] <FrozenFire> The token still grants access to do whatever you can do.
540: [22:11:00] <Pyromanik> and can be cancelled
541: [22:11:00] <Pyromanik> yeah
542: [22:11:00] <Pyromanik> well
543: [22:11:00] <FrozenFire> You definitely would not want to give it out.
544: [22:11:00] <Pyromanik> but yeh
545: [22:11:00] <Pyromanik> it should only last for a defined amount of time/requests
546: [22:12:00] <Pyromanik> and is read data only
547: [22:12:00] <FrozenFire> Nope
548: [22:12:00] <Pyromanik> it's kinda like ssh public keys
549: [22:12:00] <Pyromanik> FrozenFire: so you disagree with the entirety of oAuth?
550: [22:12:00] <Pyromanik> which one can do by visting twitter.com anyway
551: [22:12:00] <FrozenFire> Should never be given out
552: [22:13:00] <Pyromanik> mmm
553: [22:13:00] <FrozenFire> Since things like public information listings should be delegated to the client
554: [22:13:00] <FrozenFire> Basically, no, you'd never give it out. :P
555: [22:13:00] <Pyromanik> at least, with my limited knowledge that's how I view it in my head
556: [22:13:00] <FrozenFire> I don't disagree with oAuth's premise.
557: [22:13:00] <FrozenFire> I disagree with requiring all API calls to be made server-side
558: [22:13:00] <Pyromanik> rgiht
559: [22:13:00] <Pyromanik> oh well
560: [22:13:00] <Pyromanik> so all through the server then
561: [22:13:00] <FrozenFire> "Only one bearer token may exist outstanding for an application, and repeated requests to this method will yield the same already-existent token until it has been invalidated."
562: [22:13:00] <Pyromanik> so that's a twitter thing, not an oAuth thing?
563: [22:13:00] <Pyromanik> oh
564: [22:14:00] <Pyromanik> time to care less and drink hot chocolate
565: [22:14:00] <FrozenFire> Otherwise your service can be DDoS'd to exhaust your rate limit
566: [22:14:00] <FrozenFire> But it would be annoying.
567: [22:14:00] <FrozenFire> Which isn't a huge deal
568: [22:14:00] <FrozenFire> So that rate limiting happens for anonymous clients, instead of the server.
569: [22:20:00] * SightUnseen has left #silverstripe
570: [22:31:00] * chrisrio has joined #silverstripe
571: [22:40:00] <Pyromanik> FrozenFire: so like most DDoS's
572: [22:42:00] <FrozenFire> Sort of. DDoS' typically cease to affect you once they're "done", and are easy to detect
573: [22:43:00] <FrozenFire> Actually, hrmm, I guess with proper caching of the results from Twitter, it wouldn't be a huge deal.
574: [22:43:00] <FrozenFire> Would probably even be simple-ish to replace it for the SeaOfClouds script
575: [22:44:00] <travis-ci> [travis-ci] silverstripe/sapphire#2101 (2.4 - c26b83e : Ingo Schommer): The build has errored.
576: [22:44:00] * travis-ci has left #silverstripe
577: [22:44:00] * travis-ci has joined #silverstripe
578: [22:44:00] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/sapphire/builds/6742281
579: [22:44:00] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/sapphire/compare/43d422428684...c26b83ebfb19
580: [22:45:00] <travis-ci> [travis-ci] silverstripe/sapphire#2100 (3.1 - cef955c : Ingo Schommer): The build passed.
581: [22:45:00] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/sapphire/compare/caaf5a2d78d6...cef955c8b912
582: [22:45:00] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/sapphire/builds/6742174
583: [22:45:00] * travis-ci has left #silverstripe
584: [22:45:00] * nickmolhoek has joined #silverstripe
585: [22:45:00] * travis-ci has joined #silverstripe
586: [22:45:00] * nickmolhoek quit (Remote host closed the connection)
587: [22:45:00] * nickmolhoek has joined #silverstripe
588: [22:53:00] * travis-ci has left #silverstripe
589: [22:53:00] <travis-ci> [travis-ci] Build details : http://travis-ci.org/silverstripe/sapphire/builds/6742326
590: [22:53:00] <travis-ci> [travis-ci] Change view : https://github.com/silverstripe/sapphire/compare/5f91c3724dd1...7803d982bbba
591: [22:53:00] <travis-ci> [travis-ci] silverstripe/sapphire#2102 (3.0 - 7803d98 : Ingo Schommer): The build passed.
592: [22:53:00] * travis-ci has joined #silverstripe
593: [22:58:00] * terryapodaca has left #silverstripe
594: [22:58:00] * chillu quit (Quit: chillu)
595: [23:28:00] * priithansen quit (Quit: priithansen)
596: [23:29:00] <jkaunisv> Hey all, question: I've got two classes in a classic Parent-Child relationship, Parent has_many Children, Child has_one Parent
597: [23:29:00] * jkaunisv has joined #silverstripe
598: [23:30:00] <jkaunisv> when I create a child object, it doesn't get related to the parent
599: [23:30:00] <jkaunisv> so my question is, are there common gotchas that would cause the DB to not save the relations?
600: [23:30:00] <jkaunisv> and when I go into the DB and manually set the ParentID, the relation picks it up just fine via stuff like "$this->Child"
601: [23:32:00] <jkaunisv> rather, I should be more specific. It DOES get related to the parent via ParentID, but the actual relation ID field (These are Issues with Articles, so each Article should also have an IssueID) isn't set
602: [23:33:00] <FrozenFire> How are you setting ParentID?
603: [23:33:00] * SticksM has joined #silverstripe
604: [23:33:00] <FrozenFire> UploadField?
605: [23:33:00] <FrozenFire> Dropdown?
606: [23:34:00] <jkaunisv> I was hoping that given the relationships I defined, when I create a new Article under an Issue in the CMS dashboard, it would just set it automatically
607: [23:34:00] <FrozenFire> Are you using something like a newsletter module?
608: [23:34:00] <FrozenFire> I also have no clue what you're talking about with Articles and Issues
609: [23:34:00] <FrozenFire> Automatic is a relative term.
610: [23:35:00] <jkaunisv> each issue has many Articles
611: [23:35:00] <jkaunisv> there are many Issues of a magazine
612: [23:35:00] <jkaunisv> no, I wrote it myself
613: [23:35:00] <FrozenFire> ParentID is already on SiteTree
614: [23:35:00] <FrozenFire> You're not defining the ParentID on your Article, are you?
615: [23:35:00] <jkaunisv> Issue is the parent, Article is the child
616: [23:35:00] <jkaunisv> yep
617: [23:35:00] <FrozenFire> Are they Pages?
618: [23:36:00] <jkaunisv> but in each Article's db entry, IssueID isn't set
619: [23:36:00] <jkaunisv> and the dashboard shows them in the right hierarchy
620: [23:36:00] <jkaunisv> no, that's why I clarified, the ParentID is set fine
621: [23:37:00] <FrozenFire> If you're putting the Article under the Issue in the hierarchy, then ParentID is that relation.
622: [23:37:00] <FrozenFire> Hierarchy is managed through the ParentID field
623: [23:37:00] <FrozenFire> Not IssueID
624: [23:38:00] <jkaunisv> so defining has_many relationships doesn't actually do anything for creation of objects
625: [23:38:00] <jkaunisv> but then what happens if an Issue has many Articles as well as many Reviews, let's say
626: [23:38:00] <jkaunisv> and instead of saying $this->Articles() I should say $this->Children() (or something similar)
627: [23:39:00] <jkaunisv> In that case, calling $this->Children would grab both Articles and Reviews
628: [23:40:00] <FrozenFire> Eh, Hierarchy is a bit of a hacky functionality.
629: [23:40:00] <jkaunisv> when there should be a helper like $this->Articles() and $this->Reviews() for each relation defined, at least that's who the docs make it seem
630: [23:40:00] <jkaunisv> (they talk about Students and Mentors)
631: [23:40:00] <jkaunisv> how*
632: [23:40:00] <FrozenFire> You could add your own getters
633: [23:41:00] <jkaunisv> Yeah. I'm just amazed the ORM is so incomplete
634: [23:41:00] <FrozenFire> It's not
635: [23:41:00] <FrozenFire> public function Reviews() { return Review::get()->filter("ParentID", $this->ID); }
636: [23:41:00] <FrozenFire> public function Articles() { return Article::get()->filter("ParentID", $this->ID); }
637: [23:41:00] <jkaunisv> Yes it is.
638: [23:42:00] <FrozenFire> But you're nowhere near those.
639: [23:42:00] <FrozenFire> Nah. Believe me, I'm the most vocal critic of SilverStripe you're likely to find, and even I'll say the ORM is pretty good and complete.
640: [23:42:00] <jkaunisv> See this tutorial? http://doc.silverstripe.org/framework/en/tutorials/5-dataobject-relationship-management
641: [23:42:00] <FrozenFire> There are some edge cases that are sort of screwy, like grouping.
642: [23:42:00] <FrozenFire> You're not talking about the ORM, really.
643: [23:43:00] <FrozenFire> You're talking about the Hierarchy extension.
644: [23:43:00] <FrozenFire> So it sort of breaks things when you want to, say, filter the Children by ClassName
645: [23:43:00] <FrozenFire> It's hackish because instead of using *normal* getters, it uses a lot of cached getters and transformations of the resulting list based on PHP logic
646: [23:45:00] <jkaunisv> ok, whatever you want to call it
647: [23:45:00] <FrozenFire> Keep in mind that the framework is rather separate from the CMS, nowadays.
648: [23:45:00] <FrozenFire> So yeah, I'd say that the CMS is utter shit in many ways.
649: [23:45:00] <FrozenFire> It's great, but at the same time, it's hacks on hacks
650: [23:46:00] <FrozenFire> And that's CMS functionality.
651: [23:46:00] <FrozenFire> Then have a controller which routes to the correct Article/Review/Issue
652: [23:46:00] <FrozenFire> And instead simply make your articles and issues and reviews into DataObjects
653: [23:46:00] <jkaunisv> Interesting
654: [23:46:00] <FrozenFire> Were I you, I'd probably not use it for article management like that.
655: [23:46:00] <FrozenFire> You're talking about SiteTree
656: [23:47:00] <FrozenFire> You would just create a ModelAdmin for the Issues
657: [23:47:00] <FrozenFire> A.k.a. "DataObjects as Pages"
658: [23:47:00] <FrozenFire> Though many tutorials you'll find for doing that are equally shit.
659: [23:47:00] <jkaunisv> Well the whole point of this is to have a CMS for the non-devs to use
660: [23:47:00] <FrozenFire> Yup. And you can manage all of this through the CMS.
661: [23:48:00] <jkaunisv> right
662: [23:48:00] <jkaunisv> ok, just not through the Page hierarchy, you're saying
663: [23:48:00] <FrozenFire> Indeed
664: [23:48:00] <jkaunisv> Fuck, I hate this CMS sometimes
665: [23:48:00] <FrozenFire> :P
666: [23:48:00] <FrozenFire> Preach
667: [23:48:00] <jkaunisv> I wonder if I can rewrite everything I've done to now in Rails in 24 hours..
668: [23:48:00] <jkaunisv> Thanks for your help FrozenFire
669: [23:49:00] <jkaunisv> Yeah, and it would actually work the way it says it does
670: [23:49:00] <FrozenFire> :P That's more of a framework thing than a language thing.
671: [23:49:00] <jkaunisv> instead of having has_many relations that don't fulfill their contract
672: [23:49:00] <FrozenFire> Nah. They do.
673: [23:49:00] <FrozenFire> You probably could, but then you'd be using Rails
674: [23:49:00] <FrozenFire> :P
675: [23:50:00] <FrozenFire> You just, honestly, don't understand it. ;)
676: [23:50:00] <jkaunisv> I know I don't understand the system, so no offense taken, but have a look at this tutorial http://doc.silverstripe.org/framework/en/tutorials/5-dataobject-relationship-management
677: [23:50:00] <FrozenFire> It's the Hierarchy extension employed by the SiteTree that is trash
678: [23:50:00] <FrozenFire> The ORM works fine.
679: [23:50:00] <FrozenFire> Which is by no means a criticism. It's complicated.
680: [23:51:00] <jkaunisv> and tell me it's not lying
681: [23:51:00] <jkaunisv> $studentsField = new GridField( 'Students', // Field name 'Student', // Field title $this->Students(), // List of all related students $config );
682: [23:51:00] <jkaunisv> ugh
683: [23:51:00] <FrozenFire> I don't really have time to read it. What's the gist of what you're trying to point out?
684: [23:52:00] <jkaunisv> implying that the relationship is created when objects are created
685: [23:52:00] <jkaunisv> but it never details how to create that relationship beyond "make it in the cms" basically
686: [23:52:00] <FrozenFire> Anything returning a DataList
687: [23:52:00] <FrozenFire> Yup
688: [23:52:00] <jkaunisv> it uses stuff like $this->Students(), which is a has_many relationship
689: [23:52:00] <FrozenFire> It is
690: [23:53:00] <FrozenFire> You really are.
691: [23:53:00] <jkaunisv> anyway
692: [23:53:00] <jkaunisv> haha k but I'm not talking about GridField specifics
693: [23:53:00] <FrozenFire> Because SiteTree is hackish. ;)
694: [23:53:00] <FrozenFire> Because SiteTree is not meant to be managed through GridField
695: [23:53:00] <jkaunisv> lol k
696: [23:53:00] <FrozenFire> But not for SiteTree
697: [23:54:00] <FrozenFire> Because Hierarchy sucks.
698: [23:54:00] <jkaunisv> look, I'm not using GridField, that was from the tutorial
699: [23:54:00] <FrozenFire> You're best off not learning how the Hierarchy extension works. :)
700: [23:54:00] <jkaunisv> So do you know anywhere other than the code base I can learn more about how the hierarchy module works?
701: [23:54:00] <jkaunisv> haha k
702: [23:54:00] <FrozenFire> An ArrayList doesn't affect the database.
703: [23:54:00] <FrozenFire> Here's the thing. When you pass $this->Children() to a GridField, what you're passing is an ArrayList
704: [23:55:00] <FrozenFire> I would recommend simply refactoring it into its own part of the model.
705: [23:55:00] <FrozenFire> Instead of extending SiteTree
706: [23:56:00] <FrozenFire> Such as all of the built-in visibility and permissions settings
707: [23:56:00] <jkaunisv> Thanks for the recommendation
708: [23:56:00] <FrozenFire> Though, you do lose some of the functionality that makes SiteTree usful
709: [23:56:00] <jkaunisv> You're really making the case for Rails here
710: [23:56:00] <jkaunisv> what is it you LIKE about Silverstripe?
711: [23:56:00] <FrozenFire> And you'd have to deal with Versioned, which is at least as bad :)
712: [23:56:00] <FrozenFire> useful**
713: [23:57:00] * SightUnseen has joined #silverstripe
714: [23:57:00] <FrozenFire> When you know how it works, it gets shit done really, really fast.
715: [23:57:00] <FrozenFire> I like it for the same reason I like PHP.
716: [23:58:00] <jkaunisv> gotcha
717: [23:58:00] * SightUnseen has left #silverstripe
718: [23:58:00] <FrozenFire> :P
719: [23:58:00] <FrozenFire> I don't use Versioned, is how I do it.
720: [23:58:00] <jkaunisv> So you've just dealt with Versioned enough that you suck it up when you roll your own stuff?
721: [23:58:00] <FrozenFire> You can shoot yourself in the foot with it really easily, but if you know how not to, then getting work done is extraordinarily fast.
722: [23:59:00] <FrozenFire> The sort of stuff I do isn't really related to the functionality that SiteTree provides.
723: [23:59:00] <FrozenFire> I do a lot of really custom solutions like PPV VoD sites
724: [23:59:00] <FrozenFire> All my clients want is to be able to upload their video through their site panel, add a description, etc.
725: [23:59:00] <jkaunisv> makes sense

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