Form date_time attribute error

Permalink 9 8 Browser Info Environment
$this->app is null and creates error 'Call to member function make() on null'
Fix: Change line 12 of concrete/attributes/date_time/form.php
$form = $this->app->make('helper/form');

to:
$form = Loader::helper('form');


https://github.com/dreinhart/concrete5/blob/35ce5b662311b3815524f892...


Status: New
bleenders replied on at Permalink Reply
This is indeed a bug that came with 8.2.1. Seems someone did not test the code they have committed.
I have overwritten concrete/attributes/date_time.php by in the application folder and replaced line 2 with:
$form = Core::make('helper/form');


But even with that fix it will trow another error if what you type is not according the format of the date time field. For example, if you put in "January 1st" it will trow an error. End users do not understand this.
Call to a member function setTimezone() on boolean
\attributes\date_time\controller.php 205


I guess no one bothered to fill out a form and while using "Text Input Field" option on the Date/Time attribute. Because I'm pretty sure the developer who has written the code would have noticed this otherwise.
When you fix it could you also please fix the indentation on concrete/attributes/date_time/form.php.

concrete5 Environment Information

# concrete5 Version
Core Version - 8.2.1
Version Installed - 8.2.1
Database Version - 20170802000000

# concrete5 Packages
Event Calendar PRO (2.3.5), White Label (1.0.1)

# concrete5 Overrides
<<removed>>

# concrete5 Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache/2.4.27 (cPanel) OpenSSL/1.0.2k mod_bwlimited/1.4

# Server API
cgi-fcgi

# PHP Version
5.6.31

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imap, intl, ionCube Loader, json, ldap, libxml, mbstring, mcrypt, mhash, mysql, mysqli, mysqlnd, odbc, openssl, pcntl, pcre, PDO, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SourceGuardian, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend Guard Loader, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 512M
post_max_size - 128M
sql.safe_mode - Off
upload_max_filesize - 128M
ldap.max_links - Unlimited
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
odbc.max_links - Unlimited
odbc.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
opcache.max_accelerated_files - 2000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5
zend_optimizerplus.max_accelerated_files - 2000
zend_optimizerplus.max_file_size - 0
zend_optimizerplus.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (Windows NT 6.1; rv:55.0) Gecko/20100101 Firefox/55.0