Make WordPress Core

Opened 17 years ago

Closed 16 years ago

#6478 closed defect (bug) (fixed)

index.php file in the plugins folder makes the Dashboard fail

Reported by: networker's profile networker Owned by:
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.7
Component: General Keywords: has-patch commit
Focuses: Cc:

Description

The "Dashboard" tab in WordPress 2.5 at the far upper left contains the following URL:
http://www.example.com/wp-admin/admin.php?page=index.php

When this tab is clicked it, all the Dashboard widgets disappear in Firefox (2.0.0.12). I'm left with a plain screen of links.

When the page is pulled up with the following URL: it works fine with all the Dashboard widget functionality.
http://www.example.com/wp-admin/

Attachments (1)

9478-real-fix.diff (2.0 KB) - added by Denis-de-Bernardy 16 years ago.
actually fix this and optimize

Download all attachments as: .zip

Change History (18)

#1 @ninjaWR
17 years ago

My dashboard link using r7579 points to /wp-admin/index.php.

When I try going to the link you gave, I get "Cannot load index.php." in Opera 9.26, Firefox 2.0.0.13 and 2.0.0.12. IE7 gives me its generic "Cannot be displyed" error page

#2 @lloydbudd
17 years ago

  • Milestone set to 2.5.1
  • Version set to 2.5

#3 @ffemtcj
17 years ago

Works for me on FF & IE 7 using r7583

#4 @Viper007Bond
16 years ago

Works for me as well.

Disable all plugins and try again.

#5 @Denis-de-Bernardy
16 years ago

I'm still getting the issue with today's 2.5 branch. no plugins, default theme.

#6 @ryan
16 years ago

  • Milestone changed from 2.5.2 to 2.9

Milestone 2.5.2 deleted

#7 @mrmist
16 years ago

  • Milestone 2.9 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Re-open if still current in 2.7 and not a local config issue.

#8 @Denis-de-Bernardy
16 years ago

  • Summary changed from Dashboard widgets disappear after clicking "Dashboard" link to index.php file in the plugins folder makes the Dashboard fail

I nailed this down since. It was due to the presence of an index.php file in the plugins folder, and the bug is, I suspect, the same as this one:

http://trac.wordpress.org/ticket/6422

#9 @Denis-de-Bernardy
16 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened
  • Version changed from 2.5 to 2.7

still current in wp 2.7 with an index.php file in the plugins folder

#10 @DD32
16 years ago

  • Keywords dev-feedback added
  • Milestone set to 2.9

Its quite easy to "fix" this, Simply removing all references to file_exists() in wp-admin/menu-header.php will work.

However, Doing so, Will remove the ability for plugins to have menu items which are linked to files which are dumped into the wp-admin folder (There are a number of cobbled together items where people have been directed to put files in wp-content AND wp-admin), It'll also remove the ability for overriding admin pages via a .php file, It'd still be possible to hook via a action tho.
It might also remove the menu for any old plugins which add their menu item manually via array-fu

The menu code seems to need a clean up to me, I'd love to be able to specify the exact URL for a menu item when adding (ie. wp-admin/posts.php/test/example or post.php?example=url), as well as a few other items.. But staying backwards compatible is hard.

Setting to 2.9 due to no patch. Can be pulled into 2.8 if/when theres a patch, Unless its decided to leave it as-is to retain functionality. dev-feedback to see if menu should be changed, or existing functionality retained.

#11 @ryan
16 years ago

  • Milestone changed from 2.9 to 2.7.1

#12 @ryan
16 years ago

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

(In [10510]) Ignore index.php in plugins dir when creating menus. fixes #6478

#13 @ryan
16 years ago

(In [10511]) Ignore index.php in plugins dir when creating menus. fixes #6478 for 2.7

#14 @ryan
16 years ago

(In [10516]) Ignore index.php in plugins dir when creating menus. fixes #6478

#15 @ryan
16 years ago

(In [10517]) Ignore index.php in plugins dir when creating menus. fixes #6478 for 2.7

@Denis-de-Bernardy
16 years ago

actually fix this and optimize

#16 @Denis-de-Bernardy
16 years ago

  • Keywords has-patch commit added; dev-feedback removed
  • Milestone changed from 2.7.1 to 2.8
  • Resolution fixed deleted
  • Status changed from closed to reopened

applied patches don't work. attached patch fixes the issue, and places the check before the calls to file_exists to avoid uneeded filesystem calls.

#17 @ryan
16 years ago

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

(In [10890]) Ignore index.php in plugins dir when creating menus. Props Denis-de-Bernardy. fixes #6478

Note: See TracTickets for help on using tickets.