drowl_paragraphs_update_8310 fails with custom theme

Created on 25 December 2023, about 1 year ago
Updated 25 April 2024, 10 months ago

Problem/Motivation

[error] Update aborted by: drowl_paragraphs_update_8310

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Postponed

Version

4.0

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

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

Comments & Activities

  • Issue created by @Anybody
  • 🇩🇪Germany Anybody Porta Westfalica
  • 🇩🇪Germany Anybody Porta Westfalica
  • 🇩🇪Germany Anybody Porta Westfalica

    This is a combination of

    /**
     * Recalculate breakpoint_mapping_sizes values.
     */
    function drowl_paragraphs_update_8310(&$sandbox) {
      $configEditable = \Drupal::service('config.factory')->getEditable('drowl_paragraphs.settings');
      $breakpoint_mapping = $configEditable->get('breakpoint_mapping');
      $breakpoint_mapping_sizes = \Drupal\drowl_paragraphs\Form\DrowlParagraphsSettingsForm::breakpointMappingToDeviceSizes($breakpoint_mapping);
      $configEditable->set('breakpoint_mapping_sizes', $breakpoint_mapping_sizes)->save();
    
      return 'Updated breakpoint mapping sizes';
    }
    
    

    and

    breakpoint_group: drowl_base
    breakpoint_mapping:
      drowl_base:
        small:
          1x:
            size_mapping: sm
        medium:
          1x:
            size_mapping: md
        large:
          1x:
            size_mapping: lg
        xlarge:
          1x:
            size_mapping: lg
        xxlarge:
          1x:
            size_mapping: lg
    

    breakpoint_group: drowl_base
    breakpoint_mapping:
    drowl_base:

    Which means this is a hard coded dependency on the breakpoint mapping from drowl_base.
    Without that it won't work. We can just skip the step, if it does not exist.

    We decided to do this in former times, because we can't cleanly rely on breakpoints to exist.

  • Issue was unassigned.
  • Status changed to Postponed 10 months ago
  • 🇩🇪Germany Anybody Porta Westfalica

    I don't think this is worth fixing any more with drowl_paragraphs_bs but let's keep this postponed for visibility reasons, if we should run into this again.

Production build 0.71.5 2024