taoceanz

Hey all, I've applied the Versioned extension to class extending DataObject though no history tab is available. This isn't standard behaviour, is it?

taoceanz

Hey all, I've got this persistent issue with redirects away from the login page I'm unable to debug. Going to http://site.com/admin or http://site.com/Security/login redirects to http://site.com/Security/?l=en_US&BackURL=%2Fadmin%2Fpages%2F. Via xDebug, all instances of login_url are set to "Security/login".

Just after the issue occurred, I was able to load the login page via /admin/pages/ which displayed the login form from cache which allowed me to login so I don't think the issue would be a disallowed login action. Unfortunately I'm unaware of what happened just before this login issue occurred.

taoceanz

Will detect_locale interfere with the routing and locale detection by setting a higher precedence on the detected locale over the "default" locale?

taoceanz

Is there a way to force the default locale? On our site, en_US is default, but in a new browser it consistently loads in Chinese.

taoceanz

Anyone experience a redirect to something like /Security/?l=en_US&BackURL=%2Fadmin%2Fpages%2F when trying to access /admin or /Security/login?

taoceanz

Updating to ->getField doesn't throw an error and it updates the PromotionDate field, but it updates it to the current time. $this->PromotionDate = strtotime($this->getField('PromotionDateDate') . ' ' . $this->getField('PromotionDateTime'));

taoceanz

Anything other than DBDatetime::now()->Rfc2822() leads to this error

taoceanz

Without Rfc2822(), it doesn't throw errors but also doesn't save the field.

Yup, 'PromotionDate' => 'DBDatetime'

This throws errors, too. $this->PromotionDate = strtotime($this->record['PromotionDateDate'] . ' ' . $this->record['PromotionDateTime']);

taoceanz

Thanks for the tips. It was working for a second but now is throwing an error stating the date format is incorrect. PromotionDate is a DBDatetime field.

  1. $this->PromotionDate = DBDateTime::create()
  2. ->setValue($this->record['PromotionDateDate'] . ' ' . $this->record['PromotionDateTime'])
  3. ->Rfc2822();
taoceanz

Oh @null, you were right. $this->{database_record_name} = getSomeValue() works. It triggers that db field to be detected as 'changed' and then written to the database. Thanks for your help 🙂