Error updating from 8.4.0 to 8.50. Class 'Concrete\Core\Localization\Service\Config' not found

Permalink 4 0 Browser Info Environment
Whoops \ Exception \ ErrorException (E_ERROR)
Class 'Concrete\Core\Localization\Service\Config' not found


Whoops\Exception\ErrorException
…\src\Localization\Service\Date.php:890


Status: New
derykmarl replied on at Permalink Reply
Don't know if it's related at all, but I had the same error when viewing certain pages since the upgrade and traced it down to my custonisations of date outputs in e.g. the Page List block. I wanted just the month and year to be displayed so I'd made the following change to a new template based on view.php:

// Change date format to Month Year
    //$date = $dh->formatDateTime($page->getCollectionDatePublic(), true);
    $date = $dh->getLocalDateTime($page->getCollectionDatePublic(), 'F Y');


This no longer works, seemingly getLocalDateTime is gone. I've recreated my custom template and changed the affected edit to:

//$date = $dh->formatDateTime($page->getCollectionDatePublic(), true);
                $date = $page->getCollectionDatePublicObject()->format('F Y');


Now it's fine for me
Myq replied on at Permalink Reply
Myq
Error thrown with message "Class 'Concrete\Core\Localization\Service\Config' not found"

Stacktrace:
#24 Error in /var/www/htm/releases/1561583979/public/concrete/src/Localization/Service/Date.php:929
#23 Concrete\Core\Localization\Service\Date:getSystemDateTime in /var/www/htm/releases/1561583979/public/packages/core/themes/edu/file.php:12
#22 include in /var/www/htm/releases/1561583979/public/concrete/src/View/View.php:288
#21 Concrete\Core\View\View:renderTemplate in /var/www/htm/releases/1561583979/public/concrete/src/View/View.php:250
#20 Concrete\Core\View\View:renderViewContents in /var/www/htm/releases/1561583979/public/concrete/src/View/AbstractView.php:164
#19 Concrete\Core\View\AbstractView:render in /var/www/htm/releases/1561583979/public/concrete/src/Http/ResponseFactory.php:148
#18 Concrete\Core\Http\ResponseFactory:view in /var/www/htm/releases/1561583979/public/concrete/src/Http/ResponseFactory.php:215
#17 Concrete\Core\Http\ResponseFactory:controller in /var/www/htm/releases/1561583979/public/concrete/src/Http/ResponseFactory.php:362
#16 Concrete\Core\Http\ResponseFactory:collection in /var/www/htm/releases/1561583979/public/concrete/src/Http/DefaultDispatcher.php:134
#15 Concrete\Core\Http\DefaultDispatcher:handleDispatch in /var/www/htm/releases/1561583979/public/concrete/src/Http/DefaultDispatcher.php:58
#14 Concrete\Core\Http\DefaultDispatcher:dispatch in /var/www/htm/releases/1561583979/public/concrete/src/Http/Middleware/DispatcherDelegate.php:39
#13 Concrete\Core\Http\Middleware\DispatcherDelegate:next in /var/www/htm/releases/1561583979/public/concrete/src/Http/Middleware/ThumbnailMiddleware.php:76
#12 Concrete\Core\Http\Middleware\ThumbnailMiddleware:process in /var/www/htm/releases/1561583979/public/concrete/src/Http/Middleware/MiddlewareDelegate.php:50
#11 Concrete\Core\Http\Middleware\MiddlewareDelegate:next in /var/www/htm/releases/1561583979/public/concrete/src/Http/Middleware/FrameOptionsMiddleware.php:39
#10 Concrete\Core\Http\Middleware\FrameOptionsMiddleware:process in /var/www/htm/releases/1561583979/public/concrete/src/Http/Middleware/MiddlewareDelegate.php:50
#9 Concrete\Core\Http\Middleware\MiddlewareDelegate:next in /var/www/htm/releases/1561583979/public/concrete/src/Http/Middleware/CookieMiddleware.php:35
#8 Concrete\Core\Http\Middleware\CookieMiddleware:process in /var/www/htm/releases/1561583979/public/concrete/src/Http/Middleware/MiddlewareDelegate.php:50
#7 Concrete\Core\Http\Middleware\MiddlewareDelegate:next in /var/www/htm/releases/1561583979/public/concrete/src/Http/Middleware/ApplicationMiddleware.php:29
#6 Concrete\Core\Http\Middleware\ApplicationMiddleware:process in /var/www/htm/releases/1561583979/public/concrete/src/Http/Middleware/MiddlewareDelegate.php:50
#5 Concrete\Core\Http\Middleware\MiddlewareDelegate:next in /var/www/htm/releases/1561583979/public/concrete/src/Http/Middleware/MiddlewareStack.php:86
#4 Concrete\Core\Http\Middleware\MiddlewareStack:process in /var/www/htm/releases/1561583979/public/concrete/src/Http/DefaultServer.php:85
#3 Concrete\Core\Http\DefaultServer:handleRequest in /var/www/htm/releases/1561583979/public/concrete/src/Foundation/Runtime/Run/DefaultRunner.php:119
#2 Concrete\Core\Foundation\Runtime\Run\DefaultRunner:run in /var/www/htm/releases/1561583979/public/concrete/src/Foundation/Runtime/DefaultRuntime.php:102
#1 Concrete\Core\Foundation\Runtime\DefaultRuntime:run in /var/www/htm/releases/1561583979/public/concrete/dispatcher.php:36
#0 require in /var/www/htm/releases/1561583979/public/index.php:3
wavemedia replied on at Permalink Reply
wavemedia
as derykmarl wrote, look for
$date = $dh->getLocalDateTime($page->getCollectionDatePublic(), 'F Y');
in your theme of blocks in the application folder.

