Make WordPress Core

Opened 7 months ago

Last modified 7 weeks ago

#46686 new defect (bug)

Customize Close Button Not Updating URL

Reported by: JarretC Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Customize Keywords: has-patch
Focuses: Cc:
PR Number:


Currently the close button at the top left of the Customize menu uses whatever URL you visited the Customizer from. If you activate a theme that has documentation, view that page, then go to Appearance->Customize and change to a new theme the exit button still points to the old theme documentation.

Upon trying to exit out, you're redirected to a 'Sorry, you are not allowed to access this page.' message.

To replicate...

  1. Download Tonic theme ( https://wordpress.org/themes/tonic/ ) or any other that has custom documentation
  2. Visit the theme documentation ( /wp-admin/themes.php?page=bavotasan_documentation )
  3. Open up Appearance->Customize from the documentation page
  4. Activate any other theme
  5. Attempt to close out of the Customizer using the X at the top left, it will still point to /wp-admin/themes.php?page=bavotasan_documentation even though the theme is no longer active

Attachments (1)

46686.diff (703 bytes) - added by Jean-David 7 weeks ago.

Download all attachments as: .zip

Change History (7)

#1 @dlh
7 months ago

Seems like this would be an issue with any theme-generated admin screen (or plugin-generated — see #40451), not just documentation screens.

@JarretC Any thoughts about where the "close" link should go after activating the other theme?

#2 @JarretC
7 months ago

Correct, any screen specific to the previously activated theme, I had just run across the issue messing around with that theme so used it as my example.

In regards to the redirect, I would think that /wp-admin/themes.php would be suitable.

#3 @SergeyBiryukov
2 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

#4 @Jean-David
8 weeks ago

Is this even possible to know what is an accepted URL in this case ?
A theme can add query parameters from anywhere, so what allows us to distinguish between core query parameters and custom made ones ?
wp-admin/themes.php?page=bavotasan_documentation is custom but wp-admin/edit.php?post_type=page is not. In my example each URL has query parameters in it.

@SergeyBiryukov do you think it's possible ? Could you share your experience on this ?

#5 @JarretC
8 weeks ago

@Jean-David not sure I follow about the query parameters.... once the Close button is clicked on, it should just redirect back to /wp-admin/themes.php or something theme related whether the current URL has a query parameter or not

7 weeks ago

#6 @Jean-David
7 weeks ago

  • Keywords has-patch added; needs-patch removed

I'm not sure if it's a real problem, it's been this behaviour since 3.0. Anyway I tried to make a patch, we'll see.

Last edited 7 weeks ago by Jean-David (previous) (diff)
Note: See TracTickets for help on using tickets.