Joe

hey everyone. just migrated a 3.6.x site onto Windows & IIS yesterday - was originally developed on a LAMP stack.

Everything works great, with one exception. When I try to go to /admin/, I get a 404. /admin/?flush=all works fine.

ideas?

Joe

>and then stores the custom field data into a serialized array in a field

sounds like it just gets pulled from that field in getCMSFields(), and then parsed out into actual calls to addFieldToTab (or whatever the SS4 equivalent of those calls would be)

Joe

you can get the current year with:

  1. var currentYear = new Date().getFullYear();
Joe

that’s what it shows now - if now is past the specified date.

so if it just needs to be april 16th and later, you can set that to be var someDate = new Date(2018,4,16) and check now > someDate

Joe

whoops - switched for now being past the specified date

Joe
  1. var now = Date.now();
  2. var someDate = new Date(2018,4,15);
  3.  
  4. if (now > someDate) { ... }
Joe

We use the same method, but put it in the page controller’s init method instead.

Joe

that’s actually a really nice “feature” to know about…. lol

Joe

I actually think we just did something along these lines not that long ago, where we have products on Magento, but the marketing site on Silverstripe.

One of my colleagues built an API integration that pulls the product info from Magento for display on the marketing site. That way you only have to manage it in one place.