?
avatar mbabker
mbabker
15 Jan 2017

Since #10729 the #__languages table has an asset_id column with an apparent plan for a future ACL implementation. This is still incomplete and now causes corruption with the assets records.

JTableLanguage does not extend and implement the _getAsset* methods (_getAssetParentId being the most important) so the asset records are created with the system defaults. Since the _getAssetParentId isn't extended this causes all asset records for languages to be a child of the root record versus inheriting from the com_languages component.

An immediate short term fix is to implement the _getAssetParentId in JTableLanguage and implement an update routine fix (in PHP, unless you can reliably write this update statement in native SQL) to correct the inheritance of the language assets. Long term, the plan for this ACL implementation should be shared or if it isn't going to be used then it should be removed (there isn't an issue with having it in core but right now it is half baked and majorly incorrect).

avatar mbabker mbabker - open - 15 Jan 2017
avatar joomla-cms-bot joomla-cms-bot - change - 15 Jan 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 15 Jan 2017
avatar andrepereiradasilva
andrepereiradasilva - comment - 15 Jan 2017

@infograf768 what's the plan here? should it be removed or will it be used?

avatar infograf768
infograf768 - comment - 16 Jan 2017

@mbabker @andrepereiradasilva
We started working on this here, in relation to com_associations permissions;
infograf768#30 and came to the conclusion that we should not use it for com_associations, but only for Content languages.

There were many problems to solve and we did not complete the job as it may have needed a lot of refactoring. The main idea being the permission to use a specific Content Language or not all over core with a new field type.

Example: some one is allowed to use en-GB and fr-FR, but not it-IT. Therefore he can't assign it-IT to an article, but still can edit (if he has permission to edit that article) an article which is tagged to it-IT WITHOUT being able to modify its language.

As of today Content Languages are now automatically created when installing a language (at joomla installation time they are created and published. Otherwise they are created as unpublished).

Therefore I think that soon or later (later I guess, if someone implements this for 4.x), we will need this column.
Not sure what to do exactly today though.

avatar rdeutz
rdeutz - comment - 18 Jan 2017

I think we should do what @mbabker suggested, implement a _getAssetParentId and make a patch script for 3.7.0.

avatar nibra nibra - change - 24 Mar 2017
Category ACL com_languages Multilanguage
avatar nibra nibra - change - 24 Mar 2017
Status New Confirmed
avatar sanderpotjer
sanderpotjer - comment - 25 Aug 2017

Created a PR #17716 to prevent at least the corrupt language assets for now.

avatar joomla-cms-bot joomla-cms-bot - close - 25 Aug 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 25 Aug 2017
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2017-08-25 11:53:08
Closed_By franz-wohlkoenig
avatar joomla-cms-bot
joomla-cms-bot - comment - 25 Aug 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 25 Aug 2017

closed as having Pull Request #17716


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13602.

Add a Comment

Login with GitHub to post a comment