Skip to content

Conversation

@markconroy
Copy link
Member

Closes #555


Not completed yet. This add the config for publications, but does not have the "Book Outline" field in the node create/edit sidebar.


What does this change?

Configures publications module for microsites.

How to test

  • Install the new localgov_microsites_group submodule
  • Create a microsite
  • See that you can add publications overview and publications pages to the microsite

How can we measure success?

People no longer ask us to add Publications to Microsites.


Thanks to Big Blue Door for sponsoring my time to work on this.

@finnlewis
Copy link
Member

@markconroy we've got a typo here I think, picked up by the coding standards checks:

https://github.com/localgovdrupal/localgov_microsites_group/actions/runs/17489549389/job/49676141135?pr=556#step:4:24

@finnlewis
Copy link
Member

@markconroy mentions that the book outline is not showing up in the meta data sidebar.
Also we have conflicts to resolve

@willguv willguv moved this to In Progress - Core team in 2026 Priorities Sep 11, 2025
@finnlewis
Copy link
Member

Testing locally and yes, the publication outline is a problem.

On the control site, I can see this in the sidebar:

image

On the microsite, I cannot.

So something group permission related I guess.

I will investigate further.

Also need to place the blocks for publication header and publication navigation.

@markconroy
Copy link
Member Author

Also need to place the blocks for publication header and publication navigation.

Blocks are now placed.

@finnlewis
Copy link
Member

Worth looking at:

Might be worth upgrading to recent version of book.

@finnlewis
Copy link
Member

@rupertj have you successfully used localgov_publications in microsites?

@rupertj
Copy link
Member

rupertj commented Sep 23, 2025

I've yet to try it, TBH.

I don't think placing the blocks in this module is the right thing to do. Publications already tries to place the blocks using the block installer. If that's not happening on microsites, it'd be worth figuring out why. We could also place it the blocks in all the active themes for all the microsites.

@AWearring
Copy link
Contributor

I've just tested this on my local build and I get the Publication block
image

@AWearring
Copy link
Contributor

I can also confirm that child pages can be added to the parent publication and these pages aren't available to another domain on the same build

@finnlewis
Copy link
Member

I can also confirm that child pages can be added to the parent publication and these pages aren't available to another domain on the same build

What am I missing then?

I still do not see the book outline when adding a publication page on a microsite.

@finnlewis
Copy link
Member

Aha - it looks like these permissions are missing:
image

@finnlewis
Copy link
Member

Might just need to add permission's for the book module?

@markconroy
Copy link
Member Author

@finnlewis Wanna give this another spin?

@rupertj
Copy link
Member

rupertj commented Oct 2, 2025

The issue stalled a bit, but the plan is to stop publications granting "administer book outlines". See localgovdrupal/localgov_publications#83.

@rupertj
Copy link
Member

rupertj commented Oct 2, 2025

It also looks like there's some unrelated permissions in there. I don't think the ones that mention "group_term:localgov_topic" are anything to do with publications.

@markconroy
Copy link
Member Author

Topic permissions have been removed now.

@rupertj
Copy link
Member

rupertj commented Oct 3, 2025

Then for the blocks, I'm pretty sure that if you add localgov_microsites_base into this array here https://github.com/localgovdrupal/localgov_core/blob/2.x/src/Service/DefaultBlockInstaller.php#L63 you can get rid of the duplicated block config.

That won't work for microsites that have their own theme and block configuration, but then the way this PR currently does it won't either. We could make that happen in localgov_core though.

@rupertj
Copy link
Member

rupertj commented Oct 3, 2025

I'm also thinking that we could get rid of the whole concept of these submodules that integrate another module with microsites pretty easily by moving the microsites permissions hook to the module being supported and making the group relationship config optional, with a dependency on localgov_microsites_group, but that's probably out of scope for this PR. (Unless we want publications to be the guinea pig for that...)

@markconroy
Copy link
Member Author

markconroy commented Oct 6, 2025

Thanks @rupertj you were right about adding localgov_micriotes_base to the array in localgov_core.

Here's the related PR for LocalGov Core: localgovdrupal/localgov_core#324

@finnlewis
Copy link
Member

Testing this again to see where we're at.

Any recent updates @markconroy @rupertj @tonypaulbarker ?

@finnlewis
Copy link
Member

This does seem to work well now :)

The publications (book) fields show in the sidebar for a trusted editor user on a microsite.

  1. Fresh install of localgov_microsites
  2. enable localgov_microsites_publications
  3. create controller user
  4. log in as controller user
  5. create two microsites and a site admin with trusted editor role
  6. log into microsite 1 as the site admin
  7. create publication pages
  8. confirm I can create new publication outline
  9. confirm I can add more pages to the publication
  10. confirm these are not available on microsite 2

@rupertj @markconroy I do see "Breadcrumbs" listed in the "On this page" navigation. Is that a known issue?

image

@rupertj
Copy link
Member

rupertj commented Oct 22, 2025

It's new to me. Is there a hidden heading with text "Breadcrumbs" in the source?

@rupertj
Copy link
Member

rupertj commented Oct 22, 2025

It's doing that because localgov_microsites_base has the breadcrumbs block hardcoded into the node-full template.

@finnlewis
Copy link
Member

On the breadcrumb issue, sounds like this is related so we can pick it up there and resolve localgovdrupal/localgov_microsites_base#338

@finnlewis
Copy link
Member

Just chatting with @tonypaulbarker and we're happy to merge this and fix the breadcrumbs issue on localgovdrupal/localgov_microsites_base#338

Thanks @markconroy @rupertj and @AWearring :)

@finnlewis finnlewis merged commit 534992b into 4.x Oct 23, 2025
15 of 16 checks passed
@github-project-automation github-project-automation bot moved this from In Progress - Core team to Done in 2026 Priorities Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add Publications to microsites

5 participants