artfulrobot / aah

Nice CiviCRM bootstrap theme
Other
6 stars 4 forks source link

Cannot get theme to display Drupal 9 #39

Open chumkui opened 2 years ago

chumkui commented 2 years ago

I am on an upgrade project from Drupal 7 to Drupal 9 and looking to update the theme. (Currently Shoreditch under Drupal 7 which is not supported for Drupal 9 by the looks of things) I simply cannot get the aah theme to display properly. I can see it is enabled and its been chosen under display preferences (I have tried all combinations). I am using the latest Drupal 9.3.9 (with the Bartik theme out of the box) with the latest CiviCRM 5.48.1. Theme debugging is now on. I can see aah classes, but clearly these are being overridden. I think I am just being a numpty, but just in case I am missing an important step?

chumkui commented 2 years ago

I thought I'd add - my existing setup up that has been migrated over had things like the Contact Layout Editor enabled, so I just did a 'blank' Drupal 9 standard install with a CiviCRM install that has demo data only. It's the same - there is something there, but not quite right. It looks so good, I'd like to persist and get it working!

image

artfulrobot commented 2 years ago

Yeah, there are some problems with D9. I did have a bit of an experiment with D9+Civi+Aah a while back as a learning exercise.

The CSS is split in D9 between various layers - I can't remember the terms they use, but it's like "library" and "theme" etc.

The problem is that Civi seems to put all its CSS in one of these layers, which means that the D9 theme CSS gets added atop that, overpowering it. Looking at the code it looks like we should be able to specify a 'weight' for each CSS file, however these weights are improperly processed and, in short, nothing I tried worked.

That said, I seem to remember this affecting me in much more sublte ways than you seem to be encountering, but I don't yet have a live D9 civi site, so it's not been a priority for me to address, especially given the extended life of D7 now to Nov 2023, and because my dislike of D9 increases with each hour I spend on it :-D Finally, development of Aah is currently on hold, pending some other theme collaboration work that may or may not come to fruition - watch this space!

vingle commented 2 years ago

In Finsbury Park, @aydun added a fix to change the weights of the css files: https://github.com/vingle/finsburypark/commit/8a988463462de705d66538ac655618e6d142d1b5 - not sure if this would work in the short term.

chumkui commented 2 years ago

Hi Rich

Thanks for getting back to me - no problem at all, I completely understand re priorities, we all have a day job, right?!. I thought it had to be something to do with D9, as I am learning, everything has changed... But I think in a good way, in the long term? As a 'semi' developer, I do get it, but the frustrations of having to learn a whole new set of things is tough whilst maintaining D7. Having said that, Drupal is a developer's CMS - you can do anything, and this is the price to be paid. Under the cover of Civi, it's grim to in some places..

I think you were definitely on the right track from the screenshots - Civi desperately needs a good theme, I use Shoreditch on our live D7 site, but that is not perfect either by a long way and it has been going forever.

Maybe I'll take the plunge and try to understand just how theming works between D9 and Civi in all my spare time :-)

Good luck with the collaboration work and thanks again for getting back to me.


From: Rich Lott @.***> Sent: 14 April 2022 15:16 To: artfulrobot/aah Cc: Stevens, Martin; Author Subject: Re: [artfulrobot/aah] Cannot get theme to display Drupal 9 (Issue #39)

Yeah, there are some problems with D9. I did have a bit of an experiment with D9+Civi+Aah a while back as a learning exercise.

The CSS is split in D9 between various layers - I can't remember the terms they use, but it's like "library" and "theme" etc.

The problem is that Civi seems to put all its CSS in one of these layers, which means that the D9 theme CSS gets added atop that, overpowering it. Looking at the code it looks like we should be able to specify a 'weight' for each CSS file, however these weights are improperly processed and, in short, nothing I tried worked.

That said, I seem to remember this affecting me in much more sublte ways than you seem to be encountering, but I don't yet have a live D9 civi site, so it's not been a priority for me to address, especially given the extended life of D7 now to Nov 2023, and because my dislike of D9 increases with each hour I spend on it :-D Finally, development of Aah is currently on hold, pending some other theme collaboration work that may or may not come to fruition - watch this space!

- Reply to this email directly, view it on GitHubhttps://github.com/artfulrobot/aah/issues/39#issuecomment-1099233706, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEMSEZG4DNIHF2UTKYQR7JLVFASFNANCNFSM5TLTNXMA. You are receiving this because you authored the thread.Message ID: @.***>