#silverstripe IRC Log

IRC log for 30 December 2016

All timestamps are in UTC.

1: [00:59:48] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
2: [01:59:31] * Azure quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
3: [02:03:18] * Azure has joined #silverstripe
4: [06:12:51] * Shrike_Finland has joined #silverstripe
5: [06:58:32] * Shrike_Finland quit (Quit: Leaving.)
6: [08:15:08] * darianno has joined #silverstripe
7: [08:53:35] * Admonish has joined #silverstripe
8: [08:59:42] <Admonish> Hey all Im having some issues with adding a File (which is a has_one) manually to a dataObject when I create it through the ORM
9: [08:59:55] <Admonish> Here is a Gist of my code https://gist.github.com/mooror/1fc52a7e16cd82fdc9300865544eb468
10: [09:00:47] <Admonish> or at least the relevent portions of my code. I cannot post my entire code due to a NDA
11: [09:02:49] <Admonish> The strange thing is when I edit the ModeID with $object-ModeID = *id* (also a has_one) through the ORM in the same section, it works just fine.
12: [09:19:06] * Admonish quit (Ping timeout: 260 seconds)
13: [09:33:03] * wmk_ has joined #silverstripe
14: [09:45:12] * Shrike_Finland has joined #silverstripe
15: [10:32:57] * Shrike_Finland quit (Quit: Leaving.)
16: [10:50:52] * DimiStripe quit (Quit: DimiStripe)
17: [10:51:21] * DimiStripe has joined #silverstripe
18: [11:30:18] * tester has joined #silverstripe
19: [11:30:41] <tester> hi, how can I remove silvesrtripe branding logo in admin section
20: [11:52:47] <tester> could you please help regarding this
21: [11:59:13] * Shrike_Finland has joined #silverstripe
22: [12:00:08] <Firesphere> Hey tester
23: [12:00:21] <Firesphere> You can add custom CSS to the backend.
24: [12:01:56] <Firesphere> There are several ways to accomplish this. Easiest is to add your own CSS to the LeftAndMain hook.
25: [12:02:15] * Shrike_Finland quit (Client Quit)
26: [12:03:56] <Firesphere> There are quite a few modules on addons.silverstripe.org that will do what you want. With a bit of playing around, you should be able to find what you're looking for.
27: [12:04:34] <Firesphere> http://addons.silverstripe.org/add-ons?search=admin is a good start.
28: [12:04:45] <tester> how can I add css with LeftAndMain
29: [12:04:59] <Firesphere> In either your yml or your _config
30: [12:05:36] <Firesphere> It's something like LeftAndMain::load_css('Location/to/css/file.css');
31: [12:05:51] <Firesphere> I'm not entirely sure as I don't have my IDE open right now
32: [12:06:10] <Firesphere> But look at the LeftAndMain class, and it'll tell you what you need :)
33: [12:06:25] <tester> ok thanks a lot :)
34: [12:07:16] <Firesphere> LeftAndMain has a method to include extra CSS or JS. All will be included _after_ the original stuff
35: [12:07:35] <Firesphere> so you should be able to override that all with your own at your wish.
36: [12:08:25] <Firesphere> If you want to do it properly, make it a separate module, which you can include in other projects, if you want to.
37: [12:08:49] <Firesphere> But just to be sure, it needs to be in a _module_, not in themes!
38: [12:09:11] <Firesphere> (where mysite is a module as well, technically speaking)
39: [12:10:04] * gelignite has joined #silverstripe
40: [12:11:59] <Firesphere> I hope you find your way. As I have to dig it up from memory and unable to find a good example :(
41: [13:16:09] * samsam has joined #silverstripe
42: [13:40:36] * wmk_ quit (Ping timeout: 258 seconds)
43: [15:51:25] * darianno quit (Quit: Textual IRC Client: www.textualapp.com)
44: [16:42:42] * slievr has left #silverstripe
45: [17:22:05] * filisko has joined #silverstripe
46: [19:06:16] * samsam quit (Quit: samsam)
47: [19:12:10] * samsam has joined #silverstripe
48: [19:42:23] * Admonish has joined #silverstripe
49: [19:45:56] <Admonish> Hey all Im having some issues with adding a File (which is a has_one) manually to a dataObject when I create it through the ORM
50: [19:46:07] <Admonish> Here is a Gist of my code https://gist.github.com/mooror/1fc52a7e16cd82fdc9300865544eb468
51: [19:46:19] <Admonish> or at least the relevent portions of my code. I cannot post my entire code due to a NDA
52: [19:46:33] <Admonish> The strange thing is when I edit the ModeID with $object-ModeID = *id* (also a has_one) through the ORM in the same section, it works just fine.
53: [19:51:23] <samsam> What is the problem / error?
54: [19:53:16] <Admonish> Basically when I run this code a StoreItemVersion is successfully created with a ModeID of 4 but the FileID is 0 instead of 255
55: [19:53:43] <Admonish> Even though Im setting them the same way
56: [19:54:15] <Admonish> So im wondering if there is some well known issue with setting a has_one file relationship manually or if im just doing it wrong
57: [19:56:06] <samsam> I would never hardcode a FileID like that, but then again, I don’t know your full app, maybe its required
58: [19:58:10] <samsam> try die(var_dump($newItemVersion->FileID)); after line 5 on ExternalUpload.php
59: [19:58:36] <samsam> does it return 0 or null?
60: [19:58:43] <Admonish> The code that I posted is inside a cutom uploader field. The full code creates a file object on upload, returns the id for that new file object, and then will ue that id in this new StoreItemVersion object
61: [19:59:23] <Admonish> It wasn't working with the variable so I commented it out and tried with just an integer incase it was something to do with my variable.
62: [19:59:51] <Admonish> ok ill try that and post results
63: [20:03:32] <samsam> To all: the hell did I just read? Is it possible to have nested GridFields in SS?
64: [20:04:03] <samsam> Should I be worried about the gridfield-in-gridfield user interface?
65: [20:05:46] <samsam> Zauberfisch: it was your stackoverflow post that intrigued me
66: [20:15:22] * balrog_ has joined #silverstripe
67: [20:15:23] <ss-helper> balrog_: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
68: [20:15:41] * balrog_ is now known as Guest16846
69: [20:17:03] <Admonish> samsam: Turns out im just an idiot...I tried to debug the code like you suggested only to find out that that code wasn't running. A duplicate piece of code was being run somewhere above it...so no wonder it wasn't working
70: [20:17:32] <samsam> Admonish: hehe can happen, use die(var_dump()); more often
71: [20:17:41] <samsam> it’s underrated :p
72: [20:17:43] <Admonish> samsam: Thanks for your help -_-
73: [20:17:51] <Admonish> lol
74: [20:18:43] <samsam> Admonish: one more thing: assigning a FileID manually sounds like a bad idea
75: [20:19:10] <samsam> image and fileid’s have a tendency to change
76: [20:19:36] <samsam> be cautious with that is what I’m trying to say
77: [20:20:10] <Admonish> gotcha
78: [20:20:26] <Admonish> thanks for the advice
79: [20:24:44] <Guest16846> I'm in 4 alpha 3(?) and I'm not getting the rich text content area in the backend. Getting a popup which says "not found" on page load (which I presume is the WYSIWYG editor not loading).
80: [20:26:50] <Guest16846> How do I get it to be a bit for verbose?
81: [20:27:03] <Guest16846> "more" I should say.
82: [20:32:33] <samsam> Guest16846: you mean you want a more descriptive error message?
83: [20:32:44] <Guest16846> Yes
84: [20:33:15] <samsam> set environment to dev mode
85: [20:33:16] <samsam> https://docs.silverstripe.org/en/4/developer_guides/debugging/environment_types/#environment-types
86: [21:14:38] * samsam quit (Quit: samsam)
87: [21:15:09] * samsam has joined #silverstripe
88: [21:15:27] * tester quit (Quit: Page closed)
89: [21:28:16] * Admonish quit (Ping timeout: 260 seconds)
90: [21:50:58] * filisko quit (Remote host closed the connection)
91: [21:53:25] * Admonish has joined #silverstripe
92: [21:58:08] * Azure quit (Ping timeout: 265 seconds)
93: [21:59:11] * Admonish quit (Ping timeout: 260 seconds)
94: [21:59:42] * Azure has joined #silverstripe
95: [22:06:46] <samsam> any idea on stacking HTMLEditorFields next to eachother?
96: [22:07:05] <samsam> FieldGroup:: breaks the layout for this use
97: [22:20:07] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
98: [22:22:34] * Audlex has joined #silverstripe
99: [22:44:56] * Guest16846 quit (Ping timeout: 258 seconds)
100: [23:00:01] * ss-helper quit (Remote host closed the connection)
101: [23:00:17] * ss-helper has joined #silverstripe
102: [23:44:43] * Azure quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
103: [23:59:14] * balrog_ has joined #silverstripe
104: [23:59:38] * balrog_ is now known as Guest28717

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