#silverstripe IRC Log

IRC log for 31 December 2015

All timestamps are in UTC.

1: [00:02:20] * joelpittet quit ()
2: [02:33:51] * MaxD has joined #silverstripe
3: [02:33:52] <ss-helper> MaxD: Welcome to #silverstripe! Please ask your questions but don't leave too soon, we are a busy lot.
4: [02:34:25] <MaxD> Good evening from Eastern USA!
5: [02:34:26] * r_hector has joined #silverstripe
6: [02:36:42] <MaxD> I have an installation of SS 3.2 running well enough. I've installed Moodle into a sub folder (/learn/). All the solutions I've come across have advised me working in the .htaccess file to "break" that folder out of the CMS to no avail.
7: [02:37:26] <MaxD> The most common solution I've found is adding RewriteCond %{REQUEST_URI} !^/learn/.* above the RewriteRule
8: [05:00:38] * Gfactor quit (Ping timeout: 246 seconds)
9: [05:00:47] * Gfactor has joined #silverstripe
10: [05:32:15] * r_hector quit (Remote host closed the connection)
11: [05:34:06] * Gfactor quit (Ping timeout: 240 seconds)
12: [07:18:21] * TheVoid quit (Quit: TheVoid)
13: [07:21:02] * TheVoid has joined #silverstripe
14: [08:13:48] * swaiba has joined #silverstripe
15: [08:27:23] * wmk has joined #silverstripe
16: [08:27:46] <wmk> gmorning working people
17: [08:28:23] <swaiba> hey wmk
18: [08:28:27] <swaiba> #workinghard
19: [08:29:32] <wmk> if ($time > 6pm) $swaiba->partyHard();
20: [08:30:54] <swaiba> ha
21: [08:31:12] <swaiba> looking to make like a tree and leave just after lunch
22: [08:32:26] <wmk> "make like a tree"??
23: [08:40:34] <swaiba> and "leave"
24: [08:41:06] <swaiba> https://image.freepik.com/free-photo/platan-leave_2913745.jpg
25: [08:47:54] <wmk> swaiba, wow, that's a nice pun
26: [08:48:11] <swaiba> you never seen back to the future?
27: [08:48:27] <wmk> i guess i remember the one-to-one translation which just doesn't make sense in german
28: [08:48:37] <wmk> well, maybe i saw it in past
29: [08:48:59] * Gfactor has joined #silverstripe
30: [08:49:25] <wmk> wow, test now passes after i reload the tested object, cause my extension changes something in onAfterWrite()
31: [08:51:42] <swaiba> what are you writing your tests in wmk?
32: [08:52:03] <wmk> phpunit?
33: [08:52:32] <swaiba> just checking
34: [08:52:33] <wmk> btw swaiba do you use travis?
35: [08:52:52] <swaiba> I'm unspeakably annoyed with behat et al
36: [08:53:13] <swaiba> I wrote my own test engine yesterday, faster than trying to get that running
37: [08:53:14] <wmk> swaiba, you don't get wellness vouchers with your behat tests?
38: [08:53:41] <swaiba> don't use travis (yet) it links to automated runs of the tests right?
39: [08:53:46] <wmk> yup
40: [08:54:00] <swaiba> and "wellness vouchers" sounds like something one of our clients would sell!
41: [08:54:03] <wmk> somehow the tests all pass with framework 3.1, but with 3.2 it has funny errors
42: [08:54:49] <wmk> well, the voucher is more like "the tests pass, it's likely to have no errors'
43: [09:39:04] * dudinka has joined #silverstripe
44: [09:39:10] <dudinka> hey
45: [09:39:25] <dudinka> wtf is "hidden" label next to page name in cms/sitetree?
46: [09:39:38] <dudinka> working with SS 3+ years and I see it for the first time
47: [09:48:04] <dudinka> anyone?
48: [10:03:22] * dudinka quit (Ping timeout: 252 seconds)
49: [10:13:59] * Eliseth has joined #silverstripe
50: [10:14:08] <Eliseth> Morning
51: [10:14:36] <Eliseth> Using this solution to have many_many relations copied when creating a translated page: http://www.silverstripe.org/community/forums/general-questions/show/19990
52: [10:14:57] <Eliseth> Is there a way to make it copy my many_many_extrafields as well?
53: [10:29:32] * r_hector has joined #silverstripe
54: [10:30:42] <wmk> no helpful robot, it's no new year yet everywhere in the world... https://github.com/silverstripe/silverstripe-subsites/pull/226/
55: [10:31:54] <wmk> Eliseth, well, when getting a ManyManyRelation you should be able to have the extrafields
56: [10:33:03] <wmk> so from theory something like $translated->MyManyManyRelationWithExtraFields()->add($original->MyManyManyRelationWithExtraFields()) should work
57: [10:45:15] * Gfactor quit (Ping timeout: 240 seconds)
58: [10:46:18] * Gfactor has joined #silverstripe
59: [11:33:40] * wmk quit (Quit: nice to meet you ;))
60: [12:03:17] * Gfactor quit (Ping timeout: 255 seconds)
61: [12:03:34] * Gfactor has joined #silverstripe
62: [12:34:51] * Snowman23 is now known as ss23
63: [12:47:14] * Eliseth quit (Ping timeout: 245 seconds)
64: [12:57:24] * swaiba quit (Remote host closed the connection)
65: [13:19:45] <MaxD> I have an installation of SS 3.2 running well enough. I've installed Moodle into a sub folder (/learn/). All the solutions I've come across have advised me working in the .htaccess file to "break" that folder out of the CMS to no avail. The most common solution I've found is adding RewriteCond %{REQUEST_URI} !^/learn/.* above the RewriteRule, but it's not working.
66: [13:20:03] * Gfactor quit (Ping timeout: 250 seconds)
67: [13:29:34] <nontgor> MaxD: Why not have the moodle totally separate?
68: [13:31:30] * Gfactor has joined #silverstripe
69: [14:08:53] <harry> I have a DataObject that has_one Link, in my template file I have href="$Link"
70: [14:09:26] * Gfactor quit (Ping timeout: 246 seconds)
71: [14:09:30] <harry> but this gives me a URL of home/block/2 - which doesn't relate to the page link which I have selected in the CMS
72: [14:11:23] <harry> I don't understand why $link has this value
73: [15:15:31] * r_hector quit (Remote host closed the connection)
74: [15:41:54] * TRB143 quit (Ping timeout: 256 seconds)
75: [15:42:58] * TRB143 has joined #silverstripe
76: [15:57:07] * TRB143 quit (Quit: No Ping reply in 180 seconds.)
77: [15:58:24] * TRB143 has joined #silverstripe
78: [16:10:38] <MaxD> nontgor: It was meant to be separate and in a subdomain: (learn.domain.com) but the subdomain forwards to the folder (domain.com/learn). I don't have another server to host it on and SS is in the root.
79: [16:40:32] * Sphere is now known as Firesphere
80: [16:40:37] <Firesphere> Hello world
81: [16:42:09] <Firesphere> You probably need $Link.Link harry
82: [16:55:23] <MaxD> Has the excluding folders from SS problem been addressed before?
83: [16:55:39] <MaxD> Al of the posts I've found are from several years ago.
84: [16:56:01] <Firesphere> Errr, you can also do %{REQUEST_URI} !-d
85: [16:56:15] <Firesphere> Add it to the RewriteCond for the framework/main, and you're done.
86: [16:56:32] <Firesphere> Only problem... all CMS urls that are similar to a folder will break.
87: [16:57:05] <Firesphere> It has not specifically something to do with SilverStripe, it's apache configuration.
88: [17:04:57] <MaxD> RewriteCond %{REQUEST_URI} !-d breaks the whole site.
89: [17:05:37] <MaxD> Hmm, so there is no way to access a specific folder in the SS directory...
90: [17:06:41] <Firesphere> There should be. Your example should work.
91: [17:07:06] <Firesphere> I've done it quite a few times
92: [17:07:51] <MaxD> Here is the relevant section of my .htaccess: # Process through SilverStripe if no file with the requested name exists. # Pass through the original path as a query parameter, and retain the existing parameters. RewriteCond %{REQUEST_URI} !^/learn/.* RewriteCond %{REQUEST_URI} ^(.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule (?!^learn/)^.*$ framework/main.php?url=%1 [L,QSA,NC]
93: [17:08:17] <MaxD> Ick, that was an awful copy paste. I apologize!
94: [17:08:37] <Firesphere> try using ss-paste.com next time ;)
95: [17:08:47] <MaxD> Oooh, good idea.
96: [17:09:45] <MaxD> http://www.sspaste.com/paste/show/5685615160952
97: [17:10:17] <Firesphere> Hmmm, let's see what my vagrant box says
98: [17:11:40] <Firesphere> Ah, ok, that's more readable ;)
99: [17:12:27] <Firesphere> http://www.sspaste.com/paste/show/568561f535661
100: [17:12:45] <Firesphere> There's your problem. You need to have the directory-exclusion as LAST condition, not first
101: [17:13:12] <Firesphere> Otherwise, it'll continue with the next line, which overrules your directory specific rule ;)
102: [17:14:06] <Firesphere> Do note, it'll only work with /learn/, the trailing slash is important!
103: [17:15:50] <MaxD> Ok, good to know. I also don't think I had the (.*)$ in there. However, it still doesn't work. Since it's a server thing and not a SS thing, I haven't been flushing.
104: [17:16:19] <MaxD> http://www.corvustraining.com/learn/
105: [17:17:07] <Firesphere> Clear your cache
106: [17:17:59] <Firesphere> Also, a bunch of resources are blocked
107: [17:18:51] <Firesphere> I think there's something with your apache config, because it should just work.
108: [17:18:57] <Firesphere> Where is it hosted?
109: [17:19:13] <Firesphere> if possible, create a subdomain, learn.corvustraining.com
110: [17:19:29] <Firesphere> Cleaner, and should also prevent this problem from happening at all
111: [17:20:03] <MaxD> Cache is cleared, but problem persists. Hosted by GoDaddy. I see that access is blocked to .json, "silverstripe cache", and "vendor" (whatever those are).
112: [17:20:22] <Firesphere> Those are the json files, vendor folder and your SilverStripe cache ;)
113: [17:20:30] <Firesphere> They should be blocked at all time!
114: [17:20:50] <Firesphere> Ouch, godaddy, sorry, can't help you there.
115: [17:21:01] <Firesphere> I'm Dutch... and also only use my own VPS for configuration
116: [17:21:07] <MaxD> My domain is managed by Google Domains (because I am impulsive like that) and their subdomain system just forwards to a URL. It's really infuriating.
117: [17:21:56] <Firesphere> You need to setup the subdomain at godaddy, then create the pointer at google domains.
118: [17:21:57] <Firesphere> I think.
119: [17:22:00] <Firesphere> Damn....
120: [17:22:13] * Firesphere hearts TransIP and VPS even more now
121: [17:22:44] <MaxD> Yeah, I was happy until I switched over to Google Domains (because Google is awesome at everything and what could possibly go wrong?) *sarcasm*
122: [17:24:23] <Firesphere> The destination-URL for the subdomain should be the IP where the site is hosted, not a full URL, I think.
123: [17:26:31] <Firesphere> I'm not really experienced with either Google Domains or GoDaddy
124: [17:26:41] <Firesphere> I only know, I would personally never go with GoDaddy
125: [17:26:51] <Firesphere> NameCheap for the win if it comes to US domains.
126: [17:27:00] <Firesphere> Or hosting
127: [17:28:50] <Firesphere> Or DigitalOcean, Just go VPS :)
128: [17:47:39] <harry> @Firesphere - $Link.Link gives me the site root
129: [17:54:38] * Liquide quit ()
130: [18:10:30] * HARVS1789UK has joined #silverstripe
131: [18:12:25] <Firesphere> What's the Link object?
132: [18:13:31] <HARVS1789UK> I know it's NYE but I am at my wits end with something. I have a has_one relationship between Order and Customer (Order has_one Customer, Customer has_many Orders) and I have a ModelAdmin extension for managing Orders. In the Order EditForm I need to be able to either A) select an existing Customer object to link to this order or B) create a new Customer object to be linked to this Order
133: [18:14:15] <HARVS1789UK> For has_many or many_many relationships this would mean using a GridField, however this is a has_one and to my knowledge GridField has no functionality to work with has_one relationships?
134: [18:14:17] <Firesphere> Ehhh, that's default behaviour of the getCMSField() formbuild?
135: [18:14:28] <Firesphere> No, it gives you a dropdown
136: [18:14:54] <HARVS1789UK> Yes, that would allow for linking an existing Customer, but not for adding a new one from within the Order EditForm though
137: [18:15:44] <HARVS1789UK> I have been trying to use the HasOnePicker module - https://github.com/briceburg/silverstripe-pickerfield but it has a bug which I have reported under Issues on GitHub but neither I nor the maintainer of the module can resolve
138: [18:15:45] <Firesphere> No, for adding, you'd need to add the customer manually via the customer-admin first
139: [18:16:00] <HARVS1789UK> I know, that is the additional step which I need to remove
140: [18:16:33] <HARVS1789UK> I need to be able to complete that action without leaving the Order EditForm (something HasOnePicker moduke allows for, but as mentioned above, it has a bug)
141: [18:17:22] <HARVS1789UK> I have spent countless hours trying to fix the bug or find a work around but now im fed up, and was wondering if anyone had any different suggestions entirel;y
142: [18:19:11] <HARVS1789UK> Im thinking something along the lines of the default DropDown field, coupled with an 'Add New' button which opens the Customer EditForm in a popup or similar?
143: [18:21:29] <Firesphere> That can be done. With example from the uploadfield from the wysiwyg... I think it shouldn't be too complex
144: [19:14:28] * HARVS1789UK quit (Ping timeout: 252 seconds)
145: [19:14:44] <Firesphere> Welp, glad I'm not in Dubai right now.
146: [19:20:10] * jenniferaslan has joined #silverstripe
147: [19:24:00] <harry> @Firesphere - the Link object is: 'Link' => 'SiteTree'
148: [19:24:12] <Firesphere> Ah, it's a SiteTree Object...
149: [19:24:21] <Firesphere> Hmmm, don't name the relation "Link" but name it Page
150: [19:24:28] <Firesphere> Then, $Page.Link should work.
151: [19:24:52] <Firesphere> Link is a reserved function, for actually generating the link itself. I think that's confusing the framework
152: [19:25:19] <Firesphere> No, don't give it the name Page, but something less generic, like "LinkedPage" or something like that.
153: [19:26:40] * jenniferaslan quit (Quit: jenniferaslan has left the room)
154: [19:28:20] <harry> ah ok let me try
155: [19:36:13] <harry> @Firesphere - that still doesnt' work
156: [19:36:23] <harry> has_one Page -> 'SiteTree'
157: [19:36:33] <harry> $Page.Link
158: [19:36:47] <Firesphere> Ok, on the DO, try this.
159: [19:37:35] <harry> no hang no I lied
160: [19:37:37] <harry> it DOES work :)
161: [19:37:43] <Firesphere> (Y)
162: [19:38:06] <harry> thnaks!
163: [19:38:31] <Firesphere> This was my backupplan: http://sspaste.com/paste/show/5685842889ee9
164: [19:43:46] <Firesphere> Despite Page => SiteTree not being the best solution, as long as SilverStripe is not Namespace-ready, try avoiding using "reserved" keys ;)
165: [20:21:55] <Firesphere> Anyone in 2016 yet? If so, how is it?
166: [20:48:40] <Firesphere> Do you have hoverboards? As in, real _hover_ boards?
167: [22:32:27] * DimiStripe quit (Quit: DimiStripe)
168: [22:59:00] * zlinux has joined #silverstripe

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