Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-25677

Impossible to create a content type with a DateTime

    XMLWordPrintable

    Details

      Description

      Steps to reproduces.

      • Update your environment (I mean it, composer and all, because it is a regression)
      • Create a content type
      • Add a DateAndTime field definition

      Try saving, it should throw an error.

      [1] Symfony\Component\Debug\Exception\ContextErrorException: Notice: Undefined index: useSeconds
          at n/a
              in /home/yan/prog/various_repos/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeConverter.php line 80
      
          at Symfony\Component\Debug\ErrorHandler->handleError('8', 'Undefined index: useSeconds', '/home/yan/prog/various_repos/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeConverter.php', '80', array('fieldDef' => object(FieldDefinition), 'storageDef' => object(StorageFieldDefinition)))
              in /home/yan/prog/various_repos/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeConverter.php line 80
      
          at eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter\DateAndTimeConverter->toStorageFieldDefinition(object(FieldDefinition), object(StorageFieldDefinition))
              in /home/yan/prog/various_repos/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Type/Mapper.php line 337
      
          at eZ\Publish\Core\Persistence\Legacy\Content\Type\Mapper->toStorageFieldDefinition(object(FieldDefinition), object(StorageFieldDefinition))
              in /home/yan/prog/various_repos/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Type/Handler.php line 553
      
          at eZ\Publish\Core\Persistence\Legacy\Content\Type\Handler->updateFieldDefinition('13', '1', object(FieldDefinition))
              in /home/yan/prog/various_repos/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Type/MemoryCachingHandler.php line 429
      
          at eZ\Publish\Core\Persistence\Legacy\Content\Type\MemoryCachingHandler->updateFieldDefinition('13', '1', object(FieldDefinition))
              in /home/yan/prog/various_repos/ezpublish-kernel/eZ/Publish/Core/Persistence/Cache/ContentTypeHandler.php line 346
      
          at eZ\Publish\Core\Persistence\Cache\ContentTypeHandler->updateFieldDefinition('13', '1', object(FieldDefinition))
              in /home/yan/prog/various_repos/ezpublish-kernel/eZ/Publish/Core/Repository/ContentTypeService.php line 1470
      
          at eZ\Publish\Core\Repository\ContentTypeService->updateFieldDefinition(object(ContentTypeDraft), object(FieldDefinition), object(FieldDefinitionData))
              in /home/yan/prog/various_repos/ezpublish-kernel/eZ/Publish/Core/SignalSlot/ContentTypeService.php line 505
      
          at eZ\Publish\Core\SignalSlot\ContentTypeService->updateFieldDefinition(object(ContentTypeDraft), object(FieldDefinition), object(FieldDefinitionData))
              in /home/yan/prog/ezplatform/app/cache/dev/appDevDebugProjectContainer.php line 33226
      
          at eZPublishCoreRepositoryContentTypeService_000000002056516000000000246f2daae2cace4bb1df548b3e8e980d01553b77->updateFieldDefinition(object(ContentTypeDraft), object(FieldDefinition), object(FieldDefinitionData))
              in /home/yan/prog/various_repos/repository-forms/lib/Form/Processor/ContentTypeFormProcessor.php line 84
      
          at EzSystems\RepositoryForms\Form\Processor\ContentTypeFormProcessor->processDefaultAction(object(FormActionEvent), 'contentType.update', object(TraceableEventDispatcher))
              in  line 
      
          at call_user_func(array(object(ContentTypeFormProcessor), 'processDefaultAction'), object(FormActionEvent), 'contentType.update', object(TraceableEventDispatcher))
              in /home/yan/prog/ezplatform/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php line 61
      
          at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(FormActionEvent), 'contentType.update', object(ContainerAwareEventDispatcher))
              in  line 
      
          at call_user_func(object(WrappedListener), object(FormActionEvent), 'contentType.update', object(ContainerAwareEventDispatcher))
              in /home/yan/prog/ezplatform/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php line 158
      
          at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener)), 'contentType.update', object(FormActionEvent))
              in /home/yan/prog/ezplatform/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php line 46
      
          at Symfony\Component\EventDispatcher\EventDispatcher->dispatch('contentType.update', object(FormActionEvent))
              in /home/yan/prog/ezplatform/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php line 124
      
          at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch('contentType.update', object(FormActionEvent))
              in /home/yan/prog/various_repos/repository-forms/lib/Form/ActionDispatcher/AbstractActionDispatcher.php line 79
      
          at EzSystems\RepositoryForms\Form\ActionDispatcher\AbstractActionDispatcher->dispatchDefaultAction('contentType.update', object(FormActionEvent))
              in /home/yan/prog/various_repos/repository-forms/lib/Form/ActionDispatcher/AbstractActionDispatcher.php line 48
      
          at EzSystems\RepositoryForms\Form\ActionDispatcher\AbstractActionDispatcher->dispatchFormAction(object(Form), object(ContentTypeData), 'publishContentType', array('languageCode' => 'eng-GB'))
              in /home/yan/prog/various_repos/PlatformUIBundle/Controller/ContentTypeController.php line 300
      
          at EzSystems\PlatformUIBundle\Controller\ContentTypeController->updateContentTypeAction(object(Request), '13', 'eng-GB')
              in  line 
      
          at call_user_func_array(array(object(ContentTypeController), 'updateContentTypeAction'), array(object(Request), '13', 'eng-GB'))
              in /home/yan/prog/ezplatform/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php line 139
      
          at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), '1')
              in /home/yan/prog/ezplatform/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php line 62
      
          at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), '1', true)
              in /home/yan/prog/ezplatform/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php line 69
      
          at Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle(object(Request), '1', true)
              in /home/yan/prog/ezplatform/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php line 184
      
          at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
              in /home/yan/prog/ezplatform/web/app.php line 66
      

      After trouble shooting a bit, it seems the data is lost when processing this line :

      // Synchronize form and data.
      $form->handleRequest($request);
      

      https://github.com/ezsystems/PlatformUIBundle/blob/master/Controller/ContentTypeController.php#L292

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                yannick.roger-obsolete@ez.no Yannick Roger (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: