Make WordPress Core

Opened 12 years ago

Closed 10 years ago

#19268 closed defect (bug) (fixed)

Even if .htaccess isn't writable, WP shouldn't prompt if there are no changes.

Reported by: markjaquith's profile markjaquith Owned by: nacin's profile nacin
Milestone: 3.9 Priority: normal
Severity: normal Version:
Component: Permalinks Keywords: has-patch commit
Focuses: Cc:


When you visit the permalinks settings screen, and .htaccess isn't writable, it prompts you to manually update. But it does that even if the current rules it is suggesting are already present. It should only prompt if the rules it is suggesting are different from what you have.

Attachments (5)

htaccesscheck.diff (1.9 KB) - added by ldebrouwer 12 years ago.
htaccesscheckv2.diff (2.7 KB) - added by ldebrouwer 12 years ago.
htaccesscheck_extractmarkers.diff (2.7 KB) - added by ldebrouwer 12 years ago.
19268.2.diff (25.1 KB) - added by MikeHansenMe 10 years ago.
Refreshed and clean up
19628.3.diff (2.1 KB) - added by SergeyBiryukov 10 years ago.

Download all attachments as: .zip

Change History (13)

#1 @ldebrouwer
12 years ago

  • Keywords has-patch reporter-feedback needs-testing added

Something like I've attached above? I have no clue if it would work for IIS in the same way ( depends on the structure and content of the web.config file I guess ). And maybe it should be moved to a separate function in the wp_rewrite class, but I feel like that should be discussed first.

#3 @ldebrouwer
12 years ago

Attached an updated version that stays closer to what Mark requested.

#4 @ldebrouwer
12 years ago

I also attached a version using extract_from_markers as Sergey suggested, however this requires exploding the newly generated rewrite rules which could be unfavorable.

#5 @ldebrouwer
12 years ago

Another possibility, for the extract_from_markers version, could be to use array_filter to filter out the empty line that is in there by default, however that could lead to a possible false positive for one of the lines.

#6 @nacin
10 years ago

  • Component changed from General to Permalinks
  • Milestone changed from Future Release to 3.9

Would be cool to clean this up and commit it.

10 years ago

Refreshed and clean up

#7 @SergeyBiryukov
10 years ago

  • Keywords commit added; reporter-feedback needs-testing removed

19628.3.diff should be good to go.

#8 @nacin
10 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 27549:

Permalink Settings: Don't show "update your .htaccess now" if nothing needs to change.

props ldebrouwer, MikeHansenMe.
fixes #19268.

Note: See TracTickets for help on using tickets.