[FLOW3-general] Problem with registration of DateTime Object

Robert Lemke robert at typo3.org
Mon Oct 25 11:20:25 CEST 2010


Hi Jan,

Am 12.10.2010 um 13:16 schrieb Jan Grubenbecher:

> I have a problem, with the Blog-Extension. I tried to create a new Post
> but get the following Exception:
> #1265367590: Object "DateTime" is not registered. (More information)
> 
> F3\FLOW3\Object\Exception\UnknownObjectException thrown in file
> Packages/Framework/FLOW3/Classes/Object/Container/AbstractObjectContainer.php
> in line 267.
> 
> I tried it a my local machine and also at mittwald. Both show the same
> error. Do I have to register Standard PHP classes too? Or can I
> configure FLOW3 to do it for me?

I recently stumbled over a similar problem and created a fix for it 
(see issue #10341). You'll find the change set here:

	https://review.typo3.org/#change,178
	(need to login with your typo3.org account)

If you can't apply this patch via git, you can also try to make the following
changes to your FLOW3 installation. Please let me know, if that helped in your case.

Cheers,
robert

Packages/Framework/FLOW3/Classes/Object/ObjectManager.php:

protected function buildPackageObjectConfigurations(array $packages) {
	$reflectionService = $this->get('F3\FLOW3\Reflection\ReflectionService');
	$objectConfigurations = array()
	$availableClassNames = array('DateTime');
...


Packages/Framework/FLOW3/Configuration/Objects.yaml:

#                                                                          #
# Object Configuration for the FLOW3 Framework                             #
#                                                                          #
# This file contains the default object configuration for the FLOW3        #
# Framework. Because it is loaded at a very early stage during ini-        #
# tialization, this configuration cannot be overriden by other con-        #
# figuration files.                                                        #
#                                                                          #

# @package FLOW3

DateTime:
  className: DateTime
  scope: prototype

...



More information about the FLOW3-general mailing list