#silverstripe IRC Log

IRC log for 30 December 2013

All timestamps are in UTC.

1: [00:13:00] * Marvanni_ has joined #silverstripe
2: [00:13:10] * Marvanni_ quit (Client Quit)
3: [01:14:14] * gelignite_ has joined #silverstripe
4: [01:17:35] * gelignite quit (Ping timeout: 252 seconds)
5: [01:49:05] * violetina quit (Remote host closed the connection)
6: [02:21:17] * steve_ has joined #silverstripe
7: [02:25:21] <steve_> Hi, my host just installed Apache mod_security (default config) which means trouble for my SS3. I can't go on the /admin page anymore and get a forbidden. My best guess is, that the mod restricts something in the rewrtinging or URL filtering... does anyone know about this?
8: [02:38:05] <steve_> the modsecurity logfile suggest some session id issues:
9: [02:38:06] <steve_> Match of "streq %{SESSION.IP_HASH}" against "TX:ip_hash" required.
10: [02:47:32] * duramater quit (Ping timeout: 265 seconds)
11: [04:11:41] * steve_ quit (Ping timeout: 272 seconds)
12: [04:23:53] <Snowman23> mod_security -- like chemotherapy for your appy
13: [04:24:13] * cloph quit (Ping timeout: 246 seconds)
14: [04:28:18] * gelignite_ quit (Quit: http://bit.ly/nkczDT)
15: [04:29:09] * cloph_away has joined #silverstripe
16: [04:33:19] * abitran quit (Ping timeout: 246 seconds)
17: [04:33:31] * abitran has joined #silverstripe
18: [05:00:51] * abitran quit (Remote host closed the connection)
19: [05:06:05] * abitran has joined #silverstripe
20: [05:34:55] * abitran quit (Ping timeout: 245 seconds)
21: [05:35:37] * abitran has joined #silverstripe
22: [07:39:56] * UncleCheese has joined #silverstripe
23: [07:45:07] * Azure quit (Quit: My MBP went to sleep.)
24: [07:45:07] * Shrike_Finland has joined #silverstripe
25: [08:09:15] * Sj0hn has joined #silverstripe
26: [08:22:27] * ARNHOE has joined #silverstripe
27: [09:06:09] * Motoservo quit (Quit: Motoservo)
28: [09:11:32] * Motoservo has joined #silverstripe
29: [09:14:02] * gelignite has joined #silverstripe
30: [09:27:27] * qlex has joined #silverstripe
31: [09:28:30] * qlex says hi
32: [10:06:39] <qlex> Zauberfisch23: are you here ?
33: [10:27:26] * ganesh has joined #silverstripe
34: [10:27:49] * ganesh is now known as Guest28151
35: [10:28:06] <Guest28151> hi..anybody can explain how to do a hello world module in silverstripe
36: [10:32:02] <Guest28151> hi
37: [10:36:45] * Guest28151 quit (Ping timeout: 272 seconds)
38: [10:54:46] * violetina has joined #silverstripe
39: [11:01:56] * qlex has left #silverstripe
40: [11:21:03] * UncleCheese quit (Quit: UncleCheese)
41: [12:01:01] * blindMoe|2 has joined #silverstripe
42: [12:01:51] * ec8or___ has joined #silverstripe
43: [12:02:16] * mobiusnz1 has joined #silverstripe
44: [12:06:35] * mobiusnz quit (Ping timeout: 272 seconds)
45: [12:06:37] * blindMoe quit (Ping timeout: 272 seconds)
46: [12:06:37] * ec8or_ quit (Ping timeout: 272 seconds)
47: [12:14:17] * Sj0hn quit (Ping timeout: 252 seconds)
48: [12:15:12] * Sj0hn has joined #silverstripe
49: [12:52:50] * Azure has joined #silverstripe
50: [13:19:04] * UndefinedOffset has joined #silverstripe
51: [13:20:41] * spronk has joined #silverstripe
52: [13:51:26] * jrthomer_ quit (Remote host closed the connection)
53: [14:06:52] * jrthomer has joined #silverstripe
54: [14:13:11] * jrthomer quit (Remote host closed the connection)
55: [14:13:20] * jrthomer has joined #silverstripe
56: [14:21:42] * Shrike_Finland quit (Quit: Leaving.)
57: [14:33:57] * qlex has joined #silverstripe
58: [14:34:10] * qlex says hi again
59: [14:34:47] <qlex> i have a website, running on ss.2.4, planning to do update to 3.1, but have a task that requires that there are 2 pages added, which are available only to those who know password
60: [14:35:28] <qlex> how is it done the best? create register page for users, admin verifies the registrations and allows members to access some pages and others will see "this page is only available to the registered users" ?
61: [14:44:48] * violetina quit (*.net *.split)
62: [14:50:15] * violetina has joined #silverstripe
63: [14:50:41] * spronk quit (Write error: Broken pipe)
64: [15:02:34] * catcher has joined #silverstripe
65: [15:09:29] * micmania1 has joined #silverstripe
66: [15:09:54] <micmania1> is anyone alive out there?
67: [15:36:54] <qlex> micmania1: doesnt seem like it
68: [15:37:04] <qlex> i had questions throughout the day, but heard nothing but echo
69: [15:37:11] <micmania1> lol
70: [15:37:24] <micmania1> u get it solved?
71: [15:44:08] <Sj0hn> Hi, Everyone. Happy New Years from The Netherlands =)
72: [15:44:17] * Sj0hn quit (Quit: Ik ga weg)
73: [15:49:03] <qlex> nope
74: [15:49:06] <qlex> did u see my message ?
75: [15:50:59] * Zauberfisch23 quit (Ping timeout: 252 seconds)
76: [15:51:07] * Zauberfisch23 has joined #silverstripe
77: [16:04:03] <micmania1> qlex, no - didn't see it. What was it?
78: [16:07:30] <qlex> i need something like memberpage
79: [16:07:55] <qlex> got a silverstripe site, and need 1 or 2 pages to be visible only to registered and logged in users
80: [16:08:07] <qlex> https://github.com/ajshort/silverstripe-memberprofiles
81: [16:08:10] <qlex> would this help ?
82: [16:08:16] <qlex> this gives a registrartion form and profile page
83: [16:08:45] <qlex> but dont know if i can set, so that people that register have access to a given page, and people that are guests, only see "this content is visible onyl to registered users"
84: [16:10:02] * stefanovic72 has joined #silverstripe
85: [16:10:35] <stefanovic72> Hello
86: [16:11:01] <stefanovic72> I've encounter a (hopefully) small problem
87: [16:11:18] <micmania1> qlex, its built into Silverstripe. You need to add users to a group then on each page in the settings tab there is an option to only allow certain groups.
88: [16:11:33] <stefanovic72> I try to use the JSONDataFormatter
89: [16:11:50] <qlex> ok, where do i control what's displayed to guests
90: [16:12:01] <qlex> and how can they register or get user/pass from admin ?
91: [16:12:10] <stefanovic72> I want to retrieve all the data of a dataobject called ContactInfo
92: [16:12:30] <micmania1> You'll need to create a custom registration form (or use that module).
93: [16:12:38] <stefanovic72> I do this: $contacts = DataObject::get('ContactInfo');
94: [16:12:56] <stefanovic72> $f = new JSONDataFormatter();
95: [16:12:57] <qlex> micmania1: thankx, i will test the module to have registration
96: [16:13:02] <qlex> allow users to register to a certain group
97: [16:13:10] <micmania1> to get the currently logged in user you can use Member::currentUser() in php or $CurrentUser in the templates.
98: [16:13:14] <qlex> and allow that group only to view a certain page
99: [16:13:18] <stefanovic72> $retval = $f->convertDataObjectSet($contacts);
100: [16:13:24] <qlex> need to run
101: [16:13:34] <micmania1> You'll probably want to check over the Member and Group api in the docs
102: [16:13:55] <stefanovic72> the output is: {"response": "{\"totalSize\":null,\"items\":[]}"}
103: [16:14:23] * qlex has left #silverstripe
104: [16:15:32] <stefanovic72> I'm sure there are records, when I do this: $contacts->Count(), i get 2
105: [16:18:30] <stefanovic72> Does anyone have an idea what I am donig wrong. For me it seems that the datalist i get back must be itereated first or so
106: [16:19:25] <stefanovic72> when I loop through the data: foreach($contacts as $contact) { $retval = $f->convertDataObject($contact); } i get output
107: [16:25:28] * ARNHOE quit ()
108: [16:27:41] <catcher> stefanovic72, does your account have canView() permissions for ContactInfo objects?
109: [16:29:24] <catcher> stefanovic72, beyond that, it's a pretty basic wrapper (does a foreach, calls convertDataObjectToJSONObject just like convertDataObject does)
110: [16:33:31] <stefanovic72> @catcher: Thanks, that was the thing
111: [16:33:48] <stefanovic72> the was no canView permission
112: [16:34:38] <stefanovic72> Isn't it strange that convertDataObject works without canView permission and convertDataObjectSet needs that permission?
113: [16:37:06] <stefanovic72> Last question: In the JSON output totalSize is still null, so I see two records (items) in the output now but the totalSize is displayed as null. I expect the number of items there
114: [16:37:54] <catcher> stefanovic72, I could definitely see an argument for adding the canView() to convertDO for consistency.
115: [16:42:25] <catcher> stefanovic72, I don't see how the protected $totalsize would ever be set. May be a bug, or maybe someone else sees something I don't..
116: [16:43:17] <stefanovic72> no big issue catcher. Thanks very much for your help!
117: [16:43:26] <catcher> np!
118: [16:48:32] * stefanovic72 quit (Quit: Page closed)
119: [16:54:43] <micmania1> anybody used backbone js with silverstripe? Got any tips before i start?
120: [17:28:37] * micmania1 quit (Ping timeout: 248 seconds)
121: [17:44:28] * micmania1 has joined #silverstripe
122: [18:14:42] * godkiefka has joined #silverstripe
123: [18:19:54] * godkiefka quit (Read error: Connection reset by peer)
124: [18:26:32] * mojo5000 has joined #silverstripe
125: [19:30:45] * micmania1 quit (Ping timeout: 248 seconds)
126: [19:33:04] * UncleCheese has joined #silverstripe
127: [19:35:09] * micmania2 has joined #silverstripe
128: [19:36:23] * UncleCheese quit (Client Quit)
129: [19:42:22] <guzzlefry> hey guys
130: [19:42:28] <guzzlefry> I have questions! :P
131: [19:43:51] <micmania2> GO!
132: [19:43:52] <guzzlefry> So I have a controller action called MobileAppPage::app that grabs a MobileApp object via the ID request parameter.
133: [19:44:22] <guzzlefry> What's the cleanest way to get a link to that item on the MobileAppPage that lists all of the apps?
134: [19:46:05] <micmania2> Controller::join_links($this->Link("app"), $this->request->param("ID")); // That's how i'd do it.
135: [19:47:53] <micmania2> that would be done on the page controller btw
136: [20:02:46] <catcher> Has anyone here used the disqus module?
137: [20:03:58] * micmania2 quit (Read error: Connection reset by peer)
138: [20:04:25] * micmania2 has joined #silverstripe
139: [20:08:31] * gelignite quit (Ping timeout: 246 seconds)
140: [20:24:52] <UndefinedOffset> catcher only for 2.4
141: [20:33:15] * joelpittet has joined #silverstripe
142: [20:57:13] <guzzlefry> hrm
143: [20:59:06] <guzzlefry> MobileAppsPage::getMobileApps() { return MobileApp::get(); }
144: [20:59:14] <guzzlefry> I loop over that inside the template.
145: [21:00:02] <ezero> there used to be a getAll((
146: [21:00:05] <ezero> getAll()*
147: [21:00:24] <catcher> UndefinedOffset, how did removing comments work with that?
148: [21:00:42] <guzzlefry> So inside that loop I need a link to /mobileappspage/app/{ID of current mobile app}
149: [21:01:53] <ezero> guzzlefry, what does $Link give you?
150: [21:01:58] <guzzlefry> Should I just hack something together in the template?
151: [21:02:22] <guzzlefry> ezero: nothing
152: [21:02:41] <guzzlefry> I don't think DataObjects have Link()?
153: [21:02:55] <ezero> oh i thought it was a Page
154: [21:03:18] <ezero> just a create a method called Link() then and return a string :P
155: [21:03:24] <ezero> thats how i would do it. but sounds very ugly
156: [21:03:28] <guzzlefry> yeah
157: [21:03:39] <guzzlefry> That couples the DataObject with the PageType :/
158: [21:03:50] <ezero> surely there is a better way by now :P
159: [21:03:58] <ezero> im too old school SilverStriper
160: [21:04:36] <UndefinedOffset> catcher well since 2.4 has page comments built in i couldn't :S
161: [21:05:15] <guzzlefry> Ideally Link() should be attached to the dataobjects via the MobileAppPage::getMobileApps() method, right?
162: [21:07:04] <ezero> yeah
163: [21:07:23] <ezero> i guess you could return it as a decorator
164: [21:07:24] <ezero> from the method
165: [21:07:45] <guzzlefry> meh
166: [21:07:46] <ezero> try dumping what u get with MobileApp::get()
167: [21:07:51] <ezero> see if Link is in it
168: [21:07:55] <guzzlefry> I could ghetto it.
169: [21:07:58] <ezero> lol
170: [21:08:21] <guzzlefry> if (Controller::curr()) { make link inside DataObject }
171: [21:08:30] <guzzlefry> Actually, I'll do that until I find a better method. :P
172: [21:08:45] <ezero> yeah thats a little better then my link method that returns a string
173: [21:09:03] <ezero> i a link method wuold be nice if you were going to use it more then once.. for other objects too
174: [21:13:16] <guzzlefry> yay for tight coupling :P
175: [21:13:29] <ezero> lol surely no pun intended
176: [21:30:30] * UndefinedOffset quit (Quit: Leaving.)
177: [21:31:00] * gelignite has joined #silverstripe
178: [21:32:17] <micmania2> guzzlefry, did u not try my method earlier?
179: [21:33:42] <guzzlefry> micmania2: I used part of it, thanks.
180: [21:33:52] <guzzlefry> I didn't describe my problem fully enough.
181: [21:43:58] <guzzlefry> hrm
182: [21:45:21] <guzzlefry> When adding fields to a class that extends Page, shouldn't those be automatically thrown into the edit form?
183: [21:45:30] <guzzlefry> Or do I actually need to override getCMSFields()?
184: [21:53:16] * gelignite quit (Quit: http://bit.ly/nkczDT)
185: [21:55:54] * mobiusnz1 quit (Quit: Leaving.)
186: [22:26:46] * mobiusnz has joined #silverstripe
187: [22:28:05] * mobiusnz quit (Client Quit)
188: [22:33:08] <micmania2> guzzlefry, you have to override. the EditForm in admin/pages uses tabsets so automatic scaffolding doesn't work (I believe).
189: [22:33:36] * mojo5000 quit (Remote host closed the connection)
190: [22:35:16] <guzzlefry> ah, gotcha
191: [22:35:34] <guzzlefry> now...a clean way to randomly link to pages?
192: [22:35:44] <guzzlefry> I have some form pages that are linked in multiple places.
193: [22:47:40] * UncleCheese has joined #silverstripe
194: [22:52:51] <guzzlefry> I'm down to either 1) Method in Page_Controller() to pull links from the existing PageTypes for the form pages or 2) SiteConfig fields to set the Page for the specific page...
195: [23:14:51] * catcher quit (Quit: Leaving)
196: [23:31:34] * mojo5000 has joined #silverstripe
197: [23:49:45] * jrthomer quit (Remote host closed the connection)
198: [23:52:20] * jrthomer has joined #silverstripe

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