? Success

User tests: Successful: Unsuccessful:

avatar bassmanpaul
bassmanpaul
23 Oct 2014

The administrator category list view filters by extension, which allows 3rd party extensions to use the #__categories database table.

However the article list view does not filter by extension type. This means that 3rd party extensions using the #__content database table for their content items appear in Joomla's article list. The Front-End code does properly filter by extension which enforces why this is expected behaviour.

The fix I propose copies the exact filtering code used in the com_categories\models\categories.php model. Although I did notice that the categories model didn't filter the #__associations query in getListQuery(); by extension so I have also left this out when copying the logic across to the articles model.

avatar bassmanpaul bassmanpaul - open - 23 Oct 2014
avatar jissues-bot jissues-bot - change - 23 Oct 2014
Labels Added: ?
avatar Bakual
Bakual - comment - 23 Oct 2014

I still think you try to do wrong stuff with the #__content table. You should not store items from 3rd party extensions in that table if it's not supposed to show up in the article manager (and in frontend).
You should instead use your own tables and models to do that.

ContentModelArticles as well as the #__content is a class from the component com_content. It's not meant to be useable by other extensions for their own stuff.

avatar mbabker
mbabker - comment - 23 Oct 2014

Not sure how I feel about this one. On the one hand, yes it makes com_content extendable, but on the other hand, none of our existing components really fit into a UCM or CCK style model today and this one patch wouldn't really make a big difference in the long run.

As @Bakual said, each component should not be using another component's tables to store their data in, and I'll caveat that with saying that it should only happen if the table is clearly defined for shared use (things like our extensions table or the UCM tables being examples). As com_content is a really concrete implementation, it isn't suitable for this purpose IMO.

avatar phproberto
phproberto - comment - 23 Oct 2014

I agree with @Bakual also. It seems that you are trying to use #__content table (an extension table) instead of using #__ucm_content table that can be used an extended because it's part of the libraries/base system.

If we remove com_content from core your extension would be broken. I'm against allowing users to do this because it adds dependencies where we shouldn't and it's promoting bad coding practices. A step in the wrong direction.

So :-1: here

avatar bassmanpaul
bassmanpaul - comment - 24 Oct 2014

Hi guys,

Thanks for your input. I understand your points but if the categories table was designed for multiple extension use then why have categories without items? I understand and originally looked into the UCM tables when designing the extension but from my research concluded (as did others) that it is too early to use these tables yet as they are still undergoing heavy development and haven't settled down yet.

Joomla usually give fair notice when depreciating tables & classes so I'm fully prepared to move the extension's data across to the UCM tables once their design pattern has settled down.

Regards,

Paul

avatar Bakual
Bakual - comment - 24 Oct 2014

As said, com_categories is designed to be used by components. It does nothing on its own. It's a service component.

com_content on the other hand is a regular component, not meant to be reused by other components.

What you should do is create your own database tables and models for your extension. Not try to use existing ones from other components.

I'm closing this PR as already three members of PLT voted against it.
Thanks anyway for your contribution and time!

avatar Bakual Bakual - close - 24 Oct 2014
avatar Bakual Bakual - change - 24 Oct 2014
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2014-10-24 07:49:34

Add a Comment

Login with GitHub to post a comment