Drupal Planet

Drupal CSS is broken when Aggregation is turned on

The Confident Logo, Drupal Agency led by Mark Conroy

Here's some tips for debugging broken CSS in Drupal.

It's working for me locally. How come this is an issue on dev but not on staging or live? Everything was fine until we merged.

Right, the frontend of your website looks broken, but the backend does not. The chances are, it's something in the frontend theme (might not be, but probably is).

The frontend looks broken, but some of the CSS is working. Sounds like there's a corruption in a CSS file, and things are working fine until the browser gets to the corrupted part.

It's only happening on dev but not on other environments. Great, let's checkout the dev branch so.

It was all fine until "we" merged. Okay, so we have more than one person working on this, and we're not sure exactly who's created the issue. But, if it was all fine until we merged/deployed, then there's a good chance it's a merge conflict marker in your code. 

Where is the corrupted part?

Open your code editor. Do you search for >>>> (git conflict markers) in your theme. Viola!

Other things that could be at issue include a missing semi-colon like this:

.class {
  font-size: 1rem
  font-weight: bold;
}

In CSS the last property in a declaration can omit the semi-colon, but no other property can.

Also check for a missing closing bracket somewhere, like this:

.class {
  font-size: 1rem;
  font-weight: bold;
  
.other-class {
  font-size: 2rem;
}

.even-more-class {
  font-size: 3rem;
}

In the example just above, the .other-class and .even-more-class are now nested classes inside .class since .class has no closing }.

Stay tuned for more "the simple solution is often the best solution" tips.

Join the "Something nice ..." newsletter

The full title is "Something nice, something quirky, something else".

I send an email once a week with something nice, something quirky, and something else that I think is interesting (all with a web development theme, of course).

My LocalGov Drupal contributions for January 2026

Beautifully crafted digital products and experiences that matter.

We're still being clobbered by the migration of projects from GitHub to Drupal.org, making work a lot slower as we try to work and keep track of issues/tasks in two places.

  • I've been proposing for a while a desire/need to have a LocalGov Base companion module, so we can run update hooks (e.g. if we launch a new design pattern, we can reset existing sites to the old pattern so things don't break). But there's an issue with how we get that module installed on all sites in the first place. I need to use an update hook for the "Allowing configuring how many top tasks per row" feature, because we are going to set that to four, but existing sites currently have 3. Then ... Rupert came up with a great idea - themes do not have .install files to run update hooks, but they can run post_update commands. So now I have my PR updated to use our shiny news localgov_base.post_update.php file to do what I what.
  • And because of that, I think we can hold-off on my original proposal to have a companion module, at least for now.
  • Not everyone wants the "Section title" on Guides to be a required field, but we all agree we'd like a fallback if that field is not filled in. We have that now - it will fall back to the Guide title if the section title is left blank. I looked at this one for a while, then realised it was a simple config change, but kept looking through the code to see where the fallback is stored. I can't find it, I'm not convinced it should have been as easy as a simple config change, but we'll see when the other core maintainers are finished testing it.
  • I haven't gotten a huge amount of Drupal core work done recently, so I started work on the issue for removing Stable9 theme - of which I am the core maintainer. We plan to have it marked as deprecated from Drupal 11.4 and removed from Drupal 12.
  • We still haven't gotten to an agreement on what we should use as an aria-label for our facets blocks. But at least the conversation is progressing.
  • I'm not sure how I missed the fact that when creating a documents paragraph type, we show the icon for the file type in the backend when editing, but not in the frontend when viewing the page. You know me, MR ahoy!
  • Sticking to the conversations about documents, we have a lovely hook_preprocess_file_link in LocalGov Base which formats our documents like this on the frontend: "Mark's File (PDF, 2MB)", but since we don't use LocalGov Base on the backend for editing, we see this in editing mode: "mark-file.pdf". So ... I created an MR to add the function to LocalGov Core and a corresponding MR to remove the function from LocalGov Base.
  • Let's add a library to our subtheme generator, so subthemes can easily add styles to CKEditor5. Here's an MR for it.
  • Some users are not fully in love with the idea that every time we change a content moderation state to published, the 'Review date' get automatically enabled and set. I have an MR ready now to make this a configurable setting.
  • We've had one of those bikesheds of issues - a good bikeshed in this case, thankfully - trying to figure out an approach to an aria-label if the block title for a directory search block is not available. I think we have a solution.
  • And in kind of major news that no one knows about, I've started work on a redesign of the Scarfolk theme. What there's was completed in just a few days, and I've never been content with it. Hopefully a fresher design will help sell LGD better.

Join the "Something nice ..." newsletter

The full title is "Something nice, something quirky, something else".

I send an email once a week with something nice, something quirky, and something else that I think is interesting (all with a web development theme, of course).

