Problem/Motivation

See #3278332: [Meta] Tasks to remove Bartik from core and move to contrib and #3249109: Deprecate Bartik. Now that Olivero is the default theme for Drupal core, it's time to move Bartik to a contributed project.

Steps to reproduce

Proposed resolution

Remaining tasks

  1. The change record for this issue should include a link to recommendations page, https://www.drupal.org/node/3223395#s-MODULE_NAME. (For example, the CR for removing HAL)
  2. Tag this issue 'Needs release note.
  3. Remove the module ;-).
  4. Remove references from core/phpstan-baseline.neon.
  5. Check for references in @todo.
  6. Handle migration tests.
  7. In all the functional tests in migrate_drupal_ui make sure that MODULE_NAME is not installed. MODULE_NAME should also be removed from the methods getAvailablePaths() and moved to getMissingPaths() in the tests using those methods.

User interface changes

API changes

Data model changes

Release notes snippet

The Bartik theme has been removed from Drupal 10.0.0, and is now available as a contributed theme. Sites using Bartik should install the contributed theme prior to updating to Drupal 10.

Issue fork drupal-3304256

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

catch created an issue. See original summary.

longwave made their first commit to this issue’s fork.

longwave’s picture

Status: Active » Needs review

First pass, did not regenerate the dictionary yet. Will conflict with the Seven removal patch in a few places, but that's to be expected.

While grepping for Bartik I found a bunch of out of date docs and opened #3304650: Theme stylesheet documentation is out of date

quietone’s picture

Adding parent, remaining tasks and change record etc

I don't expect any migration tests needs changes and I see that the failing test is not a migration tests, so removing that from remaining tasks.

quietone’s picture

Issue summary: View changes

Nothing found in the @todo.

$ grep -riI -A2 --exclude-dir="bartik" @todo core | grep -i bartik
$ 
catch’s picture

The classy fail looks like the hash test is including comments in classy.theme, and we just need to update the hash because the comments changed. I think?

lauriii’s picture

Issue tags: +Needs reroll
mherchel’s picture

Status: Needs review » Needs work
Issue tags: -Needs reroll

Looking through this, I searched the codebase for "bartik"

I found a number of things that could be removed (not sure if these are in scope).

  • Reference to "themes/bartik/color/preview.html", in core/.cspell.json
  • Reference to bartik in comment in core/lib/Drupal/Core/Asset/AssetResolverInterface.php
  • Reference to bartik in a comment in core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php
  • Reference to bartik in a comment in the RDF module test at core/modules/rdf/tests/src/Functional/StandardProfileTest.php.
  • There's a number of references to Bartik in the migration tests. I'm guessing that many of these are valid, because people will be migrating from Bartik to Olivero.

Not sure all of these are valid, but I think some may be.

quietone’s picture

Good point to search for bartik, so I checked as well.

First for migrate related.

$ grep -ri bartik --exclude-dir="bartik" core | awk -F: '{print $1}' | grep -ie migrat -e drupal7.php | sort -u | nl
     1  core/modules/block/migrations/d7_block.yml
     2  core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockContentTranslationTest.php
     3  core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockTest.php
     4  core/modules/block/tests/src/Kernel/Plugin/migrate/source/d7/BlockTranslationTest.php
     5  core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockRegionTest.php
     6  core/modules/color/tests/fixtures/drupal7.php
     7  core/modules/color/tests/src/Kernel/Migrate/d7/MigrateColorTest.php
     8  core/modules/color/tests/src/Kernel/Plugin/migrate/source/d7/ColorTest.php
     9  core/modules/migrate_drupal/tests/fixtures/drupal7.php
    10  core/modules/rdf/tests/fixtures/drupal7.php
    11  core/modules/system/migrations/d7_theme_settings.yml
    12  core/modules/tracker/tests/fixtures/drupal7.php

@mherchel is right, the references to bartik are valid. MigrateColorTest does depend on Bartik being installed but the plan is to remove Color first, then Bartik.

Then for not migrate related

