WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#29019 closed defect (bug) (invalid)

List_Table classes can be redeclared when code is cached

Reported by: dwigton Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.9.1
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

The error is "require(): Cannot redeclare class wp_comments_list_table in /wp-admin/includes/list-table.php on line 42"

This error does not occur on the first page load after an apache restart, but happens on every subsequent page load. (this implies some sort of caching)

Apc is installed on the server for other sites but is not enabled for wordpress.

Server is CentOS 6. Running php 5.3.3 and Apache 2.2.15

I installed the latest version of wordpress and changed the names of the plugins directory, in order to disable them, and changed the theme to twenty-twelve and the issue persisted.

I am not sure if the "bug" is in the way _get_list_table includes class files or in some weird interaction with object caching.

Attachments (2)

check_for_class.29019.diff (796 bytes) - added by dwigton 6 years ago.
Proposed robustness fix.
check_for_class.1.29019.diff (772 bytes) - added by dwigton 6 years ago.
The previous file did not use tab indenting and missed a curly brace

Download all attachments as: .zip

Change History (7)

#1 follow-up: @nacin
6 years ago

This sounds like opcode cache issues.

@dwigton
6 years ago

Proposed robustness fix.

#2 in reply to: ↑ 1 @dwigton
6 years ago

Replying to nacin:

This sounds like opcode cache issues.

I agree but am still working on nailing down why. opcode cache should not behave in this way, But I do think that wordpress could be hardened against a whole class of similar issues with the patch I am including. Just adding two lines to check if the class already exists. require_once should take care of it, but in this case does not.

@dwigton
6 years ago

The previous file did not use tab indenting and missed a curly brace

#3 @dwigton
6 years ago

  • Keywords has-patch added

#4 @mattheu
5 years ago

  • Resolution set to invalid
  • Status changed from new to closed

Reviewed this at the WordCamp Europe contributor day with @dashaluna and @nacin - we think this should be closed. This definitely sounds like opcode cache issues and making this change doesn't fix the real problem which may also cause similar issues elsewhere.

#5 @DrewAPicture
5 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.