Make WordPress Core

Opened 3 years ago

Closed 6 weeks ago

#16477 closed defect (bug) (fixed)

"View post" link should not change when sample permalink changes

Reported by: solarissmoke Owned by: johnbillion
Milestone: 3.9 Priority: normal
Severity: normal Version: 3.0
Component: Editor Keywords: has-patch
Focuses: Cc:


To reproduce:

  • Go to edit a post
  • Change the permalink
  • Click on "View post" and you get a 404 because the href has been changed to the new sample permalink but the post hasn't been updated yet

The "View post" link should always point to the permalink of the currently saved post.

Attachments (2)

16477.diff (2.3 KB) - added by solarissmoke 3 years ago.
16477-2.patch (883 bytes) - added by aubreypwd 2 months ago.
View post to open in new window and always open current post content (use preview to preview what's in editor)

Download all attachments as: .zip

Change History (12)

solarissmoke3 years ago

comment:1 solarissmoke3 years ago

  • Keywords has-patch dev-feedback added

I think there may be some usability improvements that could be made here - see #6925.

For example custom fields are updated via AJAX without having to save the whole post. But permalinks aren't. Maybe we ought to be more consistent.

comment:2 nacin3 years ago

  • Version changed from 3.1 to 3.0

I imagine this isn't a regression, so moving off the 3.1 version.

comment:3 jane2 years ago

Agreed that a) View Post should go to current saved, and b) we should do an inventory of ajax vs on-save stuff and try to get things more consistent.

aubreypwd2 months ago

View post to open in new window and always open current post content (use preview to preview what's in editor)

comment:5 aubreypwd2 months ago

Actually, I need to update this patch to allow the 'View Post' button to open in same window when it's been published.

comment:6 aubreypwd8 weeks ago

After coding an update, I still think the View Post button should open a new window when the editor is present, even if published. I don't think we should loose the editor when we want to view the post.

comment:7 ircbot8 weeks ago

This ticket was mentioned in IRC in #wordpress-dev by aubreypwd. View the logs.

comment:8 SergeyBiryukov7 weeks ago

  • Milestone changed from Awaiting Review to 3.9

comment:9 johnbillion6 weeks ago

  • Keywords dev-feedback removed
  • Owner set to johnbillion
  • Status changed from new to accepted

The 'View Post' link shouldn't open a new window. If you've made changes to the content, you'll be prompted before leaving the page anyway.

Also of note is that this 'View Post' button sends the user to a 404 on draft posts. aubreypwd's patch also fixes that issue. Couldn't find an existing ticket for that.

comment:10 johnbillion6 weeks ago

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

In 27508:

Correct the "View Post" button link when changing a post slug. Fixes #16477. Props aubreypwd.

Note: See TracTickets for help on using tickets.