AI Single Page Importer: Fast, Flexible Single-page Imports for Drupal

Drupal module: AI Single Page Importer

AI Single Page Importer is a Drupal contributed module designed to help bring content into a Drupal site from a single URL or source page in a streamlined way.

I was asking on LinkedIn yesterday if anyone knew of a module that could go to any page on the internet, get the content from that page, and fill in the fields on your node form for any content type with that information.

For example: you work for a council and are given the task of copy/pasting all the content from one section of your (old CMS) site to the new Drupal website. The old site has only one content type (think "posts" in WordPress) but the new site has pages, articles, events, directories, etc. There is not enough content to take the effort of writing a full migration script, but you'd like some help to get the content from one place to the other without having to manually copy/paste every field.

A solution I created: AI Single Page Importer.

What the Module Does

AI Single Page Importer focuses on importing one page at a time and converting it into Drupal content. Typical use cases include migrating articles, documentation pages, or other standalone pages where a one-off import is more appropriate than building a full migration mapping document and pipeline.

Rather than treating imports as a “big batch migration only” problem, this module supports a smaller, repeatable workflow: pick a page, import it, review the output, and publish it.

Here's an outline of how it works:

Where It Fits in a Drupal Content Workflow

AI Single Page Importer can be helpful in scenarios such as:

  • Editorial teams moving content from an old site or external source one page at a time
  • Site builders who want quick imports during a build without creating full migrations
  • Content cleanup projects where each imported page needs human review and refinements

Practical Benefits

  • Speed for one-off imports: Single-page imports help avoid the overhead of full migration setups when only a limited set of pages needs to be moved.
  • Less manual formatting: AI-assisted extraction and cleanup can reduce time spent fixing headings, paragraphs, and general page structure.
  • Structured content outcomes: Instead of dumping everything into one big body field, the import process can be aligned to content types and field models.
  • Editorial control: Human review remains central, with the importer acting as an accelerator rather than a fully automated publisher.

You can download the module from Drupal.org at AI Single Page Importer on Drupal.org. The README.md and project page is quite detailed. If you need to configure anything, you can do so at /admin/config/ai/ai-single-page-importer.

AI Single Page Importer is a handy option for Drupal sites that need quick, page-by-page importing with the added advantage of AI-assisted extraction and cleanup. For teams that want to move faster without sacrificing editorial oversight, it can be a practical bridge between manual copy/paste and full-scale migrations.

Join the "Something nice ..." newsletter

The full title is "Something nice, something quirky, something else".

I send an email once a week with something nice, something quirky, and something else that I think is interesting (all with a web development theme, of course).

My LocalGov Drupal contributions for December 2025

Beautifully crafted digital products and experiences that matter.

What with the move from GitHub to Drupal.org and Christmas holidays being upon us, this month was not as productive as usual.

Join the "Something nice ..." newsletter

The full title is "Something nice, something quirky, something else".

I send an email once a week with something nice, something quirky, and something else that I think is interesting (all with a web development theme, of course).

Solving Common Drupal Workspaces Problems for Content Editors

Here's a response video to some issues reported by Royal Borough of Greenwich during their presentation of using Workspaces.

Hopefully this will help Greenwich and others to get around some of those issues.

Original Greenwich presentation: https://www.youtube.com/watch?v=Fr5Adux2poA

 

Join the "Something nice ..." newsletter

The full title is "Something nice, something quirky, something else".

I send an email once a week with something nice, something quirky, and something else that I think is interesting (all with a web development theme, of course).

Publishing Whole Site Sections with Drupal Workspaces

Publishing Whole Site Sections with Drupal Workspaces

Ever had to publish a new section for a website (with multiple pages, menu items, etc) and all needed to go live at the same time? Drupal Workspaces has you covered.

Here's a short video to show how to set up Workspaces in Drupal.

Join the "Something nice ..." newsletter

The full title is "Something nice, something quirky, something else".

I send an email once a week with something nice, something quirky, and something else that I think is interesting (all with a web development theme, of course).

Klaro is the simplest Cookie Consent Management solution for Drupal

The Confident: Drupal Cookies Management with Klaro

Here's a super quick outline of how to set up Klaro cookie management system for your Drupal website.

Installing the Klaro module for Drupal is as easy as 1, 2, 3.

  1. Download and enable the module
  2. Set the dialog type you want (dialog, modal, etc)
  3. Set the permissions for which user roles will be presented with the Klaro dialog (only admin by default)

Here's a video with a little more detail.

Join the "Something nice ..." newsletter

The full title is "Something nice, something quirky, something else".

I send an email once a week with something nice, something quirky, and something else that I think is interesting (all with a web development theme, of course).

