Ds disable css feature warnings because of structural changes.

Created on 3 January 2023, over 1 year ago
Updated 17 January 2024, 5 months ago

While preparing a drupal10 upgrade for a client I noticed a lot of warnings when upgrading ds to 8.x-3.15.
Was caused by settings that are moved.
Don't know if we did something wrong in the past or if this is a real problem.
Will upload a patch that bypasses the warning

πŸ› Bug report
Status

Fixed

Version

3.15

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium aspilicious

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡§πŸ‡ͺBelgium johanvdr

    To bypass the warnings as mentioned above this happened most probably due to settings that are moved.

    Warning: Undefined array key "disable_css" in template_preprocess_ds_entity_view() (regel 461 van /var/www/html/web/modules/contrib/ds/ds.module)
    

    Patch added.

  • πŸ‡§πŸ‡ͺBelgium johanvdr

    Updated patch from #2.

  • πŸ‡«πŸ‡·France Chris64 France

    Patch ds-bypass-disable-css-warnings-3330759-3.patch β†’ applied, and errors got,

        Warning: Undefined array key "disable_css" in _ds_field_ui_table_layouts() (line 795 of modules/contrib/ds/includes/field_ui.inc).
    
        _ds_field_ui_table_layouts('user', 'user', 'full', Array, Object) (Line: 51)
        ds_field_ui_fields_layouts(Array, Object) (Line: 241)
        ds_form_entity_view_display_edit_form_alter(Array, Object, 'entity_view_display_edit_form') (Line: 562)
        Drupal\Core\Extension\ModuleHandler->alter('form', Array, Object, 'entity_view_display_edit_form') (Line: 840)
        Drupal\Core\Form\FormBuilder->prepareForm('entity_view_display_edit_form', Array, Object) (Line: 284)
        Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
        Drupal\Core\Controller\FormController->getContentResult(Object, Object)
        call_user_func_array(Array, Array) (Line: 123)
        Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
        Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
        Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
        Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
        Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
        Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
        Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
        Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
        Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
        Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
        Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
        Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
        Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
        Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
        Warning: Undefined array key "entity_classes" in _ds_field_ui_table_layouts() (line 796 of modules/contrib/ds/includes/field_ui.inc).
    
        _ds_field_ui_table_layouts('user', 'user', 'full', Array, Object) (Line: 51)
        ds_field_ui_fields_layouts(Array, Object) (Line: 241)
        ds_form_entity_view_display_edit_form_alter(Array, Object, 'entity_view_display_edit_form') (Line: 562)
        Drupal\Core\Extension\ModuleHandler->alter('form', Array, Object, 'entity_view_display_edit_form') (Line: 840)
        Drupal\Core\Form\FormBuilder->prepareForm('entity_view_display_edit_form', Array, Object) (Line: 284)
        Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
        Drupal\Core\Controller\FormController->getContentResult(Object, Object)
        call_user_func_array(Array, Array) (Line: 123)
        Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
        Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
        Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
        Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
        Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
        Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
        Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
        Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
        Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
        Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
        Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
        Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
        Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
        Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
  • Status changed to Needs review 9 months ago
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update 9 months ago
    30 pass
  • πŸ‡«πŸ‡·France Chris64 France

    if (isset($build['#ds_configuration']['layout']['disable_css'])) {
    gives TRUE if $build['#ds_configuration']['layout']['disable_css'] exists and sets to FALSE. May be patch 3 is needed after patch 2 because of this.

    Therefore what about these changes?,

    -  if ($build['#ds_configuration']['layout']['disable_css']) {
    +  if ($build['#ds_configuration']['layout']['disable_css'] ?? FALSE) {
    -      $layout['disable_css'] = $layout_configuration['disable_css'];
    +      $layout['disable_css'] = $layout_configuration['disable_css'] ?? FALSE;
    -      $layout['entity_classes'] = $layout_configuration['entity_classes'];
    +      $layout['entity_classes'] = $layout_configuration['entity_classes'] ?? [];
    • swentel β†’ committed fcf0ae5a on 8.x-3.x
      Issue #3330759 by johanvdr, Chris64: Ds disable css feature warnings...
  • πŸ‡§πŸ‡ͺBelgium swentel

    committed with a few changes. probably came from a (really?) old version where those two settings didn't exist yet, which is possible.

  • Status changed to Fixed 6 months ago
  • πŸ‡§πŸ‡ͺBelgium swentel
  • πŸ‡«πŸ‡·France Chris64 France

    Available since 3.17. This version solves our problem #4 πŸ› Ds disable css feature warnings because of structural changes. Fixed . Thank you.

Production build 0.69.0 2024