-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.0] Remove mod_multilangstatus tampering from mod_user #30113
Conversation
As far as I understand, this breaks the automatic display of the module when multilang is ON. |
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. |
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. |
Just for reference a PR which I did last year. Turns out the code was just moved in between and the PR mistakenly closed. |
@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.
|
PR updated. Using the check from |
administrator/modules/mod_multilangstatus/mod_multilangstatus.php
Outdated
Show resolved
Hide resolved
I don't understand anything to your changes. They look much more complex than our suggestion. Any reason to choose such a code? |
It's the same but with dependencies passed to |
Do you mean that we should change everywhere 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. |
@wilsonge Any opinion on the class removal (or deprecation) mentioned in the "Documentation Changes Required" section of the description? |
IMHO, as it does not exist in J3, no need to deprecate it. |
I have tested this item ✅ successfully on f2ff1d4 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30113. |
1 similar comment
I have tested this item ✅ successfully on f2ff1d4 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30113. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30113. |
Thanks |
Closes #29948.
Summary of Changes
Removes
mod_multilangstatus
tampering frommod_user
.Testing Instructions
Create and publish a
Multilingual Status
module.Actual result BEFORE applying this Pull Request
Module created but keeps getting unpublished on every page load.
Expected result AFTER applying this Pull Request
Module created and published.
Documentation Changes Required
Joomla\Module\Multilangstatus\Administrator\Helper\MultilangstatusAdminHelper
class is removed. If it's too late for that, it can be deprecated instead.