#silverstripe IRC Log

IRC log for 6 May 2016

All timestamps are in UTC.

1: [00:00:01] * ss-helper quit (Remote host closed the connection)
2: [00:00:18] * ss-helper has joined #silverstripe
3: [00:20:32] * Marc_newbie quit (Ping timeout: 250 seconds)
4: [00:34:02] * Azure quit (Ping timeout: 276 seconds)
5: [00:46:41] * twicenaps has joined #silverstripe
6: [00:46:42] <ss-helper> twicenaps: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
7: [00:47:36] <twicenaps> hey guys, any idea how i can debug this problem; the site was working fine, after a server reboot, now (like normal) the site presents me a login form but when i log into it I get a 'Sorry, there was a problem with handling your request.
8: [00:47:42] <twicenaps> and the error log shows:
9: [00:48:19] <twicenaps> http://dpaste.com/07Q5QDX.txt
10: [00:58:01] * Stomach quit (Quit: zzz)
11: [01:02:14] * Stomach has joined #silverstripe
12: [01:09:13] <micmania1> twicenaps: can you replicate the issue locally?
13: [01:16:06] * Stomach quit (Quit: zzz)
14: [01:17:29] * Stomach has joined #silverstripe
15: [01:22:25] * zlinux quit (Ping timeout: 252 seconds)
16: [01:33:40] * BrewNaked quit (Remote host closed the connection)
17: [01:57:05] <twicenaps> micmania1: not on staging, will build a throw away machine i guess
18: [01:57:54] <micmania1> twicenaps: at a guess, i’d say you have a DataObject which is trying to parse some html/xml and its failing. Probably triggered by an onAfterWrite (of Member maybe?).
19: [02:00:04] <ss-helper> Silverstripe add UploadField to ModelAdmin failed - http://stackoverflow.com/questions/37062906/silverstripe-add-uploadfield-to-modeladmin-failed
20: [02:09:45] <willr> twicenaps would seem to be application code specific. Take a look at where in your app you’re trying to parse an XML file.
21: [02:10:09] * Admonish quit (Ping timeout: 246 seconds)
22: [02:10:15] * Stomach_ has joined #silverstripe
23: [02:12:44] * Stomach quit (Ping timeout: 260 seconds)
24: [02:24:00] * micmania1 quit (Quit: micmania1)
25: [02:28:14] * spronk quit (Quit: I may need a longer sleep timer...)
26: [02:45:15] * MichalKleiner has joined #silverstripe
27: [02:45:15] * MichalKleiner quit (Client Quit)
28: [02:51:56] * micmania1 has joined #silverstripe
29: [03:01:35] * spronk has joined #silverstripe
30: [03:22:28] * BrewNaked has joined #silverstripe
31: [03:27:24] * BrewNaked quit (Ping timeout: 276 seconds)
32: [03:32:38] * Phlunk3 quit (Remote host closed the connection)
33: [03:37:43] * willr quit (Ping timeout: 252 seconds)
34: [03:46:42] * Stomach_ quit (Ping timeout: 244 seconds)
35: [04:38:44] * Stomach has joined #silverstripe
36: [05:04:55] * micmania1 quit (Quit: micmania1)
37: [05:11:22] * BrewNaked has joined #silverstripe
38: [05:11:25] * Hailwood quit (Remote host closed the connection)
39: [05:15:54] * BrewNaked quit (Ping timeout: 260 seconds)
40: [05:17:06] * Stomach quit (Quit: zzz)
41: [05:32:09] * Stomach has joined #silverstripe
42: [06:01:37] * Stomach quit (Ping timeout: 260 seconds)
43: [06:29:27] * Eliseth has joined #silverstripe
44: [07:00:17] * BrewNaked has joined #silverstripe
45: [07:01:33] * arnhoe has joined #silverstripe
46: [07:01:38] * spronk quit (Quit: I may need a longer sleep timer...)
47: [07:02:00] * arnhoe quit (Remote host closed the connection)
48: [07:02:36] * arnhoe has joined #silverstripe
49: [07:04:04] * spronk has joined #silverstripe
50: [07:04:31] * BrewNaked quit (Ping timeout: 252 seconds)
51: [07:51:50] <elgabbu> gd morning,
52: [07:52:50] <elgabbu> I have a situation where I am displaying the same form multiple times on same 'page' in the admin ... the form has a couple of radio buttons but it would seem that the second form loses its selected/checked value
53: [07:53:07] <elgabbu> the input elements have the same ID
54: [07:53:47] * Teddy_ has joined #silverstripe
55: [08:05:17] * spronk quit (Quit: I may need a longer sleep timer...)
56: [08:46:01] * agent44 has joined #silverstripe
57: [08:49:06] * BrewNaked has joined #silverstripe
58: [08:53:42] * BrewNaked quit (Ping timeout: 260 seconds)
59: [09:59:40] * marvanni has joined #silverstripe
60: [10:10:18] * GioVdK has joined #silverstripe
61: [10:17:29] * martimiz has joined #silverstripe
62: [10:18:57] <martimiz> Hi guys! Anyone ever tried to add an 'are you sure' popup to the gridfield 'save' button?
63: [10:19:37] <marvanni> no, but it should not be very hard
64: [10:20:20] <martimiz> Using entwine everything responds fine, only the save button doesn't respond to the onclick...
65: [10:21:11] <martimiz> using the same technique I found in AssetAdmin.js #67
66: [10:21:41] <marvanni> let me try
67: [10:22:05] <marvanni> can I see you javasript?
68: [10:22:07] <marvanni> c
69: [10:22:44] <martimiz> sure... need to upload it first :)
70: [10:23:13] <marvanni> just a !paste the onclick part
71: [10:24:23] <martimiz> $('.cms-edit-form :submit[name=action_doSave]').entwine({ onclick: function() {alert('clicked');}});
72: [10:25:56] <martimiz> replace onclick by onmatch and it works...
73: [10:27:50] <kinglozzer> martimiz: You probably need to make the selector more specific
74: [10:29:36] <kinglozzer> If you've got a specific ModelAdmin you want that enabled in, there might be a class you can target.. otherwise I'd try $('.cms .cms-edit-form :submit[name=action_doSave]').entwine({ onclick: function() {alert('clicked');}});
75: [10:29:41] <marvanni> this works
76: [10:29:42] <marvanni> $('.cms-edit-form .Actions button#Form_ItemEditForm_action_doSave').entwine({onclick: function(e) {e.preventDefault();alert('clicked');}});
77: [10:29:51] * phorloop quit (Quit: Byeee...)
78: [10:30:10] <kinglozzer> Then if they click okay, this._super(e);
79: [10:30:55] <marvanni> this._super(e); is like php => parent::method($event) ?
80: [10:32:16] <martimiz> Thanks, I'll try!!
81: [10:33:20] <kinglozzer> martimiz: Yep
82: [10:34:27] <kinglozzer> So like $('.a').onmatch(function() { alert('a'); }); $('.a.b').onmatch(function() { alert('b'); this._super(); }); would alert b, then a
83: [10:37:03] <martimiz> Works!!! Thanks so much :))
84: [10:37:37] <martimiz> Entwine is still a bit out of my comfortzone... so thanks both for the tips, really appreciated
85: [10:38:05] * BrewNaked has joined #silverstripe
86: [10:40:43] <kinglozzer> martimiz: Shameless self-promotion: https://www.bigfork.co.uk/takeaway/a-beginners-introduction-to-using-entwine-in-silverstripe :D
87: [10:42:54] * BrewNaked quit (Ping timeout: 276 seconds)
88: [10:43:34] <martimiz> Consider yourself promoted by me as well :) Thanks!!!
89: [10:50:02] <martimiz> Marvanni: missed this response - I did add a class to the special ModelAdmin class, to prevent others from reacting, which was a thing in itself :) but that wasn't enough for the onclick event, so happy now
90: [11:31:17] * twicenaps is now known as twicenappes
91: [11:31:29] * twicenappes is now known as twicenaps
92: [11:53:35] * zlinux has joined #silverstripe
93: [11:59:08] * GioVdK quit (Ping timeout: 276 seconds)
94: [12:01:06] * NETim_ has joined #silverstripe
95: [12:03:24] * NETim quit (Ping timeout: 246 seconds)
96: [12:23:07] * UndefinedOffset has joined #silverstripe
97: [12:26:58] * BrewNaked has joined #silverstripe
98: [12:31:04] * BrewNaked quit (Ping timeout: 240 seconds)
99: [12:50:09] <marvanni> has anyone tried to put the edit button in a seperate column of a grid field?
100: [12:55:07] * UndefinedOffset quit (Quit: Leaving.)
101: [12:57:18] <marvanni> nvm
102: [13:02:09] * UndefinedOffset has joined #silverstripe
103: [13:32:35] * GioVdK has joined #silverstripe
104: [13:41:07] * DimiStripe quit (Quit: DimiStripe)
105: [14:06:52] * HD|Laptop has joined #silverstripe
106: [14:06:52] <ss-helper> HD|Laptop: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
107: [14:07:24] <HD|Laptop> Hello all!
108: [14:08:13] * DimiStripe has joined #silverstripe
109: [14:08:18] <HD|Laptop> I have inherited a Silverstripe 3.1 website... with a QA and a Live server. Currently content sync is done via copying the Live database to QA, then editing in QA, and after sign-off copying of the database to Live
110: [14:09:03] <HD|Laptop> Obviously that situation sucks because always someone will do something on Live (e.g. HR posting new jobs) and then the QA copy undoes their work.
111: [14:09:40] <HD|Laptop> So I have googled and found https://docs.silverstripe.org/en/3.3/developer_guides/model/versioning/ but it looks like I will have to retrofit all the custom code?
112: [14:11:42] * muskie9 has joined #silverstripe
113: [14:15:49] * BrewNaked has joined #silverstripe
114: [14:20:07] * BrewNaked quit (Ping timeout: 250 seconds)
115: [14:24:47] * UndefinedOffset quit (Quit: Leaving.)
116: [14:30:11] * UndefinedOffset has joined #silverstripe
117: [14:37:45] <kinglozzer> HD|Laptop: If you're just importing and overwriting the database, then you'll *always* run the risk of losing content
118: [14:38:28] <kinglozzer> If you're only using the QA server to edit and sign-off on content, you might want to look into the workflows module instead - https://github.com/silverstripe-australia/silverstripe-advancedworkflow. You can set it up so admins can approve/reject content
119: [14:38:38] <kinglozzer> (disclaimer: I've not used that module before)
120: [14:41:01] <HD|Laptop> kinglozzer: hmm... looks nice, but how do I configure it to work w/ different subdomains?
121: [14:41:52] <kinglozzer> Sorry, no idea!
122: [14:42:25] <kinglozzer> I just suggested that approach because I can't think of any way that you can overwrite the database like you're suggesting without losing content
123: [14:45:15] <HD|Laptop> kinglozzer: Hmm... I was thinking that the SS_ENVIRONMENT_TYPE together with the draft/publish buttons in the admin area would be sufficient
124: [15:19:09] * arnhoe quit ()
125: [15:28:42] * cloph_away is now known as cloph
126: [15:30:52] * BrewNaked has joined #silverstripe
127: [15:36:53] * GioVdK quit (Ping timeout: 265 seconds)
128: [16:03:47] * gelignite has joined #silverstripe
129: [16:07:46] * Eliseth quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
130: [16:07:48] * HD|Laptop quit (Ping timeout: 250 seconds)
131: [16:13:48] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
132: [16:17:02] * GioVdK has joined #silverstripe
133: [16:17:49] * zlinux quit (Ping timeout: 252 seconds)
134: [16:19:20] * zlinux has joined #silverstripe
135: [16:27:01] * Guest13662 quit (Remote host closed the connection)
136: [16:27:15] * madmatt has joined #silverstripe
137: [16:27:39] * madmatt is now known as Guest82395
138: [16:32:11] * zlinux_ has joined #silverstripe
139: [16:33:26] * Teddy_ quit (Ping timeout: 276 seconds)
140: [16:35:29] * zlinux quit (Ping timeout: 260 seconds)
141: [16:36:18] * marvanni quit (Quit: marvanni)
142: [16:40:45] * zlinux has joined #silverstripe
143: [16:40:53] * zlinux_ quit (Read error: Connection reset by peer)
144: [16:44:35] * NETim_ quit (Quit: Leaving)
145: [16:59:40] * eightythree has joined #silverstripe
146: [17:00:34] * zlinux quit (Ping timeout: 240 seconds)
147: [17:04:24] * agent44 quit (Quit: zzz)
148: [17:05:00] * martimiz quit (Ping timeout: 250 seconds)
149: [17:11:10] * GioVdK quit (Ping timeout: 252 seconds)
150: [17:25:34] * arnhoe has joined #silverstripe
151: [17:27:34] * Admonish has joined #silverstripe
152: [17:46:10] * zlinux has joined #silverstripe
153: [18:13:05] <Admonish> Hey there everyone, does anyone know how to make nested tabs (a.k.a subtabs) change the url so that people can bookmark and travel back to the nested tab
154: [18:14:37] <Admonish> oh wait..it looks like they already do
155: [18:35:06] <Admonish> Ok thats really weird. So basically it looks like when you click on the subtab it uses javascript to show that id using a link (e.g. yoursite/page#subtab2) but it doesnt actually update the url itself. So can copy the link into the browser addressbar (yoursite/page#subtab2) and it would take you the the second subtab like you would expect. So I need to find a way to get the subtabs to change the url onclick
156: [18:36:16] * UndefinedOffset quit (Quit: Leaving.)
157: [18:43:02] <eightythree> Hey guys, how can I use custom field in setAttribute? I've got this code http://www.sspaste.com/paste/show/572ce55bd98cf but after refreshing the Page I get Undefined variable: MessageText error
158: [18:43:07] <Admonish> Looking at the firebug inspector net tab as I click through subtabs doesnt seem to show any ajax requests. Does this mean that all the contents of each subtab is loaded when the main tab is loaded? For example, if I have a mian tab called "main" that has three nested tabs in it, will all of the contents of those tabs load when I travel to "main"?
159: [18:49:39] <eightythree> Basically I want to set $MessageText in CMS by myself
160: [18:49:57] <Admonish> eightythree I do believe that that is the correct way of adding attributes. I mean you could try something like this: http://www.sspaste.com/paste/show/572ce6ed41f99 but I dont think it will make a difference. The error is more likely to be caused by something in the rest of your code.
161: [18:51:41] <eightythree> Hmm
162: [18:52:22] <Admonish> eightythree So if I understand you correctly you want to enter (into an input of some kind) the contents of $MessageText and then later on have that added to a field as an attribute. Am I correct?
163: [18:57:02] <eightythree> Ummm, what I want is to declare field variable and use it in template same as Page fields and then put that in CMS so I can add that placeholder content by myself
164: [18:57:22] <eightythree> Do you know what I mean?
165: [18:59:02] <Admonish> I think I understand. It sounds like you want to be able to change the placeholder of a field in the template using a field in the CMS.
166: [18:59:13] <eightythree> Right :)
167: [18:59:19] <Admonish> oh ok
168: [18:59:23] <Admonish> hmm
169: [19:00:29] <Admonish> What are you using to display the field in the CMS? Are you just adding the field to a Page or are you usig ModelAdmin?
170: [19:00:37] <Admonish> or something else
171: [19:01:47] <eightythree> Standard Page
172: [19:02:21] <eightythree> I have $MessageText already created in that Page I just need to pass it to controller ... I think
173: [19:02:51] <Admonish> eightythree could you by any chance make a gist or ssPaste with the full code that Standard page? It would really help if I can see what you have so far and exactly what your doing
174: [19:03:10] <Admonish> if not thats ok :D
175: [19:06:27] <eightythree> or to be more precise to setAttribute inside Page Controler
176: [19:07:20] <eightythree> http://www.sspaste.com/paste/show/572ceb62bcd1f
177: [19:07:42] <Admonish> thanks
178: [19:07:54] <eightythree> This is what I have more less
179: [19:12:09] <Admonish> eightythree Looking at your code here I agree with what you said earlier. Everything looks ok syntax wise, (from what I can see). It looks like you just have to retrieve the MessageText data from the page and store it in a $MessageText variable on the controller.
180: [19:12:47] * UndefinedOffset has joined #silverstripe
181: [19:13:01] <eightythree> I've tried $field->MessageText but I got field variable error
182: [19:13:30] <eightythree> So know I need to tell to $form to use $field
183: [19:13:31] <eightythree> lol
184: [19:13:40] <eightythree> now^
185: [19:14:13] <eightythree> I bet this is super simple lol
186: [19:17:08] <Admonish> well what you could do is create a new private (or public if you want) static variable in your page controller and have it get the data directly from the MessageText that is stored in the database. However you would most likely need to add a defualt value to the database field or the placeholder would be empty untill you add it through the CMS field
187: [19:20:08] <eightythree> Could you provide some code?
188: [19:20:11] * zlinux_ has joined #silverstripe
189: [19:20:51] * zlinux quit (Ping timeout: 250 seconds)
190: [19:21:17] <Admonish> eightythree working on something as we speak ;D
191: [19:23:42] <eightythree> Oh, ok :)
192: [19:29:37] <Admonish> wow this is annoying, I know how to do this using data stored in a DataObject. But for the life of me I cannot remember how to retrieve data stored in a pages $db
193: [19:36:15] * zlinux has joined #silverstripe
194: [19:38:02] * zlinux_ quit (Ping timeout: 276 seconds)
195: [19:38:25] <eightythree> http://www.sspaste.com/paste/show/572cf2ab0d1d5
196: [19:39:36] <eightythree> This is something from lessons section and if change getName() to MessageText ?
197: [19:40:13] <eightythree> But problem is there will be one placeholder for all fields
198: [19:45:08] * eightythree quit (Quit: Page closed)
199: [19:45:37] * eightythree has joined #silverstripe
200: [19:45:47] <eightythree> oops
201: [19:57:28] <DimiStripe> Hey guys,
202: [19:57:28] <DimiStripe> Im using "new SS_LogEmailWriter('my@email.com')" in config.php, however when mail comes its being marked as
203: [19:57:28] <DimiStripe> FROM : errors@silverstripe.com
204: [19:57:28] <DimiStripe> Can i somehow setup email headers for LogEmailWriter so it comes from my defined email address ?
205: [19:59:56] * gelignite has joined #silverstripe
206: [20:08:13] <Admonish> eightythree Im stumped on this one. Perhaps one of the other members can help you out. Sorry :(
207: [20:08:49] <muskie9> DimiStripe try Config::inst()->update('SS_LogEmailWriter', 'send_from', 'youremail@someplace.com'); or via yml per the config
208: [20:11:28] <eightythree> That's ok Admonish, thans for your time :)
209: [20:14:22] <muskie9> eightythree your MessageText is stored in the page you said?
210: [20:14:37] <muskie9> *** in the db array in the page
211: [20:15:25] <muskie9> looking at your paste showing the controller, you'd replace $MessageText with $this->data()->MessageText
212: [20:17:01] <eightythree> muskie9 :)
213: [20:17:29] <muskie9> that should pull what you've entered in the cms as the placeholder attribute for the form field
214: [20:21:58] <DimiStripe> muskie9: thanks , works ! :)
215: [20:24:33] * zlinux_ has joined #silverstripe
216: [20:26:23] * UndefinedOffset quit (Quit: Leaving.)
217: [20:27:52] * zlinux quit (Ping timeout: 260 seconds)
218: [20:29:45] <DimiStripe> Another good one - how can i force SS use ONLY MyISAM (it tries converting all tables into InnoDB, and we have no InoDB on production server ?
219: [20:30:16] * zlinux_ quit (Ping timeout: 252 seconds)
220: [20:31:34] <eightythree> muskie9 you're my hero :p Thanks again :)
221: [20:31:54] <muskie9> DimiStripe that one I'm not sure on
222: [20:32:08] <muskie9> you're welcome eightythree
223: [20:32:24] * zlinux has joined #silverstripe
224: [20:32:57] <muskie9> DimiStripe I ran into some db stuff like that a few months ago w/searchable dataobjects and how one handles language searches differently than the other, but never got it sorted out
225: [20:33:24] <DimiStripe> i found somehting like
226: [20:33:25] <DimiStripe> DataObject::$create_table_options['MySQLDatabase'] = 'ENGINE=MyISAM';
227: [20:33:34] <DimiStripe> but im not sure how to apply this to all tables
228: [20:35:17] <muskie9> seems that $create_table_options is another config option (an array though) http://api.silverstripe.org/3.3/source-class-DataObject.html#3789
229: [20:35:21] * willr has joined #silverstripe
230: [20:35:33] <muskie9> used in updating tables http://api.silverstripe.org/3.3/source-class-DataObject.html#3395
231: [20:35:42] <muskie9> I'm not sure how it all works though
232: [20:38:10] <muskie9> just discovered regex find/replace in phpstorm... my life is now complete ;P
233: [20:41:44] <Admonish> So I subclassed modelAdmin (SubTabModelAdmin.php) and added optional subtab functionality. However when I extend that class like I would modelAdmin, the managed_models that I dont have my optional subtabs toggled on give this error: Fatal error: Class 'ExternalDataGridFieldDetailForm' not found in *Path*/SubTabModelAdmin.php.
234: [20:42:17] <Admonish> But if modelAdmin has access to this 'ExternalDataGridFieldDetailForm' shouldnt my subclass also?
235: [20:44:35] <Admonish> The offending line of code is ->addComponents(new ExternalDataGridFieldDetailForm()) on a gridfield, which I just simply copied from the original modelAdmin code.
236: [20:45:23] <DimiStripe> muskie9: just changed this in core of DataObject create_table_options . SO now works ;)
237: [20:45:29] * DimiStripe quit (Quit: DimiStripe)
238: [20:45:58] <Admonish> oh wait
239: [20:46:10] <Admonish> nvm I think i figured it out XD im so stupid
240: [20:46:50] * zlinux_ has joined #silverstripe
241: [20:47:33] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
242: [20:47:48] * zlinux quit (Read error: Connection reset by peer)
243: [20:47:53] <eightythree> xD
244: [20:48:49] <Admonish> I was looking at other peoples plugins and copying there code. I had removed most of it later but I guess I left that in XD
245: [21:07:42] * glenn-bautista1 has joined #silverstripe
246: [21:07:43] * glenn-bautista quit (Read error: Connection reset by peer)
247: [21:18:43] * zlinux_ quit (Ping timeout: 250 seconds)
248: [21:20:14] * eightythree quit (Ping timeout: 250 seconds)
249: [21:20:34] * zlinux_ has joined #silverstripe
250: [21:38:01] * DimiStripe has joined #silverstripe
251: [21:39:05] * Stomach has joined #silverstripe
252: [21:49:30] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
253: [22:01:58] * Azure has joined #silverstripe
254: [22:10:01] * Stomach quit (Quit: zzz)
255: [22:22:56] <Admonish> Im not the best with SQL as I was originally a frontend only dev. But am I right to assume that silverstripes filter() is pretty much doing WHERE clauses?
256: [22:53:01] * Admonish quit (Quit: Going offline, see ya! (www.adiirc.com))
257: [22:53:51] * glenn-bautista1 quit (Read error: Connection reset by peer)
258: [22:54:07] * glenn-bautista has joined #silverstripe
259: [22:57:35] * eightythree has joined #silverstripe
260: [22:58:22] <eightythree> Where can i find files with from fields? I just wanted to cstomize layout, I've copied Form.ss to my template but can't find $FieldHolder
261: [23:02:47] * zlinux_ quit (Ping timeout: 276 seconds)
262: [23:05:49] * eightythree quit (Quit: Page closed)
263: [23:20:47] * zlinux_ has joined #silverstripe
264: [23:53:40] * willr quit (Quit: willr)

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