My LocalGov Drupal contributions for November 2025

Beautifully crafted digital products and experiences that matter.

This month I focussed on fewer, but larger, issues. Let's see ...

Code Contributions

  1. You know the way the things in CK Editor look different to your frontend (e.g. heading styles, blockquotes, lists etc). Well, there's an easy way to fix that, but not so many people know about it. So I decided to add it by default to our subtheme generator.
  2. I got a nice update to the PR from last month to set the homepage by page id in the LocalGov Demo module.
  3. This month I plan on working on some of the larger, more complex issues such as getting Events using Finders closer to a stable release. I installed it, played with it, created some PRs and issues, and reviewed what's there so far.
  4. Created a PR to use the Teaser view mode for events listings.
  5. Created an MR to add an 'Add Finders Facet Type' link to have consistency with how Directory Facets work.
  6. Created an MR to add the same CSS and JS we have for directories to Finders.
  7. Created an MR to add the schema for finders facets processors.
  8. Created an MR to use the default localgov_events_date format for calendar dates.
  9. Our box links listing component is hardcoded to have either a single column of items or else a grid of items with 2 in each row. I now have a PR to allow options for 3 or 4 items in a row and a follow-up PR to reflect this in the LocalGov Base template.
  10. I got some preliminary - proof-of-concept - work done on the "Have different numbers of top tasks on service landing pages" issue.
  11. I love when I find a tiny issue with a simple fix, that's been there for ages but no one has noticed it. Here's a fix for when the media item is viewed on a small screen where the media item is on the right hand side (if it was viewed on a large screen).
  12. The body of our blog channels is printed in a sidebar as a summary of the blog you are reading. However, if we don't have anything in the body, we are still printing an empty <aside>. But ... no more!
  13. Whether you have a value in the summary field of a step-by-step page or not, we show the "Show summary" button in the navigation. Then even if there are no summaries at all, we still create and show a "Show all summaries" button. Thanks to James in Essex for finding this issue. I have a PR ready for it now.
  14. But that PR broke one of our tests, which took nearly half a day to fix. The good news is the test not passing showed up some brittle code (the test was failing for a reason not got to do with the test, which is why it took so long to track it down) which all got fixed in the one PR, so ... happy days!
  15. If you can write a test for it, write a test for it. Our LocalGov Topics module had no tests, but now has a full suite of them.

Join the "Something nice ..." newsletter

The full title is "Something nice, something quirky, something else".

I send an email once a week with something nice, something quirky, and something else that I think is interesting (all with a web development theme, of course).

How the Irish Government's “Build to Share” Vision Comes to Life: A New Public Consultations Module for All

The Confident Logo, Drupal Agency led by Mark Conroy

Local spark, national impact: an open-source public consultations module built to share, built to scale.

The Irish Government’s Build to Share (BTS) initiative has been a driving force behind a more efficient, collaborative, and forward-thinking approach to digital public services. It encourages public bodies to reuse shared digital assets rather than reinventing the wheel—maximising value, reducing costs, and improving outcomes.

A recent project led by Mark Conroy of The Confident offers a standout example of the initiative’s ideals in action.

A Smart Solution Built Locally, Designed to Scale Nationally and Internationally

Tipperary County Council worked with The Confident to create a new Public Consultations Module - a streamlined, accessible, open-source tool that enables councils and public-sector organisations to publish consultations, gather feedback, and manage submissions effectively.

Originally built to meet Tipperary’s needs, the module was architected with wider reuse in mind. Now that it’s been released on Drupal.org, it can be adopted by any local authority or public-sector organisation at no cost. In fact, it can be used by any Drupal website, not just government ones.

We needed a flexible, user-friendly way to run public consultations, but we also knew that other councils faced the very same challenges. From the outset, we wanted a solution that would benefit the wider local government community.

  • Ruth Maher, Tipperary County Council

A True Build to Share Success Story

The release of this module aligns perfectly with the Government’s Build to Share strategy:

  • Shared Digital Assets: One high-quality solution available to all
  • Lower Costs: No licensing fees and reduced duplication of effort
  • Open-Source Transparency: Community review and long-term sustainability
  • Consistent UX: Citizens benefit from a unified, accessible consultation experience
  • Local Innovation: A county-level project with national relevance

What began as a project for Tipperary County Council has now become a reusable digital resource for every local authority in Ireland—and indeed, any Drupal-based public body worldwide.

We’re proud to see solutions built for Irish local government contributing to the global Drupal ecosystem. It highlights the strength of open standards and shared digital investments.

  •  Will Callaghan, LocalGov Drupal Product Lead

Looking Ahead

As more councils adopt the module, the Drupal community and local government partners can continue enhancing it, adding functionality, and ensuring it remains aligned with accessibility and security standards.

