Make WordPress Core

Opened 22 months ago

#62761 new defect (bug)

Database error logged on re-install with custom LOGGED_IN_COOKIE name

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

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 22 months ago.
62761.diff​ (457 bytes ) - added by MattyRob 22 months ago.

Download all attachments as: .zip

Change History (2)

@MattyRob
22 months ago

Note: See TracTickets for help on using tickets.