#silverstripe IRC Log

IRC log for 17 November 2016

All timestamps are in UTC.

1: [00:08:22] * helenclark0 has joined #silverstripe
2: [00:10:54] * helenclarko quit (Ping timeout: 268 seconds)
3: [00:23:36] * DarjusIT quit (Ping timeout: 250 seconds)
4: [00:32:50] * bubaphex has joined #silverstripe
5: [00:44:21] <zippy> DanaeNZ: doesn't that only work when you create new records?
6: [00:44:42] <zippy> or is that defaultRecords, and the requireDefaultRecords populates existing ones on dev/build
7: [00:44:47] <DanaeNZ> zippy: I think I discovered it runs every build
8: [00:49:33] * Stomach quit (Ping timeout: 265 seconds)
9: [00:51:18] <zippy> Anyone use multisites? Is it possible to share a page between two sites?
10: [00:51:27] <zippy> Or are the SiteTree's totally different
11: [00:55:54] <DanaeNZ> never used multisites
12: [01:02:33] * bubaphex quit (Quit: bubaphex)
13: [01:09:43] * bubaphex has joined #silverstripe
14: [01:15:10] * Robdgreat quit (Ping timeout: 265 seconds)
15: [01:16:33] * Robdgreat has joined #silverstripe
16: [01:20:52] * pippy has joined #silverstripe
17: [01:24:19] * Stomach has joined #silverstripe
18: [01:29:17] * zippy quit (Read error: Connection reset by peer)
19: [01:30:58] * bubaphex quit (Quit: bubaphex)
20: [01:51:26] * lerni quit ()
21: [01:52:59] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22: [02:00:40] * bubaphex has joined #silverstripe
23: [02:12:51] * bubaphex quit (Quit: bubaphex)
24: [02:15:33] * bubaphex has joined #silverstripe
25: [02:15:44] * UncleCheese has joined #silverstripe
26: [02:20:57] * DarjusIT has joined #silverstripe
27: [02:26:36] * cjsissingh has joined #silverstripe
28: [02:27:48] * cjsissingh quit (Remote host closed the connection)
29: [02:28:11] * cjsissingh has joined #silverstripe
30: [02:37:05] * Phlunk3 quit (Quit: Leaving)
31: [02:37:31] * pippy quit (Ping timeout: 260 seconds)
32: [02:44:55] * Stomach quit (Quit: zzz)
33: [03:11:18] * Stomach has joined #silverstripe
34: [03:14:42] * pweh has joined #silverstripe
35: [03:32:31] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
36: [04:07:20] * UncleCheese has joined #silverstripe
37: [04:40:10] * Stomach quit (Quit: zzz)
38: [04:40:53] * DanaeNZ quit (Remote host closed the connection)
39: [04:41:29] * DanaeNZ has joined #silverstripe
40: [04:45:54] * DanaeNZ quit (Ping timeout: 265 seconds)
41: [04:56:41] * micmania1 quit (Quit: micmania1)
42: [04:58:08] * bubaphex quit (Quit: bubaphex)
43: [05:01:31] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
44: [05:21:27] * Stomach has joined #silverstripe
45: [05:48:30] * helenclark0 quit (Ping timeout: 258 seconds)
46: [05:53:02] * Shrike_Finland has joined #silverstripe
47: [05:53:28] * Stomach quit (Quit: zzz)
48: [05:56:53] * Shrike_Finland quit (Client Quit)
49: [05:59:36] * spronk quit (Quit: I may need a longer sleep timer...)
50: [06:15:35] * Stomach has joined #silverstripe
51: [06:22:10] * UncleCheese has joined #silverstripe
52: [06:52:00] * wmk has joined #silverstripe
53: [06:54:23] * Shrike_Finland has joined #silverstripe
54: [07:02:48] * pweh quit (Ping timeout: 260 seconds)
55: [07:09:44] * pweh has joined #silverstripe
56: [07:21:24] * bubaphex has joined #silverstripe
57: [07:35:41] <wmk> woah, i cannot believe that i answered something in the forum today.
58: [07:35:46] * wmk feels so oldschool
59: [07:36:28] * hewp has joined #silverstripe
60: [07:39:12] * pweh quit (Ping timeout: 260 seconds)
61: [07:40:27] * Shrike_Finland quit (Quit: Leaving.)
62: [07:51:52] * bubaphex quit (Quit: bubaphex)
63: [08:04:00] * Shrike_Finland has joined #silverstripe
64: [08:21:11] * DarjusIT quit (Read error: Connection reset by peer)
65: [08:23:01] * Stomach quit (Quit: zzz)
66: [08:23:37] * darianno has joined #silverstripe
67: [08:42:57] * DanaeNZ has joined #silverstripe
68: [08:47:34] * DanaeNZ quit (Ping timeout: 250 seconds)
69: [09:00:05] * kinglozzer has joined #silverstripe
70: [09:00:12] * Shrike_Finland quit (Quit: Leaving.)
71: [09:07:55] * janneklouman-- has joined #silverstripe
72: [09:24:50] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
73: [09:30:05] * slievr has joined #silverstripe
74: [09:46:10] * agent44 has joined #silverstripe
75: [09:52:15] * Shrike_Finland has joined #silverstripe
76: [10:29:58] * Shrike_Finland quit (Quit: Leaving.)
77: [10:33:13] * cupcake has joined #silverstripe
78: [10:43:20] * Shrike_Finland has joined #silverstripe
79: [11:01:18] * janneklouman-- quit (Ping timeout: 245 seconds)
80: [11:08:57] * janneklouman-- has joined #silverstripe
81: [11:13:59] * janneklo1man-- has joined #silverstripe
82: [11:14:52] * janneklouman-- quit (Ping timeout: 260 seconds)
83: [11:24:18] * wmk quit (Ping timeout: 268 seconds)
84: [11:27:13] * samsam has joined #silverstripe
85: [11:28:58] * janneklo1man-- quit (Ping timeout: 252 seconds)
86: [11:31:45] * adrexia quit (Ping timeout: 240 seconds)
87: [11:34:07] * janneklouman-- has joined #silverstripe
88: [11:40:22] <gamma> Hey. We've got an XML document that we need to place at /doc.xml on our site. Is there an easy way to have a file in the top level on silverstripe?
89: [11:41:08] <kinglozzer> Just copy it onto the server?
90: [11:41:17] <kinglozzer> SSH / FTP whatever
91: [11:57:51] * hewp is now known as pweh
92: [12:17:33] * Shrike_Finland quit (Quit: Leaving.)
93: [12:19:31] * lerni has joined #silverstripe
94: [12:34:09] * Shrike_Finland has joined #silverstripe
95: [12:39:31] <samsam> I'm trying to convert user input (Title) to a clean URL (replace space by hyphens, lower case, remove special characters etc)
96: [12:39:44] <samsam> the same way as URLSegment does in SiteTree
97: [12:40:39] <samsam> Does SS come with a out-of-box function for this?
98: [12:44:23] * DanaeNZ has joined #silverstripe
99: [12:44:58] * r5v3rb has joined #silverstripe
100: [12:45:07] <r5v3rb> good afternoon all
101: [12:46:20] <samsam> lol, I just created a SiteTree class and called generateURLSegment, if there is a cleaner way, please share
102: [12:46:31] <samsam> hi r5v3rb
103: [12:46:43] <r5v3rb> quick getList question for a modeladmin - how can I filter the results by checking for a $has_many’s $Title for the record list? http://hastebin.com/ojosozober.php << where Items is the $has_many
104: [12:46:50] <r5v3rb> samsam: hello
105: [12:47:11] <r5v3rb> you created a class extending SiteTree?
106: [12:48:08] <samsam> I needed a way to generate URL segments like SiteTree does (but not for a page)
107: [12:48:23] <samsam> this guy found the same solution: https://gist.github.com/rotassator/400af5f8e5a3b2e60c42
108: [12:48:45] * DanaeNZ quit (Ping timeout: 246 seconds)
109: [12:51:48] <r5v3rb> samsam: I just did this for my controller: http://hastebin.com/emojumimaf.php simple and works
110: [12:52:35] <r5v3rb> the str_replace could be used to add - hypens if preferred
111: [12:52:46] <r5v3rb> hyphens*
112: [12:53:25] <samsam> there is also slashes, special characters and ä ö and all that stuff
113: [12:53:59] <r5v3rb> regex?
114: [12:54:03] <samsam> I think the generateURLSegment method on SiteTree takes care of all that stuff
115: [12:54:19] <samsam> it's just too much work to do manual :p
116: [12:54:26] <r5v3rb> feel free to use it, for my needs the above worked fine :D
117: [12:54:34] <samsam> hehe thanks for sharing
118: [12:54:39] <r5v3rb> no worries
119: [12:57:20] <samsam> get()->byID
120: [12:57:40] <samsam> returns a single record right? (browses api)
121: [13:02:09] * DanaeNZ has joined #silverstripe
122: [13:07:15] <cloph> samsam: you could also just use the URLSegmentFilter's filter function as the SiteTree's functions uses.
123: [13:08:16] <samsam> cloph: good call, I think that's better because otherwise it performs some unnecessary checks
124: [13:09:08] <samsam> and it's a static function too, makes more sense
125: [13:17:26] * pweh quit (Read error: Connection reset by peer)
126: [13:21:43] <samsam> get->byid() does this return an ArrayList or a DataList?
127: [13:23:47] * UndefinedOffset has joined #silverstripe
128: [13:27:23] <cloph> neither. it returns a single DataObject
129: [13:29:24] <samsam> I see. I need to get the exact same return type for this: SomeObject::get()->filter("Name", $someString)
130: [13:29:51] <samsam> I think this return's some kind of list (arraylist or datalist?) but I need to get only one record
131: [13:29:53] <slievr> of change the filter to find
132: [13:30:00] <samsam> omg yes, that's it
133: [13:30:25] <samsam> someone told me about ->find() before, I forgot
134: [13:30:35] <samsam> giving it a try
135: [13:30:40] <slievr> pretty sure it was me (I love find)
136: [13:30:43] <cloph> or add a ->first()
137: [13:31:02] <slievr> find() is just filter()->First()
138: [13:31:28] <slievr> just in one method instead of 2
139: [13:34:32] <samsam> lol, my bug was somewhere completely else, but I know the difference between find() and first() now
140: [13:35:00] <samsam> I'm on my first adventure of using dataobject as pages
141: [13:49:36] <cupcake> 0/
142: [13:54:04] * cupcake quit (Quit: Page closed)
143: [13:54:47] * cupcake has joined #silverstripe
144: [14:13:17] * kinglozzer has been using SilverStripe for 5 years, had no idea that ->find() even existed
145: [14:13:40] <kinglozzer> mind = blown
146: [14:13:43] <cupcake> lol
147: [14:13:45] <kinglozzer> the keystrokes I could've saved
148: [14:13:46] <kinglozzer> :(
149: [14:17:25] <samsam> looooool
150: [14:17:55] * Shrike_Finland quit (Quit: Leaving.)
151: [14:18:02] <samsam> been using silverstripe for 6 months, can say I know more than kinglozzer
152: [14:19:09] * DarjusIT has joined #silverstripe
153: [14:21:03] <kinglozzer> samsam: /nick kingsamsam ;D
154: [14:21:11] <samsam> :')
155: [14:21:22] * samsam is now known as kingsamsam
156: [14:21:23] <kingsamsam> :)
157: [14:21:46] <DarjusIT> Hi all
158: [14:21:49] <DarjusIT> is any posibility in SS Left admin with title make Count, for example Testimonials (1) ?
159: [14:31:16] * wmk has joined #silverstripe
160: [14:33:30] <DarjusIT> is any posibility in SS Left admin with title make Count, for example Testimonials (1) ?
161: [14:36:26] <cupcake> menu item u mean?
162: [14:36:31] <cupcake> DarjusIT
163: [14:36:45] <DarjusIT> yes
164: [14:37:28] <DarjusIT> in admin left admin we can change icon, can we add (count)
165: [14:43:26] <kingsamsam> private static $menu_title = "Testimonials" . " " . $count;
166: [14:43:31] <kingsamsam> I think..
167: [14:43:52] <agent44> Hi all, I have another newbie question. Just trying to set up a GridField on an Admin page using GridFieldConfig_RelationEditor to enable creation of new records, but when you click on the Add button that is produced I get the following error: PHP Fatal error: Call to a member function dataFieldByName() on null in /Projects/projName/framework/forms/gridfield/GridFieldDetailForm.php on line 403
168: [14:43:53] <agent44>
169: [14:44:21] <agent44> Can anyone help me with what that’s trying to do so that I can fix it please?
170: [14:45:42] <DarjusIT> kingsamsam, thx
171: [14:46:13] <kingsamsam> DarjusIT: did it work? :p
172: [14:46:21] <DarjusIT> agent44, sspaste.com add code
173: [14:47:44] * muskie9 has joined #silverstripe
174: [14:48:56] <agent44> DarjusIT: Here you go :) http://sspaste.com/paste/show/582dc33cddd81
175: [14:53:20] <slievr> DarjusIT: does the count update? I thought it was taken into the manifest, and served from there.
176: [14:53:35] <kinglozzer> agent44: in GalleryVideo, you need to return $fields
177: [14:54:12] <kinglozzer> in getCMSFields()
178: [14:54:23] <DarjusIT> yes kinglozzer right
179: [14:55:08] <agent44> kinglozzer: Oh my goodness, of course i do.
180: [14:55:12] <agent44> Ugh!
181: [14:55:39] <kinglozzer> DarjusIT: I think you'll need to manually update the 'menu_title' value in the config manifest, in _config.php or somewhere
182: [14:55:55] <DarjusIT> this row seams bit weird $gridField = GridField::create
183: [14:56:01] <agent44> How stupid of me, thank you DarjusIT and kinglozzer
184: [14:56:10] <kinglozzer> Something like Config::inst()->update('MyModelAdmin', 'menu_title', 'Testimonials (' . Testimonial::get()->count() . ')');
185: [14:58:52] <kingsamsam> Guys, inside of onBeforeWrite(), does $this->Foo refer to the value the user just entered into Field "Foo" or the database value for "Foo" BEFORE user submit?
186: [14:59:28] <kinglozzer> kingsamsam: The value entered into the field
187: [14:59:32] <kingsamsam> phew
188: [15:03:58] <cupcake> i have an issue with radio buttons on image upload field
189: [15:04:31] <cupcake> when i select Insert on cms and select two images, the radio buttons in the second edit attributes form dont get selected
190: [15:04:37] <cupcake> causing me a headache
191: [15:04:37] <cupcake> :)
192: [15:06:53] <kinglozzer> UploadField? Radio buttons? I'm confused
193: [15:07:12] <cupcake> tinymce...
194: [15:07:16] <kinglozzer> Ah okay
195: [15:07:18] <cupcake> adding an image to content field
196: [15:07:22] <kinglozzer> So the "insert media" thing?
197: [15:07:23] <cupcake> u can select
198: [15:07:30] <cupcake> Insert From CMS
199: [15:07:31] <cupcake> yes
200: [15:07:47] <cupcake> i had customized to be able to crop the image and set the size
201: [15:07:53] <cupcake> i used radio buttons
202: [15:08:07] <cupcake> but when i select two images to insert it
203: [15:08:35] <cupcake> second edit form the radio buttons are not being set with their defaults
204: [15:09:16] <kinglozzer> Hmm, the support for inserting multiple images is a bit broken in core already :/ I think it's being removed in 4
205: [15:09:35] <kinglozzer> Do you have any custom JS that might need updating to support 2 sets of inputs?
206: [15:10:48] * helenclarko has joined #silverstripe
207: [15:12:05] <kinglozzer> I think when you insert 2 images, there are duplicate HTML ids :( maybe that's causing the problem
208: [15:12:10] <cupcake> yeh
209: [15:12:18] <cupcake> thats the issue
210: [15:12:25] <cupcake> input fields with same names
211: [15:12:36] <cupcake> maybe i try and make them unique somehow
212: [15:13:04] <cupcake> its very rare that users select more than one image at once
213: [15:13:21] <cupcake> but since its breaking thought of investigating it and hoping for a solution
214: [15:24:03] * lerni quit ()
215: [15:24:27] * lerni has joined #silverstripe
216: [15:32:15] <kingsamsam> The day has come, I'm officially tired of working without an IDE
217: [15:32:42] <kingsamsam> kinglozzer: you work with PHPStorm right?
218: [15:32:59] <muskie9> PHPStorm FTW
219: [15:33:14] <kingsamsam> It enables you to read variable values line by line right?
220: [15:33:38] <kinglozzer> kingsamsam: Nope, Sublime Text over here
221: [15:33:42] <muskie9> with xdebug I believe
222: [15:33:42] <kingsamsam> so you can follow variables / object change line by line
223: [15:34:20] <kingsamsam> hmm
224: [15:35:40] * DanaeNZ quit (Ping timeout: 260 seconds)
225: [15:36:46] * MattyBalaam has joined #silverstripe
226: [15:38:29] <MattyBalaam> Content Authors on a site I manage reported they were unable to duplicate pages on the top level.
227: [15:38:52] <MattyBalaam> I have made a fresh blank install and the only way I can duplicate top levels as a Content Author is to give full CMS rights.
228: [15:39:41] <MattyBalaam> Has anyone else come across this issue?
229: [15:42:29] <kinglozzer> MattyBalaam: In the settings section, is there a restriction on "Who can create pages in the root of the site?" ?
230: [15:43:55] <MattyBalaam> It's on "Anyone who can log-in to the CMS"
231: [15:44:13] <MattyBalaam> I've gone back to 3.2 from 3.4 and still get the same issue
232: [15:45:36] <MattyBalaam> I can create a page there fine
233: [15:45:43] <kinglozzer> Hmm, not sure then - any issues open for it on Github?
234: [15:45:52] <MattyBalaam> Not that I could see
235: [15:47:08] <MattyBalaam> And example page it tries to hit is: admin/pages/duplicate/9?SecurityID=cc80814a39387d0a50ef662005f08a5726876d88
236: [15:47:17] <MattyBalaam> but I get the message: "You don't have access to this page. If you have another account that can access that page, you can log in again below."
237: [15:49:25] <kinglozzer> MattyBalaam: My guess is that you're hitting that error here: https://github.com/silverstripe/silverstripe-cms/blob/3.5/code/controllers/CMSMain.php#L1367
238: [15:49:39] <kinglozzer> Maybe $page->Parent() is null or something, and that breaks the canCreate() check?
239: [15:50:46] <helenclarko> hey all
240: [15:50:48] <helenclarko> o/
241: [15:51:02] <slievr> HELLO o/
242: [15:52:36] <helenclarko> Quick question. How can I get the title of a dataobject from its page... I've tried $this->DataObject()->Title; on the HolderPage.php
243: [15:52:43] <helenclarko> But it returns blank
244: [15:53:01] <MattyBalaam> I just logged into the http://demo.silverstripe.org/ and created a user with the same permissions, and I can recreate the error. Able to make a page top level, not able to duplicate.
245: [15:53:11] <MattyBalaam> I will look at that issue
246: [15:53:38] <kinglozzer> helenclarko: Can you paste your HolderPage and DataObject?
247: [15:53:44] <helenclarko> Sure
248: [15:55:20] <helenclarko> Page: http://www.sspaste.com/paste/show/582dd2ddbf35a
249: [15:55:33] <helenclarko> Dataobject: http://www.sspaste.com/paste/show/582dd2b75d84f
250: [15:56:00] <kinglozzer> helenclarko: Your holder page "has_many" NonLinkedServices
251: [15:56:08] <kinglozzer> So how does it know which title to show? ;)
252: [15:56:13] <helenclarko> Right
253: [15:56:17] <helenclarko> hmm
254: [15:56:47] <kinglozzer> helenclarko: You can get the first one like $this->NonLinkedServices()->First()->Title
255: [15:56:56] <kinglozzer> Assuming you always want the first one
256: [15:57:06] <kinglozzer> I'd also wrap it in a check to make sure that one actually exists, though
257: [15:57:24] <helenclarko> otherwise I'll have to do a database lookup
258: [15:57:31] <kinglozzer> if ($firstService = $this->NonLinkedServices()->First()) { return $firstService->Title; } or something
259: [15:57:47] <helenclarko> okay, thanks kinglozzer
260: [15:58:59] <MattyBalaam> kinglozzer: yep, that condition returns true
261: [16:00:10] * cloph has left #silverstripe
262: [16:00:25] * cloph has joined #silverstripe
263: [16:04:51] <MattyBalaam> To clarify, a page is returned, however. $page->canCreate(null, array('Parent' => $page->Parent()) returns false for the Content Authors, but true when full admin rights are given
264: [16:05:08] <helenclarko> Okay kinglozzer, how can I strip whitespace from the title and use that in the template Or do I need to create a new field on the DataObject?
265: [16:06:34] <kinglozzer> helenclarko: The best way would be to create a method in the DataObject class to handle it, then call that instead of ->Title
266: [16:07:02] <helenclarko> Oh right.
267: [16:07:07] <kinglozzer> public function cleanTitle() { return preg_replace('/\s+/', '', $this->Title); } for example
268: [16:07:38] <kinglozzer> Then instead of doing $this->NonLinkedServices()->First()->Title, you'd do $this->NonLinkedServices()->First()-> cleanTitle()
269: [16:07:46] <kinglozzer> Or in template, $CleanTitle instead of $Title
270: [16:09:49] * wmk quit (Ping timeout: 268 seconds)
271: [16:11:19] <helenclarko> Perfect!
272: [16:11:27] <helenclarko> That works perfectly
273: [16:11:38] <helenclarko> Thanks again kinglozzer
274: [16:11:51] <kinglozzer> Welcome :)
275: [16:13:26] <MattyBalaam> in canCreate this is the condition it fails against: $parent->canAddChildren($member)
276: [16:13:53] <slievr> Who was it that was super excited about Affinity? It just got released.
277: [16:13:56] <slievr> for windows
278: [16:14:02] <kinglozzer> r5v3rb: maybe?
279: [16:20:56] <MattyBalaam> OK, and then in canAddChildren this is then returning true. $this->getIsDeletedFromStage()
280: [16:24:18] <MattyBalaam> Aha, in getIsDeletedFromStage, because the parent of the page being duplicated has an ID of 0, the line then returns true: if(!$this->ID) return true;
281: [16:28:00] <MattyBalaam> Assuming my assumptions are all correct here, is it possible to change the ID of the root pages to something other that 0?
282: [16:28:07] <MattyBalaam> As a quick fix?
283: [16:29:02] <MattyBalaam> sorry ID of the root pages parent
284: [16:29:36] * janneklouman-- quit (Ping timeout: 244 seconds)
285: [16:30:24] <kingsamsam> If anyone is in for a puzzle: http://www.sspaste.com/paste/show/582ddaf81c4f3
286: [16:30:27] <kingsamsam> has been killing me
287: [16:30:29] <kinglozzer> MattyBalaam: No, that would probably cause a lot of other problems
288: [16:30:36] <r5v3rb> kinglozzer: sorry phone mad today
289: [16:30:43] <kinglozzer> So the problem is that $parent's ID is 0?
290: [16:30:47] <kinglozzer> Which means it isn't in the DB
291: [16:31:19] <kinglozzer> I'd just adjust canCreate() - where it says if ($parent) { return $parent->canAddChildren($member); }, I'd change the if statement to if($parent && $parent->exists())
292: [16:31:37] * janneklouman-- has joined #silverstripe
293: [16:31:43] <kinglozzer> You can't add children to a page that doesn't exist :P
294: [16:31:53] <MattyBalaam> Well these are the root pages, and they have a 'parent' with an ID of 0
295: [16:32:26] <r5v3rb> kinglozzer: maybe?
296: [16:32:42] <kinglozzer> r5v3rb: the thing about affinity above my message
297: [16:33:25] <r5v3rb> ah yes, already purchased kinglozzer slievr
298: [16:33:58] <r5v3rb> now just waiting on Photo and their page layout software to complete the acquisitions
299: [16:34:33] <kinglozzer> MattyBalaam: Yeah, so in canCreate() $parent->ID is 0, because $page->Parent() returns an "empty" page
300: [16:34:48] <kinglozzer> We just need to adjust that if statement to check whether $parent actually exists
301: [16:35:12] <MattyBalaam> True. I'll make an issue.
302: [16:35:33] <kinglozzer> Just tested and it seems to fix it :)
303: [16:36:17] <MattyBalaam> I'm just wondering what I can do from a site admin point of view on my current live site, can I overload in my page.php?
304: [16:36:28] <MattyBalaam> I guess I should just try it :)
305: [16:36:36] <kinglozzer> MattyBalaam: Yeah overload canCreate()
306: [16:36:46] <kinglozzer> Just copy and paste it, adjust the if statement, boom
307: [16:36:58] <MattyBalaam> Cheers! I'll make a note to create an issue about that.
308: [16:37:45] <MattyBalaam> Many thanks for your help
309: [16:37:49] <kinglozzer> Man there are some weird legacy things in the CMS module... https://github.com/silverstripe/silverstripe-cms/blob/3.5/code/controllers/CMSMain.php#L1244-L1279
310: [16:37:52] <kinglozzer> No problem MattyBalaam
311: [16:44:37] * helenclark0 has joined #silverstripe
312: [16:48:13] * helenclarko quit (Ping timeout: 258 seconds)
313: [16:52:05] * muskie9 quit (Remote host closed the connection)
314: [16:57:13] * helenclark0 is now known as helenclarko
315: [16:58:05] <helenclarko> Can someone tell me why this: $config->getComponentsByType('GridFieldAddNewButton')->setButtonName('GridFieldAddNewButton'); gives me an error: the method 'setbuttonname' does not exist on 'ArrayList'
316: [16:58:32] <helenclarko> I mean the error itself it pretty straight forward
317: [16:58:46] <helenclarko> But, how then do I set the button name
318: [16:59:13] <slievr> drop the s?
319: [16:59:17] <kinglozzer> ^^
320: [16:59:28] <slievr> 'getComponentByType'
321: [16:59:29] <kinglozzer> getComponentByType instead of getComponentsByType
322: [16:59:31] <kinglozzer> ^^
323: [16:59:32] <kinglozzer> :D
324: [16:59:40] <helenclarko> Well I feel stupid!
325: [16:59:48] <helenclarko> That solved it
326: [17:00:06] <helenclarko> I need more sleep.
327: [17:00:38] <slievr> or more caffeine
328: [17:01:41] <slievr> cya o/
329: [17:01:48] <kinglozzer> cya slievr
330: [17:01:53] * slievr is now known as slievr_away
331: [17:02:29] <helenclarko> o/
332: [17:02:59] <helenclarko> Caffeine will have to do the trick. I have lots to do.
333: [17:03:51] <kinglozzer> I gotta run too!
334: [17:03:54] <kinglozzer> bb all o/
335: [17:04:10] * kinglozzer quit ()
336: [17:05:28] * MattyBalaam quit (Quit: Page closed)
337: [17:18:46] * plaerzen has joined #silverstripe
338: [17:20:26] <plaerzen> Anyone have experience here with event-calendar (unclecheese) module? Or can reccommend a good alternative? I have the module running, but looks like CSS is broken on it or maybe jquery isn't working as intended.
339: [17:29:57] * janneklouman-- quit (Ping timeout: 240 seconds)
340: [17:31:32] <helenclarko> plaerzen, I think event calendar is the only one I have used.
341: [17:31:47] <helenclarko> I havent used it in awhile.
342: [17:31:54] <helenclarko> Whats going wrong?
343: [17:32:25] * DanaeNZ has joined #silverstripe
344: [17:32:48] <plaerzen> I will take a screenshot. links are broken - one example is <img src="/themes/simple/img/calendar-previous.png"> (the actual path for the template should be /themes/simple/images/* but even that does not include a "Calendar-previous.png"
345: [17:33:29] <plaerzen> helenclarko: http://pasteboard.co/sosxqzyTL.png
346: [17:36:48] * DanaeNZ quit (Ping timeout: 246 seconds)
347: [17:37:39] <plaerzen> The documentation for this module is lacking, so I'm sorta trying to figure it out as I go. I think all I did was composer install it, do calendarconfig()::init in _config.php and then run /dev/build.... however I think that's not quite right.
348: [17:38:22] * janneklouman-- has joined #silverstripe
349: [17:38:22] <helenclarko> Okay, I'm just looking for its previous and next link setup
350: [17:39:39] <helenclarko> hmm, his latest release was 23 days ago.
351: [17:39:53] <plaerzen> This one is installed from before then, maybe I should look at that.
352: [17:42:37] <helenclarko> Hmm, Using composer require silverstripe/event-calendar gets the latest release.
353: [17:42:42] <helenclarko> 1.0.15
354: [17:42:56] <plaerzen> do you have to rebuild after that?
355: [17:43:19] <helenclarko> Yeah, /dev/build?flush=1
356: [17:44:28] <helenclarko> actually, if its already in your composer.json folder, you can do a "composer update" (but remember it'll update everything)
357: [17:44:52] <helenclarko> composer.json *FILE*
358: [17:45:20] <plaerzen> hrm... "
359: [17:45:20] <plaerzen> Fatal error: Uncaught exception 'Exception' with message 'There are two files containing the "Calendar" class: "/var/www/html/event_calendar/code/Calendar.php" and "/var/www/html/calendar/code/calendars/Calendar.php"' in /var/www/html/framework/core/manifest/ClassManifest.php:569 "
360: [17:45:21] <ss-helper> SilverStripe unique URL (debug) - http://stackoverflow.com/questions/40661531/silverstripe-unique-url-debug
361: [17:45:34] <plaerzen> I don't recall installing 2 calendars
362: [17:45:37] <plaerzen> but maybe
363: [17:46:15] <plaerzen> ah yes.
364: [17:46:22] <helenclarko> Delete event calendar folder and run composer require silverstripe/event-calendar again
365: [17:48:55] <plaerzen> I did composer remove titledk/calendar && rm -rf calendar/* && rm -rf event-calendar && composer require silverstripe/event-calendar, did build with flush and it built.
366: [17:49:11] <plaerzen> (not all at once like that, just easier to type)
367: [17:50:12] <helenclarko> Excellent
368: [17:50:27] <helenclarko> Did it get you 1.0.15?
369: [17:50:57] <helenclarko> Okay, question... Can I use the same dataobject twice on one page and gather different results?
370: [17:51:45] <plaerzen> how do I know if it's 1.0.15? composer info shows "unclecheese/eventcalendar dev-master 3575f4d "
371: [17:53:45] <helenclarko> When you ran composer require silverstripe/event-calendar, it should have said which version it installed
372: [17:54:28] <plaerzen> Using version ^1.0 for silverstripe/event-calendar
373: [17:54:33] <plaerzen> =/
374: [17:54:51] <helenclarko> it should be
375: [17:55:13] <helenclarko> You can also try composer update silverstripe/event-calendar
376: [17:55:23] <helenclarko> That'll get you the latest
377: [17:56:43] * Stomach has joined #silverstripe
378: [17:59:57] <plaerzen> Ok. This is weird. When I install eventcalendar, it also installed the titledk calendar and then build complains about the class being defined twice. http://pasteboard.co/soTsX4OD7.png even doing a composer update didn't work.
379: [18:08:34] * agent44 quit (Quit: agent44)
380: [18:54:13] * janneklouman-- quit (Ping timeout: 245 seconds)
381: [18:56:15] * r5v3rb quit (Quit: r5v3rb)
382: [18:56:21] * Stomach quit (Read error: Connection reset by peer)
383: [18:56:57] * Stomach has joined #silverstripe
384: [19:30:19] <plaerzen> at any rate, the new readme.md is there in my local composer, so I assume it is the latest.... the documentation is still lacking, but I assume the latest version uses global config based on readme.md (https://github.com/unclecheese/silverstripe-event-calendar/blob/master/README.md) and that's fine.... still, I am unable to do /dev/build without removing calendar package....
385: [19:40:25] * bubaphex has joined #silverstripe
386: [19:44:59] * muskie9 has joined #silverstripe
387: [19:50:45] * darianno quit (Quit: Textual IRC Client: www.textualapp.com)
388: [19:56:27] <plaerzen> Hrm, got it working I guess. Looks kinda weird but it'll do.... http://pasteboard.co/sqTyB5FP5.png
389: [20:08:55] <plaerzen> appears to not be using jquery.
390: [20:27:27] * DanaeNZ has joined #silverstripe
391: [20:27:41] * UncleCheese has joined #silverstripe
392: [20:28:54] <plaerzen> UncleCheese: hey! I'm working on implementing your calendar right now.... thanks for the work there and for making the module public :)
393: [20:29:10] <UncleCheese> oh wow, that's an old module
394: [20:29:12] <UncleCheese> good luck!
395: [20:29:14] <UncleCheese> :)
396: [20:29:49] <plaerzen> Yeah, it kinda works. http://pasteboard.co/srsQW26mZ.png
397: [20:29:59] <plaerzen> not pretty, but it works.
398: [20:53:28] * micmania1 has joined #silverstripe
399: [20:55:56] * frustrated has joined #silverstripe
400: [20:57:02] <frustrated> Hey guys, I am having a (most likely) very stupid issue. I'm trying to return dataobjects that have specific tags.
401: [20:57:29] <frustrated> https://thepasteb.in/p/xGhmp3ow6lyIM
402: [20:58:10] <frustrated> Ideally, I will use PartialMatch, but I'm just trying to get anything working.
403: [21:04:28] <DanaeNZ> frustrated: I feel like FilterTags.Title:StartsWith would be more likely to work
404: [21:04:58] <DanaeNZ> You can also debug it by having a look at what $WKC->sql() gives you (forgot the exact syntax, you should be able to find it)
405: [21:06:02] <frustrated> ah, I am an asshole. You on the other hand are a beautiful individual
406: [21:06:25] <frustrated> .Title was it. I have been staring for so long at this, the Tag is a data object, the dataobject has a title.
407: [21:07:17] * micmania1 quit (Quit: micmania1)
408: [21:07:59] <DanaeNZ> frustrated: that;s the one :)
409: [21:10:13] * phorloop has joined #silverstripe
410: [21:10:57] <kingsamsam> I'm using dataobject as pages, any idea on how to handle breadcrumbs?
411: [21:11:30] <kingsamsam> when opening a page that's based on a dataobject, that page isn't added to the breadcrumbs trail
412: [21:12:23] * bubaphex quit (Quit: bubaphex)
413: [21:13:51] <frustrated> I think I had to do something like this before. I think I manually did the breadcrumbs on the page for this instances. It was not the prettiest solution, but it worked.
414: [21:14:38] <kingsamsam> hehe yes I'm training to refrain from using not-so-pretty solutions
415: [21:15:59] <kingsamsam> http://www.ssbits.com/tutorials/2010/dataobjects-as-pages-part-2-using-model-admin-and-url-segments-to-create-a-product-catalogue/
416: [21:16:13] <kingsamsam> that's an old article, not sure if it works on ss 3.x
417: [21:17:05] <frustrated> I used that module when I did it. They do touch on breadcrumbs in there actually.
418: [21:17:09] * micmania1 has joined #silverstripe
419: [21:24:15] * Stomach quit (Quit: zzz)
420: [21:25:57] * bubaphex has joined #silverstripe
421: [21:28:20] * UndefinedOffset quit (Quit: Leaving.)
422: [21:29:58] * Stomach has joined #silverstripe
423: [21:38:27] * phorloop quit (Quit: Byeee...)
424: [21:57:25] * muskie9 quit (Ping timeout: 248 seconds)
425: [21:58:21] * kingsamsam quit (Ping timeout: 260 seconds)
426: [22:03:05] * Stomach quit (Quit: zzz)
427: [22:03:10] * bubaphex quit (Quit: bubaphex)
428: [22:05:29] * bubaphex has joined #silverstripe
429: [22:06:22] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
430: [22:06:37] * micmania1 quit (Ping timeout: 260 seconds)
431: [22:08:11] * micmania1 has joined #silverstripe
432: [22:12:47] * spronk has joined #silverstripe
433: [22:23:13] * Stomach has joined #silverstripe
434: [22:31:33] <spronk> anyone here using http2 clients in php?
435: [22:36:48] * Stomach quit (Quit: zzz)
436: [22:40:01] * Stomach has joined #silverstripe
437: [23:00:01] * ss-helper quit (Remote host closed the connection)
438: [23:00:18] * ss-helper has joined #silverstripe
439: [23:07:05] * agent44 has joined #silverstripe
440: [23:19:06] * leomeloxp quit (Quit: Connection closed for inactivity)
441: [23:37:55] * Stomach quit (Quit: zzz)
442: [23:46:31] * UncleCheese has joined #silverstripe
443: [23:46:39] * bubaphex quit (Quit: bubaphex)

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