Giter VIP home page Giter VIP logo

Comments (10)

smira2000 avatar smira2000 commented on September 24, 2024

ps= Thank you very much for releasing this code it's very easy to use!

from wp-update-server.

YahnisElsts avatar YahnisElsts commented on September 24, 2024

In which directory is the plugin installed on the network site - /wp-content/plugins or /wp-content/mu-plugins? If it's the former, then how did you activate the plugin - separately on each site, or via network activation?

from wp-update-server.

smira2000 avatar smira2000 commented on September 24, 2024

it's in the /wp-content/plugins directory and activated individually on a couple of sites

i tested network activating the plugin and it updates fine. this is less than ideal however, any chance we could work on a patch?

from wp-update-server.

YahnisElsts avatar YahnisElsts commented on September 24, 2024

When you activate it individually on each site, how do you check if an update is available? Are you logged in as the super admin when you do it? Since the update checker is loaded as part of the plugin, updates will obviously only show up on sites where the plugin is active and the current user has the capability to install plugin updates.

Also, you can use the Debug Bar plugin to view various debugging information about the update checker. The library adds a "PUC (plugin-slug)" panel to the debug bar for each plugin that uses it.

from wp-update-server.

YahnisElsts avatar YahnisElsts commented on September 24, 2024

I looked into this some more and it appears that WordPress will never display plugin updates on individual sites when they're part of a network install. This is something I wasn't aware of. From /wp-admin/includes/update.php, line 199:

if ( is_network_admin() || !is_multisite() ) {
    //(The code that displays the update notification goes here.)
}

So the problem is this:

  • On a network install, plugin updates only show up in the network admin.
  • The plugin needs to be active for the update checker to run and display an update.
  • WordPress will only load the plugin in the network admin if it is active on the main site.
  • As a result, updates don't show up if the plugin is only active on some sites but not the main one.

I don't see an easy solution to this. Do you have any ideas?

from wp-update-server.

damien1 avatar damien1 commented on September 24, 2024

Hi Janis

I believe that plugin updates need to be run by a network admin role.

So if the plugin is running on a sub site, then if possible, what about
just hiding the update notification ?

Cheers

Damien

Damien Saunders

On 31 Mar 2013, at 17:54, Yahnis Elsts [email protected] wrote:

I looked into this some more and it appears that WordPress will never
display plugin updates on individual sites when they're part of a network
install. This is something I wasn't aware of. From
/wp-admin/includes/update.php, line 199:

if ( is_network_admin() || !is_multisite() ) {
//(The code that displays the update notification goes here.)}

So the problem is this:

  • On a network install, plugin updates only show up in the network admin.
  • The plugin needs to be active for the update checker to run and
    display an update.
  • WordPress will only load the plugin in the network admin if it is
    active on the main site.
  • As a result, updates don't show up if the plugin is only active on *
    some* sites but not the main one.

I don't see an easy solution to this. Do you have any ideas?


Reply to this email directly or view it on
GitHubhttps://github.com//issues/1#issuecomment-15694091
.

from wp-update-server.

YahnisElsts avatar YahnisElsts commented on September 24, 2024

Hide it from whom? The library (and WordPress itself) already checks if the current user has the ability to install updates, and it either will not display the notification at all or use different notification text (without an update link) for users that can't.

from wp-update-server.

smira2000 avatar smira2000 commented on September 24, 2024

Ok, I enabled the plugin for the "main" site in the network (site id#1 with path of /) and the plugin updates fine now.
I don't think this is a big deal but it might be worth mentioning in the documentation.
Maybe something like:
"on a wordpress network installation the plugin (need to test this on themes?) needs to be enabled on the main site for updates to work. The main site in a wp-network is the one with id#1 and path of / in your dashboard."

from wp-update-server.

YahnisElsts avatar YahnisElsts commented on September 24, 2024

Okay, I've added a note to the plugin checker page. And yes, the same applies to themes as well.

from wp-update-server.

smira2000 avatar smira2000 commented on September 24, 2024

That makes sense to me, hopefully it'll be helpful to others.
Thank you so much for helping me with this, and again for releasing this work!

from wp-update-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.