Sub theme does not save the settings.

Created on 16 March 2024, 9 months ago
Updated 29 August 2024, 4 months ago

Problem/Motivation

I have created a sub theme from Tara. It works fine on the frontend, but saving any setting that is not part of the Global Settings tab in the admin does not seem to work.

Steps to reproduce

  1. create a folder in themes (e.g mytheme)
  2. create a file mytheme/mytheme.info.yml
  3. create a file mytheme/mytheme.libraries.yml
  4. create a file mytheme/mytheme.theme

The content of the file 'mytheme.info.yml' is:

name: My Theme
type: theme
description: Theme for CRMIndex
core_version_requirement: ^8 || ^9 || ^10
# Defines the base theme
base theme: tara
# Defines libraries group in which we can add CSS/JS.
libraries:
  - mytheme/global-styling
# Regions, quote the names
regions:
  header_top: 'Header Top'
  site_branding: 'Site Branding'
  primary_menu: 'Primary menu'
  search_box: 'Full Page Search'
  page_top: 'Page top'
  page_bottom: 'Page bottom'
  highlighted: Highlighted
  breadcrumb: Breadcrumb
  content: Content
  content_top: 'Content Top'
  content_bottom: 'Content Bottom'
  content_home: 'Homepage Content'
  sidebar_first: 'Sidebar Left'
  sidebar_second: 'Sidebar Right'
  sidebar_sliding: 'Sliding Sidebar'
  footer_top: 'Footer Top'
  footer_first: 'Footer first'
  footer_second: 'Footer second'
  footer_third: 'Footer third'
  footer_fourth: 'Footer fourth'
  footer_bottom: 'Footer Bottom'
  copyright: 'Footer Copyright'
  cookie_text: 'Cookie Consent Message'
  hidden_blocks: 'Hidden Blocks'

The content of the file 'mytheme.libraries.yml' is:

global-styling:
  css:
    component:
      css/style.css: {}

The content of the file 'mytheme.theme' is:

<?php

/**
 * Implements hook_theme_suggestions_HOOK_alter for blocks.
 */
function mytheme_theme_suggestions_block_alter(&$suggestions, $variables) {
  // Load theme suggestions for blocks from parent theme.
  foreach ($suggestions as &$suggestion) {
    $suggestion = str_replace('mytheme_', 'tarapro_', $suggestion);
  }
}

Proposed resolution

Not sure?

Remaining tasks

User interface changes

API changes

Data model changes

💬 Support request
Status

Closed: won't fix

Version

10.1

Component

Code

Created by

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

Comments & Activities

  • Issue created by @MikeBuzzwoo
  • Status changed to Closed: won't fix 4 months ago
  • 🇮🇳India ravis

    Hello,

    I am sorry about the issue you are having. But I guess this is how Drupal sub-theme works. Please correct me if I am wrong.

Production build 0.71.5 2024