#silverstripe IRC Log

IRC log for 29 December 2015

All timestamps are in UTC.

1: [00:44:23] * arnhoe has joined #silverstripe
2: [00:46:07] * TRB143 quit (Ping timeout: 250 seconds)
3: [00:49:23] * arnhoe quit (Ping timeout: 264 seconds)
4: [00:52:58] * TRB143 has joined #silverstripe
5: [00:58:59] * joelpittet quit (Remote host closed the connection)
6: [02:32:57] <ss-helper> Use Composer to execute a composer.json file - http://stackoverflow.com/questions/34503579/use-composer-to-execute-a-composer-json-file
7: [02:53:13] * gelignite_ has joined #silverstripe
8: [02:57:00] * gelignite quit (Ping timeout: 260 seconds)
9: [03:03:52] * r_hector has joined #silverstripe
10: [03:21:28] * gelignite_ quit (Quit: http://bit.ly/1kso8Ta)
11: [03:28:18] * joelpittet has joined #silverstripe
12: [03:44:09] * joelpittet quit ()
13: [04:20:35] * arnhoe has joined #silverstripe
14: [04:24:44] * arnhoe quit (Ping timeout: 245 seconds)
15: [05:22:42] * Stomach has joined #silverstripe
16: [05:27:27] * Audlex has joined #silverstripe
17: [05:46:11] * Stomach quit (Quit: zzz)
18: [06:06:02] * Shrike_Finland has joined #silverstripe
19: [06:12:29] * Audlex- has joined #silverstripe
20: [06:14:23] * Audlex quit (Ping timeout: 260 seconds)
21: [07:56:50] * arnhoe has joined #silverstripe
22: [08:01:59] * arnhoe quit (Ping timeout: 276 seconds)
23: [08:32:39] * swaiba has joined #silverstripe
24: [08:42:44] * Shrike_Finland1 has joined #silverstripe
25: [08:42:45] * Shrike_Finland quit (Read error: Connection reset by peer)
26: [08:45:46] * Shrike_Finland has joined #silverstripe
27: [08:46:15] * Shrike_Finland1 quit (Read error: Connection reset by peer)
28: [08:46:32] * Shrike_Finland1 has joined #silverstripe
29: [08:49:24] * r_hector quit (Remote host closed the connection)
30: [08:50:14] * Shrike_Finland quit (Ping timeout: 255 seconds)
31: [09:23:26] * Shrike_Finland1 quit (Quit: Leaving.)
32: [09:38:25] * Mike123 has joined #silverstripe
33: [09:38:31] <Mike123> hi guys
34: [09:47:17] <swaiba> hi Mike123
35: [10:33:05] <ss-helper> .htaccess redirect .php and .html requests - http://stackoverflow.com/questions/34508977/htaccess-redirect-php-and-html-requests
36: [11:00:32] * glenn-bautista has joined #silverstripe
37: [11:05:15] * glenn-bautista quit (Ping timeout: 255 seconds)
38: [11:08:35] * Marteng has joined #silverstripe
39: [11:09:08] <Marteng> Hi all, How (if) can I put a custom controller in the site tree?
40: [11:16:02] * Audlex- quit (Ping timeout: 255 seconds)
41: [11:32:54] * arnhoe has joined #silverstripe
42: [11:35:20] <swaiba> Marteng in short... you make a Page and then you dev/build
43: [11:35:26] <swaiba> long answer is to work through... https://www.silverstripe.org/learn/lessons/
44: [11:37:02] * arnhoe quit (Ping timeout: 246 seconds)
45: [11:37:21] <Mike123> guys
46: [11:37:55] <Mike123> http://www.sspaste.com/paste/show/5682706ac6007 what i need to write so that it would extract my files directly to THIS folder
47: [11:49:14] * MarkGuin_ has joined #silverstripe
48: [11:51:26] <Marteng> swaiba, thank you but I want to do a controller that does not extend from Page, available through route but also available in siteTree menues
49: [11:51:51] <swaiba> sorry Marteng but you are asking for the cake and to eat it too :)
50: [11:52:08] <swaiba> you need to have a page and controller for it to be in the site tree
51: [11:52:35] <swaiba> if you forego the sitetree and just want it in routes then you can skip the page and just extend page_controller
52: [12:08:07] <Marteng> :)
53: [12:13:52] <elgabbu> hi all
54: [12:14:10] <elgabbu> is there a way to programitaccly change the page type of a page?
55: [12:15:57] <swaiba> elgabbu sure, change the classname and do a writeToStage
56: [12:19:25] * Marteng quit (Ping timeout: 252 seconds)
57: [12:22:40] <elgabbu> ERROR [User Error]: Uncaught Exception: Object->__call(): the method 'writetostage' does not exist on 'TextPage'
58: [12:22:56] <elgabbu> weird considering text page extends page
59: [12:25:03] <elgabbu> if i don't change the classname it works
60: [12:25:05] <elgabbu> hihi
61: [12:28:35] * arnhoe has joined #silverstripe
62: [12:33:27] <elgabbu> any other ideas swaiba?
63: [12:34:27] <swaiba> elgabbu not really... http://api.silverstripe.org/3.1/source-class-Versioned.html#1196-1209
64: [12:34:52] <swaiba> any "page" should have the extension "versioned" to handle... er... versioning
65: [12:35:19] <elgabbu> yeah the error thrown doesn't make sense
66: [12:36:36] <elgabbu> maybe it because i am doing it from a build task
67: [12:38:50] <elgabbu> swaiba i was able to change it from TextPage to Page ... but then from Page to NewsPage (sub class of page) got same error
68: [12:39:00] * arnhoe_ has joined #silverstripe
69: [12:40:38] <swaiba> elgabbu strange
70: [12:42:05] * arnhoe quit (Ping timeout: 260 seconds)
71: [12:47:20] * harry has joined #silverstripe
72: [12:52:00] <harry> i'm having problems with concept of dividing my home page up into editable content in the CMS
73: [12:53:20] <harry> unlike modelling say a relationship between a Patients and Doctors and Clinics
74: [12:53:56] <harry> so I'm wondering if there are some native functions or features thatalready exist in SS to handle this
75: [13:01:09] * MarkGuin_ quit (Remote host closed the connection)
76: [13:01:24] * arnhoe_ quit (Remote host closed the connection)
77: [13:01:35] * MarkGuin_ has joined #silverstripe
78: [13:01:56] * arnhoe has joined #silverstripe
79: [13:22:30] * lerni has joined #silverstripe
80: [13:25:22] <swaiba> harry sounds like you either need to review the lessons in terms of Articles / Authors
81: [13:25:41] <swaiba> or maybe you need to look at some decent content block modules and make your own blocks to go inside them
82: [13:28:58] <harry> @swaiba - content blocks sounds like what I need
83: [13:29:08] <harry> can i find this in the tutorials
84: [13:30:08] <swaiba> harry - you can find most block modules here - http://addons.silverstripe.org/add-ons?search=blocks
85: [13:30:44] <harry> wow this is exactly what I need
86: [13:30:53] <harry> can you recommend a particular add-on?
87: [13:37:47] <lerni> harry: I've made a list of some of the mudules once but duno how outdated that is :( https://docs.google.com/spreadsheets/d/1JvodD2L9K4b4hIrq1lTKb1Mpky5pgoOY0fElgKrrgq8/edit?pref=2&pli=1#gid=0
88: [13:38:49] <lerni> harry: you can edit the document - feel free to update :)
89: [13:40:13] <harry> very helpful thank you
90: [13:40:23] <harry> saves me having to reinvent the whell
91: [13:40:25] <harry> wheel
92: [13:41:33] <lerni> harry: I've used bummzack/page-blocks and like it!
93: [13:44:22] <harry> i was going to try sheadawson
94: [13:46:30] <harry> any idea what this error is: [User Error] Uncaught ReflectionException: Class MultiValueField does not exist
95: [13:46:46] <harry> i downlaoded the folder and dev/build
96: [13:48:57] <harry> missing plugin i think!
97: [13:49:05] <harry> dependancy
98: [14:05:50] <swaiba> harry was going to reco sheadawson, but I'm sure bummzack stuff is good (other stuff of his I've used is)
99: [14:06:06] <swaiba> and to avoid errors like the above it's best if you are using composer
100: [14:07:18] <swaiba> however looking at lerni google doc, I'd go with one the works with Versioned
101: [14:07:42] <swaiba> it sucks when you have to tell clients "yeah the *page* is versioned, but no the blocks in it" DOH!
102: [14:17:10] <elgabbu> via the CMS interface is there a way to completely delete a page ... at the moment i unpublish it and delete draft ... but it still shows up in the tree with a crossed line
103: [14:22:18] <nontgor> elgabbu: I don't think so, other than hiding it with CSS or manually deleting in the database
104: [14:25:26] <nontgor> been playing around with continuous integration, using Travis for testing and code coverage, uploading to likes of Scrutinizer, Coverall and Codecov. Viola, test coverage on your source code https://codecov.io/github/gordonbanderson/Mappable?ref=93ff38e98d85b83b3ecf16ee75ed470ca6084022
105: [14:27:12] * MarkGui__ has joined #silverstripe
106: [14:28:00] <harry> @swaiba thanks I will bear that in mind
107: [14:31:16] * MarkGuin_ quit (Ping timeout: 256 seconds)
108: [14:41:15] <harry> hmm stuck with this
109: [14:41:17] <harry> https://github.com/sheadawson/silverstripe-blocks
110: [14:41:30] <harry> don't see where in the CMS I add block content!
111: [14:42:23] <harry> ok I found it - not the usual green button to add in Model Admin
112: [14:49:18] <harry> @swaiba - I have the Sheadawson block module working, would you know if I can extend a block to have an image associated with it
113: [14:49:21] <harry> has_one
114: [14:50:05] <swaiba> well yeah, just look at https://github.com/sheadawson/silverstripe-blocks/blob/master/code/dataobjects/ContentBlock.php
115: [14:50:27] <swaiba> that is a specific content block for HTMLText
116: [14:50:53] <swaiba> so it should be easy to work out what to do if you wanted a ImageBlock for example...
117: [14:50:58] <swaiba> ^^^^^^ harry
118: [14:51:20] <harry> I want to associate a single image with a block
119: [14:51:27] <harry> but not part of the HTML edit
120: [14:52:00] <harry> so it would be a mandatory image
121: [14:52:21] <harry> but User shouldn't have control of the sizing or number of images nor the positioning
122: [14:54:01] <swaiba> i know what you want harry :)
123: [14:54:13] <swaiba> I'm trying to avoid just coding it for you...
124: [14:58:13] <harry> sure... I'm trying a few things
125: [14:59:16] <swaiba> make a new file, copying https://github.com/sheadawson/silverstripe-blocks/blob/master/code/dataobjects/ContentBlock.php
126: [14:59:25] <swaiba> and then make some changes to that... ;-)
127: [15:04:48] <harry> I edited the file directly
128: [15:04:56] <harry> added a has_one relationship with image
129: [15:05:18] <harry> it seems to have worked, but I guess that is not the best practice, I should make a new file?
130: [15:08:49] <swaiba> harry yes you should
131: [15:10:14] <swaiba> you see the Block should really be an abstract class, and then it forces you to subclass it
132: [15:10:28] <swaiba> and also certain methods should be abstract to force you to complete them
133: [15:10:45] <swaiba> but when doing stuff with silverstripe and extending other objects, there are reasons not to
134: [15:11:05] <swaiba> but this is a case where Polymorphism is very useful
135: [15:11:25] <swaiba> and you can make a "XYZBlock" for whatever you need
136: [15:11:33] * arnhoe quit ()
137: [15:12:21] * arnhoe has joined #silverstripe
138: [15:12:25] * arnhoe quit (Client Quit)
139: [15:24:30] <harry> I see, so when I copy the file into mysite I need to give the class a unique name, will this cause issues with how that CMS works
140: [15:34:28] <swaiba> well the "issue" will be that if you name the class the same as the file (again like ContentBlock) then silverstripe picks up the file
141: [15:35:03] <swaiba> and as you've extended Block it knows this can be used and - not that I've used this module - but it should appear as an option
142: [15:44:38] <harry> @swaiba - so I should create the file in mysite for example MyContentBlock (for both the class and file name)?
143: [15:45:16] <swaiba> yes, one file with the name the same as the name of the class within
144: [15:52:14] * lerni quit (Remote host closed the connection)
145: [15:56:42] <harry> hmm, doing that has removed the image upload from the blocks in Model Admin
146: [15:57:31] <harry> aha - I see - because now I need to select the new 'type' of block which I have created
147: [15:57:34] <harry> smart I like it!
148: [16:02:31] <harry> @swaiba - I like how this works - very slick ^^^^^
149: [16:02:35] <harry> thanks for your help
150: [16:02:53] <swaiba> good to hear harry, and you're very welcome
151: [16:03:42] <harry> i had been putting off starting this project for some time
152: [16:03:55] <harry> the community has helped me - you being the community today :)
153: [16:09:30] * MarkGui__ quit (Remote host closed the connection)
154: [16:10:25] * MarkGuin_ has joined #silverstripe
155: [16:21:30] * MarkGuin_ quit (Remote host closed the connection)
156: [16:30:35] * swaiba quit (Remote host closed the connection)
157: [16:30:46] * Mike123 quit (Ping timeout: 252 seconds)
158: [16:40:24] * Liquide quit ()
159: [16:45:32] * jcwacky quit (Quit: jcwacky)
160: [16:51:00] <harry> @swaiba, any ideas where the content areas are defined, for example I want to add some extra areas other than BeforeContent, AfterContent etc
161: [16:56:31] * jcwacky has joined #silverstripe
162: [17:08:35] * jcwacky quit (Quit: jcwacky)
163: [17:16:20] * MarkGuin_ has joined #silverstripe
164: [17:16:29] * MarkGuin_ quit (Client Quit)
165: [17:21:05] <harry> If my dataObject has_one link (SiteTree) - what is the variable name in ym template?
166: [17:36:03] <harry> MyContentBlock has_one Link
167: [17:36:22] <harry> I have created the content block and I have selected a Link, saved, flushed
168: [17:36:43] <harry> in my template I use $Link.Link and there is no output
169: [17:36:59] <harry> also $Link and $Link.URL
170: [17:39:45] <harry> if i output $Link I see: /home/block/2
171: [17:39:53] <harry> but that isn't a link I recognise
172: [17:45:36] <harry> anyone awake?
173: [17:51:29] <harry> @swaiba did you leave for the day?
174: [17:51:54] <harry> stuck on a simple issue
175: [17:56:41] <harry> ok this is utter nonsense, Block has_one Link (SiteTree), I have set and saved the Link in the CMS
176: [17:56:56] <harry> I have flushed, in my template this has no output: $Link.URLSegment
177: [17:57:08] <harry> $Link.Link not even $Link.Id
178: [17:57:13] <harry> what's going on?
179: [17:58:56] <harry> i only get output from $Link.Link = /home/block/2
180: [17:59:14] <harry> but that is a a nonsense URL that doesn't exist nor has any meaning
181: [18:15:46] <harry> please can someone help me
182: [18:17:51] <harry> im about to put my fist through my screen
183: [19:01:17] * lerni_ has joined #silverstripe
184: [19:03:00] * lerni_ quit (Client Quit)
185: [19:03:13] <ss-helper> Proper use of Bootstrap 3 Tooltip on a PHP based system - http://stackoverflow.com/questions/34517231/proper-use-of-bootstrap-3-tooltip-on-a-php-based-system
186: [19:24:27] * Stomach has joined #silverstripe
187: [19:45:18] * Azure quit (Quit: My Mac has gone to sleep. ZZZzzz…)
188: [19:55:07] * Stomach quit (Quit: zzz)
189: [19:58:29] * Stomach has joined #silverstripe
190: [20:06:28] * gelignite has joined #silverstripe
191: [20:16:35] * Stomach quit (Quit: zzz)
192: [21:21:28] * r_hector has joined #silverstripe
193: [21:40:17] * Azure has joined #silverstripe
194: [21:50:37] * zlinux has joined #silverstripe
195: [22:21:54] * Stomach has joined #silverstripe
196: [22:24:45] * Stomach quit (Client Quit)
197: [22:46:06] * zlinux_ has joined #silverstripe
198: [22:48:56] * zlinux quit (Ping timeout: 272 seconds)
199: [23:03:17] <ss-helper> Silverstripe ExactMatchFilter example - http://stackoverflow.com/questions/34520403/silverstripe-exactmatchfilter-example
200: [23:59:49] <zlinux_> Hi all

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