#silverstripe IRC Log

IRC log for 2 May 2016

All timestamps are in UTC.

1: [00:00:02] * ss-helper quit (Remote host closed the connection)
2: [00:00:15] * ss-helper has joined #silverstripe
3: [00:00:20] <nightjar> urgh, the effort
4: [00:00:37] <nightjar> k so standard sapphiretest subclass right
5: [00:00:52] <spronk> yup
6: [00:01:36] <nightjar> protected static fixture_file = projectmodule/tests/fixtures/dat.yml
7: [00:01:37] <nightjar> et
8: [00:01:38] <nightjar> c
9: [00:01:52] <spronk> k
10: [00:02:18] <nightjar> then setUpOnce() parent::setUpOnce then $mycoolobj = this.objFromFixture('Event','TestEvent')
11: [00:02:56] <spronk> yeeep
12: [00:03:01] <spronk> and then what happen
13: [00:03:06] <nightjar> then testGetLatitude() assertequals('2.3153151whatever', $mycoolobj
14: [00:03:10] <nightjar> k
15: [00:03:12] <nightjar> so run
16: [00:03:18] <nightjar> line above
17: [00:03:27] <nightjar> (sake)
18: [00:04:15] <nightjar> it whinges: PHP Fatal error: Couldn't find object 'EmptyEvent' (class: Event) in [...]/SapphireTest.php on line 437
19: [00:04:37] <spronk> whats your fixture yaml
20: [00:04:39] <spronk> paste thats
21: [00:04:52] <nightjar> I'm all righto, maybe I can't make objects in setUpOnce
22: [00:05:06] <nightjar> change to setUp() ( and parent::setUp() )
23: [00:05:06] <spronk> you should be able to as long as parent:: call is run
24: [00:05:07] <spronk> i think
25: [00:05:41] <nightjar> then it whinges about translatable not finding any locales or something (testing location extension on events page)
26: [00:05:47] <spronk> bro
27: [00:05:50] <spronk> paste your yammly
28: [00:05:53] <nightjar> k
29: [00:06:03] <nightjar> Event:
30: [00:06:03] <nightjar> EmptyEvent:
31: [00:06:05] <nightjar> Title: EE
32: [00:06:11] <nightjar> done.
33: [00:06:41] <nightjar> mebbe there's some kind of failure on write
34: [00:06:56] <spronk> could not find object emptyevent
35: [00:06:56] <spronk> hmm
36: [00:06:56] <nightjar> it should complain about that though right?
37: [00:07:04] <spronk> is it actually loading the fixture?
38: [00:07:13] <nightjar> well that's the bit it appears to be failing on
39: [00:07:13] <spronk> try changing it to another name
40: [00:07:14] <spronk> liek
41: [00:07:15] <spronk> bob
42: [00:07:17] <nightjar> I did
43: [00:07:24] <nightjar> same error, different name.
44: [00:09:13] <spronk> and it's definitely.... a SapphireTest?
45: [00:10:03] <nightjar> yup
46: [00:10:52] <nightjar> like I say, if I change to setUp then it appears to try and load the fixture
47: [00:10:58] <nightjar> but errors because translatable
48: [00:11:04] <spronk> hmm
49: [00:11:05] <spronk> thats weird
50: [00:11:31] <nightjar> I thought so yeh
51: [00:12:16] <spronk> where the fuck is SapphireTest
52: [00:14:09] <nightjar> http://api.silverstripe.org/3.1/source-class-SapphireTest.html#421-441
53: [00:14:20] <spronk> fuck this code is icky
54: [00:15:31] <spronk> interesting
55: [00:15:40] <spronk> setUp is where the fixtures are first metnioned
56: [00:15:46] <spronk> so maybe you can't use setUpOnce for fixtures
57: [00:15:48] <spronk> makes sense though
58: [00:19:58] <nightjar> I thought it did
59: [00:20:05] <nightjar> setUp runs before every text method right?
60: [00:20:49] <nightjar> Does that mean it flushes and (re)imports (fixtures) before every method?
61: [00:21:12] <nightjar> that seems... well undesired in this case at least.
62: [00:21:21] <nightjar> I'm doing simple lookups, not writes.
63: [00:21:21] <spronk> yup.
64: [00:21:40] <spronk> well
65: [00:21:42] <nightjar> if I was writing I mean sure that seems more useful
66: [00:21:48] <nightjar> clean state on each run
67: [00:21:49] <spronk> it's not like SS is fast enough for proper TDD anyway
68: [00:21:49] <spronk> so
69: [00:21:51] <spronk> meh
70: [00:21:57] <nightjar> luls
71: [00:22:08] <nightjar> painful when you haven't got sqlite set up too
72: [00:22:16] <nightjar> right, setting default locale :<
73: [00:26:24] <nightjar> oh good
74: [00:26:33] <nightjar> tests don't read site wide configurations
75: [00:26:40] <nightjar> that's handy
76: [00:27:53] * adrexia quit (Quit: My Mac has gone to sleep. ZZZzzz…)
77: [00:29:23] <nightjar> maybe they do, idk.
78: [00:35:58] * jules0x has joined #silverstripe
79: [00:37:40] * Stomach quit (Quit: zzz)
80: [00:38:16] <jules0x> is there a way to return an aribitrary image as a summary field for a row in a gridfield?
81: [00:38:25] <jules0x> There certainly used to be...
82: [00:39:49] <jules0x> I had referenced a function name in $summary_fields, and in that function I created a new Image(), setting the setFilename('mysite/image/x.jpg')
83: [00:40:40] <jules0x> then returned it
84: [00:40:46] <jules0x> but yeah, no workey no more.
85: [00:41:43] <jules0x> I was using it to indicate publish status for versioned objects... my workaround of 'Yes'/'No' is less visually clear... :*(
86: [00:41:56] <jules0x> UX - 1
87: [01:04:11] * micmania1 quit (Quit: micmania1)
88: [01:06:48] <Admonish> Does anyone know how to test if a string is the name of a DataObject? I would like to be able to do something like this " if($DOName == DataObject){...}"
89: [01:12:01] * Stomach has joined #silverstripe
90: [01:12:30] <spronk> Admonish what do you mean 'name of a DataObject'
91: [01:12:32] <spronk> define name?
92: [01:12:36] <spronk> class name? Title? something else?
93: [01:14:42] * micmania1 has joined #silverstripe
94: [01:14:59] <Admonish> So ModelAdmin needs to have the name a a model in the managed_models array to work. But how would one test to make sure that its a real model name?
95: [01:15:12] <Admonish> or DataObjecty
96: [01:17:16] * Crashy has joined #silverstripe
97: [01:18:18] <Crashy> Hey guys any reason public function PortalPage() { return PortalPage::get_one('PortalPage'); } wouldn't work when looping over blog posts? Just want the link to the portal page $PortalPage.Link
98: [01:21:35] * adrexia has joined #silverstripe
99: [01:33:01] <nightjar> Admonish: subclassOf or something of the like
100: [01:42:27] * BrewNaked has joined #silverstripe
101: [01:42:55] <spronk> Admonish why would you need to test that?
102: [01:43:12] * Tanger has joined #silverstripe
103: [01:43:53] * adrexia quit (Ping timeout: 260 seconds)
104: [01:45:06] <ss-helper> Re: [silverstripe-dev] Re: PHP/Silverstripe IDE Survey : What IDE do you use for SS work ? - https://groups.google.com/d/msg/silverstripe-dev/bozY5hh9g4c/XgFqTBfMBgAJ
105: [01:46:33] * BrewNaked quit (Ping timeout: 240 seconds)
106: [01:48:48] <Admonish> spronk basically I am subclassing ModelAdmin and overwriting existing functions. I would like to have the code do different things based on whether the passed in $managed_models are DataObjects or not
107: [01:49:13] <spronk> this sounds kinda dodgy
108: [01:49:32] <spronk> $managed_models is hardcoded string
109: [01:49:54] <spronk> if you pass something in there that isn't a DataObject subclass, you're not doing it right.. ?
110: [01:51:58] * Stomach quit (Quit: zzz)
111: [01:52:38] <Admonish> Like I said...Im subclassing it and overwriting functionality...
112: [01:52:46] <Admonish> Custom logic
113: [01:52:56] <spronk> well
114: [01:53:12] <spronk> the only thing i could suggest is instantiating an object of that string and checking instanceof
115: [01:53:33] <spronk> but... i wouldn't advise doing that, definitely sounds like a code smell
116: [01:56:59] * novaweb has joined #silverstripe
117: [01:57:09] <Admonish> Thank you for your help :D
118: [02:01:54] * Admonish quit (Quit: Going offline, see ya! (www.adiirc.com))
119: [02:02:42] * Stomach has joined #silverstripe
120: [02:27:20] * nightjar quit (Quit: leaving)
121: [02:46:21] * Admonish has joined #silverstripe
122: [02:48:50] * slievr__ has joined #silverstripe
123: [02:52:34] * slievr_ quit (Ping timeout: 260 seconds)
124: [03:01:41] * slievr_ has joined #silverstripe
125: [03:05:24] * slievr__ quit (Ping timeout: 260 seconds)
126: [03:05:50] * slievr has joined #silverstripe
127: [03:08:19] * slievr_ quit (Ping timeout: 260 seconds)
128: [03:08:21] * slievr__ has joined #silverstripe
129: [03:11:36] * zlinux has joined #silverstripe
130: [03:11:49] * slievr quit (Ping timeout: 260 seconds)
131: [03:13:21] * Crashy quit (Quit: Leaving)
132: [03:13:22] * novaweb quit (Read error: Connection reset by peer)
133: [03:13:48] * novaweb has joined #silverstripe
134: [03:18:40] * slievr_ has joined #silverstripe
135: [03:21:54] * slievr has joined #silverstripe
136: [03:22:19] * slievr__ quit (Ping timeout: 260 seconds)
137: [03:23:29] * slievr_ quit (Ping timeout: 260 seconds)
138: [03:26:50] * slievr_ has joined #silverstripe
139: [03:28:21] * slievr__ has joined #silverstripe
140: [03:30:29] * slievr quit (Ping timeout: 260 seconds)
141: [03:31:30] * BrewNaked has joined #silverstripe
142: [03:31:39] * slievr_ quit (Ping timeout: 260 seconds)
143: [03:34:54] * slievr_ has joined #silverstripe
144: [03:35:55] * BrewNaked quit (Ping timeout: 252 seconds)
145: [03:38:39] * slievr__ quit (Ping timeout: 260 seconds)
146: [03:51:09] * micmania1 quit (Quit: micmania1)
147: [03:56:13] * jules0x quit (Quit: Leaving)
148: [03:59:42] * Admonish quit (Quit: Going offline, see ya! (www.adiirc.com))
149: [04:37:12] * micmania1 has joined #silverstripe
150: [04:39:05] * zlinux quit (Ping timeout: 244 seconds)
151: [04:43:27] * novaweb quit (Remote host closed the connection)
152: [05:04:06] * Admonish has joined #silverstripe
153: [05:18:57] * micmania1 quit (Quit: micmania1)
154: [05:20:10] * BrewNaked has joined #silverstripe
155: [05:24:49] * BrewNaked quit (Ping timeout: 252 seconds)
156: [05:29:28] * Stomach quit (Quit: zzz)
157: [05:32:17] * Stomach has joined #silverstripe
158: [05:37:31] * micmania1 has joined #silverstripe
159: [05:45:12] <ss-helper> Re: [silverstripe-dev] Preferred method for converting framework to PSR-2 - https://groups.google.com/d/msg/silverstripe-dev/IoMtKlju3Rc/WnGUmTTZBgAJ
160: [05:50:06] * Stomach quit (Ping timeout: 276 seconds)
161: [06:01:41] * Mike123 has joined #silverstripe
162: [06:14:20] * Copperis has joined #silverstripe
163: [06:19:07] * marvanni has joined #silverstripe
164: [06:24:45] * phorloop has joined #silverstripe
165: [06:31:10] * Eliseth has joined #silverstripe
166: [07:00:02] * Admonish quit (Quit: Going offline, see ya! (www.adiirc.com))
167: [07:07:59] * micmania1 quit (Quit: micmania1)
168: [07:09:03] * BrewNaked has joined #silverstripe
169: [07:13:34] * BrewNaked quit (Ping timeout: 244 seconds)
170: [07:14:15] * spronk quit (Quit: I may need a longer sleep timer...)
171: [07:14:51] * marvanni quit (Quit: marvanni)
172: [07:14:52] * arnhoe has joined #silverstripe
173: [07:17:01] * marvanni has joined #silverstripe
174: [07:19:53] * arnhoe_ has joined #silverstripe
175: [07:21:13] * marvanni quit (Ping timeout: 250 seconds)
176: [07:22:13] * spronk has joined #silverstripe
177: [07:23:26] * spronk quit (Max SendQ exceeded)
178: [07:23:53] * arnhoe quit (Ping timeout: 276 seconds)
179: [08:02:44] * marvanni has joined #silverstripe
180: [08:09:33] * DimiStripe has joined #silverstripe
181: [08:10:13] * novaweb has joined #silverstripe
182: [08:25:23] * Agilix_ has joined #silverstripe
183: [08:28:33] <Agilix_> Hello o/
184: [08:35:14] * Stomach has joined #silverstripe
185: [08:39:20] * Stomach quit (Client Quit)
186: [08:39:42] * Stomach has joined #silverstripe
187: [08:50:46] * Stomach quit (Quit: zzz)
188: [08:51:36] * Stomach has joined #silverstripe
189: [08:57:55] * BrewNaked has joined #silverstripe
190: [09:01:10] * wmk has joined #silverstripe
191: [09:02:37] * BrewNaked quit (Ping timeout: 260 seconds)
192: [09:19:47] * DarjusIT has joined #silverstripe
193: [09:25:28] * novaweb quit (Remote host closed the connection)
194: [09:45:33] * DarjusIT quit (Quit: Leaving)
195: [09:46:00] * DarjusIT has joined #silverstripe
196: [09:51:20] <DarjusIT> Hi all, i have problems with watermarcable, to make it work my code is this http://www.sspaste.com/paste/show/5727225ce4ba9 ant it gives me http://pasteboard.co/Cqtixmf.png
197: [09:51:29] * Tanger quit (Quit: Tanger)
198: [09:55:31] * Stomach quit (Quit: zzz)
199: [09:58:47] <Agilix_> DarjusIT: what does the function getWatermark return in your code?
200: [09:59:07] <Agilix_> if you look at what it returns, is that an Image?
201: [10:00:18] <ss-helper> Re: [silverstripe-dev] Re: PHP/Silverstripe IDE Survey : What IDE do you use for SS work ? - https://groups.google.com/d/msg/silverstripe-dev/bozY5hh9g4c/bnnQq03nBgAJ
202: [10:00:18] <ss-helper> Re: [silverstripe-dev] Preferred method for converting framework to PSR-2 - https://groups.google.com/d/msg/silverstripe-dev/IoMtKlju3Rc/M_op_szmBgAJ
203: [10:05:29] * eightythree has joined #silverstripe
204: [10:14:39] <DarjusIT> yes it gives image object
205: [10:19:26] <wmk> DarjusIT, screenshot and error are different methods...?
206: [10:19:59] <wmk> do you have a trace of the error? if not, you should install xdebug on your dev machine, it gives you a good backtrace where you can see what called your methdo.
207: [10:20:03] <wmk> method
208: [10:20:36] <wmk> and if you don't have the image file on your dev machine (when db and assets file dir are out of sync) you get funny errors from image generation
209: [10:20:49] <wmk> silverstripe assumes, when there is an entry in DB you have the files in assets...
210: [10:22:46] <marvanni> $file->exists() checks for file_exists as well
211: [10:27:37] <wmk> nice... but you can't assume when you have an Image Object, that we actually have an image on disk
212: [10:27:58] <wmk> That's where sspak is totally handy for smaller sites...
213: [10:28:13] <DarjusIT> http://pasteboard.co/CsTRLuE.png
214: [10:28:19] <wmk> with GB of assets you need something else to sync over to dev
215: [10:28:46] <wmk> i had troubles with deep folder structure on server moving over to a win dev machine... that sucks
216: [10:29:48] <wmk> DarjusIT, well, the watermark file is not found or not an Image DO.
217: [10:29:52] <wmk> !debug DarjusIT
218: [10:29:52] <ss-helper> DarjusIT: Maybe it's time to start xdebug and see whats going on... check out http://docs.silverstripe.org/en/developer_guides/debugging/ and http://xdebug.org/docs/
219: [10:30:21] <wmk> so even if the file is there, it's claiming that the PHP object is not of class Image
220: [10:46:52] * BrewNaked has joined #silverstripe
221: [10:48:09] <eightythree> Hey guys, i have a class extending straight controller and when i want include loop Menu(1) in my template it doesn't show, how to fix this?
222: [10:51:31] * BrewNaked quit (Ping timeout: 252 seconds)
223: [10:57:42] <marvanni> add the method to your controller
224: [10:57:55] <marvanni> Menu is a SiteTree thingy
225: [11:03:52] <eightythree> Umm, ok is something like public function Menu() {return $this->renderWith('mytemplate')} would worj in this case?
226: [11:04:23] <eightythree> Could you provide some guidance?
227: [11:14:43] * zlinux has joined #silverstripe
228: [11:16:57] <Agilix_> wmk: just wondering but could it be that the Image is actually a MyImage object in DarjusIT 's case?
229: [11:17:54] <Agilix_> Than it would indeed fail and he'd need to overwrite the method to use MyImage (unless he can specify in the conf, no experience with the module though)
230: [11:18:20] <DarjusIT> MyImage is extension of Image, I have taken another module
231: [11:25:11] * marvanni quit (Ping timeout: 250 seconds)
232: [11:36:51] * marvanni has joined #silverstripe
233: [11:38:47] * pinkp has joined #silverstripe
234: [11:39:53] <pinkp> looking for help to answer this question if anyone has any knowledge or redirecting... http://stackoverflow.com/questions/36947205/silverstripe-3-1-dynamically-creating-page-redirects/36964554#36964554
235: [11:42:48] <DarjusIT> maybe someone tried https://github.com/samthejarvis/silverstripe-watermarking and put watermark on original image
236: [11:52:55] * phorloop_ has joined #silverstripe
237: [11:55:36] * phorloop quit (Ping timeout: 240 seconds)
238: [12:13:00] <eightythree> Anyone had an error: cannot implement Searchable - it is not an interface in (...) after installing searchable dataobject module ?
239: [12:22:04] * UndefinedOffset has joined #silverstripe
240: [12:23:47] <eightythree> Nevermind it was just a conflict
241: [12:26:50] <eightythree> Anyway could someone provide guidance in how to write method in straight controller to use loop Menu(1) in my template?
242: [12:35:43] * BrewNaked has joined #silverstripe
243: [12:40:12] * BrewNaked quit (Ping timeout: 260 seconds)
244: [12:51:41] <Agilix_> eightythree: use how?
245: [12:51:52] <Agilix_> DarjusIT: No, srr no experience with the module
246: [12:52:18] <Agilix_> pinkp: It seems your call is wrong, do you have an index action as well?
247: [12:52:56] <Agilix_> eightythree: https://docs.silverstripe.org/en/3.3/developer_guides/templates/how_tos/navigation_menu/ is not what you're looking for?
248: [12:57:47] <pinkp> Agilix_: no index action no, I've never really used actions before so its all a bit out of my knowledge.. Any guidance appreciated!
249: [12:58:23] <eightythree> Hi Agilix, not exactly
250: [12:58:46] <eightythree> I have a class extending straight controller and when i want include loop Menu(1) in my template it doesn't show
251: [12:59:26] <eightythree> Marvanni told me to add some method to controller because Menu it's a SiteTree element
252: [12:59:50] <eightythree> But I don't know how to write that method
253: [13:00:28] <eightythree> If you culd provide some help it would be great
254: [13:02:26] <pinkp> Agilix_: heres my code http://codepaste.net/fm75fm
255: [13:02:47] <marvanni> eightythree https://github.com/silverstripe/silverstripe-cms/blob/3/code/controllers/ContentController.php#L223-L260
256: [13:04:30] <wmk> when running a Task via cron in CLI... is there a way to suppress the "Running Task FooTask" message?
257: [13:06:19] <marvanni> this code just works, if I paste it in my controller : http://stackoverflow.com/questions/36947205/silverstripe-3-1-dynamically-creating-page-redirects/36964554#36964554
258: [13:10:52] <cloph_away> wmk: None except modifying runTask metho/title function therein of TaskRunner
259: [13:11:11] <wmk> cloph_away, i just thought about that.
260: [13:11:19] <wmk> that's a pity
261: [13:11:30] <wmk> any known issue on github for that?
262: [13:12:04] * cloph_away finds that output pretty helpful, and if you don't like it, you can grep -v it as well.. Why would you not want to see that?
263: [13:12:09] <wmk> it's when running in cron, i don't want to suppress emailing the result, cause if it crashes i want to get an error email. but not for normal processing every 5 minutes
264: [13:12:41] <wmk> i guess i make a route to dev/crontask/mytask with no output
265: [13:14:43] <eightythree> marvanni, thanks i'll check that later
266: [13:14:55] <pinkp> Marvinni: if you add /videos its take you to /?tab=videos ... for me I get "too many redirects occurred trying to open page" maybe I'm applying it incorrectly to my code... http://codepaste.net/fm75fm ?
267: [13:15:39] <marvanni> eightythree thats the solution to your poblem…. you might as well just loop SiteTree::get()->filter(showinmenus parentid 0)
268: [13:17:25] <marvanni> erhmm… pinkp you know that the code is comment out right?
269: [13:17:55] <marvanni> otherwise i cant see enything strange
270: [13:17:56] <marvanni> a
271: [13:18:56] * eightythree quit (Ping timeout: 250 seconds)
272: [13:19:10] <pinkp> haha, yeah sorry I did that as its was breaking my page.. in practice its not commented out ;)
273: [13:21:12] * phorloop_ quit (Quit: Byeee...)
274: [13:21:41] <marvanni> there must be something else.
275: [13:29:05] <pinkp> Yeah, im not really sure how to double shoot it now.. adding that code causes that browser error. Could it be another page code effecting it?
276: [13:32:33] <marvanni> could be. redirecting in a extension somewhere?
277: [13:33:09] <marvanni> you could try to return $this->redirect(); …?
278: [13:35:14] <Agilix_> I don't see the link function?
279: [13:35:24] <Agilix_> So doens't it keep going to the same function?
280: [13:35:32] <Agilix_> hence the redirect loop
281: [13:35:36] <Agilix_> (not sure though)
282: [13:36:08] <marvanni> Link is in $this->dataRecord->Link();
283: [13:36:42] <Agilix_> ah right
284: [13:44:23] * zlinux_ has joined #silverstripe
285: [13:47:47] * zlinux quit (Ping timeout: 244 seconds)
286: [14:00:57] * muskie9 has joined #silverstripe
287: [14:20:29] * Werner_2_ has joined #silverstripe
288: [14:21:23] <pinkp> marvanni: the weird thing is if I go to /productname its automatically adds "?tab=videos" it should only go to that if you click that tab or if you went /productname/videos ...
289: [14:22:17] <marvanni> and if you try another browser?
290: [14:23:15] <pinkp> also going to /videos says "action videos isn't allowed on the page controller"
291: [14:24:04] * wmk quit (Ping timeout: 240 seconds)
292: [14:24:14] * Werner_2_ is now known as wmk
293: [14:24:44] * BrewNaked has joined #silverstripe
294: [14:26:07] <pinkp> same on another browser
295: [14:27:27] <marvanni> weird
296: [14:29:27] * BrewNaked quit (Ping timeout: 276 seconds)
297: [14:30:10] <pinkp> also putting /audio /pictures or /firmware still redirects to /?tab="videos" maybe my tab javascript code is getting in the way
298: [14:32:37] <marvanni> hehe
299: [14:32:49] * zlinux_ quit (Ping timeout: 250 seconds)
300: [14:32:51] <marvanni> yeah better pull that out to make sure its not php
301: [14:41:50] <pinkp> removing the JS didn't seem to matter.. I don't get why it defaults to adding "?tab=videos" when you visit the url.. Normal behaviour is it just goes straight to the page /Productname the only change is the PHP that you say works for you...
302: [14:54:09] * pinkp quit (Quit: Page closed)
303: [14:54:30] * pinkp has joined #silverstripe
304: [15:09:52] * Mike123 quit (Ping timeout: 250 seconds)
305: [15:10:47] * BrewNaked has joined #silverstripe
306: [15:14:21] * BrewNaked quit (Remote host closed the connection)
307: [15:16:16] * BrewNake_ has joined #silverstripe
308: [15:20:42] * Agilix_ quit (Ping timeout: 250 seconds)
309: [15:21:31] * slievr_ quit (Read error: Connection reset by peer)
310: [15:21:43] * slievr has joined #silverstripe
311: [15:21:59] * slievr quit (Ping timeout: 260 seconds)
312: [15:22:03] * Firesphere quit (Ping timeout: 260 seconds)
313: [15:22:11] * Firesphere has joined #silverstripe
314: [15:22:17] * zlinux_ has joined #silverstripe
315: [15:24:41] * novaweb has joined #silverstripe
316: [15:26:42] * arnhoe_ quit ()
317: [15:29:53] * zlinux__ has joined #silverstripe
318: [15:32:41] * zlinux_ quit (Ping timeout: 276 seconds)
319: [15:52:38] * Eliseth quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
320: [16:05:54] * zlinux_ has joined #silverstripe
321: [16:07:30] * neomang has joined #silverstripe
322: [16:07:48] * zlinux__ quit (Ping timeout: 244 seconds)
323: [16:08:47] <neomang> Hey I'm trying to implement a custom check that runs some code every 3rd item in a loop, can I directly perform checks against $Pos or do I need to write a custom controller function
324: [16:09:12] <neomang> and if so, would the correct syntax be $this->iteratorPos ?
325: [16:09:30] <neomang> I'm only finding old info but want to make sure it's up to date with the current versions
326: [16:09:53] * Werner_2_ has joined #silverstripe
327: [16:10:29] <muskie9> neomang if you're going for something in the templates there's modulus and multiple of https://docs.silverstripe.org/en/3.3/developer_guides/templates/syntax/#modulus-and-multipleof
328: [16:13:00] * wmk quit (Ping timeout: 246 seconds)
329: [16:14:46] * novaweb quit (Remote host closed the connection)
330: [16:19:18] <neomang> awesome, thanks muskie9
331: [16:26:15] * zlinux__ has joined #silverstripe
332: [16:29:13] * zlinux_ quit (Ping timeout: 252 seconds)
333: [16:29:36] * pinkp quit (Ping timeout: 250 seconds)
334: [16:30:21] * Werner_2_ quit (Ping timeout: 276 seconds)
335: [16:30:34] * Teddy_ quit (Ping timeout: 240 seconds)
336: [16:39:40] * zlinux__ quit (Ping timeout: 252 seconds)
337: [16:39:55] * eightythree has joined #silverstripe
338: [16:43:37] * wmk has joined #silverstripe
339: [16:44:47] <eightythree> Hey marvanni, thanks for that https://silverstripe.logged.nz/index.php?date=2016-05-02#log_1860535 :)
340: [16:45:12] <marvanni> no problem
341: [16:45:41] * zlinux has joined #silverstripe
342: [16:45:42] <marvanni> Third option, would be extending ContentController instead of Controller…
343: [16:46:09] <marvanni> but most of the time I just create a PageType if I need SiteTree functions like Menu
344: [16:48:16] <eightythree> Yeah, I know that would be better solution for me too, but that Controller thing is from a module and I don't have skills to customize it for my needs so I do what I can :)
345: [16:48:38] <marvanni> those are the best lessons..
346: [16:48:52] <eightythree> Indeed
347: [17:00:15] * zlinux quit (Ping timeout: 246 seconds)
348: [17:03:55] <neomang> So I accidentally logged out of the admin page, and I don't have a login page to sign back in
349: [17:04:06] <neomang> I tried changing the theme back to simple, but it didn
350: [17:04:09] <neomang> didn't work
351: [17:04:45] <neomang> How would I go about getting back in as an admin?
352: [17:06:30] <marvanni> just add $Form to you page template and visit Security/login
353: [17:06:46] <marvanni> or try this https://github.com/axyr/silverstripe-adminlogin
354: [17:07:01] <marvanni> this displays a different template for the admin
355: [17:13:00] <neomang> awesome thanks
356: [17:15:26] * slievr has joined #silverstripe
357: [17:21:42] * Azure quit (Ping timeout: 276 seconds)
358: [17:22:57] <eightythree> marvanni one more question about searchable-dataobject module if you still here. I get it to work which is good thing :) But when I search something I get all title fields at once from getTitleFields array, like it's one field, do you know what i mean? ... i think it might be problem with function itself ... whole fields in array are treated as one variable, is there any solution for that?
359: [17:24:21] <marvanni> dunno. as far as I know the Title fields are used for the indexing/search? if you have list of search results you just can use $Title ?
360: [17:24:55] <eightythree> I saw this https://github.com/g4b0/silverstripe-searchable-dataobjects/issues/36 but I don't think my issue is the same
361: [17:26:27] * wmk quit (Ping timeout: 276 seconds)
362: [17:26:33] <eightythree> Yea, and I'm doing that but ... i'm searching for "mission" for example and that phrase is in one place only ... but in results page i get whole array even if "mission" isn't there
363: [17:37:29] <marvanni> could be, i dont know the module that well
364: [17:48:21] * Copperis quit (Ping timeout: 276 seconds)
365: [17:50:02] * Copperis has joined #silverstripe
366: [18:42:16] * Azure has joined #silverstripe
367: [19:03:04] * muskie9 quit (Quit: My Mac has gone to sleep. ZZZzzz…)
368: [19:08:13] * Stomach has joined #silverstripe
369: [19:08:36] * muskie9 has joined #silverstripe
370: [19:10:43] <neomang> For some reason I'm having trouble getting my page to pull up the dataobjects I have associated with it and loop through them
371: [19:11:17] <neomang> It runs through one loop with no information output, but I have 2 objects of that type related to it
372: [19:11:28] <neomang> (it being the page)
373: [19:18:06] <eightythree> Hi neomang, could you provide some code? here you can paste it http://www.sspaste.com
374: [19:20:42] <neomang> http://www.sspaste.com/paste/show/5727a87d06d3a thanks eightythree
375: [19:22:16] * wmk has joined #silverstripe
376: [19:26:36] * Stomach quit (Quit: zzz)
377: [19:27:09] * wmk quit (Ping timeout: 276 seconds)
378: [19:30:53] <eightythree> Maybe this could work http://www.sspaste.com/paste/show/5727aacaaa3f9
379: [19:31:26] * marvanni quit (Quit: marvanni)
380: [19:37:31] <muskie9> neomang eightythree just wrap the loop with an <% if $EducationPost %>//loop here <% else %> //no results message <% end_if %> instead of checking total items
381: [19:37:57] <neomang> Alright, but I'm having trouble getting any to show up
382: [19:38:03] <neomang> even though they're related to the page
383: [19:38:46] <muskie9> what's the relation key => val
384: [19:38:51] <muskie9> on the page itself
385: [19:39:43] <muskie9> here's the loop https://gist.github.com/muskie9/ebfadf8846dbc47f03a9ceaa10d27731
386: [19:40:11] <neomang> Yeah I already fixed the loop
387: [19:40:12] <neomang> but
388: [19:40:25] <neomang> I'm not sure what you mean by the relation key => val
389: [19:40:44] <muskie9> your page should have a $has_many or $many_many array... for the relation
390: [19:40:44] <neomang> It's related many_many between the Page and the EducationPost
391: [19:40:54] <neomang> okay, thought that might be it
392: [19:40:57] <neomang> it's many many
393: [19:41:07] <muskie9> so is it array('EducationPost' => 'EducationPost') ?
394: [19:41:15] <neomang> private static $many_many = array ( 'EducationPost' => 'EducationPost' );
395: [19:41:19] <neomang> yeah
396: [19:41:42] <muskie9> and you have a $belongs_many_many on EducationPost
397: [19:41:48] <neomang> Yes
398: [19:41:54] <neomang> It shows up fine on my main page
399: [19:42:07] <neomang> Though that's getting all EducationPosts
400: [19:42:08] <muskie9> what do you mean by main page
401: [19:42:10] <neomang> not just related ones
402: [19:42:20] <neomang> The parent page for this branch
403: [19:42:24] <neomang> this is a sub-page
404: [19:42:43] <neomang> Different page type
405: [19:43:42] <muskie9> have you setup something to manage the relations (likely a gridfield) on the page type that has the many_many
406: [19:43:44] * eightythree quit (Ping timeout: 250 seconds)
407: [19:44:30] <neomang> I have that setup. The Educationposts can be related many_many to each of my pagetypes
408: [19:44:58] <neomang> It's on the management for the posts though, do I need a corresponding one for the page itself?
409: [19:45:04] <muskie9> and you have some set as related on the page you're loading
410: [19:45:10] <neomang> yes
411: [19:45:45] <neomang> it's weird, from what I'm reading it should work
412: [19:45:53] <neomang> I'm probably missing something simple and small
413: [19:46:20] <muskie9> ya, it should since you have the relations setup, and as long as the page in the cms has items related to it showing, the loop should work
414: [19:49:01] * Stomach has joined #silverstripe
415: [20:08:41] * Copperis quit (Quit: Leaving)
416: [20:12:40] * gelignite has joined #silverstripe
417: [20:16:22] * Stomach quit (Quit: bye)
418: [20:17:35] * Stomach has joined #silverstripe
419: [20:24:37] * EasyCo_ has joined #silverstripe
420: [20:29:09] * EasyCo quit (Ping timeout: 268 seconds)
421: [20:29:46] * EasyCo_ is now known as EasyCo
422: [20:30:04] * novaweb has joined #silverstripe
423: [20:45:33] * UndefinedOffset quit (Quit: Leaving.)
424: [20:48:27] * UndefinedOffset has joined #silverstripe
425: [20:48:35] * UndefinedOffset quit (Client Quit)
426: [20:48:47] * UndefinedOffset has joined #silverstripe
427: [20:53:29] * UndefinedOffset quit (Ping timeout: 260 seconds)
428: [21:30:32] <ss-helper> Re: [silverstripe-dev] Re: PHP/Silverstripe IDE Survey : What IDE do you use for SS work ? - https://groups.google.com/d/msg/silverstripe-dev/bozY5hh9g4c/Xe4fDpgMBwAJ
429: [21:40:11] * micmania1 has joined #silverstripe
430: [21:46:18] * Nightjar has joined #silverstripe
431: [21:46:26] <Nightjar> So
432: [21:46:59] <Nightjar> why do tests feel the need to change the locale of the site they're testing?
433: [21:47:47] <Nightjar> http://api.silverstripe.org/3.3/source-class-SapphireTest.html#208
434: [21:47:48] <Nightjar> OR
435: [21:48:16] <Nightjar> why does translatable feel that every site every is en_US, and should be reset to such?
436: [21:49:14] <Nightjar> https://github.com/silverstripe/silverstripe-translatable/blob/master/code/model/Translatable.php#L236
437: [21:49:54] <Nightjar> because
438: [21:49:57] <muskie9> Nightjar the only thing I could think of is for consistency... rather than guessing to some extent... could you override the settings in your own setUp method
439: [21:50:14] <Nightjar> the combination of these two makes it rather impossible to test project specific developments.
440: [21:50:20] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
441: [21:50:39] <Nightjar> as it resets the locale, then errors upon trying to fetch because no such locale (translatable modified queries)
442: [21:50:44] <Nightjar> for pagetypes, etc.
443: [21:51:03] <Nightjar> muskie9: yeah, but that would mean copypasta the entire setUp from the parent class, less that one line.
444: [21:51:50] <Nightjar> my setup does set the locale, and default locale. After it calls parent::setUp
445: [21:52:41] <muskie9> I would think that it would be good then since it's after the parent call
446: [21:52:54] <muskie9> I haven't written tests involving translations/locales though
447: [21:52:59] <Nightjar> yeah
448: [21:53:05] <Nightjar> I would have thought so too muskie9
449: [21:56:17] <Nightjar> but it always seems to fail on fixtures
450: [22:05:24] <Nightjar> ah muskie9 - it is because SapphireTest::setUp resets, THEN proceeds to import all fixtures (build a test database).
451: [22:05:57] <Nightjar> it never gets back to my test's setUp, where the locales are correctly set.
452: [22:06:32] <Nightjar> I guess this points to Translatable being the issue, not the test.
453: [22:06:38] <Nightjar> test framework*
454: [22:07:12] <Nightjar> reset should respect the hard coded option on which the default locale should be, I guess. How to go about that is a bigger question
455: [22:07:20] * UndefinedOffset has joined #silverstripe
456: [22:10:24] * DarjusIT quit (Quit: Leaving)
457: [22:14:30] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
458: [22:15:33] <ss-helper> Re: [silverstripe-dev] Re: PHP/Silverstripe IDE Survey : What IDE do you use for SS work ? - https://groups.google.com/d/msg/silverstripe-dev/bozY5hh9g4c/8xYWvUQPBwAJ
459: [22:26:05] * Mitcheru has joined #silverstripe
460: [22:33:02] <Mitcheru> Morning all, is it possible to put modules in a sub directory (as opposed to the project root) and have SilverStripe still detect them?
461: [22:37:04] * UndefinedOffset quit (Quit: Leaving.)
462: [22:49:48] * chillu_23 has joined #silverstripe
463: [23:00:31] * novaweb quit (Remote host closed the connection)
464: [23:07:09] * Mitcheru quit (Quit: Page closed)
465: [23:08:41] * Mitcheru has joined #silverstripe
466: [23:35:28] * novaweb has joined #silverstripe
467: [23:42:39] * novaweb quit (Remote host closed the connection)
468: [23:45:33] <ss-helper> SilverStripe 3.1+ Using PHP to dynamically change the URL slug of a Redirector - http://stackoverflow.com/questions/36993219/silverstripe-3-1-using-php-to-dynamically-change-the-url-slug-of-a-redirector

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