#silverstripe IRC Log

IRC log for 12 August 2016

All timestamps are in UTC.

1: [00:00:02] * ss-helper quit (Remote host closed the connection)
2: [00:00:14] * ss-helper has joined #silverstripe
3: [00:00:28] <Nightjar> then test the file upload again.
4: [00:00:34] <pixelboy> Nightjar, you mean File' => 'FileID', in the db declaration of the object ?
5: [00:00:57] <Nightjar> pixelboy, no I mean FileField::create('FileID', 'Dis Fiel Up me PLZ')
6: [00:01:15] <pixelboy> Nightjar, gocha lemme try
7: [00:02:02] <Nightjar> pixelboy, currently on line 10 in that pastehbin. so FileField::create('File'), becomes: FileField::create('FileID', 'File'),
8: [00:02:33] <pixelboy> Nightjar, yep tried that, does not seem to upload anything
9: [00:03:06] <Nightjar> pixelboy, check admin/assets, make sure it's not full of your test uploads
10: [00:03:07] <pixelboy> Nightjar, this is what it looks like curently http://pastebin.com/gT0FsEw9
11: [00:04:16] <Nightjar> pixelboy, statics on CustomOrder still not private.
12: [00:05:13] <pixelboy> Nightjar, added :)
13: [00:09:42] <Nightjar> pixelboy, flush & build
14: [00:09:49] <Nightjar> then try again
15: [00:10:49] <pixelboy> Nightjar, wow nice, the file got uploaded to Uploads folder
16: [00:11:24] <pixelboy> Nightjar, but file is not liked in the dataobject entry
17: [00:11:27] <Nightjar> pixelboy, and is it associated with the ... oh.
18: [00:11:37] <Nightjar> did you make private and flush then try?
19: [00:12:16] <pixelboy> Nightjar, yep, so now it does upload to the server, but inside the gridfield with all the enqueryies the filefiled is empty
20: [00:12:32] <Nightjar> pixelboy, so it didn't even upload before?
21: [00:12:50] <Nightjar> pixelboy, oh, try taking the ID off the formfield id string again
22: [00:13:40] <pixelboy> Nightjar, you mean the filefield right ? this guy FileField::create('FileID', 'Upload File'),
23: [00:14:06] <Nightjar> yup. Make the params just 'File' and 'Upload File' again
24: [00:15:08] <pixelboy> Nightjar, file is uploaded but not present in the dataobject registry
25: [00:15:16] <Nightjar> :/
26: [00:15:29] <pixelboy> Nightjar, yea i get that :))
27: [00:15:48] <Nightjar> pixelboy, what is $data['File'] ?
28: [00:16:00] <Nightjar> I was sure saveInto should work
29: [00:16:33] <pixelboy> Nightjar, i have no data['file']
30: [00:16:45] <Nightjar> capital.
31: [00:16:54] <Nightjar> just dump $data then
32: [00:17:38] <pixelboy> Nightjar, this is the current class state
33: [00:17:39] <pixelboy> http://pastebin.com/P8LcJgwt
34: [00:18:58] <pixelboy> Nightjar, this is the data dump http://pastebin.com/zqXaWWYB
35: [00:19:33] <Nightjar> pixelboy, you have an error in the upload.
36: [00:19:59] <pixelboy> Nightjar, wut where o.0
37: [00:20:05] <Nightjar> UPLOAD_ERR_NO_FILE
38: [00:20:06] <Nightjar> Value: 4; No file was uploaded.
39: [00:20:37] <Nightjar> In your paste: ["error"]=> int(4)
40: [00:20:46] <Nightjar> (for 'File')
41: [00:20:49] <pixelboy> ah i see it
42: [00:20:59] <pixelboy> but the weird this is, inside the files in the cms
43: [00:21:02] <pixelboy> i can see the file
44: [00:21:11] <Nightjar> are you sure it's the one your trying to upload?
45: [00:21:16] <Nightjar> you're*
46: [00:21:20] <pixelboy> let me try again
47: [00:22:00] <pixelboy> http://pastebin.com/jvZsE6FH
48: [00:22:17] <Nightjar> did that attach correctly?
49: [00:22:44] <Nightjar> ps. http://php.net/manual/en/features.file-upload.errors.php
50: [00:22:59] <pixelboy> cheers
51: [00:23:04] <pixelboy> yea it's in files
52: [00:23:08] <pixelboy> but not attached to the object
53: [00:23:12] <Nightjar> yeah, but is it on dataob...k
54: [00:23:39] <pixelboy> could the problem be that the data obejct has a FileField::create('File')
55: [00:23:50] <pixelboy> i mean the file should not be editable from there
56: [00:24:05] <pixelboy> even as admin, it should be just linked if exists
57: [00:24:20] <Nightjar> No, well... maybe.
58: [00:24:28] <Nightjar> use UploadField in the CMS anyway.
59: [00:24:37] <Nightjar> FileField for frontend.
60: [00:25:30] <Nightjar> pixelboy, the easiest way to check is to query the DB, if "CustomOrder"."FileID" is not null and greater than 0, then it's working properly, and you just can't see it in the CMS.
61: [00:25:56] <pixelboy> Nightjar,
62: [00:26:01] <pixelboy> Nightjar, good point
63: [00:26:06] <pixelboy> Nightjar, let me ssh into that
64: [00:26:15] <Nightjar> o.0 you're doing this live? D:
65: [00:26:21] <pixelboy> yes :D
66: [00:26:24] <Nightjar> :S
67: [00:26:45] <pixelboy> well it's kinda protected so normal ppl can't get to that page anyway
68: [00:26:51] <pixelboy> and the website is not live yet
69: [00:27:15] <Nightjar> even so, do go through the effort of a local dev environment.
70: [00:27:24] <Nightjar> worth it, promise.
71: [00:27:24] * micmania1 quit (Quit: micmania1)
72: [00:28:44] <pixelboy> Nightjar, how so? just curious
73: [00:28:57] <Nightjar> less of a pain.
74: [00:29:05] <Nightjar> plus you get all the cool toys.
75: [00:29:10] <pixelboy> Nightjar, usually i prefer it off a live server but i use linux at home it's a two sec job to have it local
76: [00:29:42] <Nightjar> well, if it is a dev environment that's just not local, then that's ok I guess. So long as it's not on a live server!
77: [00:30:53] <pixelboy> file is is 0 for most
78: [00:30:58] <pixelboy> apart from two tests
79: [00:31:10] <pixelboy> which have a file id of 19 and 20
80: [00:31:51] <Nightjar> well there you go, worked at some point.
81: [00:31:58] <Nightjar> check the Created date
82: [00:32:07] * Azure quit (Quit: My Mac has gone to sleep. ZZZzzz…)
83: [00:32:11] <pixelboy> latest one worked
84: [00:32:25] <Nightjar> select ID, Created, FileID from CustomOrder where FileID is not null
85: [00:33:24] <pixelboy> Nightjar, id maches
86: [00:33:29] <pixelboy> matches **
87: [00:33:36] <pixelboy> so it's just not displaying in the cms then
88: [00:33:38] <pixelboy> :/
89: [00:33:41] <pixelboy> wonder why
90: [00:33:45] <Nightjar> so there you go. It's fixed, so if it's not showing in the CMS then 1) use type UploadField. 2) iff still not working, then; 'File' parameter of UploadField to 'FileID' (or the opposite if need be)
91: [00:34:42] <pixelboy> Nightjar, sweetness it works
92: [00:34:55] <Nightjar> also, make sure you're checking the CustomOrder with the correct ID where FileID is non zero pixelboy
93: [00:34:57] <Nightjar> cool :)
94: [00:34:58] <pixelboy> Nightjar, major props man, this saved me tons of time
95: [00:35:10] <Nightjar> that's sorta why I'm here :>
96: [00:35:17] * Azure has joined #silverstripe
97: [00:35:20] <Nightjar> good night?
98: [00:35:28] <Nightjar> or go for lunch?
99: [00:40:04] <pixelboy> Nightjar, nah, it's a good night, i'm in uk, it's 1:40 here
100: [00:40:21] <Nightjar> Thought so
101: [00:41:13] <Nightjar> pixelboy, the trick to has_one's is that if Name doesn't work, try NameID. Or vice versa. Generally only really run into that with filefield, but y'know. So ya know.
102: [00:41:34] <Nightjar> generally only needed when setting them though.
103: [00:41:46] <Nightjar> reading can always be done with Name()
104: [00:41:55] <Nightjar> :)
105: [00:42:08] <pixelboy> Nightjar, happy now it works, the only weird thing is ... well instead of showing the thumb in the files
106: [00:42:14] <pixelboy> Nightjar, i see a blank file
107: [00:42:36] <pixelboy> Nightjar, same in the dataobject. but the file is there an it's reading just fine
108: [00:42:52] * Hailwood quit (Ping timeout: 240 seconds)
109: [00:43:06] <Nightjar> could be a permissions thing, could be because it's of 'File' type, not 'Image', or perhaps because uploaded via FileField, not UploadField (although probably not this one).
110: [00:43:10] <pixelboy> Nightjar, but aparently is i use FileID, it looks just fine in the files of the CMS but it won't link to the dataobject
111: [00:43:11] <Nightjar> just rattling ideas from head
112: [00:43:50] <Nightjar> pixelboy, depends on a few things as when to use Thing and ThingID.
113: [00:44:01] <pixelboy> Nightjar, yea it's a minor thing, one i can check later anyway :) thx again for the help
114: [00:44:08] <pixelboy> Nightjar, it's turning in for the night
115: [00:44:09] <Nightjar> I can't remember from the top of my head sorry. Been years since I made anything in SS :P
116: [00:44:33] <Nightjar> pixelboy, first check is to ensure web user can write to the assets folder, and create _resized
117: [00:44:38] <Nightjar> for the morning ;)
118: [00:44:47] <pixelboy> Nightjar, thx will do :D
119: [00:44:50] <Nightjar> second is to check ClassName setting on the File in the DB
120: [00:45:04] <Nightjar> File probably won't thumbnail. Image will.
121: [00:45:07] * spronk has joined #silverstripe
122: [00:45:24] <Nightjar> then use http://api.silverstripe.org/ to find out what the deal with the magic detection is.
123: [00:45:36] <Nightjar> and where you/it might be going wrong.
124: [00:45:42] <Nightjar> but until then, just sleep tight.
125: [00:45:53] <pixelboy> Nightjar, makes sense, will do it :D night
126: [00:46:21] * pixelboy quit (Quit: Leaving)
127: [00:46:53] * DanaeNZ quit (Remote host closed the connection)
128: [00:47:28] * DanaeNZ has joined #silverstripe
129: [00:48:42] * DanaeNZ quit (Remote host closed the connection)
130: [00:48:57] * DanaeNZ has joined #silverstripe
131: [00:54:51] * Hailwood has joined #silverstripe
132: [01:08:23] * Nightjar quit (Ping timeout: 265 seconds)
133: [01:15:34] * micmania1 has joined #silverstripe
134: [01:18:07] * Hailwood quit (Ping timeout: 252 seconds)
135: [01:34:31] * Hailwood has joined #silverstripe
136: [01:46:35] * gelignite quit (Read error: Connection reset by peer)
137: [01:47:01] * gelignite_ has joined #silverstripe
138: [01:52:59] * muskie9 has joined #silverstripe
139: [01:55:12] * Nightjar has joined #silverstripe
140: [01:58:21] <Nightjar> Kingy, you still working?
141: [01:59:24] <Nightjar> Guess he's not nocturnal after all :>
142: [01:59:45] * gelignite_ quit (Quit: http://bit.ly/1kso8Ta)
143: [02:14:58] * muskie9 quit (Quit: Textual IRC Client: www.textualapp.com)
144: [02:17:30] * Nightjar quit (Ping timeout: 265 seconds)
145: [02:26:03] <ss23> Kingy: I'm not aT SilverStripe anymore!
146: [02:26:25] * spronk quit (Quit: I may need a longer sleep timer...)
147: [02:37:16] * Nightjar has joined #silverstripe
148: [02:42:57] * spronk has joined #silverstripe
149: [02:45:34] * DanaeNZ quit (Remote host closed the connection)
150: [02:46:06] * DanaeNZ has joined #silverstripe
151: [02:51:12] * DanaeNZ quit (Ping timeout: 276 seconds)
152: [02:51:30] * DanaeNZ has joined #silverstripe
153: [03:12:47] * gpb has joined #silverstripe
154: [03:12:47] <ss-helper> gpb: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
155: [03:18:24] * gpb quit (Quit: Page closed)
156: [03:35:54] * micmania1 quit (Quit: micmania1)
157: [03:42:23] <Hailwood> Blergh, anyone know how in .htaccess you would redirect all requests for a particular domain *except the homepage* to the same page on a different domain?
158: [03:42:48] <Hailwood> I.e. domain2.com = domain2.com but domain2.com/anything = domain1.com/anything
159: [03:47:20] <Hailwood> Here's my current attempt, but something with the standard SS .htaccess seems to be messing with it http://kopy.io/bnwch
160: [03:48:08] <Hailwood> Er ok. so adding RewriteCond %{REQUEST_URI} !^/framework/main.php$ works... but that's... odd.
161: [03:48:47] * micmania1 has joined #silverstripe
162: [03:56:02] <Nightjar> gans roond twice like.
163: [03:57:48] <Nightjar> Hailwood, you put that above or below the SS bits?
164: [03:57:59] <Nightjar> sounds like below.
165: [03:58:05] <Nightjar> processed in order holmes.
166: [03:58:36] <Nightjar> so request already rewritten, but then you tell it to change domain.
167: [04:06:05] <Hailwood> Nightjar, Na I tried it with both
168: [04:06:28] <Hailwood> Had it above originally, moved it below, no change heh.
169: [04:07:03] * Nightjar shrugs
170: [04:07:26] <Nightjar> It's like, you learn this shit, and then it's so long between then and needing it again you forget all the shit :<
171: [04:09:47] <spronk> story of my life
172: [04:10:13] <Nightjar> fuck'n rewrite rules, every time.
173: [04:10:21] <spronk> mm
174: [04:10:30] <Nightjar> Always rewrite rules, never not rewrite rules. EVERY SINGLE TIME.
175: [04:10:45] <Nightjar> "oh you just... wait... that didn't... FUCK"
176: [04:11:29] <Nightjar> Probably the most difficult simple FSM ever :<
177: [04:12:21] <Hailwood> FSM?
178: [04:12:58] <Nightjar> finite state machine
179: [04:13:13] <Nightjar> not flying spaghetti monster.
180: [04:17:36] <spronk> yeahhh
181: [04:18:15] <spronk> i prefer the 'redirect everything to just one entry point' scenario
182: [04:18:30] <spronk> and use a completely separate server to host public static assets
183: [04:18:54] <micmania1> Nightjar: you getting back on the wagon tonight?
184: [04:19:21] <Nightjar> nah.
185: [04:20:07] * Stomach has joined #silverstripe
186: [04:21:36] <micmania1> Nightjar: booooooooo!
187: [04:26:22] <DanaeNZ> someone handed me a big glass of wine
188: [04:26:31] <DanaeNZ> great Friday
189: [04:29:33] * Stomach quit (Quit: bye)
190: [04:32:02] <Nightjar> big glass. Not even wine could fix my day.
191: [04:33:03] <spronk> heh
192: [04:33:26] <Nightjar> plagued by irrecreatable intermittant issues.
193: [04:34:32] <Nightjar> welp, have good weekends.
194: [04:34:36] <Nightjar> ciao
195: [04:34:37] * Nightjar quit (Quit: Leaving)
196: [04:34:39] <spronk> BAI U2
197: [04:34:40] <spronk> oh
198: [04:34:42] <spronk> he leave the fast
199: [04:42:25] <DanaeNZ> must have been some week
200: [04:42:50] <spronk> mm
201: [04:48:32] * micmania1 quit (Quit: micmania1)
202: [04:49:03] * metaspike quit (Quit: Leaving)
203: [04:56:56] * spronk quit (Quit: I may need a longer sleep timer...)
204: [05:02:01] * Hailwood quit (Remote host closed the connection)
205: [05:37:54] * DanaeNZ quit (Quit: TIME TO FEED)
206: [06:21:51] * darjusIT has joined #silverstripe
207: [06:34:21] <darjusIT> Hi all how to load locale into Security/login
208: [06:34:24] <darjusIT> ?
209: [06:58:01] * arnhoe has joined #silverstripe
210: [07:30:10] <ss-helper> SilverStripe SiteConfig titlefield manipulation - http://stackoverflow.com/questions/38686690/silverstripe-siteconfig-titlefield-manipulation
211: [07:49:58] * swaiba has joined #silverstripe
212: [08:00:28] <darjusIT> Hi I am using transaltable module how to make login page translatable?
213: [08:30:21] * janneklouman-- has joined #silverstripe
214: [08:32:30] * agent44 has joined #silverstripe
215: [08:43:23] * DimiStripe has joined #silverstripe
216: [08:54:36] * agent44 has left #silverstripe
217: [08:54:48] * agent44 has joined #silverstripe
218: [09:15:26] * elgabbu quit (Ping timeout: 264 seconds)
219: [09:43:40] * spronka has joined #silverstripe
220: [10:35:53] * veb is now known as vebb
221: [10:35:57] * vebb is now known as veb
222: [12:24:45] * lerni has joined #silverstripe
223: [12:26:38] * UndefinedOffset has joined #silverstripe
224: [13:00:17] <ss-helper> Silverstripe working searchbar on template - http://stackoverflow.com/questions/38918407/silverstripe-working-searchbar-on-template
225: [13:14:32] * darjusIT quit (Ping timeout: 250 seconds)
226: [13:44:53] * spronka quit (Quit: My Mac has gone to sleep. ZZZzzz…)
227: [14:01:53] * micmania1 has joined #silverstripe
228: [14:06:21] * micmania1 quit (Ping timeout: 258 seconds)
229: [14:07:04] * keroberos quit (Ping timeout: 264 seconds)
230: [14:12:50] * muskie9 has joined #silverstripe
231: [14:15:18] <ss-helper> Silverstripe how use <% cached %> in a PaginatedPages - http://stackoverflow.com/questions/38920097/silverstripe-how-use-cached-in-a-paginatedpages
232: [14:15:33] * keroberos has joined #silverstripe
233: [14:32:02] * muskie9 quit (Ping timeout: 258 seconds)
234: [14:39:50] * arnhoe quit ()
235: [14:52:10] * wonk has joined #silverstripe
236: [14:52:11] <ss-helper> wonk: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
237: [15:00:22] * wonk quit ()
238: [15:03:34] * lietzmk has joined #silverstripe
239: [15:15:19] <ss-helper> SilverStripe $summary_field interupts label translation - http://stackoverflow.com/questions/38678640/silverstripe-summary-field-interupts-label-translation
240: [15:36:10] * Azure|dc has joined #silverstripe
241: [15:37:33] * Azure quit (Ping timeout: 276 seconds)
242: [15:42:47] * swaiba quit (Remote host closed the connection)
243: [15:47:03] * lerni quit ()
244: [15:53:39] * UndefinedOffset quit (Quit: Leaving.)
245: [15:59:32] * UndefinedOffset has joined #silverstripe
246: [16:03:28] * gelignite has joined #silverstripe
247: [16:31:34] * janneklouman-- quit (Ping timeout: 240 seconds)
248: [17:12:13] * agent44 quit (Quit: zzz)
249: [18:36:31] * TombL quit (Ping timeout: 252 seconds)
250: [18:45:23] <ss-helper> Silverstripe Image class field extension - http://stackoverflow.com/questions/38924430/silverstripe-image-class-field-extension
251: [18:48:02] * neomang has joined #silverstripe
252: [18:52:42] * TombL has joined #silverstripe
253: [19:57:31] <neomang> So I am getting a recursive dependency error when trying to build a semi-complex structure to house some data in my silverstripe site
254: [19:57:50] <neomang> and was wondering what the nesting level allowance was like
255: [19:58:34] <neomang> currently i have ArrayData -> ArrayList -> ArrayData -> ArrayList -> ArrayData
256: [20:03:38] * micmania1 has joined #silverstripe
257: [20:04:16] <neomang> I had this same structure in just a multiple nested array before importing code to silverstripe and it worked fine, I just don't know if it's an error in my code or if it's actually too nested for these structures
258: [20:08:36] * micmania1 quit (Ping timeout: 276 seconds)
259: [20:13:15] * UndefinedOffset quit (Quit: Leaving.)
260: [20:39:34] <DimiStripe> Hi all, Is it possible removing "Created" and "Last Modified" fileds from Dataobject ? (I have a table with 20Mil records, and its basically most consuming fields - never used) Without them i can gain ~30% of size of that table
261: [21:02:15] <AlphaCactus> DimiStripe: That could be a tall order, but I'd start with replacing the DataObject class with your own which doesn't have those fields. or maybe just copying that class and remove the fields and then extend your copy instead of the base. but both of those approaches aren't really optimal.
262: [21:02:47] <AlphaCactus> Depending on your scenario you could just consider having a table you query manually without using the ORM at all, but then you lose your relationships to other objects if you need them.
263: [21:03:07] <DimiStripe> yep, i need those relations
264: [21:03:16] <DimiStripe> its actually a huge relations table :)
265: [21:04:00] <AlphaCactus> Well, depending on how you use those relations you can still process that manually, but if it is a core table that you use all over the place that could get pretty nasty.
266: [21:04:59] <AlphaCactus> Many_Many relation tables don't have the created/lastedited fields so if you can use that kind of relationship then the relationships storage would be light weight
267: [21:05:58] <DimiStripe> thats a good idea :)
268: [21:06:03] <DimiStripe> thanks for advice
269: [21:15:24] <AlphaCactus> yup. Good luck with that.
270: [22:27:44] * lietzmk quit (Quit: Leaving)
271: [23:40:56] * pweh has joined #silverstripe
272: [23:44:29] * pweh is now known as GudGud

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