Make WordPress Core

Opened 20 years ago

Closed 19 years ago

#4006 closed defect (bug) (fixed)

wp_die stylesheet path needs to be absolute

Reported by: filosofo Owned by:
Priority: low Milestone: 2.3
Component: Administration Version: 2.2
Severity: normal Keywords: wp_die stylesheet is_wp_error has-patch
Cc: Focuses:

Description

I have a plugin that calls wp_die, but not in the WP top-level directory, so the relative links to the error message stylesheet don't work.

The attached patch makes the path to the stylesheet absolute.

Attachments (3)

trunk.diff​ (580 bytes ) - added by filosofo 20 years ago.
trunk.2.diff​ (1018 bytes ) - added by filosofo 20 years ago.
4006.diff​ (656 bytes ) - added by Nazgul 19 years ago.

Download all attachments as: .zip

Change History (10)

#1 @foolswisdom
20 years ago

  • Milestone 2.3 → 2.2
  • Version → 2.2

#2 follow-up: @Sewar
20 years ago

This way wp_die won't work if WP didn't installed yet, see #3138.

But if #4003 committed, this will be usable.

#3 @foolswisdom
20 years ago

  • Milestone 2.2 → 2.3

#4 in reply to: ↑ 2 @filosofo
20 years ago

  • Keywords is_wp_error added

Replying to Sewar:

This way wp_die won't work if WP didn't installed yet, see #3138.

Oops. I wondered why that existing code was there.

The second patch works even without wp installed, in the top-level directory and in wp-admin.

I also added a fix you can see in the upper half of the patch for a problematic call to is_wp_error if you try to run /wp-admin/install.php

#5 @Sewar
20 years ago

Great, if this code moved to get_bloginfo('wpurl') it will be possible for other parts of WP to use it also.

Thanks a lot for fixing these bugs.

#6 @Nazgul
19 years ago

New patch which tries multiple ways of determining the admin_dir if the previous one fails.

#7 @markjaquith
19 years ago

  • Resolution → fixed
  • Status new → closed

(In [6057]) Try more ways of getting wp-admin URL in wp_die(). props Nazgul. fixes #4006

Note: See TracTickets for help on using tickets.