https://github.com/joomla/joomla-platform/pull/93/files
BC was taken into account but obviously does not go far enough. Where
developers are have problems we need to have the following reported:
1. The locations of the table files.
2. The names of the table files.
3. The name of the table class in the table files.
4. The name of any related models, controllers and, of course, the component.
If code is in a public repo, links to the table and model files would
also be appreciated.
With that information we can probably determine a usage pattern and
devise a change to the unit tests accordingly.
On 28 December 2011 07:53, Elin Waring <elin....@gmail.com> wrote:
> Should all these b/c issues to just go into the platform issue tracker?
If verified by the authors of extensions, yes. If people are finding
these things and have not reported them back to the
authors/maintainers, no.
> (There are now at least 3 being discussed on various lists.)
> Should we just do pull requests for status quo ante while waiting for scope
> discussions to take place and tests to be written?
No, because you could introduce further instability by doing so.
Regards,
Andrew Eddie
http://learn.theartofjoomla.com - training videos for Joomla 1.7 developers
Class:
class TablePies extends JTable {}
Then in a model:
class BakeryModelPies {
...
$pieTable = $this->getTable('Pies');
...
}
Before pull 93 this works fine, after it then we start looking for
"PiesTablePies" first and then look for TablePies. The reason for this
is that JModel::getName() (which is used when a prefix isn't
specified) returns the name of the model (Pies) not the name of the
component (Bakery). The pull request doesn't actually do what is
intended given the description.
Further we call JTable::getInstance() with a class that doesn't exist
which (PiesTablePies, or even BakeryTablePies when using TablePies)
which looking through the code will probably result in a warning as
well if the class hasn't been loaded (probably a
JLIB_DATABASE_ERROR_CLASS_NOT_FOUND_IN_FILE if the file loads).
Given it doesn't do what the pull request suggests it should and could
generate spurious warnings, my suggestion would be that we revert that
pull request.
Cheers,
Sam Moffatt
http://pasamio.id.au
Cheers,
Sam Moffatt
http://pasamio.id.au