#silverstripe IRC Log

IRC log for 8 November 2016

All timestamps are in UTC.

1: [00:02:45] <spronk> :'(
2: [00:02:48] <spronk> problems problems problems
3: [00:03:07] * spronk wants a schiit magni2uber and modi2uber but stupid customs and shipping :<
4: [00:06:07] <muskie9> if a client lists a location's address as "England" and you're using addressable... what country code do you use? (I'm in the US and don't run into international addresses a lot)
5: [00:06:13] <muskie9> I assume UK
6: [00:07:50] <irogue> muskie9: yes
7: [00:08:17] <muskie9> guess I need to talk to the client lol, thanks irogue
8: [00:08:49] <irogue> muskie9: https://www.youtube.com/watch?v=rNu8XDBSn10
9: [00:08:51] <muskie9> just curious, when addresses are written, is it ever England, Scotland, etc?
10: [00:11:59] <irogue> i'm sure some people would write that, but United Kingdom is the norm I believe
11: [00:13:00] * lerni quit (Remote host closed the connection)
12: [00:13:26] * lerni has joined #silverstripe
13: [00:15:37] * slievr quit (Ping timeout: 265 seconds)
14: [00:15:39] * slievr1 has joined #silverstripe
15: [00:16:18] <muskie9> irogue I wish I would've had that video in school... things would've made much more sense ;p
16: [00:16:48] <irogue> haha yeah
17: [00:17:46] * lerni quit (Ping timeout: 256 seconds)
18: [00:18:03] * markcl has joined #silverstripe
19: [00:22:24] * markcl quit (Ping timeout: 246 seconds)
20: [00:33:02] * micmania1 has joined #silverstripe
21: [00:44:38] * irogue quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22: [00:48:09] * janneklouman-- has joined #silverstripe
23: [00:50:17] * irogue has joined #silverstripe
24: [00:57:44] * janneklouman-- quit (Ping timeout: 252 seconds)
25: [01:22:02] * Stomach has joined #silverstripe
26: [01:28:05] * Stomach quit (Quit: bye)
27: [01:42:02] * DanaeNZ quit (Remote host closed the connection)
28: [01:42:34] * DanaeNZ has joined #silverstripe
29: [01:45:00] * DanaeNZ quit (Remote host closed the connection)
30: [01:45:12] * DanaeNZ has joined #silverstripe
31: [01:45:41] * pippy quit (Ping timeout: 260 seconds)
32: [01:55:00] * pweh quit (Ping timeout: 260 seconds)
33: [01:59:03] * micmania1 quit (Quit: micmania1)
34: [02:00:44] <Hailwood> Why do all the docs tell us to use e.g. TextField::create(...) but all the core classes use new TextField(...)?
35: [02:08:00] <irogue> Hailwood: X::create allows overriding by Injector, but is less efficient
36: [02:09:28] <Hailwood> Right, but it means that I can't as an example replace the TextField in the MemberLoginForm with a CustomTextField via the Injector yeah?
37: [02:12:03] * micmania1 has joined #silverstripe
38: [02:13:03] <MichalKleiner> I tell everyone to use X::create where possible
39: [02:13:11] <MichalKleiner> for testability
40: [02:13:52] <MichalKleiner> not that we would be replacing TextField by something else for testing, but the same pattern makes sense for e.g. emails etc.
41: [02:13:56] <MichalKleiner> so to keep it standardised
42: [02:14:07] <irogue> Hailwood: correct. generally you would extend MemberLoginForm instead.
43: [02:14:40] * pweh has joined #silverstripe
44: [02:14:42] <irogue> MichalKleiner: agreed. except for a site where we are trying to optimise it to the microsecond, we always favour ::create too
45: [02:15:40] <MichalKleiner> yeah.. but if that's the last place where you can gain a microsecond, you're happy
46: [02:16:58] <MichalKleiner> Last time I checked, the docs weren't actually consistent about the approach and explaining which approach is better for what use-cases
47: [02:17:12] * MichalKleiner knows he can submit a PR :D
48: [02:18:51] <Hailwood> irogue: But tbh I don't want to create a custom Xform just to replace the TextField with a BootstrapTextField ha. If I was optimizing down to the milliseconds I wouldn't use silverstripe :D
49: [02:19:10] * markcl has joined #silverstripe
50: [02:20:48] <MichalKleiner> I can hardly imagine what form can't be cached and needs the field created every single time with microseconds making a big difference.. and for bigger classes/objects, the Object wrapper will be minor overhead anyway
51: [02:20:55] <irogue> Hailwood: agreed, ideally we would consistently use ::create. feel free to PR ;)
52: [02:22:09] * muskie9 quit (Read error: Connection reset by peer)
53: [02:23:32] * markcl quit (Ping timeout: 252 seconds)
54: [02:35:32] * pweh has left #silverstripe
55: [02:36:05] <Hailwood> Ha I should do it to SS4 before it is released
56: [02:38:41] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
57: [02:43:24] * muskie9 has joined #silverstripe
58: [02:51:21] * spronk quit (Quit: I may need a longer sleep timer...)
59: [03:20:29] * markcl has joined #silverstripe
60: [03:25:02] * markcl quit (Ping timeout: 250 seconds)
61: [03:28:05] * micmania1 quit (Quit: micmania1)
62: [03:30:08] <ss-helper> silverstripe 3 blog next and previous post - http://stackoverflow.com/questions/40478366/silverstripe-3-blog-next-and-previous-post
63: [03:40:34] * wilson has joined #silverstripe
64: [03:40:39] <wilson> *wilson
65: [03:43:26] * janneklouman-- has joined #silverstripe
66: [03:43:28] <wilson> Hi to all, this is not a pure SS question but still... I understand that display:none (used with media queries) will only hide the elements but they will still be loaded into the page THEN hidden by the css. How to have different content based on media size? All my searches led me to php function that many say are no to be used. What the standard procedure you use for mobile sites? Thanks!
67: [03:45:38] * micmania1 has joined #silverstripe
68: [03:49:49] <muskie9> wilson the only way to "serve" different content (don't even load content on mobile vs desktop) is likely PHP, especially when using a CMS of some sort... if you are hiding content completely, rather than altering it's presentation, per media size, why is it showing at all on some devices? seems like a larger strategy thing than a dev thing... how would it impact SEO having some content served (not just hidden/shown) on
69: [03:49:49] <muskie9> certain media sizes?
70: [03:53:09] * janneklouman-- quit (Ping timeout: 248 seconds)
71: [03:53:14] * DanaeNZ quit (Quit: TIME TO FEED)
72: [03:54:16] <wilson> <muskie9>HI Muskie9, this is something i am thinking of since a long time. I KNOW that content hidden via display:one is loaded. Why is non-sense on a mobile. I have a site that has more than a 130 images and i want only 20-30 of them to show on cells. My usual approach is create two galeries : one with 100s image and another one with 20 images and hide the bigger one on celles. But still, it loaded. (to continue)
73: [03:55:01] <wilson> I was thinking of a PHP function that says: if under 680px load this (mobile.php) into a div ELSE load desktop.php into the same div. Good approach? Feasible?
74: [03:57:47] <muskie9> wilson so it's the same content, rather, optimized for the device
75: [03:59:04] <muskie9> rather than have a completely separate file to render the page, maybe just have methods that serve optimized content (for images) based on the device/media size
76: [03:59:13] <wilson> <muskie9>Yes there are 20-30 (out of 130s) that will show up on every screen. The remaining 100s would have to be hidden (or not loaded at all).
77: [03:59:44] <muskie9> wilson why not paginate? then it's not all on one load?
78: [03:59:59] <muskie9> both desktop and mobile
79: [04:00:34] <wilson> <muskie9>You mean put the 20-30 images on page one, and to not offer access to the page where the remaining images are?
80: [04:01:03] <wilson> <muskie9>I mean on mobile, you hide Go to page2 button?
81: [04:02:24] <muskie9> no, you allow them to go to page 2... but regardless of the media size you have pages of results... so if there are 180 photos and you show 9 per page, there would be 30 pages of images... but only 9 would ever be loaded per page
82: [04:03:02] <muskie9> you only serve 1-x to the page... not all and only show x
83: [04:03:18] <wilson> <muskie9>OK i get in. Well, because on the desktop site, i want all images on the same page and the way i crate a menu to see all of the images isn't compatible with this scheme. But you made me think....
84: [04:04:09] <muskie9> you could do pagination I guess on mobile and not on desktop if there are separate files for each... but that's more upkeep
85: [04:04:19] <wilson> <muskie9> Can i hide buttons instead? I mean on desktop, you have button would go to portfolio-with-130-images page and on mobile, you hide that button and you offer a button that goes to page-with-30-images. Pretty simple right?
86: [04:05:20] <muskie9> ya, that could work... but are you limiting the user to just the 30 images? like I mentioned... it's a strategy thing, the execution can be done many ways
87: [04:05:35] * dayne has joined #silverstripe
88: [04:05:35] <ss-helper> dayne: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
89: [04:05:49] <dayne> anyone used silverstripe-multisites?
90: [04:05:54] <MichalKleiner> another solution would be to have all the markup in the page, say images as img tags without src, but with e.g. data-src attribute.. and then use JS to change the data-src to src on whatever number you want, based on whatever condition, e.g. viewport width
91: [04:05:55] <muskie9> dayne yes
92: [04:06:12] <dayne> awesome
93: [04:06:14] <muskie9> MichalKleiner u so smrt :D
94: [04:06:18] <dayne> i have a quick question
95: [04:06:26] <muskie9> I no frontend lots... that's much easier
96: [04:06:49] <irogue> wilson there's also srcset which can do it for you
97: [04:06:54] <irogue> see http://responsiveimages.org/
98: [04:07:11] * muskie9 remembering and learning so much in one night
99: [04:07:27] <irogue> (and the picture element, but support for that is still a bit iffy)
100: [04:07:37] <MichalKleiner> muskie9: 'smrt' in czech means 'death' :-D
101: [04:07:50] <wilson> <muskie9><@irogue><MichalKleiner>Thank you guys, i have enough to think about as far as solutions. Great forum.
102: [04:07:59] <muskie9> MichalKleiner I learned another new thing ;P
103: [04:08:10] <muskie9> wilson cheers
104: [04:08:15] <muskie9> 🍻
105: [04:08:28] * wilson quit (Quit: Page closed)
106: [04:08:32] <muskie9> dayne what's your question
107: [04:14:59] <dayne> sorry. got pulled away
108: [04:15:06] <dayne> ok so i've installed the module and all is working
109: [04:17:29] <dayne> i have setup a global-header component and added it to the settings tab in the main admin
110: [04:17:36] <dayne> and that is working fine
111: [04:17:46] <dayne> but i want to be able to have seperate global-header components for each of my sites
112: [04:18:01] <dayne> so instead of it appearing in the settings tab in my main admin
113: [04:18:46] <dayne> it appears in my site settings (where the site configuration, site url) settings are for that specific site
114: [04:18:51] <dayne> does that make sense?
115: [04:20:19] <muskie9> I'm not sure the last version I've used... been a number of months since then... but that may be where things are managed now per site instance... although I'm not sure a Site Owner has access to that, like they would the Settings section
116: [04:21:29] <dayne> hmmm ok
117: [04:23:25] <muskie9> I'll spin up my instance and test something quick... the last one we did we setup a separate admin for the project settings
118: [04:24:15] <dayne> ok cool
119: [04:24:16] <dayne> that would be great
120: [04:24:17] <dayne> thanks
121: [04:26:44] <muskie9> dayne how are you applying your global components?
122: [04:27:16] <muskie9> DataExtension to SiteConfig?
123: [04:35:50] <dayne> class CustomSiteConfig extends DataExtension
124: [04:37:20] <muskie9> here's what we applied to SiteConfig as a DataExtension: https://gist.github.com/muskie9/7d4e9190382720ecd3a32ee7e64c37a4
125: [04:38:09] <muskie9> we ended up having more configuration for our calendar, so we extended LeftAndMain to manage a new DataObject that stored the configuration settings... but this was the start and it was managed in Settings
126: [04:38:25] * adrexia quit (Quit: My Mac has gone to sleep. ZZZzzz…)
127: [04:39:19] <dayne> ok cool
128: [04:39:24] <dayne> i'll give it a crack and see how i go
129: [04:39:27] <dayne> thanks so much
130: [04:40:40] <muskie9> 👍
131: [04:43:01] <muskie9> well, time to go... laterz
132: [04:43:04] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
133: [04:43:50] * dayne quit (Quit: Page closed)
134: [04:50:56] * irogue quit (Ping timeout: 260 seconds)
135: [04:54:08] * micmania1 quit (Quit: micmania1)
136: [04:58:55] * markcl has joined #silverstripe
137: [05:04:06] * UncleCheese has joined #silverstripe
138: [05:38:11] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
139: [05:54:18] * janneklouman-- has joined #silverstripe
140: [05:59:16] * janneklouman-- quit (Ping timeout: 265 seconds)
141: [06:02:48] * micmania1 has joined #silverstripe
142: [06:05:34] * markcl quit (Remote host closed the connection)
143: [06:07:57] * markcl has joined #silverstripe
144: [06:07:58] * markcl quit (Remote host closed the connection)
145: [06:08:13] * markcl has joined #silverstripe
146: [06:24:44] * helenclarko quit (Ping timeout: 268 seconds)
147: [06:26:12] * UncleCheese has joined #silverstripe
148: [06:43:45] * micmania1 quit (Ping timeout: 260 seconds)
149: [06:44:03] * micmania1 has joined #silverstripe
150: [06:54:06] * wmk has joined #silverstripe
151: [06:55:57] * janneklouman-- has joined #silverstripe
152: [06:56:32] * wmk_ has joined #silverstripe
153: [06:59:16] * wmk quit (Ping timeout: 268 seconds)
154: [07:01:39] * irogue has joined #silverstripe
155: [07:02:06] * janneklouman-- quit (Ping timeout: 265 seconds)
156: [07:21:32] * lerni has joined #silverstripe
157: [07:24:15] * wmk_ is now known as wmk
158: [07:24:35] <wmk> caching backend for partial caching: memcached or redis?
159: [07:45:16] <ss-helper> addons site not showing new modules? - https://groups.google.com/d/msg/silverstripe-dev/59QuAIzy3b0/NaJSWjQIAwAJ
160: [07:49:14] * darianno has joined #silverstripe
161: [07:49:55] * irogue quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
162: [08:09:45] * micmania1 quit (Quit: micmania1)
163: [08:27:17] * micmania1 has joined #silverstripe
164: [08:27:47] * cheatus has joined #silverstripe
165: [08:27:47] <ss-helper> cheatus: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
166: [08:32:49] * janneklouman-- has joined #silverstripe
167: [08:34:11] <cheatus> Hi fellas, got a question. I'm using searchable add-on https://github.com/i-lateral/silverstripe-searchable everything seems to work fine but I've found a bug and don't know how to handle it. When i'm searching for content in dataobjects that object is being deleted form my db and I don't know why. There is open issue on github https://github.com/i-lateral/silverstripe-searchable/issues/6 but none of that solution worked for m
168: [08:34:59] <cheatus> In anyone could take a look at this and possibly provide some help?
169: [08:35:54] <wmk> ouch cheatus
170: [08:36:34] <wmk> cheatus, i had good experiences with https://github.com/g4b0/silverstripe-searchable-dataobjects
171: [08:36:41] <wmk> works fine on single language sites
172: [08:38:34] * lck_ has joined #silverstripe
173: [08:38:34] <ss-helper> lck_: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
174: [08:38:38] * janneklouman-- quit (Ping timeout: 252 seconds)
175: [08:40:14] <lck_> Trying to display dataobjects as a page with custom routes. Seems to work. However i wish to use templates/Page.ss as a template, but with templates/layout/Jobs.ss as a layout. How do i do this?
176: [08:40:57] <lck_> $this->renderWith('Jobs'); in the index method, does not work. But $this->renderWith('Page') does
177: [08:42:10] <lerni> lck_: flush!
178: [08:43:03] <lck_> Sadly that is not the issue
179: [08:43:50] <cheatus> @wmk hi there, yea it's pretty painful I can't finish my project because of that. Thanks for your suggestion I'll check that out but what if I need to implement translation to other languages?
180: [08:43:57] <lck_> ?showtemplate=1 shows me that it is indeed using the templates/layout/jobs.ss. I think it might not be using the Page.ss with the Jobs as layout?
181: [08:44:18] <wmk> cheatus, do you have a single language site yet or do you have translations?
182: [08:44:38] <wmk> if you need translations later we'd need to refactor this search module
183: [08:45:50] <cheatus> Single lang now, but maybe in the future it will be translated - I don't really know but it's good to have some other options
184: [08:46:24] <wmk> cheatus, of course. See the issues at that module, maybe it gets rewritten some time to use dataobjects, then filtering by locale would be possible
185: [08:47:28] <cheatus> Ok I will, thanks
186: [08:50:21] <wmk> lck_, doesn't renderwith use an array? so ->renderWith(['Jobs', 'Page']) should do the trick. It uses Jobs for layout and falls back to Page for general outside template
187: [08:51:28] <lck_> Oh! I tried that, but assumed it didn't work, since my template variable $ClassName didn't change
188: [08:52:05] <lck_> But it does indeed seem to be working. Do you know however why the $ClassName variable doesn't change?
189: [08:52:17] <wmk> lck_, i could be wrong, i'm always usure about that syntax ;)
190: [08:52:37] <lck_> I just tested it. And you are not wrong :)
191: [08:52:57] <wmk> lck_, ? depends on scope? hard to tell without your code
192: [08:53:01] <wmk> !paste lck_
193: [08:53:01] <ss-helper> lck_: Please paste your code using something like http://kopy.io/ or http://www.sspaste.com/ or https://gist.github.com/ and then paste the link here.
194: [08:56:20] <lck_> https://gist.github.com/hoodweb/20ff7f7ea73fbe1bce0e2ac1374885a0
195: [08:58:00] <lck_> My issue is the class that i add on <body> :-) If that makes sense
196: [09:00:50] * kinglozzer has joined #silverstripe
197: [09:01:33] <wmk> lck_, hmm... debug it? *cough*... Debugging templates is kinda pain.
198: [09:02:06] <wmk> but in JobDetailPage_Controller you won't need to define the index like this, cause it automatically renders with a JobDetailPage template by convention
199: [09:02:22] <wmk> and: What is $ClassName outputting? Page?
200: [09:02:26] <wmk> kinglozzer, ☺/
201: [09:02:28] <lck_> Yup
202: [09:02:40] <kinglozzer> \o wmk
203: [09:03:05] <wmk> lck_, if you output $ClassName inside JobDetailPage.ss ?
204: [09:03:32] <lck_> 'Page'
205: [09:03:51] <lck_> This is not the same behaviour when using the standard CMS ofc
206: [09:04:03] <wmk> hmm...
207: [09:04:33] <wmk> the page is published? And in the DB you see "JobDetailPage" as ClassName?
208: [09:05:23] <lck_> I tried deleting index() which resulted in a Page.ss tempalte with Page.ss layout.
209: [09:05:30] <wmk> btw: I love https://github.com/NightJar/ssrigging-slug for the urlslug functionality. This one comes with url param instaead of ID
210: [09:05:40] * janneklouman-- has joined #silverstripe
211: [09:05:51] <wmk> lck_, i guess you're still on a Page in DB, try to re-publish that page
212: [09:06:21] <lck_> It is not a page though. I simply use the controller to display with
213: [09:06:33] <lck_> oh wait. i might be an idiot.
214: [09:07:55] <lck_> I forgot to build, since i am not using the page in the CMS... But nevertheless $ClassName is still 'Page'
215: [09:08:06] <wmk> lck_, not an idiot, just without rubber duck
216: [09:08:42] <wmk> well, if you use controller only - why do you have a related page for it?
217: [09:08:56] <wmk> and if you don't have a related page, classname seems to fallback to "Page"
218: [09:09:09] <wmk> so you can overwrite it in your controller with a method called "getClassName()"
219: [09:09:14] <wmk> and return the string you need
220: [09:10:05] * Tron has joined #silverstripe
221: [09:10:44] <lck_> I might override the getClassName. What do you mean however with related page? Do you mean my JobDetailPage class? I thought that was required?
222: [09:11:23] <wmk> well, kinda. Not really
223: [09:11:28] <lck_> As you can see i have overridden the canCreate method, since i do not wish that the admin can create this page in the cms
224: [09:11:40] <wmk> but if you have it you'd need a page of that type in the CMS
225: [09:11:49] <Tron> hey guys I have a template question with how to loop over a set of images like this private static $many_many = array( 'DesignerImageSet' => 'Image' );
226: [09:11:56] <lck_> Would removing the JobDetailPage class all together have any benefits?
227: [09:12:27] <wmk> otherwise you need a route to the controller, as there are no default controller routes any more
228: [09:12:46] <wmk> so - yes, for beginning a page is kinda needed
229: [09:13:04] <lck_> Isn't the routing i have enough?
230: [09:13:05] <wmk> Tron, loop over it ;)
231: [09:13:29] <Tron> wmk i loop over $DesignerImageSet
232: [09:13:39] <wmk> Tron, <% loop $RelationName %>
233: [09:13:42] <wmk> yes
234: [09:13:46] <wmk> in template
235: [09:13:51] <Tron> how do i assign something like this .SetRatioSize(80,80)
236: [09:14:02] <wmk> $Me.SetRatioSize()
237: [09:14:03] <kinglozzer> Tron: Just use $SetRatioSize directly
238: [09:14:18] <kinglozzer> Either/or :)
239: [09:14:20] <wmk> kinglozzer, really? could also be possible, dunno.
240: [09:14:30] <kinglozzer> Yep, either will work
241: [09:14:41] <wmk> $Me is like "$this" in templates. returns the current object
242: [09:14:45] <wmk> kinglozzer, good to know
243: [09:14:47] <Tron> ahhh right il give this a try
244: [09:14:48] <Tron> ty
245: [09:15:53] <wmk> lck_, well, routing would work, but in your case i'd make a page in cms and give it the URLSegment "job"
246: [09:16:07] <wmk> and remove the routes.yml after that
247: [09:17:24] <lck_> I understand. However, my clients barely know how to doubleclick. I think they would be confused by this "dumb" page in the sitetree. :P
248: [09:18:01] <lck_> Could you elaborate on what removing my Page extension would do?
249: [09:18:32] <wmk> well, there is a way to hide pages in cms you're not allowed to edit
250: [09:18:35] <wmk> simple css.
251: [09:19:20] <lck_> Right now i am overriding the canCreate method returning false. This way they are not able to create the page at all.
252: [09:19:52] <wmk> of course. and canEdit... depends on how you manage the actual jobs
253: [09:21:00] <lck_> I do think i have a working solution atm, with your renderWith('JobsDetailPage','Page') tip, and overriding getClassName :-) Thanks alot
254: [09:28:50] * cupcake has joined #silverstripe
255: [09:29:07] <cupcake> o/ o/
256: [09:29:58] <slievr1> o/
257: [09:30:02] * slievr1 is now known as slievr
258: [09:30:39] <wmk> ☺/ cupcake
259: [09:31:13] <wmk> lck_, you're welcome. Though with a actual page in CMS it'd be cleaner
260: [09:34:16] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
261: [09:35:16] * irogue has joined #silverstripe
262: [09:37:28] * agent44 has joined #silverstripe
263: [09:45:56] * irogue quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
264: [09:58:17] * UncleCheese has joined #silverstripe
265: [11:19:06] * cheatus quit (Ping timeout: 260 seconds)
266: [11:27:58] * micmania1 quit (Quit: micmania1)
267: [11:44:46] <cloph> wmk: re caching backend /me just uses xcache's var store and on-disk for the aggregate stuff - no perf or other bottleneck that would other stuff worthwhile.. But if you ask memcached or redis, then I'd go for redis if you have the choice..
268: [11:52:57] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
269: [11:53:09] * UncleCheese has joined #silverstripe
270: [11:53:44] * UncleCheese quit (Client Quit)
271: [11:55:47] * neilf__ has joined #silverstripe
272: [12:01:06] * lck_ quit (Ping timeout: 260 seconds)
273: [12:01:09] * agent44 quit (Quit: zzz)
274: [12:01:25] * agent44 has joined #silverstripe
275: [12:16:05] * lucinderella has joined #silverstripe
276: [12:16:57] * agent44 quit (Ping timeout: 260 seconds)
277: [12:16:58] * lucinderella is now known as agent44
278: [12:18:36] <slievr> Hello, am I missing something why does this return a 200
279: [12:18:37] <slievr> $response = new SS_HTTPResponse($this->RenderWith('ErrorPage'),'404');
280: [12:18:37] <slievr> echo $response->getStatusCode( );
281: [12:18:37] <slievr> $response->output();
282: [12:19:35] <kinglozzer> slievr: $response->getStatusCode() returns 200? Or the response is a 200 when its output?
283: [12:19:40] <kinglozzer> Where are you calling that?
284: [12:19:54] <slievr> controller
285: [12:20:12] <slievr> the response is 200, it renders correctly
286: [12:20:19] <kinglozzer> Try return $response; instead of $response->output()
287: [12:20:50] <slievr> Yep, that's it
288: [12:20:54] <slievr> thanks kinglozzer
289: [12:21:04] <kinglozzer> Cool :)
290: [12:22:18] <slievr> Is there any instance where I would want to use output() ?
291: [12:24:17] <kinglozzer> hmm
292: [12:24:29] <kinglozzer> You could use $response->output(); exit;
293: [12:24:33] <kinglozzer> I think that would work
294: [12:30:16] * markcl quit (Remote host closed the connection)
295: [12:33:26] * markcl has joined #silverstripe
296: [12:34:54] <slievr> right, makes sense I thought the output method would do that already.
297: [12:36:24] * lucinderella has joined #silverstripe
298: [12:37:32] * agent44 quit (Ping timeout: 265 seconds)
299: [12:37:33] * lucinderella is now known as agent44
300: [12:38:08] * markcl quit (Ping timeout: 260 seconds)
301: [13:05:51] * cupcake quit (Ping timeout: 260 seconds)
302: [13:08:31] * markcl has joined #silverstripe
303: [13:14:15] <lerni> look I've got a new module ;)
304: [13:14:17] <lerni> https://github.com/lerni/silverstripe3-italian-lang-fix
305: [13:14:35] <lerni> it should do what it's name says, fix it.yml parsing
306: [13:17:25] <cloph> and that is better than a pull request to fix that upstream because...?
307: [13:18:23] <cloph> ah, ignore, pull request for that already exists :-)
308: [13:19:31] <Tron> exit
309: [13:20:43] <cloph> almost /part to leave a channel :-)
310: [13:22:17] <lerni> cloph: since this has to be done per Transifex and it.yml breaks hard
311: [13:22:49] <cloph> or by making silverstripe's parser more lax re possible yaml syntax.
312: [13:23:56] * Tron quit (Ping timeout: 260 seconds)
313: [13:24:42] <lerni> tractorcow and sam have put some effort to make sure next it doesn't happen again. Should be in "cow" I think.
314: [13:25:27] <lerni> ...but until next pointrelese, it.yml just breaks, thats why this module exists at all
315: [13:27:43] <cloph> the patch could be smaller though by usingHelp1: >-
316: [13:28:19] <cloph> ups, I mean "Help1: >-"<newline><indented-multi-linetranslation>
317: [13:29:43] <cloph> btw: why make the patch a remote URL instead of local file, part of the module?
318: [13:33:25] <lerni> cloph: 'git diff' did it that way and well why remote, this is since 'netresearch/composer-patches-plugin' suggests to handle it that way.
319: [13:38:24] <cloph> yeah, sure, if you make it a single-line-diff then it looks that way, what I mean silvestripe would be fine with the ">-" ("folded block, chomp last newline") modifier
320: [13:39:27] <cloph> and is that netresearch thing actual document, or meta-speek for a google search suggested doing it that way :-)
321: [13:39:40] * cloph really is wondering, I didn't use composer thus far)
322: [13:41:13] <lerni> cloph: well google it!
323: [13:41:23] <cloph> that'd be too easy :-)
324: [13:41:34] <lerni> :)
325: [13:43:09] <cloph> but should have just looked at your composer.json - so it is not core composer stuff, but rather using an additional plugin that just happens to use URLs for that...
326: [13:43:18] * UndefinedOffset has joined #silverstripe
327: [13:56:27] <kinglozzer> cloph/lerni: I've submitted a PR to silverstripe/cow for it, I don't think it's merged yet though...
328: [13:59:25] <lerni> kinglozzer rocks!
329: [14:05:31] <wmk> cloph, thanks. it seems the new server is faster without cache than the old machine with cache
330: [14:05:54] <wmk> so for beginning it's ok so. But i always want it faster
331: [14:06:31] <wmk> cloph, PR for lang fix isn't working, as framework gets lang from transifex
332: [14:07:54] <wmk> lerni, i'd put the patch inside the module, an external url might change and break the module
333: [14:10:02] <lerni> it's my own gist, but yes could have put it in the module
334: [14:10:47] <wmk> lerni, basically i used gist on the php7 patch, so...
335: [14:10:50] * neilf__ quit (Quit: Connection closed for inactivity)
336: [14:10:55] <wmk> as long it's your own gist it should be OK
337: [14:28:14] * DarjusIT has joined #silverstripe
338: [14:28:29] <DarjusIT> Hi all
339: [14:29:19] <DarjusIT> is any module for base SS, user login history for logging IP, login date, account to track users?
340: [14:29:43] <wmk> DarjusIT, that was/is built in
341: [14:29:52] <wmk> afaik it's a module now...
342: [14:30:22] <DarjusIT> do you know how its named? wmk
343: [14:32:23] <wmk> just searching for that
344: [14:35:13] <wmk> it's LoginAttempt
345: [14:35:25] <wmk> and Security.login_recording must be true
346: [14:35:56] <wmk> was set to false in a recent release, was on in the past
347: [14:36:48] <wmk> MemberAuthenticator::record_login_attempt() does the actual job
348: [14:57:41] <DarjusIT> https://github.com/axyr/LoginHistory
349: [14:57:48] <DarjusIT> maybe someone used this
350: [14:57:59] <DarjusIT> and knows what is maxmindgeoip?
351: [15:00:18] * muskie9 has joined #silverstripe
352: [15:04:14] <cloph> the maxmind geoIP is a database that allows to map the IP address to the geographical location.
353: [15:04:49] <cloph> depending on the granularity it is free to use (and city is pretty accurate I'd say)
354: [15:04:50] <kinglozzer> DarjusIT: That module is only for SilverStripe 2.4
355: [15:05:28] <cloph> not sure why you want it in silverstripe/what actual purpose you have for it, but you could also use piwik and custom tracking of login events
356: [15:06:34] * wilson has joined #silverstripe
357: [15:06:36] <wilson> *wilson
358: [15:06:46] <kinglozzer> ed balls
359: [15:07:05] <kinglozzer> (probably one only brits will understand) :P
360: [15:07:18] * helenclarko has joined #silverstripe
361: [15:07:35] <wilson> Stupid me prolly... i can't fin the formula to loop a specific page..... I thought <% loop $url-of-page %> should do it.,...
362: [15:07:50] <slievr> what does *[user] do second person I've seen do that
363: [15:08:07] <kinglozzer> wilson: "loop" a page? If there's only one, then you're not looping
364: [15:08:13] <muskie9> wilson if it's a single page, wouldn't it be <% with $url-of-single-page %>
365: [15:08:22] <kinglozzer> Do you mean <% with $Page('page-url') %> {$Title} <% end_with %> ?
366: [15:08:30] <muskie9> ^
367: [15:09:04] <wilson> <kinglozzer>Yup!
368: [15:11:14] <wilson> <kinglozzer>Thanks!
369: [15:11:17] * wilson quit (Client Quit)
370: [15:34:09] <DarjusIT> is any module to limit, if user is logged in no one canoot login with same user accout until it disconects?
371: [15:34:44] <kinglozzer> DarjusIT: No, but there is one to only allow one user to edit a page at a time if that helps?
372: [15:41:28] <DarjusIT> :(
373: [15:55:36] * wmk quit (Ping timeout: 256 seconds)
374: [16:06:31] <slievr> anyone happen to remeber the name of a module that will create an object if it doesn't exsist
375: [16:15:04] <slievr> I found it
376: [16:15:05] <slievr> https://github.com/silverstripe/silverstripe-tagfield
377: [16:15:09] <slievr> for anyone else
378: [16:53:38] * darianno quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
379: [17:31:27] * kinglozzer quit ()
380: [17:34:58] * lerni quit (Remote host closed the connection)
381: [17:40:10] <muskie9> I absolutely hate this error: Fatal error: Call to a member function CreatedCount() on null in /var/www/public/my-web-root/framework/admin/code/ModelAdmin.php on line 425
382: [17:40:29] <muskie9> the most ambiguous error for a model admin bulk loader
383: [17:44:23] * agent44 quit (Quit: zzz)
384: [18:09:37] * digitall_it has joined #silverstripe
385: [18:09:38] <ss-helper> digitall_it: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
386: [18:10:00] <digitall_it> Good evening (or morning, if that’s your timezone) to everyone!
387: [18:11:31] <digitall_it> I’d like to know: what if I would like to easily a list of pages to a dataobject without creating a database relationship?
388: [18:11:42] <digitall_it> Would you suggest using a multivaluefield?
389: [18:11:53] <digitall_it> *easily add
390: [18:12:04] * janneklouman-- quit (Ping timeout: 250 seconds)
391: [18:13:29] <digitall_it> Just to clarify: I’ve got a dataobject that acts like a widget, that renders out “featured” pages, with an image, a text and an image. I would like to add a variable number of pages to this widget without telling widget has_many pages, a page has_many widgets.
392: [18:13:58] <digitall_it> usually for a single page I can store the ID, but if there is more than one?
393: [18:16:58] * darianno has joined #silverstripe
394: [18:18:07] * darianno quit (Client Quit)
395: [18:43:57] * DarjusIT quit (Quit: Leaving)
396: [18:44:40] * DarjusIT has joined #silverstripe
397: [18:46:52] * Quatrepee is now known as netzucks
398: [18:47:12] * netzucks is now known as Quatrepee
399: [19:05:09] * neomang has joined #silverstripe
400: [19:05:45] <neomang> When using the subsites module, is it possible to limit certain classes to certain subsites?
401: [19:07:31] <neomang> I saw it was an option for dataobjects, at least making them subsite aware
402: [19:08:20] <neomang> but I didn't know if they could be properly limited or if this could be applied to pagetypes etc.
403: [19:08:58] <cloph> if you mean having only certain page templates: yes, this is default config setting, you can hide those that should not show up as available pagetypes
404: [19:09:53] <neomang> I mean, i know the templates in the theme could be limited, but could the same be done for the underlying page type in php?
405: [19:10:16] * UndefinedOffset quit (Quit: Leaving.)
406: [19:10:33] <neomang> oh, hold on
407: [19:10:36] <neomang> found the answer
408: [19:11:03] <digitall_it> A subsite cannot use a different codebase as the main site, they are intrinsically tied. However, you can remove page types from a subsite when creating the subsite.
409: [19:11:49] <neomang> alright. I was hoping to not change the codebase but for example, subsite A can use dataobjects x and y, whereas subsite B can only use y
410: [19:12:08] <digitall_it> You can try to make the DataObjects subsite “aware”
411: [19:12:21] <neomang> just to try to keep the cms clear between sites
412: [19:12:25] <cloph> again: by default you have that for pagetypes, if you want it for other stuff, you have to modify the code/add that yourself
413: [19:12:35] <digitall_it> Also, you could make the modelAdmin subsite Aware
414: [19:13:15] <neomang> interesting idea digitall_it, I'll have to look into that, see what it would take and if it would be worthwhile for our use cases
415: [19:13:15] <digitall_it> That means, if you use the modeladmin to manage the dataobjects, you can try to disable the interfaces on the LeftAndMain per subsite
416: [19:14:01] <digitall_it> it will require fr you to look at some variable that returns the subsite name at runtime
417: [19:14:31] <digitall_it> Another idea could be to have it ingrained into the Security panel
418: [19:15:36] <digitall_it> for example hide the dataobjects modeladmin if the use has no access to them
419: [19:16:31] <digitall_it> Permissions
420: [19:16:32] <digitall_it> Groups can be associated with one or more subsites, in which case the granted page- and asset-related permissions only apply to this subsite.
421: [19:17:47] <neomang> group permissions would be great for other users, but the primary users will be admins and we'll need access to all sites, but your suggestion for modifying the security panel would clear up the junk for us
422: [19:18:03] <neomang> thanks for the advice
423: [19:18:41] <digitall_it> To make your DataObject subsite aware, include a SubsiteID on your DataObject.
424: [19:18:49] <digitall_it> private static $has_one = array(
425: [19:18:49] <digitall_it> 'Subsite' => 'Subsite'
426: [19:18:50] <digitall_it> );
427: [19:19:14] <digitall_it> look over there: https://github.com/silverstripe/silverstripe-subsites#enable-subsite-support-on-dataobjects
428: [19:20:04] <neomang> oh awesome, this hadn't turned up in my searches
429: [19:20:23] <neomang> wait, that's in the readme?
430: [19:20:30] <digitall_it> yes, eh eh eh
431: [19:20:34] <neomang> oh jeez, i totally mised that lol
432: [19:20:53] <neomang> for shame, my reading skills are weak today
433: [19:20:59] <digitall_it> what is your experience with this module?
434: [19:21:14] <digitall_it> is this only something cosmetic, does it interfere with other module operations?
435: [19:21:52] <digitall_it> I would like to apply that a site that will have Translatable and Elemental too
436: [19:22:04] <neomang> I actually haven't installed it yet, this was going to be one thing to consider when determining if it would be right for our needs
437: [19:22:46] <digitall_it> did you check out the Elemental or Blocks module? it is awesome
438: [19:23:05] <neomang> i'll look into those
439: [19:23:07] <digitall_it> I couldn’t use Blocks yet but Elemental is very nice
440: [19:23:30] <digitall_it> instead of cluttering your page of fields you add blocks as you go
441: [19:23:59] <digitall_it> Blocks even has Blocksets, but with some tweaking you can make nested blocks in Elemental
442: [19:24:20] <digitall_it> that is, a row that has columns, each column has an image, then a text, then a button, etc...
443: [19:24:27] <digitall_it> fully sortable
444: [19:25:00] <digitall_it> It should work with translatable, but I’m not sure it works with subsites
445: [19:25:41] <digitall_it> as translatable I think is very similar to multisites, it should do the trick
446: [19:26:22] <digitall_it> what is your workflow for creating frontend css and javascript?
447: [19:26:44] <neomang> That's actually not my bag, I work almost exclusively on the backend
448: [19:27:03] <digitall_it> so you will not create the frontend
449: [19:27:16] <neomang> Nope, that'd be done elsewhere in the department
450: [19:27:50] <digitall_it> ok, allow me to point out to another awesome module you surely heard of: jonom focus+
451: [19:27:52] <digitall_it> ops sorry
452: [19:27:57] <digitall_it> https://github.com/jonom/silverstripe-focuspoint
453: [19:28:08] <digitall_it> do you know it?
454: [19:28:21] <neomang> yeah we're actually using it currently
455: [19:28:48] <digitall_it> did you encounter a bug where if you save the focus point and then reload the image, the point returns to the center?
456: [19:29:31] <neomang> not that I recall, but we haven't done an exceptional amount with it yet as we're still building the site up and havent gotten to data migration yet where we'll need to make the tweaks to images
457: [19:29:45] <neomang> but it helped us with our test data
458: [19:30:47] <digitall_it> nice, I miss the ease of fixture on the old Symfony 1.x
459: [19:30:53] * muskie9 quit (Ping timeout: 244 seconds)
460: [19:31:32] <digitall_it> you could easily create objects to populate your database, still taking the grips of that here
461: [19:37:13] * lerni has joined #silverstripe
462: [19:42:06] <digitall_it> hi lerni
463: [19:42:18] * DanaeNZ has joined #silverstripe
464: [19:43:14] <lerni> digitall_it: hi o/
465: [19:44:08] * janneklouman-- has joined #silverstripe
466: [19:45:09] * muskie9 has joined #silverstripe
467: [19:58:49] <DanaeNZ> happy election day
468: [19:59:07] <digitall_it> I hope Trump doesn’t win
469: [20:00:00] <DanaeNZ> I'm going to NYC next March
470: [20:00:26] <DanaeNZ> Hopefully the kerfuffle dies down by then, and hopefully too soon before any new policies come into play
471: [20:00:55] * vitaly_ has joined #silverstripe
472: [20:02:20] * adrexia has joined #silverstripe
473: [20:14:17] * Dig has joined #silverstripe
474: [20:16:42] * muskie9 will be very drunk pending election results
475: [20:16:53] <digitall_it> eh eh
476: [20:23:30] * pippy has joined #silverstripe
477: [20:30:15] * micmania1 has joined #silverstripe
478: [20:57:55] * janneklouman-- quit (Read error: Connection reset by peer)
479: [20:58:17] * janneklouman-- has joined #silverstripe
480: [20:59:30] <DarjusIT> maybe somewhere is a tutorial how to make controller view in SS CMS? just hello world would be enough
481: [21:07:03] <Hailwood> DarjusIT: huh?
482: [21:07:52] <digitall_it> DarjusIT you mean a themeless response from a Page_Controller?
483: [21:08:02] <digitall_it> can you expand on your request?
484: [21:11:27] * micmania1 quit (Quit: micmania1)
485: [21:14:05] * micmania1 has joined #silverstripe
486: [21:17:04] * UncleCheese has joined #silverstripe
487: [21:17:23] <digitall_it> hi UncleCheese
488: [21:17:26] <UncleCheese> hi
489: [21:23:46] <DarjusIT> No I mean in CMS admin part
490: [21:24:04] <digitall_it> so you mean a ModelAdmin?
491: [21:24:20] <digitall_it> you want to add a button on the left side of the interface?
492: [21:27:17] <DarjusIT> yes same as model admin but how to costumise views data and so on, like you make page templates and views with controller so I cound do same thing in CMS admin part
493: [21:28:13] <digitall_it> ok you need to have a completely free Main area in the CMS to do whatever you want?
494: [21:29:32] <DarjusIT> I tried to look in ss docs but it not seem to be clear and very informative, so I could for example make in model left "My view" click on it and see for example 4 html blovks with hello world or something basic like that so I could understand how to make it
495: [21:30:25] <digitall_it> ok I think I understand, I think you will need to create a class that extends lower in the hierarchy that usual
496: [21:30:41] * micmania1 quit (Quit: micmania1)
497: [21:31:25] * micmania1 has joined #silverstripe
498: [21:31:27] <DarjusIT> for exmaple to create view like this http://swipestripe.com/assets/Uploads/settings.png
499: [21:31:45] <digitall_it> where did you see that
500: [21:32:03] <DarjusIT> this is swipestripe settings page
501: [21:32:13] <digitall_it> ok let me take a look in the git repo
502: [21:32:34] <DarjusIT> its shop module
503: [21:33:19] <digitall_it> just a moment I’m searching in the repo
504: [21:33:27] <DarjusIT> https://github.com/swipestripe/silverstripe-swipestripe/tree/2.1
505: [21:33:57] <digitall_it> yes already found, looking for matching strings
506: [21:35:03] * UndefinedOffset has joined #silverstripe
507: [21:35:04] <digitall_it> ok found one
508: [21:35:05] <digitall_it> https://github.com/swipestripe/silverstripe-swipestripe/blob/5e55adf1329743e3a94de13d3cb721627db705de/code/admin/ShopAdmin.php
509: [21:35:19] <digitall_it> this seems to be the class that manages that panel, let me have a check on how it works
510: [21:35:44] <DarjusIT> ok thx for help
511: [21:35:45] <digitall_it> first of all, it requires custom css and javascript
512: [21:36:04] <digitall_it> so you can style as you wish and respond to js events
513: [21:37:52] <digitall_it> also, as you can see, there are many classes declared in this file
514: [21:38:11] <digitall_it> they created a class ShopAdmin extends ModelAdmin
515: [21:38:35] <digitall_it> then many other small classes for example class ShopAdmin_BaseCurrency extends ShopAdmin
516: [21:38:39] <digitall_it> so we are a level too deep
517: [21:38:52] <digitall_it> we are already in the classes that appear when you click on one of these boxes
518: [21:38:57] <DarjusIT> yes I think that ModelAdmins is sort of controller for SS cms area
519: [21:39:11] <digitall_it> yes it is, but you want to style it your way
520: [21:39:44] <digitall_it> let me check in the code/admin directory for more clues
521: [21:40:09] <digitall_it> there, https://github.com/swipestripe/silverstripe-swipestripe/blob/5e55adf1329743e3a94de13d3cb721627db705de/code/admin/ShopConfig.php
522: [21:40:18] <digitall_it> let’s check that
523: [21:40:55] * lerni quit ()
524: [21:41:02] <digitall_it> uhm no, almost there. this is the class that records the preferences
525: [21:42:57] * irogue has joined #silverstripe
526: [21:44:26] <digitall_it> now that I look,
527: [21:44:39] <digitall_it> seems like you have to enter a license key in one of these screens
528: [21:44:51] <digitall_it> this could mean that the source code is encrypted
529: [21:44:54] <digitall_it> of some panels
530: [21:45:15] <digitall_it> maybe it is under an ioncube encoding
531: [21:45:59] <DarjusIT> ShopConfig.php is not difficult my main problem that is little documentation how to make own view in CMS admin
532: [21:46:23] <digitall_it> I would start here: https://docs.silverstripe.org/en/3.4/developer_guides/customising_the_admin_interface/cms_layout/
533: [21:46:45] <DarjusIT> I kinda try to loot at modules like this and trying to make simple hello worl view and not hapening :)
534: [21:46:46] <digitall_it> there seems to be a Layout API
535: [21:48:05] <DarjusIT> it would be awsome it SS guys would make videos about this like about simple website developing :)
536: [21:48:20] <muskie9> anyone ever try loading a model admin with ~41000 records? I wasn't sure how or if it would load up, but seems it can't handle that number of records... just Address, City, State, Zip, Country and a has_one relation ID on these records
537: [21:48:48] <digitall_it> another information you could do is that: you could overload a cms template, look at this page
538: [21:48:50] <DarjusIT> yes I did
539: [21:48:52] <digitall_it> https://docs.silverstripe.org/en/3.1/developer_guides/customising_the_admin_interface/how_tos/extend_cms_interface/
540: [21:49:03] <DarjusIT> I have ss model with 500K+
541: [21:49:29] <muskie9> and a model admin for those records loads up?
542: [21:49:38] <DarjusIT> yes
543: [21:49:54] <muskie9> maybe I have something botched in my model
544: [21:49:59] <DarjusIT> it uses lots of php memmory
545: [21:50:00] <digitall_it> muskie9: raise your PHP memory limit
546: [21:50:25] <DarjusIT> I am ysing ~2GB on that project
547: [21:50:32] <muskie9> damn!
548: [21:50:36] <digitall_it> DarjusIT, did you use pagination?
549: [21:50:41] <DarjusIT> yes
550: [21:50:47] <digitall_it> muskie9, did you?
551: [21:50:53] * UndefinedOffset quit (Quit: Leaving.)
552: [21:51:18] <DarjusIT> it I use les than 1.5 pagination trash due to php memory limit
553: [21:51:31] <muskie9> ya, pagination... gotta up my memory though
554: [21:51:47] <digitall_it> what does that modeladmin display?
555: [21:51:49] <digitall_it> a big grid?
556: [21:52:02] <digitall_it> an enormous list with hundreds of pages?
557: [21:52:02] <DarjusIT> mine is grid of 25 items
558: [21:52:26] <digitall_it> a grid of 25 items of 41000 records would still be 1600 pages
559: [21:52:39] <DarjusIT> but is I set up less that 1.5 GB memory then goint throw pagintation its crashed and askes more memory
560: [21:53:12] <digitall_it> did you use xdebug
561: [21:53:16] <digitall_it> to try to identify your problem
562: [21:53:55] <digitall_it> DarjusIT: did you look at the docs I gave you earlier? https://docs.silverstripe.org/en/3.1/developer_guides/customising_the_admin_interface/how_tos/extend_cms_interface/
563: [21:54:22] <digitall_it> maybe also look there: https://docs.silverstripe.org/en/3.1/developer_guides/customising_the_admin_interface/cms_architecture/
564: [21:54:24] <DarjusIT> there is no problem just SS CMS is build that way if it would not use so mutch JS it would be pasible to use with less memory
565: [21:54:27] <muskie9> mine is just a white screen, so probably crapped out
566: [21:54:36] <muskie9> upping my limit on my vbox
567: [21:55:12] <DarjusIT> muskie9 check server logs you will see php memory error
568: [21:56:15] <DarjusIT> for my count of rows I also extended function execution time
569: [21:56:15] <digitall_it> muskie9, the problem is that the datagrid sometimes needs to load much data in memory when has to do complicated SQL joins
570: [21:56:17] <muskie9> good call
571: [21:56:53] <digitall_it> muskie9: just remember to always switch to latest version, the links I gave you are v3.1
572: [21:57:49] <muskie9> 👍
573: [21:58:25] <digitall_it> muskie9: can you paste your cmsfields function of the modeladmin?
574: [21:59:39] <muskie9> it's just the scaffold fields... nothing special
575: [22:00:05] <digitall_it> if you comment all the fields, does it load?
576: [22:00:20] <digitall_it> is there a particular field that crashes it upon adding to the fieldlist?
577: [22:01:13] <digitall_it> what does your silverstripe log says? if you haven’t got one, add this row to your _config.php
578: [22:01:23] <digitall_it> if(!Director::isDev()) { SS_Log::add_writer(new SS_LogFileWriter('../silverstripe-errors-warnings.log'), SS_Log::WARN, '<='); }
579: [22:01:44] <DarjusIT> it would say php memory limit
580: [22:02:06] <digitall_it> did you try commenting all the fields leaving the form empty
581: [22:02:15] * EasyCo_ has joined #silverstripe
582: [22:03:32] <digitall_it> the 41000 records are Pages?
583: [22:04:24] <DarjusIT> mine is DO but no 41k, mine is larger
584: [22:04:43] <digitall_it> I wanted to understand if these are dataobjects or pages
585: [22:04:50] <digitall_it> I hope those are dataobjects
586: [22:05:05] <digitall_it> maybe they have a relation with pages
587: [22:05:13] <digitall_it> can you post some code?
588: [22:07:04] <muskie9> na, they're DO's
589: [22:07:32] <muskie9> vbox's logs are dumb... had to re-work some stuff so I could find them 😞
590: [22:09:11] * Hailwood quit (Quit: Konversation terminated!)
591: [22:11:43] <DarjusIT> vbox's you use vargrant?
592: [22:11:49] <muskie9> yup
593: [22:11:51] <muskie9> puphpet
594: [22:12:36] <DarjusIT> I am using this https://box.scotch.io/
595: [22:12:48] <digitall_it> so do I! Love it
596: [22:13:46] <DarjusIT> yes it the best for me have 2 of these one for dev other for crashing
597: [22:15:34] <muskie9> we looked at scotch box... we had used puphpet a while back so ended up circling back to it
598: [22:17:59] <muskie9> looks like it is memory exhaustion
599: [22:19:02] <DarjusIT> :)
600: [22:19:13] <digitall_it> ok, first and foremost,
601: [22:19:17] <digitall_it> can you paste some code?
602: [22:20:02] <muskie9> it's just an arbitrary data set, was more wondering how many records people have managed in a model admin... the client won't be seeing this area anyways
603: [22:20:24] <digitall_it> many times the problem is in the way the data is loaded in memory
604: [22:20:25] <muskie9> just eating time till beer o'clock lol
605: [22:20:40] <digitall_it> for example,
606: [22:20:55] <digitall_it> I’ve got a newsletter system that sends many messages each hour
607: [22:21:01] <digitall_it> in Symfony
608: [22:21:12] <digitall_it> if I try to load all the dataset in memory it crashes
609: [22:21:20] <digitall_it> but if I load it in batches it works
610: [22:21:29] <digitall_it> I’m sure the ModelAdmin allows that, but
611: [22:21:50] <digitall_it> as an ORM is involved it muddies the water on where the memory footprint enlarges
612: [22:21:58] <digitall_it> it could be the grid, the form...
613: [22:22:02] <digitall_it> the relationships
614: [22:22:11] <digitall_it> you should use xdebug
615: [22:22:21] <digitall_it> scotchbox has the module already built in
616: [22:22:38] <digitall_it> use this slide of the latest Stripecon 2016 for guidance:
617: [22:22:49] <digitall_it> https://speakerdeck.com/wernerkrauss/debug-silverstripe-like-a-pro
618: [22:23:07] <digitall_it> it is by Lukas Erni, he was here since 30 minutes ago
619: [22:24:06] <DarjusIT> digitall_it http://www.sspaste.com/paste/show/582250739d0bb
620: [22:24:16] <DarjusIT> simple
621: [22:24:32] <digitall_it> I see it manages many models
622: [22:25:15] <DarjusIT> all works normaly exept GrabberEstate if I use less memory it crashes
623: [22:25:54] * pweh has joined #silverstripe
624: [22:26:07] <DarjusIT> I think that if SS admin would use less js in admin structure and loading it would use less memory
625: [22:26:12] <digitall_it> is there a screenshot of the admin interface
626: [22:26:50] <muskie9> 2 gigs of memory did it lol
627: [22:27:14] * pweh is now known as TehPweh
628: [22:27:14] <DarjusIT> hi5 :) muskie9
629: [22:27:47] <digitall_it> I’m curious, can we see a screenshot of this admin interface
630: [22:31:59] * irogue quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
631: [22:33:07] * irogue has joined #silverstripe
632: [22:33:14] <muskie9> https://puu.sh/sbibl/1e40c6a99a.png
633: [22:33:38] <muskie9> https://puu.sh/sbidB/f305d40b14.png
634: [22:33:53] <muskie9> https://puu.sh/sbifh/0f3c0c446b.png
635: [22:34:34] <DarjusIT> mine is that simple too :)
636: [22:34:42] <digitall_it> have you tried disabling some managed models to see which one consumes most memory?
637: [22:35:14] <muskie9> the territory zip codes does when it tried to load the gridfield... loads fine now w/the 2 gigs
638: [22:35:43] <digitall_it> try to reduce the pagination from 30 to 10 fields
639: [22:35:54] <digitall_it> in that grid
640: [22:36:22] <digitall_it> however I think there’s a bug somewhere
641: [22:36:24] <DarjusIT> I know my consumer :) ant it because of count of rows ss executes longer that plain php would I made the compare :) I event put most relationsips as serialized data :)
642: [22:37:15] <digitall_it> how do you usually navigate this large 41000 dataset?
643: [22:37:19] <digitall_it> you do a search?
644: [22:37:26] * DarjusIT quit (Quit: Leaving)
645: [22:39:00] <muskie9> we don't actually interact with this data... it was originally for an attempted geolocale lookup, but now we're just doing a straight zip code lookup... so the query done in the frontend form is fine... if we ever have to adjust the data, I'll re-run the import from the command line as the browser times out
646: [22:39:43] <digitall_it> ok so it is a pure theoretical experiment
647: [22:39:59] <digitall_it> as it is an useless interface
648: [22:40:07] <muskie9> exactly
649: [22:40:11] <digitall_it> it is like having a keyboard with 41000 buttons
650: [22:40:16] <muskie9> yup
651: [22:40:27] <digitall_it> the pagination should handle it, but
652: [22:40:39] <muskie9> more of a test of the SS cms rather than anything needed
653: [22:40:44] <digitall_it> it is difficult to understand where it is leaking without a memory dump in xdebug
654: [22:41:11] <digitall_it> you will be able to see which functions and variables are consuming more memory
655: [22:41:22] <digitall_it> if you manage to find out, you can issue a bug
656: [22:41:26] <digitall_it> in the cms
657: [22:42:12] <muskie9> I think it'd be framework since this is modeladmin and scaffold fields
658: [22:42:25] * muskie9 needs to get xdebug working again
659: [22:42:40] <digitall_it> yes, if you can create a minimum use case
660: [22:42:51] <digitall_it> with fake data, a replicable example
661: [22:43:01] <digitall_it> so that they can work on it, they will be glad to fix it
662: [22:43:02] * janneklouman-- quit (Read error: Connection reset by peer)
663: [22:43:18] <digitall_it> they could even create a test to prevent such thing in future
664: [22:43:25] * micmania1 quit (Quit: micmania1)
665: [22:43:35] <muskie9> just a build task that generates a ton of empty DataObjects, then see if the model admin loads... simple enough
666: [22:43:42] <muskie9> find the leak, and back track
667: [22:44:11] <digitall_it> yes, you should post your findings in the issue tracker
668: [22:44:35] <digitall_it> I now have to go, thanks everyone for you time! goodbye!
669: [22:44:56] * DarjusIT has joined #silverstripe
670: [22:45:10] <digitall_it> goodbye DarjusIT, muskie9
671: [22:45:13] * digitall_it quit (Quit: digitall_it)
672: [22:45:26] <DarjusIT> bye
673: [22:48:44] * janneklouman-- has joined #silverstripe
674: [22:53:57] <muskie9> home time
675: [22:54:00] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
676: [23:00:02] * ss-helper quit (Remote host closed the connection)
677: [23:00:14] * ss-helper has joined #silverstripe
678: [23:03:22] * micmania1 has joined #silverstripe
679: [23:15:57] * TehPweh is now known as bazhang_
680: [23:16:27] * bazhang_ is now known as Guest93764
681: [23:28:34] * DarjusIT quit (Read error: Connection reset by peer)

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