$ grep -ri bartik --exclude-dir="bartik" core | awk -F: '{print $1}' | grep -iv migrat | grep -iv drupal7.php | sort -u | nl
     1  core/.cspell.json
     2  core/lib/Drupal/Core/Asset/AssetResolverInterface.php
     3  core/lib/Drupal/Core/Config/ConfigInstallerInterface.php
     4  core/lib/Drupal/Core/Extension/InfoParserInterface.php
     5  core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php
     6  core/lib/Drupal/Core/Plugin/plugin.api.php
     7  core/lib/Drupal/Core/Theme/AjaxBasePageNegotiator.php
     8  core/lib/Drupal/Core/Theme/Registry.php
     9  core/MAINTAINERS.txt
    10  core/misc/cspell/dictionary.txt
    11  core/modules/breakpoint/src/BreakpointManager.php
    12  core/modules/comment/tests/src/Functional/CommentLinksTest.php
    13  core/modules/contextual/contextual.module
    14  core/modules/help/help.api.php
    15  core/modules/rdf/tests/src/Functional/StandardProfileTest.php
    16  core/tests/Drupal/KernelTests/Core/Theme/ConfirmClassyCopiesTest.php
    17  core/tests/Drupal/Tests/WebAssert.php
    18  core/themes/classy/classy.theme

I've made a note to add more thorough searching to the steps to remove a module/theme.

longwave’s picture

The cspell config needs updating, and the dictionary regenerating.

Reference to bartik in comment in core/lib/Drupal/Core/Asset/AssetResolverInterface.php
Reference to bartik in a comment in core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php

Opened #3304650: Theme stylesheet documentation is out of date for this as the problem is wider than just renaming something.

Reference to bartik in a comment in the RDF module test at core/modules/rdf/tests/src/Functional/StandardProfileTest.php.

RDF is also on its way out so I left this alone, but we can fix it here I guess.

dww made their first commit to this issue’s fork.

dww’s picture

Re-ran the recursive grep from #10 (thanks @quietone for posting that!) with the MR branch checked out, and still had:

     1	core/lib/Drupal/Core/Asset/AssetResolverInterface.php
     2	core/lib/Drupal/Core/Extension/ThemeHandlerInterface.php
     3	core/misc/cspell/dictionary.txt

So I pushed a commit to fix 1 + 2. 😅

Also fixed the file hash in ClassyPreprocessUnchangedTest now that classy.theme has changed (only to remove 'bartik' from some comments). Fixed that assertSame() to put the expected value as the 1st param, while I was at it.

The other test fails don't make much immediate sense, but I don't really have time to investigate now. Maybe random fails? Let's see. 🤞

dww’s picture

Yeah, passes locally:

% ./vendor/bin/phpunit -c core/phpunit.xml core/modules/book/tests/src/Functional/BookTest.php
PHPUnit 9.5.21 #StandWithUkraine

Warning:       Your XML configuration validates against a deprecated schema.
Suggestion:    Migrate your XML configuration using "--migrate-configuration"!

Testing Drupal\Tests\book\Functional\BookTest
................                                                  16 / 16 (100%)

Time: 02:33.625, Memory: 10.00 MB

OK (16 tests, 749 assertions)

Let's hope the bot agrees on this run.😅

dww’s picture

Status: Needs work » Needs review

Yay. So only the release note and the cspell directory regeneration are needed.

Back to NR to get more eyes on this in case anyone spots something else.

Thanks,
-Derek

catch’s picture

Issue summary: View changes
catch’s picture

Added a release note.

Spokje made their first commit to this issue’s fork.

catch’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

Went ahead and committed #3270899: Remove Color module from core which means this needs a re-roll/rebase.

Spokje’s picture

Assigned: Unassigned » Spokje

Yay, one more extension removed!

Let's see if I can do the reroll/rebase

Spokje’s picture

Assigned: Spokje » Unassigned
Status: Needs work » Needs review
Issue tags: -Needs reroll

Rerolled, left comment on the only open thread in GitLab.

lauriii’s picture

Status: Needs review » Reviewed & tested by the community

Confirmed that all of the changes to existing code makes sense. 👍 I was surprised how many references there were still pointing to Bartik 😅 Also confirmed that all of the remaining references to Bartik are related to migration. 👍

Does this need a change record given that we already published https://www.drupal.org/node/3304352? 🤔

Prepared issue credits for another committer ✌️

lauriii’s picture

Forgot to mention that I also tested manually installing Drupal without Bartik and all worked as expected 👍

  • catch committed e3dbefb on 10.0.x
    Issue #3304256 by longwave, Spokje, dww, lauriii, catch, quietone,...
  • catch committed 56aef13 on 10.1.x
    Issue #3304256 by longwave, Spokje, dww, lauriii, catch, quietone,...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Yeah I was also surprised by the number of Bartik references left, I guess it's test failures vs. grep.

I updated the existing change record since that covers both the deprecation and removal.

Thanks to everyone who worked on this (and on adding Bartik to core in the first place, it did really well for over a decade).

Committed/pushed to 10.1.x and cherry-picked to 10.0.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

xjm’s picture

Issue summary: View changes
quietone’s picture

Added a CR specific for the deprecation, so the branch/version information is correct, and published it.
wrong issue

smustgrave’s picture