Improve cloning in views to prevent crashes.

Created on 9 October 2025, 3 days ago

When cloning a Views display from another display type (e.g., Page or Block), the new Data Export display should automatically apply valid defaults for its format and path, preventing misconfiguration and errors on export.

Current behaviour

When a Data Export display is created by cloning an existing display (like a Page):

  • The Format sometimes inherits from the original (e.g., “Unformatted list”), which causes a fatal error because it’s invalid for the exporter.
  • The Show setting may inherit “Content” instead of “Fields”.
  • The Path duplicates the original path, leading to routing conflicts.

Proposed behaviour

When cloning a Data Export display:

  • Set valid default format:
    • Format = Data export
  • Data export format = CSV
  • Set “Show” = Fields
  • If cloning from a Page display:
    • Append /export to the path (e.g., /articles → /articles/export)
  • 🐛 Bug report
    Status

    Active

    Version

    1.0

    Component

    Code

    Created by

    🇦🇺Australia VladimirAus Brisbane, Australia

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

    Merge Requests

    Comments & Activities

    Not all content is available!

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

    • Merge request !89Improve cloning → (Open) created by VladimirAus
    • Pipeline finished with Canceled
      3 days ago
      #622378
    • Pipeline finished with Success
      3 days ago
      Total: 534s
      #622379
    • Pipeline finished with Failed
      3 days ago
      Total: 272s
      #622384
    Production build 0.71.5 2024