- Issue created by @bradallenfisher
- First commit to issue fork.
- π³πΏNew Zealand danielveza Brisbane, AU
DanielVeza β changed the visibility of the branch 3423920-custom-blocks-with to hidden.
- Merge request !7361[#3423920] - Ensure the front end theme is used when using Layout Builder with block_content β (Open) created by danielveza
- Status changed to Needs review
8 months ago 11:39pm 7 April 2024 - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Left some comments on the MR - thanks!
- π³πΏNew Zealand danielveza Brisbane, AU
Addressed the feedback. I've moved the new functionality to the Layout Builder module.
I was going to wrap the new code in a
moduleExists('block_content')
, but since Layout Builder is already getting a dependency on block_content in π Hidden dependency on block_content in layout_builder Needs work and adding this route doesn't cause any hard without the block_content module I think it's fine to keep in.The main reason why I went against this approach is that it means we would need to add the
ModuleHandler
dependency toLayoutBuilderRoutes
, just to then deprecate and remove it after π Hidden dependency on block_content in layout_builder Needs work has been commited. - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
The main reason why I went against this approach is that it means we would need to add the ModuleHandler dependency to LayoutBuilderRoutes, just to then deprecate and remove it after
Makes sense - the presence of the route in the collection signals the module exist anyway right?
- π³πΏNew Zealand danielveza Brisbane, AU
Ah yes you're correct. We check if that route exists before we do anything. That esentially acts as a
moduleExists('block_content')
anyway :) - Status changed to Needs work
8 months ago 1:52pm 8 April 2024 - πΊπΈUnited States smustgrave
Seems @acbramley already did a review.
But landing on the ticket noticed the issue summary could use an update, would be helpful to use the standard issue template. UI changes before/after screenshots, proposed solution, etc.
- Status changed to Needs review
8 months ago 10:53pm 8 April 2024 - π³πΏNew Zealand danielveza Brisbane, AU
MR feedback addressed, IS updated.
Ready for review again
- Status changed to RTBC
8 months ago 11:06pm 8 April 2024 - π¦πΊAustralia acbramley
Changes look great, IS reads well. Tried to run the test only job but it is currently broken https://git.drupalcode.org/issue/drupal-3423920/-/jobs/1273985
I think this is good to go now regardless, small uber nit on the MR that could be applied on commit.
- Status changed to Needs work
8 months ago 6:36am 9 April 2024 - π¦πΊAustralia acbramley
Need to fix the test file and class name, I had run the test only job and it passed. Got very confused and posted in #gitlab thinking the job itself was broken. Thanks to @fjgarlin for seeing the name was invalid.
- Status changed to Needs review
8 months ago 10:17pm 9 April 2024 - π³πΏNew Zealand danielveza Brisbane, AU
π€¦ββοΈ Renamed the test file
- Status changed to RTBC
8 months ago 11:59pm 9 April 2024 - Status changed to Needs work
8 months ago 2:50pm 10 April 2024 - π¬π§United Kingdom alexpott πͺπΊπ
Should we be fixing this here or in \Drupal\layout_builder\Routing\LayoutBuilderRoutesTrait::buildLayoutRoutes() or in \Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage::buildRoutes()... like should we have a generic fix here for all entity types or something specific for content blocks?
For example: \Drupal\layout_builder\Plugin\SectionStorage\DefaultsSectionStorage::buildRoutes() does
$options['_admin_route'] = FALSE;
prior to callingLayoutBuilderRoutesTrait::buildLayoutRoutes()
- why is OverridesSectionStorage::buildRoutes() not doing the same? - π³πΏNew Zealand danielveza Brisbane, AU
I did have the thought while I was doing this that it was a little odd to be writing a specific override for one entity type.
I don't have the historical context on why
OverridesSectionStorage::buildRoutes
doesn't set _admin_route to FALSE, so I'm unsure if thats an oversight or a choice that was made.Either way, I've reworked the solution to disable the _admin_route in
OverridesSectionStorage::buildRoutes
and renamed the test to be more generic. - Status changed to Needs review
7 months ago 2:35am 12 April 2024 - Status changed to RTBC
7 months ago 6:02pm 17 April 2024 - πΊπΈUnited States smustgrave
Can confirm the issue following the steps in the issue summary
Applying the MR does resolve the issue of layout builder using admin themeScreenshots are near identical to the issue summary but here's a fresh set.
Before
After
- Status changed to Fixed
7 months ago 9:47am 24 April 2024 - π¬π§United Kingdom catch
This looks good to me, couldn't find anything to complain about.
Committed/pushed to 11.x and cherry-picked to 10.3.x, thanks!
Automatically closed - issue fixed for 2 weeks with no activity.