Fixing these entries will solve your problem. For some reason, the date fix was not working for me

I just removed the code as it was no longer needed. I was then able to update to 5.8.5
Myq replied on at Permalink Reply
Myq
Thanks, wavemedia. Actually I did that, but I wanted to confirm the bug because the method is marked as deprecated, but it should continue to work until the next major version. It looks like the root cause here is that something still in the core is still relying on the method, so it does need to be fixed in the core.
mlocati replied on at Permalink Reply
mlocati
This has been fixed byhttps://github.com/concrete5/concrete5/pull/7713... (which will be included in the upcoming concrete5 8.5.2)

concrete5 Environment Information

# concrete5 Version
Core Version - 8.4.0
Version Installed - 8.4.0
Database Version - 20180524000000

# concrete5 Packages
Magic Tabs (7.2.0), POST (1.1.1), SCALA Clear Cache (1.1), Vivid Simple Accordion (1.0.1)

# concrete5 Overrides
blocks/autonav/controller.php, blocks/autonav/nav_item.php, blocks/autonav/templates/breadcrumb.php, blocks/autonav/templates/inthissection/view.php, blocks/autonav/templates/inthissection, blocks/autonav/templates, blocks/autonav, blocks/image/form.php, blocks/image, blocks/page_title/view.php, blocks/page_title, blocks/search/view.php, blocks/search

# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - On - If blocks on the particular page allow it.
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Microsoft-IIS/7.5

# Server API
cgi-fcgi

# PHP Version
5.5.15

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imap, intl, json, ldap, libxml, mbstring, mcrypt, mhash, mysql, mysqli, mysqlnd, oci8, odbc, openssl, pcre, PDO, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, Phar, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, sqlite3, standard, tidy, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib

# PHP Settings
max_execution_time - 300
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 4000
memory_limit - 128M
post_max_size - 100M
sql.safe_mode - Off
upload_max_filesize - 500M
ldap.max_links - Unlimited
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
oci8.max_persistent - -1
odbc.max_links - Unlimited
odbc.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pdo_sqlsrv.client_buffer_max_kb_size - 10240
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5

Browser User-Agent String

Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0