Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#4006 closed defect (bug) (fixed)

wp_die stylesheet path needs to be absolute

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

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 17 years ago.
trunk.2.diff (1018 bytes) - added by filosofo 17 years ago.
4006.diff (656 bytes) - added by Nazgul 17 years ago.

Download all attachments as: .zip

Change History (10)

@filosofo
17 years ago

#1 @foolswisdom
17 years ago

  • Milestone changed from 2.3 to 2.2
  • Version set to 2.2

#2 follow-up: @Sewar
17 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
17 years ago

  • Milestone changed from 2.2 to 2.3

@filosofo
17 years ago

#4 in reply to: ↑ 2 @filosofo
17 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
17 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.

@Nazgul
17 years ago

#6 @Nazgul
17 years ago

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

#7 @markjaquith
17 years ago

  • Resolution set to fixed
  • Status changed from new to 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.