Skip to content

[4.0] Resolve B/C break in BaseDatabaseModel #24559

@wilsonge

Description

@wilsonge

The LeagcyModelLoaderTrait is having unexpected behaviour in J4. The static variable used to load the classes is unfortunately initialised per class. This means changing BaseDatabaseModel::getInstance()/JModelLegacy::getInstance() to BaseModel::getInstance() - this is not an intended b/c break. Options are:

  • Move the trait to BaseDatabaseModel from BaseModel
  • Rework the static variable to one in the trait. However this will allow 3rd parties to override it which isn't intended.

This has been an issue I've had to manually patch in the action logs and privacy components (e.g. 494a567), so is definitely a real thing for components migrating from J3 to J4

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