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
Disables some more feature if internet features are disabled #13076
Conversation
Did a find usages of Http class and found some other possible candidates for this check: CoreAdminHome\Tasks::updateSpammerBlacklist() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally works, even when a geoip autoupdate task was previously scheduled.
core/Piwik.php
Outdated
public static function checkInternetConnectionAvailable() | ||
{ | ||
if (!SettingsPiwik::isInternetEnabled()) { | ||
throw new Exception('This feature requires an internet connection. Please check your config value for `enable_internet_features` if you want to use this feature.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be translated?
Those tasks should already only be added when internet is enabled |
regarding MobileMessaging and Marketplace: Wondering if we maybe should simply "deactivate" those plugins if internetfeatures are disabled. |
If they're deactivated, will they be activated when the setting is enabled? I guess we could just unload it at the start of a request, might have the same effect... |
…omatically unloaded plugins if required
4cd9d2e
to
fcccac8
Compare
Marketplace and MobileMessaging plugins will now be dynamically removed from the list of activated plugins in each request if internet connection is disabled in config. |
@sgiehl thought of one more thing, would it be a good idea to mention if a plugin requires internet in the manage plugin page? Btw @mattab some API/product changes were added here (new API to |
we could do so. But not sure about it, as other plugins require a working internet connection for some specific features as well. And that wouldn't be displayed then |
I was mostly thinking about the plugins that are unloaded, if there's no signal to the user anywhere that the plugins require enabling internet, maybe some users will think there's a bug. Do you think this is an issue? |
The is a compatibility message shown when If the features are enabled, but there is actually no internet connection available the will probably get various connection timeout errors |
Ah ok, that's what I was thinking about, then 👍 will approve |
The new API & marking internet-requiring plugins in the Plugins overview look good to me 👍 |
…org#13076) * Disable GeoIP update tasks if no internet connection available * Show GeoLocation Auto Updater UI only with enabled internet connection * Throw exception if Marketplace is used without enabled internet features * Hide Marketplace menu entry if internet is disabled * Implements new plugin class method requiresInternetConnection, to automatically unloaded plugins if required * Improve how plugins not working without internet connection are shown in plugin list * Adds UI test * typo 'whether'
We already added check at various places. This aims to complete it:
Is anything still missing?
refs #6324