Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Port Switchtheme to Drupal 8.
Comment | File | Size | Author |
---|---|---|---|
#6 | switchtheme-Drupal_8_port-1601192-6.patch | 28.06 KB | shkiper |
#4 | switchtheme-Drupal_8_port-1601192-4.patch | 27.47 KB | shkiper |
#3 | switchtheme-port-to-d8-please-1601192-3.patch | 27.33 KB | calebtr |
#1 | switchtheme-Drupal_8-1601192-1.patch | 27.11 KB | shkiper |
d8.patch | 952 bytes | droplet |
Comments
Comment #1
shkiper CreditAttribution: shkiper commentedHi, I made a version of this module which works with current Drupal 8 release
Here is my patch
Comment #2
mgiffordComment #3
calebtr CreditAttribution: calebtr commentedI got Switchtheme working for Drupal 8, kinda sorta, see issues I noticed below.
This patch still applies to 7.x-1.x-dev - thanks @andrii zahura@. I updated the issue summary.
I added a couple of functions for classes that needed getEditableConfigNames().
The form now checks that a theme is not labeled "hidden" - this keeps Classy and Stable out of the form choices. I'm not sure I did this correctly or if we should be using a getter:
src/Switchtheme.php:
Issues I noticed:
I didn't test the random theme block at all.
I am attaching an updated patch. It would be great to get this committed as a 8.x-1.x-dev branch so we could track it better and file some more specific issues.
Comment #4
shkiper CreditAttribution: shkiper as a volunteer commentedHi @calebtr, thank you for your review. I fixed issues from your comment
Comment #5
TimeBandit CreditAttribution: TimeBandit commentedThanks for the port! Here are some comments:
https://www.drupal.org/node/2225029#comment-10108294
“Notice: Undefined index: switchtheme_bartik in Drupal\switchtheme\Form\SwitchthemeAdminSettings->buildForm() (line 46 of modules/contrib/switchtheme/src/Form/SwitchthemeAdminSettings.php”
Comment #6
shkiper CreditAttribution: shkiper as a volunteer commentedHi @TimeBandit. Thank you for your review.
I have fixed issues 1,3,4,6.
2- I can uninstall module without switchtheme.install file
5 - it is great idea, I'll try to implement this feature in future, but it needs some time
Comment #7
mgiffordOk.. So can we put out a rough D8 dev release with the code in #6?
Just like to start nudging this closer to a release. Or should we just start recommending folks move to something like https://www.drupal.org/project/styleswitcher for D8?
Comment #8
OFF CreditAttribution: OFF commentedAny news?