Skip to content

Table prefix (dbprefix) can't be set at install time #427

Closed

Description

@caseysoftware

Found on the dev-6.0.0 branch (local, at 9bd3a1e0) during the lib/ cleanup. It may be on master too: the same code is there.

The runtime honours $w2Pconfig['dbprefix'] (w2p_Database_Query, w2p_Core_BaseObject, w2p_Extensions_Permissions), but an installation can never get one:

  • install/install/dbcreds.php has no prefix field.
  • install/install/perform.php L13 reads $_POST['dbprefix'] but never puts it into the $w2Pconfig array it passes on.
  • w2p_System_UpgradeManager::createConfigString() replaces [DBPREFIX] with a hard-coded ''.
  • The migrations in install/sql/ create unprefixed tables.

So a prefix only appears if someone edits config.php by hand afterwards, and then every query points at tables that don't exist.

Fix: either support it end to end (form field, config string, and prefixing in the migration runner), or remove the half-implementation and document that prefixes are not supported.

Activity

  1. added a commit that references this issue on Oct 21, 2026
    7bb9e0b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions