Backward compatibility issue

123 views
Skip to first unread message

Elin Waring

unread,
Dec 26, 2011, 12:56:02 PM12/26/11
to joomla-de...@googlegroups.com
Hi,

It looks like we are seeing some breakage of third party extensions using non standard naming. 



also this commen
 
All I think related to

This isn't documented in the potential b/c issues page in the wiki but obviously could be. Still I wonder if it is appropriate to break b/c on this at this point rather than at 12.1 or if you think the CMS should fix this in its libraries or if there is a code solution. The problem I see with the code solution it that it is hard predict what non standard patterns extensions are using. 

Elin

Elin.

Chraneco

unread,
Dec 27, 2011, 9:43:06 AM12/27/11
to Joomla! Platform Development
Hi!

I'm not sure whether the behavior I mentioned in
https://groups.google.com/forum/#!searchin/joomla-dev-general/gettable/joomla-dev-general/OzBYfziA30E/URJu0MTyONwJ
is intended or not.

If it's not intended (which would be my opinion on this) I think the
commit of
https://github.com/joomla/joomla-platform/pull/93
should be reverted for now and redone after the problem above was
discussed (and fixed).

This way backward compatibility wouldn't be broken now, too.

Regards
Chraneco

Elin Waring

unread,
Dec 27, 2011, 4:53:41 PM12/27/11
to joomla-de...@googlegroups.com
Should all these b/c issues to just go into the platform issue tracker? (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?

Elin 

Andrew Eddie

unread,
Dec 28, 2011, 6:30:26 AM12/28/11
to joomla-de...@googlegroups.com
This seems to be related to pull 93 as Chraneco suggests.

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

Sam Moffatt

unread,
Dec 28, 2011, 11:56:58 AM12/28/11
to joomla-de...@googlegroups.com
I think it's quite simple.

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

Chraneco

unread,
Dec 31, 2011, 6:45:03 AM12/31/11
to Joomla! Platform Development
Hi,

your example with the bakery shows exactly what happens in our
component (and I think in many others, too).

So I would also say that the commit of this pull request should be
reverted for now.

At a later point when breaking backwards compatibility is allowed it
should be discussed again taking into account my notes at

https://groups.google.com/forum/#!searchin/joomla-dev-general/gettable/joomla-dev-general/OzBYfziA30E/URJu0MTyONwJ

Regards
Chraneco

Sam Moffatt

unread,
Jan 1, 2012, 1:40:06 AM1/1/12
to joomla-de...@googlegroups.com

rolandd

unread,
Jan 1, 2012, 3:15:24 PM1/1/12
to joomla-de...@googlegroups.com
Hey guys,

I ran into the same issue on the J2.5 beta 1 release. Is this something we can expect to be fixed in beta 2 or need to wait till the final?

Elin Waring

unread,
Jan 2, 2012, 1:08:25 AM1/2/12
to joomla-de...@googlegroups.com
I assume that we'll update to the current platform before another beta. 

Elin
Reply all
Reply to author
Forward
0 new messages