Skip to content

Block editor alignment controls disabled when Query block and Post Content block exist in same template #70856

Closed

Description

@onetrev

Description

When a template contains both a Query block and a Post Content block (regardless of nesting structure), the block editor incorrectly applies width constraints that disable alignment controls (alignwide/alignfull) for ALL Group blocks in the template. This appears to be related to the "abstracted view" logic that incorrectly triggers when detecting template complexity, but the constraint affects unrelated blocks beyond just the Query/Post Content combination.

Expected Behavior:

  • Group blocks should retain their alignment controls
  • Template complexity should not affect individual block alignment options
  • Editor should display proper wide/full alignment previews

Actual Behavior:

  • All Group block alignment controls disappear
  • Editor applies arbitrary width constraints
  • Frontend renders correctly, issue is editor-only

Workarounds:

  • Enable "Show template" toggle in editor (as mentioned in this issue, but losing widths controls if you don't does not seem an acceptable UX and was not mentioned in that issue).
  • Move Query or Post Content blocks to separate template parts
  • Use template parts to separate the conflicting blocks

Step-by-step reproduction instructions

Steps to Reproduce:

  1. Create or edit a template (e.g., front-page.html) in the site editor
  2. Add both a Query block and a Post Content block to the template
  3. Try to select alignment options for any Group block in the template
  4. Notice alignment controls are missing/disabled and max-width constraint (~620-850px) is applied

Screenshots, screen recording, code snippet

No response

Environment info

  • WordPress: 6.8.2
  • Gutenberg NOT installed.
  • Theme: Twenty Twenty-Five

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Activity

  1. added
    [Type] BugAn existing feature does not function as intended
    on Jul 23, 2025
  2. SirLouen commented on Jul 31, 2025

    @SirLouen
    Member

    Reproduction Report

    Description

    ❌ This report can't validate that the issue can be reproduced.

    Environment

    • WordPress: 6.9-alpha-60093-src
    • PHP: 8.2.29
    • Server: Apache/2.4.62 (Debian)
    • Database: mysqli (Server: 11.8.2-MariaDB-ubu2404 / Client: mysqlnd 8.2.29)
    • Browser: Chrome 138.0.0.0
    • OS: Windows 10/11
    • Theme: Twenty Twenty-Four 1.3
    • MU Plugins: None activated
    • Plugins:
      • Gutenberg 21.3.0
      • Test Reports 1.2.0

    Testing Instructions

    • Following the exact instructions in the OP.
    • Check Screencasts below to confirm if things are being done correctly

    Actual Results

    1. ❌ Error condition is not ocurring

    Additional Notes

    • Adding Query and Content blocks doesn't make a difference compared to adding just Content block. But I can't really see the alignment issue or the max width limitation.
    • @onetrev can you provide more precise information on how to reproduce this? Please check the screencasts and see what I could be missing.
    • Given that this is report is pretty new, I'm going to be adding for now the Needs More Info tag.

    Supplemental Artifacts

  3. added and removed
    Needs TestingNeeds further testing to be confirmed.
    on Jul 31, 2025
  4. added theissue type on Jul 31, 2025
  5. onetrev commented on Aug 1, 2025

    @onetrev
    Author

    Hey @SirLouen thanks for reviewing this, so sorry to cause confusion and time loss -- my bug report missed a KEY detail. Probably because by the time I figured this all out I was stressed. :)

    The reason you couldn't replicate this is because this happens the Block Editor not the Template Editor. As such, one workaround is to Enable "Show template" toggle. Not ideal. Hopefully that clears it up?

  6. github-actions commented on Aug 19, 2025

    @github-actions

    Help us move this issue forward. This issue is being marked stale since it has no activity after 15 days of requesting more information. Please add info requested so we can help move the issue forward. Note: The triage policy is to close stale issues that need more info and no response after 2 weeks.

  7. added
    [Status] StaleGives the original author opportunity to update before closing. Can be reopened as needed.
    on Aug 19, 2025
  8. onetrev commented on Aug 19, 2025

    @onetrev
    Author

    I added additional information, but haven't heard anything in reply. This should not be marked "Stale" yet. Happy to provide any more details if needed...

  9. added
    Needs TestingNeeds further testing to be confirmed.
    and removed
    [Status] StaleGives the original author opportunity to update before closing. Can be reopened as needed.
    on Aug 19, 2025
  10. shrivastavanolo commented on Sep 3, 2025

    @shrivastavanolo
    Contributor

    Tried reproducing this bug using the additional info provided

    Reproduction Report

    Description

    ❌ This report can't validate that the issue can be reproduced.

    Environment

    • WordPress: 6.9-alpha-60500
    • PHP: 8.2.29
    • Server: Apache/2.4.65 (Debian)
    • Database: mysqli (Server: 11.8.3-MariaDB-ubu2404 / Client: mysqlnd 8.2.29)
    • Browser: Chrome 139.0.0.0
    • OS: macOS
    • Theme: Twenty Twenty-Five 1.3
    • MU Plugins: None activated
    • Plugins:
      • Gutenberg 21.5.0
      • Test Reports 1.2.0

    Steps to reproduce

    1. Set up the template first (in Site Editor):

      • Go to Appearance → Editor → Templates
      • Edit a template (like pages)
      • Add both a Query block and a Post Content block to the template
      • Save the template
    2. Reproduce the bug (in Block Editor):

      • Go to Posts/Pages → Add New (or edit existing)
      • Make sure you're using the template you just modified
      • Add a Group block to your post/page content
      • Try to select the Group block and look for alignment options

    Actual Results

    1. ❌ Error condition does not occur (not reproduced).

    Additional Notes

    • Please let me know if I'm missing any steps

    Supplemental Artifacts

    Screen.Recording.2025-09-03.at.2.34.47.PM.mov
  11. SirLouen commented on Sep 3, 2025

    @SirLouen
    Member

    Hey @shrivastavanolo thanks for the test
    But I think you used the testing information in the OP post.
    It seems that @onetrev suggested in this comment, that the test shall be done in the block editor, not in the template editor.

  12. github-actions commented on Oct 4, 2025

    @github-actions

    Hi,
    This issue has gone 30 days without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest versions, you can help the project by responding to confirm the problem and by providing any updated reproduction steps.
    Thanks for helping out.

  13. added
    [Status] StaleGives the original author opportunity to update before closing. Can be reopened as needed.
    on Oct 4, 2025
  14. onetrev commented on Oct 12, 2025

    @onetrev
    Author

    Well, oddly I can no longer replicate this -- just when I finally had the chance to make a video of it. So I will close it for now, and re-open if it occurs again and I can video it. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TestingNeeds further testing to be confirmed.[Status] StaleGives the original author opportunity to update before closing. Can be reopened as needed.[Type] BugAn existing feature does not function as intended

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions