User tests: Successful: Unsuccessful:
Closes #29948.
Removes mod_multilangstatus
tampering from mod_user
.
Create and publish a Multilingual Status
module.
Module created but keeps getting unpublished on every page load.
Module created and published.
Joomla\Module\Multilangstatus\Administrator\Helper\MultilangstatusAdminHelper
class is removed. If it's too late for that, it can be deprecated instead.
Status | New | ⇒ | Pending |
Category | ⇒ | Modules Administration |
Labels |
Added:
?
|
Yes, it stops unpublished modules being automatically published.
I can't be in favor of that. As I said, this is definitely an improvement for all multilingual sites.
Hardcode it into the template if you want. Just stop messing with user data.
We have enough explaining all the time in the forums how to use that module first when someone has a multilingual issue.
I was not the one who originally created that code and I don't know how to hard code it in atum.
This basically means that, if you want to get rid of it from mod_user, I am fine with it, but please provide also the solution to hardcode it in atum.
I agree with @infograf768 Dont just remove functionality without providing a replacement
Personally, I don't think there is a need for replacement for this. If you know how to enable Language Filter plugin, publishing the module shouldn't be that hard. But OK, some options:
Take your pick. Anything is better than what we have now.
Why don't we have the module enabled by default, but display nothing when multilang is disabled? We have such behavior regulary in modules. Then it would automatically appear as soon as multilang is enabled. That would be the best approach imho.
A module should never automatically change its state. If it's unpublished, it has to stay unpublished, if it's published, it has to stay published. Also modules shouldn't interact with other modules, that's just plain wrong.
It should also not be hardcoded into the template, that would be equally wrong.
@SharkyKZ If you add the following lines to administrator/modules/mod_multilangstatus/mod_multilangstatus.php at line 13 (after the use statement), then you got option 1 but the module doesn't show up until the language filter plugin is enabled. Similar to other modules that don't show up if there is nothing to show.
use Joomla\CMS\Language\Multilanguage;
if (!Multilanguage::isEnabled())
{
return;
}
Category | Modules Administration | ⇒ | Modules Administration SQL Installation Postgresql |
PR updated. Using the check from com_languages
.
I don't understand anything to your changes. They look much more complex than our suggestion. Any reason to choose such a code?
if you insist on this, please correct typo $mutilanguageEnabled
to $multilanguageEnabled
It's the same but with dependencies passed to Multilanguage::isEnabled()
. Typo fixed.
Do you mean that we should change everywhere Multilanguage::isEnabled()
to Multilanguage::isEnabled($app, Factory::getContainer()->get(DatabaseInterface::class));
?
A simple grep gives me 134 occurrences of that code present in 88 files in J4
That seems to be the way going forward. But there's no need to rush replacing every existing instance now.
IMHO, as it does not exist in J3, no need to deprecate it.
People who are using beta versions should only use them for tests.
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-11-07 12:29:49 |
Closed_By | ⇒ | HLeithner | |
Labels |
Added:
?
|
Thanks
As far as I understand, this breaks the automatic display of the module when multilang is ON.
I believe this was a real improvement in J4 for multilingual sites.