Make WordPress Core

Opened 6 weeks ago

#62761 new defect (bug)

Database error logged on re-install with custom LOGGED_IN_COOKIE name

Reported by: mattyrob's profile MattyRob Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

There have been a couple of previous tickets in trac about similar issues:

https://core.trac.wordpress.org/ticket/34762
https://core.trac.wordpress.org/ticket/38498

And we have had a similar issue raised over on GitHub at ClassicPress.

https://github.com/ClassicPress/ClassicPress/pull/1699

To reproduce the issue I think the following steps should suffice:

1/ Create a new install and in the wp-config.php file use a custom name for LOGGED_IN_COOKIE:
define( 'LOGGED_IN_COOKIE', 'session_' . AUTH_KEY ); provided salts are defined first
2/ Ensure you are logged into this new site and retain session cookies in the browser.
3/ Drop all database tables
4/ Follow the reinstall steps to re-create the database and either see the error on screen or in debug.log files

[01-Jan-2025 14:34:13 UTC] WordPress database error Table 'wordpress.test_dev_users' doesn't exist for query SELECT * FROM test_dev_users WHERE user_login = 'admin'

Attachments (2)

Screenshot 2025-01-01 at 14.34.22.png (137.1 KB) - added by MattyRob 6 weeks ago.
62761.diff (457 bytes) - added by MattyRob 6 weeks ago.

Download all attachments as: .zip

Change History (2)

Note: See TracTickets for help on using tickets.