This initiative stands as a model for how public-sector digital services can be built collaboratively, shared openly, and leveraged nationally.

Tipperary were fantastic partners. They understood the value of building something that could be reused across the country. Publishing the module on Drupal.org ensures it stays open, evolves with community input, and supports councils for years to come.

  • Mark Conroy, The Confident

Demo

Join the "Something nice ..." newsletter

The full title is "Something nice, something quirky, something else".

I send an email once a week with something nice, something quirky, and something else that I think is interesting (all with a web development theme, of course).

My LocalGov Drupal contributions for October 2025

Beautifully crafted digital products and experiences that matter.

Lots of smaller issues fixed this month.

Code Contributions

  1. We've had a PR open for a few weeks trying to amend the default content listing view to show some new fields (easy) and an exposed filter for the person who last updated the content, rather than the original author (not so easy). We seem to have it working now.
  2. We've another PR open for a while to get our templates to use our new grid layout. I got some more templates added to this now, so hopefully we're nearly ready to merge it.
  3. While working on those new templates, I realised that the library for the "One Col Flexible" is not actually doing anything. It just targets a CSS class that doesn't exist in the template it is working on. So I created a PR to remove that library (and hopefully we can follow up by removing the template itself as well).
  4. I (finally, I hope) have publications ready to work with microsites. Go me!
  5. But of course, that's opened up the possibility for some improvements in other places where we are placing blocks in LocalGov Microsites, but trying to figure out exactly what we needed to do became a little bit too much for my brain this month.
  6. In an effort to move from LocalGov Sa11y to LocalGov Editoria11y (or at least to allow LocalGov Sa11y to be uninstalled), I created a few PRs (1 and 2) to remove the dependency on LocalGov Sa11y.
  7. An issue that has bugged me for a long time - when you install LGD and the Demo Content module the homepage redirects to /localgov-demo-site. The issue moved from microsites to localgov_core to localgov_demo content module. And now I have a PR - at last - to fix it. The only issue is the PR presumes that the demo content module is being installed on a fresh site with no other content ... so I'll have to think about making that a bit more scalable.
  8. I'm not a fan of the Docs and GitHub links being placed in the main nav in the Demo Content module, so I created a PR to add "News" and "Events" instead, and then create a footer menu to add to the housekeeping region with links for Docs, GitHub, LinkedIn, and Bluesky.
  9. The LocalGov Editoria11y module isn't quite there with a stable 1.0.0 release, so I spent some time working on that and think we are in a position to now release a 1.0.0 release (or at least are very close to it). All of the issues are now either closed, or have working MRs ready to be tested.
  10. Lee has been doing great work on coding standards and automated tests. With Drupal moving towards strict types for PHP, he has been updating all our modules. This month, I decided to jump with with a help on the LocalGov Workflows module and LocalGov Services module.
  11. And when I created the PRs for LocalGov Workflows, that showed up coding standards issues with our JS, so I fixed that too, and while I was at it I also rewrote the whole file to remove its dependency on jQuery and use modern JavaScript instead.
  12. After nearly 5 years of working on LocalGov Base, I've only just now realised that our Site Slogan in our Branding block is not placed inside the same .branding container as the rest of the branding block, breaking out BEM naming pattern. I have a PR to fix that ready now.
  13. When using a "Call Out Box" component, if you don't have a call to action in it, we are printing an empty link element, but even worse that element is styled so we are printing an empty box on the page. Thanks to Maria for posting the issue. I have a PR ready to fix it.
  14. While doing some training recently with Blackburn with Darwen council, we were looking at the icon component and how to use custom icons in our themes. That showed me that the inline documentation we have (available variables, schema definition, etc) is a little bit lacking. I've created a PR to bring that up to our usual high standards.
  15. I'm a sucker for linters and automating boring work like fixing coding standards. While training with Blackburn with Darwen recently we noticed Drupal core's linting system is using updated packages that we are no yet using. Fix is ready in this PR.
  16. With the linters working again, I did a little tidy up on LocalGov Alert Banner and a little tidy up on LocalGov Directories and a little tidy up on LocalGov Step-by-Step.
  17. And then for a bonus, I also fixed the CSS stylelint issues on LocalGov Step-by-Step.
  18. I created an issue and a PR back in April this year to add a listing of where each paragraph is used on the website. That PR had some issues, which I have now fixed, but also added in some extra features (enable the view on existing sites, add secondary tabs so it's easy to find, etc).
  19. GitPod is no more, so here's a PR to remove it from our setup.

Join the "Something nice ..." newsletter

The full title is "Something nice, something quirky, something else".

I send an email once a week with something nice, something quirky, and something else that I think is interesting (all with a web development theme, of course).