#silverstripe IRC Log

IRC log for 18 April 2017

All timestamps are in UTC.

1: [00:00:01] * ss-helper quit (Remote host closed the connection)
2: [00:00:06] <drod_> with more or less effort I can probably find missing has_one, but exception will be still wrong
3: [00:00:14] * ss-helper has joined #silverstripe
4: [00:00:46] <UncleCheese> you're sure you don't have some example code kicking around?
5: [00:01:01] <UncleCheese> because Namespace\ClassName just reeks of psuedo code or something
6: [00:01:10] <UncleCheese> and that string appears nowhere in the core codebase
7: [00:01:14] <UncleCheese> not even in tests
8: [00:01:40] <drod_> "[01:58] <drod_> Namespace\ClassName is generic" ie I replaced real classname with it
9: [00:02:18] <drod_> exception is from line 829 of DataObjectSchema
10: [00:03:27] <drod_> [Emergency] Uncaught Exception: No has_one found on class 'Manja\Data\Routing\Website', the has_many relation from 'SilverStripe\Core\Object' to 'Manja\Data\Routing\Website' requires a has_one on 'Manja\Data\Routing\Website'
11: [00:03:33] <drod_> that's real exception
12: [00:14:51] <drod_> and still no sign of origin of a problem
13: [00:15:47] <drod_> should be super easy to replicate - just add has_many on one class but don't add has_one on the other
14: [00:16:24] <drod_> and puff - abstract class Object somehow got has_many
15: [00:19:01] <drod_> what's even funnier - this line was triggering it: $parentObj->Websites() but this one wasn't: Website::get()->filter("ParentID", $parentObj->ID)
16: [00:19:53] <drod_> any thoughts UncleCheese ?
17: [00:21:29] <UncleCheese> not without more context, unfortunately
18: [00:21:39] <UncleCheese> if you can replicate it outside your project, i'd be keen to see
19: [00:23:46] <drod_> let me set up fresh install of SS4.0
20: [00:24:02] <drod_> btw, any idea why obsolete PHPUnit version?
21: [00:25:52] <UncleCheese> i knew at one time.. but the reason has since escaped me :)
22: [00:27:29] <drod_> I also had issue with it
23: [00:27:46] <drod_> but they vanished as soon as I deleted 4 classes from fw/src/dev :)
24: [00:39:22] <drod_> seems that I replicated it... now only to make it show what actual error is
25: [00:40:44] <drod_> site in dev mode and still "Sorry, there was a problem with handling your request." displayed
26: [00:41:04] <drod_> and empty error_log
27: [00:41:25] <UncleCheese> sure it's in dev mode? you should be getting verbose errors
28: [00:41:42] <UncleCheese> try ?isDev=1?
29: [00:41:47] <drod_> Silverstripe\Control\Director: environment_type: 'dev'
30: [00:42:04] <drod_> same
31: [00:42:15] <drod_> only diff is that I get dev token in url
32: [00:44:29] <drod_> I know that I should be getting, but I don't get any error...
33: [00:45:01] <drod_> flushed it again, no luck
34: [00:45:16] <drod_> default "simple" page with "Sorry" text
35: [00:46:06] <drod_> I'm logged in and all
36: [00:47:58] <drod_> Director::isDev() returns true right before problematic code
37: [00:49:51] <drod_> https://pastebin.com/XvxUuZZa
38: [00:50:22] <drod_> https://pastebin.com/SDkP8Nvv
39: [00:51:20] <drod_> https://pastebin.com/5NPTYXc5
40: [00:51:32] <drod_> all three classes in very fresh SS4.0 install
41: [00:52:15] <drod_> only addition (apart from those 3 files) is dev mode in config.yml
42: [00:52:55] <drod_> https://pastebin.com/GGQJKHwa
43: [00:56:28] <drod_> any thoughts UncleCheese ?
44: [00:58:08] * DanaeNZ quit (Remote host closed the connection)
45: [01:10:39] <drod_> so it's not one - but two issues
46: [01:10:47] <drod_> 1) why dev mode is not working
47: [01:11:06] <drod_> 2) why exception is calling out wrong origin
48: [01:19:06] <drod_> oooooooooooo yeah
49: [01:19:10] <drod_> found it
50: [01:20:07] <drod_> line #820 in DataObjectSchema overwrites $class UncleCheese
51: [01:22:14] <drod_> that's why it spits out Object instead of real classname
52: [01:28:55] * DanaeNZ has joined #silverstripe
53: [01:36:05] <drod_> so real error is
54: [01:36:07] <drod_> [Emergency] Uncaught Exception: No has_one found on class 'Cloud69\Data\Routing\Website', the has_many relation from 'Cloud69\Data\Service\Realm' to 'Cloud69\Data\Routing\Website' requires a has_one on 'Cloud69\Data\Routing\Website'
55: [01:36:35] <drod_> but in website...
56: [01:36:41] <drod_> private static $has_one = array( "Realm" => "Cloud69\\Data\\Service\\Realm"...
57: [01:36:53] <drod_> fml
58: [01:40:42] <UncleCheese> interesting
59: [01:40:47] <UncleCheese> submit a pr
60: [01:41:50] <UncleCheese> also, just a tip -- don't use FQCNs as strings... Realm::class is a lot more succinct and robust
61: [01:56:27] * UncleCheese quit (Ping timeout: 240 seconds)
62: [02:05:38] * xyphoid_ quit (Remote host closed the connection)
63: [02:12:52] * DanaeNZ quit (Remote host closed the connection)
64: [02:42:52] * DanaeNZ has joined #silverstripe
65: [03:15:06] <ss-helper> Extending the SilverStripe File class for Video - http://stackoverflow.com/questions/42758733/extending-the-silverstripe-file-class-for-video
66: [05:00:34] * Shrike_Finland quit (Quit: Leaving.)
67: [05:30:08] <ss-helper> DB rebuild claiming changes that never actually change - http://stackoverflow.com/questions/43464129/db-rebuild-claiming-changes-that-never-actually-change
68: [05:56:15] * munk0r has joined #silverstripe
69: [05:59:24] * DarjusIT has joined #silverstripe
70: [06:37:26] * DanaeNZ quit (Quit: TIME TO FEED)
71: [07:43:43] * filisko has joined #silverstripe
72: [08:04:41] * kinglozzer has joined #silverstripe
73: [08:22:15] * DarjusIT quit (Ping timeout: 260 seconds)
74: [08:33:50] * Shrike_Finland has joined #silverstripe
75: [08:46:23] * Shrike_Finland quit (Quit: Leaving.)
76: [08:51:09] * agent44 has joined #silverstripe
77: [09:01:29] * agent44 quit (Quit: zzz)
78: [09:01:44] * agent44 has joined #silverstripe
79: [09:13:11] * agent44 quit (Ping timeout: 255 seconds)
80: [09:14:03] * zemiacsik has joined #silverstripe
81: [09:14:47] * agent44 has joined #silverstripe
82: [09:17:24] <zemiacsik> hi, may I ask you for a help? I have my own custom private field in DataObject object (adding in getCMSFields), everything works fine when I edit record, but when I create a new one I can not get a value of that field onAfterWrite and it is empty, should I use session in this case somehow or..?
83: [09:23:10] * UncleCheese has joined #silverstripe
84: [09:25:13] * UncleCheese quit (Client Quit)
85: [09:35:16] * UncleCheese has joined #silverstripe
86: [09:39:23] * lucinderella has joined #silverstripe
87: [09:40:21] * agent44 quit (Ping timeout: 268 seconds)
88: [09:40:22] * lucinderella is now known as agent44
89: [10:32:44] * Brew-Jay has joined #silverstripe
90: [10:32:45] <ss-helper> Brew-Jay: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
91: [10:32:58] <Brew-Jay> Hi, We've got a Silverstripe project. We're trying to deploy it to a server and getting some issues.
92: [10:33:02] <Brew-Jay> We're running into this error:
93: [10:33:03] <Brew-Jay> mysqli::mysqli() expects parameter 5 to be long, string given
94: [10:33:12] <Brew-Jay> define( 'SS_DATABASE_PORT', 3306);
95: [10:33:26] <Brew-Jay> If we remove that we then get.
96: [10:33:27] <Brew-Jay> mysqli::mysqli(): (HY000/2005): Unknown MySQL server host '<filtered>' (2)
97: [10:33:31] <Brew-Jay> Anyone seen this before?
98: [10:41:53] * filisko quit (Ping timeout: 245 seconds)
99: [10:50:54] * Shrike_Finland has joined #silverstripe
100: [10:51:57] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
101: [11:06:47] * Brew-Jay quit (Quit: Page closed)
102: [11:07:14] * Shrike_Finland quit (Quit: Leaving.)
103: [11:19:24] * Shrike_Finland has joined #silverstripe
104: [11:27:13] * mrG has joined #silverstripe
105: [11:27:48] <mrG> Is it posible to get a link to a modeladmin from a dataobject?
106: [11:56:59] * webdoc has joined #silverstripe
107: [11:59:20] * zemiacsik quit (Quit: Page closed)
108: [12:02:35] <webdoc> how to fix blank admin page after adding new dataobject
109: [12:03:00] <webdoc> the right page is viewable after the page refresh
110: [12:13:53] * Shrike_Finland quit (Quit: Leaving.)
111: [12:24:29] * UndefinedOffset has joined #silverstripe
112: [12:45:39] * Shrike_Finland has joined #silverstripe
113: [13:20:05] <cloph> webdoc: did you run /dev/build already?
114: [13:22:04] <webdoc> already fixed thinged i had problem with UndefinedOffset module but in real just a ?> on the end of my page-type php file
115: [13:26:51] * Shrike_Finland quit (Quit: Leaving.)
116: [13:31:56] * filisko has joined #silverstripe
117: [13:52:29] * webdoc quit (Ping timeout: 260 seconds)
118: [14:32:09] * mrG quit (Ping timeout: 260 seconds)
119: [15:03:20] * filisko quit (Ping timeout: 258 seconds)
120: [15:50:36] * gelignite has joined #silverstripe
121: [16:28:34] * kinglozzer quit ()
122: [17:02:42] * filisko has joined #silverstripe
123: [17:06:58] * Shrike_Finland has joined #silverstripe
124: [17:08:22] * agent44 quit (Quit: zzz)
125: [17:55:30] * DimiStripe quit (Quit: DimiStripe)
126: [17:55:52] * DimiStripe has joined #silverstripe
127: [19:01:12] * Shrike_Finland quit (Quit: Leaving.)
128: [19:28:46] * UndefinedOffset quit (Quit: Leaving.)
129: [19:29:55] * UndefinedOffset has joined #silverstripe
130: [20:44:56] * UndefinedOffset quit (Quit: Leaving.)
131: [21:40:38] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
132: [21:47:15] * filisko quit (Ping timeout: 260 seconds)
133: [22:34:29] * DanaeNZ has joined #silverstripe
134: [23:01:06] <ss-helper> double entries on unique keys - best way to deal with them in Silverstripe - https://groups.google.com/d/msg/silverstripe-dev/n-FZ8pSsWD8/N48322fmGAAJ

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