Make WordPress Core

Opened 19 months ago

Closed 19 months ago

Last modified 19 months ago

#57819 closed defect (bug) (fixed)

Fix Appearance > Template Parts URL

Reported by: mamaduka's profile Mamaduka Owned by: hellofromtonya's profile hellofromTonya
Milestone: 6.2 Priority: normal
Severity: normal Version:
Component: Editor Keywords: gutenberg-merge has-patch has-testing-info commit
Focuses: Cc:

Description

Due to recent changes to Site Editor's client-side routing, the Appearance > Template Parts URL requires an extra argument to load the page correctly.

This a ticket for syncing the fix with Core: https://github.com/WordPress/gutenberg/pull/48343.

Testing instructions

  1. Activate a theme that enables block-based template parts - https://github.com/Mamaduka/block-fragments.
  2. Visit the new Appearance > Template Parts menu.
  3. Confirm the list page is loaded correctly.

The flow is now also covered by e2e tests in the Gutenberg plugin repo.

Attachments (2)

trac57819-reproduce-bug.png (52.9 KB) - added by hellofromTonya 19 months ago.
Test Report: Can reproduce the issue (before applying PR 4142)
trac57819-after-applying-pr-4142.png (102.9 KB) - added by hellofromTonya 19 months ago.
Test Report: PR 4142 resolves the issue

Download all attachments as: .zip

Change History (8)

#2 @hellofromTonya
19 months ago

  • Owner set to hellofromTonya
  • Status changed from new to reviewing

Currently reviewing for commit ahead of Beta 4 today.

#3 @hellofromTonya
19 months ago

  • Keywords has-testing-info added

Testing Instructions

These steps define how to reproduce the issue, and indicate the expected behavior.

Steps to Reproduce

  1. Install the block-fragments theme (i.e. enables block-based template parts within a non-block theme) https://github.com/Mamaduka/block-fragments.
  2. Activate the theme.
  3. Navigate to Appearance > Template Parts menu.
  4. 🐞 Bug occurs.

Expected Results

When testing a patch to validate it works as expected:

  • ✅ The Site Editor should show All template parts in the menu sidebar and a list of template parts.

When reproducing a bug:

  • ❌ The Site Editor shows the Design menu sidebar with an empty content area.

@hellofromTonya
19 months ago

Test Report: Can reproduce the issue (before applying PR 4142)

@hellofromTonya
19 months ago

Test Report: PR 4142 resolves the issue

#4 @hellofromTonya
19 months ago

  • Keywords commit added

Test Report

Patch tested: https://github.com/WordPress/wordpress-develop/pull/4142/

Environment

  • OS: macOS
  • Localhost: wp-env (Docker)
  • WordPress: trunk
  • Browser: Firefox, Chrome, Edge
  • Theme: Block Fragments
  • Plugins: none

Actual Results

When reproducing a bug/defect:

  • ❌ Can reproduce the reported issue.

When testing the bugfix patch:

  • ✅ The patch resolves the issue.

#5 @hellofromTonya
19 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 55435:

Site Editor: Add 'path' query arg to Appearance > Template Parts menu.

To display a list of block-based template parts for classic themes, this changeset adds a path query arg to the Appearance > Template Parts menu URL. This change is necessary due to recent changes to Site Editor's client-side routing.

Reference:

Follow-up to [55392], [54176].

Props mamaduka, audrasjb, fabiankaegy, hellofromTonya, kevin940726, mukesh27, youknowriad.
Fixes #57819.

Note: See TracTickets for help on using tickets.