#silverstripe IRC Log

IRC log for 10 June 2016

All timestamps are in UTC.

1: [00:00:01] * ss-helper quit (Remote host closed the connection)
2: [00:00:16] * ss-helper has joined #silverstripe
3: [00:24:11] * phorloop has joined #silverstripe
4: [00:24:12] * Stomach quit (Quit: zzz)
5: [00:29:47] * Stomach has joined #silverstripe
6: [00:47:24] * Stomach quit (Quit: zzz)
7: [01:07:27] * bobo has joined #silverstripe
8: [01:07:27] <ss-helper> bobo: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
9: [01:09:20] <bobo> afternoon all
10: [01:09:24] <bobo> quick question
11: [01:09:44] <bobo> how can I access the old vs new values of a page in the onBeforeWrite() method?
12: [01:09:53] * Stomach has joined #silverstripe
13: [01:09:55] <bobo> ie. I want to check if a certain field is changing, and do something
14: [01:10:34] <bobo> so compare $this_old->field with $this_new->field
15: [01:11:00] <bobo> $this is the value of the existing object before writing, so is the old value...
16: [01:11:16] <bobo> so I need to get the new value I am attempting to save
17: [01:22:29] * oddnoc quit (Quit: yawn!)
18: [01:25:44] <muskie9> bobo you could always query your record and check if(YourRecord::get()->byID($this->ID)->FieldName != $this->FieldName){ /*it changed*/ }
19: [01:26:23] <bobo> I didn't try that. I assumed it would be the one in the db, not the one submitted in the save action...
20: [01:26:58] <muskie9> $this->FieldName should be the one on save... I just found ->getChangedFields() as well: http://api.silverstripe.org/3.3/source-class-DataObject.html#2527
21: [01:27:51] <muskie9> not sure exactly how/when hasChangedFields works though
22: [01:29:33] <muskie9> you could probably call ->isChanged('YourFieldName') as well
23: [01:29:44] <bobo> Debug::show(SiteTree::get()->byID($this->ID)->Summary); vs Debug::show($this->Summary); ... both show the same val
24: [01:31:36] <muskie9> check $this->isChanged('YourField') and see if that returns true if it's chaged
25: [01:33:23] * micmania1 has joined #silverstripe
26: [01:36:32] <bobo> muskie9 no joy. Neither on the onAfterWrite() :S not sure whats going on ..
27: [01:37:03] <muskie9> ah, sorry... try in the onBeforeWrite()... I'm not sure if anything persists the previous value after the write
28: [01:41:34] <bobo> I have a feeling something else is interfering... thanks for the tips.. hopefully one leads to an answer, I'll continue looking into it
29: [01:47:36] <bobo> muskie9 $this->isChanged('Summary') worked... it's being called twice for some reason though :S so next problem to deal with! thanks
30: [01:51:36] * muskie9 quit (Ping timeout: 246 seconds)
31: [01:54:06] * UncleCheese has joined #silverstripe
32: [01:58:33] * micmania1 quit (Quit: micmania1)
33: [02:09:26] * bobo quit (Ping timeout: 250 seconds)
34: [02:11:26] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
35: [02:23:13] * oddnoc has joined #silverstripe
36: [02:24:37] * micmania1 has joined #silverstripe
37: [02:29:29] * oddnoc quit (Quit: yawn!)
38: [02:52:42] * Stomach quit (Quit: zzz)
39: [02:52:44] * Embraden quit (Read error: Connection reset by peer)
40: [02:59:17] * UncleCheese has joined #silverstripe
41: [03:11:40] * Embraden has joined #silverstripe
42: [03:11:40] * Embraden quit (Changing host)
43: [03:11:40] * Embraden has joined #silverstripe
44: [03:40:38] * potatofamine has joined #silverstripe
45: [03:40:38] <ss-helper> potatofamine: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
46: [03:42:24] <potatofamine> so, I need to add a simple modal popup to an existing SilverStripe site, but I'm not familiar with silverstripe and the documentation makes it look like I need years of experience just to do this simple thing
47: [03:42:57] <potatofamine> does anybody know of any quick tutorials for experienced developers thrown into SilverStripe?
48: [03:52:36] <potatofamine> for example, how do I delete a page?
49: [03:53:18] <potatofamine> this appears borderline impossible. Googling "Silverstripe delete page", which anybody would expect the first result to explain how it is done, only describes "archiving" etc
50: [03:53:27] <potatofamine> "unpublishing"
51: [03:53:38] <potatofamine> I don't want to archive. I don't want to publish. I don't want to unpublish.
52: [03:53:49] <potatofamine> I want to create a dumb page to learn how the thing works, then delete it
53: [03:54:19] <potatofamine> Once I get to a point where I can make changes I want to keep, I will commit them to a git repository and let the guys off-site build/deploy/update/whatever the production site
54: [03:55:07] <potatofamine> what is wrong with my logic here? how can I do this "the silverstripe way" ?
55: [04:07:57] <micmania1> potatofamine: SilverStripe doesn’t allow you to delete a page. You can only archive it. If you want to delete the page completely you need to remove all traces of it from SiteTree, SiteTree_Live and SiteTree_versions (as well as subclassed tables).
56: [04:08:22] <micmania1> That would be done using DB::query(“DELETE FROM …”);
57: [04:10:05] <micmania1> potatofamine: there’s some video tutorials online https://www.silverstripe.org/learn/lessons/
58: [04:11:04] * Stomach has joined #silverstripe
59: [04:24:18] * Hailwood quit (Read error: Connection reset by peer)
60: [04:24:44] * spronk quit (Quit: I may need a longer sleep timer...)
61: [04:33:59] * Stomach quit (Quit: zzz)
62: [04:40:05] * oddnoc has joined #silverstripe
63: [04:45:01] * phorloop quit (Quit: My laptop go to sleep. ZZZzzz…)
64: [04:45:47] * n8_ has joined #silverstripe
65: [04:46:22] <n8_> Hello?
66: [04:47:17] <n8_> Anyone got any experience with the 'silverstripe-gridfieldextensions' inline editing across mnay_many_extrafields?
67: [04:47:20] <n8_> Can it be done?
68: [04:47:47] <n8_> It indicates it can be with "Editing data contained in many_many_extraFields is supported - just treat it as you would any other field."
69: [04:48:00] <n8_> But what does that mean?
70: [04:49:24] * spronk has joined #silverstripe
71: [04:53:45] * spronk quit (Ping timeout: 240 seconds)
72: [04:58:24] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
73: [05:03:49] * Stomach has joined #silverstripe
74: [05:16:41] * Stomach quit (Quit: zzz)
75: [05:21:35] * Stomach has joined #silverstripe
76: [05:26:44] <micmania1> n8_: that’s not very good docs! Try ‘MyRelation.MyExtraField’
77: [05:26:49] <micmania1> After that i’m not sure :/
78: [05:33:58] * Stomach quit (Quit: zzz)
79: [05:38:12] * Embraden quit (Read error: Connection reset by peer)
80: [05:44:10] * johnwl quit (Quit: Connection closed for inactivity)
81: [05:44:58] * Embraden has joined #silverstripe
82: [05:44:59] * Embraden quit (Changing host)
83: [05:44:59] * Embraden has joined #silverstripe
84: [05:45:46] * Stomach has joined #silverstripe
85: [05:50:13] * Stomach quit (Ping timeout: 250 seconds)
86: [05:50:52] * n8_ quit (Ping timeout: 250 seconds)
87: [06:09:27] * Embraden quit (Read error: Connection reset by peer)
88: [06:16:13] * Stomach has joined #silverstripe
89: [06:19:59] * oddnoc quit (Quit: yawn!)
90: [06:24:09] * Eliseth has joined #silverstripe
91: [06:25:39] * XorPush has joined #silverstripe
92: [06:28:04] <XorPush> I need a little help: I have a dataobject that has as parent (has_one) member, from the frontpage I have a search and I need to filter it, mostly on fields that belong to the object, but one field I have in Member (extended it). I am creating a datalist, how can I access the given field value of Member in relation has_one-has_one
93: [06:28:22] * Embraden has joined #silverstripe
94: [06:35:52] * micmania1 quit (Quit: micmania1)
95: [06:38:11] * Embraden quit (Read error: Connection reset by peer)
96: [06:41:06] * wmk has joined #silverstripe
97: [06:44:54] * Embraden has joined #silverstripe
98: [06:55:07] * arnhoe has joined #silverstripe
99: [06:55:13] * phorloop has joined #silverstripe
100: [07:00:04] * wmk quit (Ping timeout: 240 seconds)
101: [07:13:43] * phorloop quit (Quit: My laptop go to sleep. ZZZzzz…)
102: [07:14:54] * phorloop has joined #silverstripe
103: [07:15:45] * darianno has joined #silverstripe
104: [07:17:38] * phorloop quit (Client Quit)
105: [07:31:30] * phorloop has joined #silverstripe
106: [07:33:24] * wmk has joined #silverstripe
107: [07:53:42] * Embraden quit (Read error: Connection reset by peer)
108: [07:55:01] * phorloop quit (Quit: Byeee...)
109: [08:03:38] * kinglozzer has joined #silverstripe
110: [08:09:51] * slievr has joined #silverstripe
111: [08:12:54] * Embraden has joined #silverstripe
112: [08:15:13] <ss-helper> Silverstripe - Post data to external URL - http://stackoverflow.com/questions/37743027/silverstripe-post-data-to-external-url
113: [08:15:14] * micmania1 has joined #silverstripe
114: [08:15:14] * micmania1 quit (Client Quit)
115: [08:19:32] * Mike123 has joined #silverstripe
116: [08:31:02] * micmania1 has joined #silverstripe
117: [08:34:32] * micmania1 quit (Client Quit)
118: [08:37:25] * UncleCheese has joined #silverstripe
119: [08:40:25] * Embraden quit (Read error: Connection reset by peer)
120: [08:42:21] * Teddy_ has joined #silverstripe
121: [08:47:13] * Embraden has joined #silverstripe
122: [09:10:01] * brasileric has joined #silverstripe
123: [09:11:42] <brasileric> is ther a difference between class .... extends Extension and class ... extends DataExtension ? I see both are used
124: [09:27:01] <XorPush> anybody?
125: [09:32:16] * wmk quit (Ping timeout: 252 seconds)
126: [09:34:21] * Stomach quit (Quit: zzz)
127: [09:38:43] * Embraden quit (Read error: Connection reset by peer)
128: [09:45:44] * Embraden has joined #silverstripe
129: [09:45:44] * Embraden quit (Changing host)
130: [09:45:44] * Embraden has joined #silverstripe
131: [10:04:11] <XorPush> what I would like to achiev the same using Datalist as I do with sql SELECT * FROM Member LEFT JOIN Team ON Team.MemberID=Member.ID WHERE Member.CityID=142 AND Team.Target='Boy' AND Team.GenreID=51 AND Team.Fyr <= 9 AND Team.Tyr >= 9
132: [10:04:20] * darianno has joined #silverstripe
133: [10:35:09] * XorPush quit (Quit: Page closed)
134: [10:38:19] * cloph is now known as cloph_away
135: [10:39:12] * Embraden quit (Read error: Connection reset by peer)
136: [10:45:59] * Embraden has joined #silverstripe
137: [10:45:59] * Embraden quit (Changing host)
138: [10:45:59] * Embraden has joined #silverstripe
139: [10:48:28] * Eliseth quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
140: [11:15:16] <ss-helper> Silverstripe 3.3 How select the right Relation - http://stackoverflow.com/questions/37746629/silverstripe-3-3-how-select-the-right-relation
141: [11:21:13] * cloph_away is now known as cloph
142: [11:30:17] <ss-helper> SilverStripe How to get Children from a far away land (back-end and output) - http://stackoverflow.com/questions/37709023/silverstripe-how-to-get-children-from-a-far-away-land-back-end-and-output
143: [11:41:03] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
144: [12:01:27] * kinglozzer quit (Remote host closed the connection)
145: [12:01:54] * kinglozzer has joined #silverstripe
146: [12:29:53] * UndefinedOffset has joined #silverstripe
147: [12:52:21] * kinglozzer quit (Remote host closed the connection)
148: [12:52:27] * kinglozz_ has joined #silverstripe
149: [13:14:19] * kinglozz_ is now known as kinglozzer
150: [13:24:28] * Embraden quit (Read error: Connection reset by peer)
151: [13:29:08] * XorPush has joined #silverstripe
152: [13:43:29] * Embraden has joined #silverstripe
153: [13:43:29] * Embraden quit (Changing host)
154: [13:43:29] * Embraden has joined #silverstripe
155: [13:45:19] <ss-helper> Accessing Fields of a has_one relation Silvestripe - http://stackoverflow.com/questions/37749840/accessing-fields-of-a-has-one-relation-silvestripe
156: [13:45:57] * TheVoid quit (Ping timeout: 260 seconds)
157: [13:47:47] * TheVoid has joined #silverstripe
158: [14:00:20] * Teddy__ has joined #silverstripe
159: [14:00:21] * slievr_ has joined #silverstripe
160: [14:02:51] * XorPush quit (Quit: Page closed)
161: [14:03:55] * Teddy_ quit (Ping timeout: 260 seconds)
162: [14:04:02] * slievr quit (Ping timeout: 260 seconds)
163: [14:09:51] * Embraden quit (Read error: Connection reset by peer)
164: [14:24:52] * oddnoc has joined #silverstripe
165: [14:30:20] <ss-helper> Silverstripe 3.3 How select the right Relation many_many belongs_many_many has_one has_many belongs_to - http://stackoverflow.com/questions/37746629/silverstripe-3-3-how-select-the-right-relation-many-many-belongs-many-many-has-o
166: [14:35:57] * johnwl has joined #silverstripe
167: [14:47:28] * muskie9 has joined #silverstripe
168: [15:05:17] * Embraden has joined #silverstripe
169: [15:05:58] * Mike123 quit (Ping timeout: 250 seconds)
170: [15:14:13] * arnhoe quit ()
171: [15:34:00] * oddnoc quit (Quit: yawn!)
172: [15:58:42] * kinglozzer quit ()
173: [16:04:35] * oddnoc has joined #silverstripe
174: [16:15:45] * muskie9 quit (Quit: My Mac has gone to sleep. ZZZzzz…)
175: [16:25:38] * brasileric quit (Remote host closed the connection)
176: [16:27:36] * Embraden quit (Read error: Connection reset by peer)
177: [16:35:04] * Teddy__ quit (Ping timeout: 240 seconds)
178: [16:36:17] * slievr_ quit (Ping timeout: 260 seconds)
179: [16:38:40] * muskie9 has joined #silverstripe
180: [16:46:32] * Embraden has joined #silverstripe
181: [16:46:32] * Embraden quit (Changing host)
182: [16:46:32] * Embraden has joined #silverstripe
183: [16:47:22] * gelignite has joined #silverstripe
184: [17:36:24] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
185: [18:25:17] * Azure quit (Remote host closed the connection)
186: [18:31:24] * UndefinedOffset quit (Quit: Leaving.)
187: [18:58:55] * UndefinedOffset has joined #silverstripe
188: [19:12:06] * Embraden quit (Read error: Connection reset by peer)
189: [19:27:02] * UndefinedOffset quit (Quit: Leaving.)
190: [19:31:00] * Embraden has joined #silverstripe
191: [19:31:00] * Embraden quit (Changing host)
192: [19:31:00] * Embraden has joined #silverstripe
193: [20:02:28] * Stomach has joined #silverstripe
194: [20:18:50] * Stomach_ has joined #silverstripe
195: [20:21:41] * Stomach quit (Ping timeout: 240 seconds)
196: [20:51:29] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
197: [21:27:59] * Embraden quit (Read error: Connection reset by peer)
198: [21:38:24] * Stomach_ quit (Read error: Connection reset by peer)
199: [21:39:03] * Stomach has joined #silverstripe
200: [21:46:55] * Embraden has joined #silverstripe
201: [22:49:12] * Stomach quit (Quit: zzz)
202: [23:15:30] <ss-helper> How to add custom item to left CMS menu and manage model and extra fields? Similar to ModelAdmin? - http://stackoverflow.com/questions/37758277/how-to-add-custom-item-to-left-cms-menu-and-manage-model-and-extra-fields-simil
203: [23:28:42] * Embraden quit (Read error: Connection reset by peer)
204: [23:53:24] * Azure has joined #silverstripe
205: [23:55:05] * Stomach has joined #silverstripe

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