WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#21187 closed defect (bug) (fixed)

Plugin Header file, tag Network:true not checked while building plugin table

Reported by: imath Owned by: nacin
Milestone: 3.4.2 Priority: high
Severity: normal Version: 3.4.1
Component: Multisite Keywords: has-patch
Focuses: Cc:

Description

Hi,

( sorry for my english )

I recently added a forum on wordpress.org, because i wasn't sure it was a bug. http://wordpress.org/support/topic/plugin-header-file-tag-networktrue-no-more-used

What happens is that is a plugin sets its tag Network to true in his plugin header, then the plugin will show in the main blog list of plugin and all the child blog lists. In WordPress 3.3, when this tag is set to true, it only shows the plugin in the network admin list of plugins.

The reply Ipstenu wrote on my forum seems to mean it's a bug, so i submit this ticket. Sorry if i missed something about 3.4.1 features.

Have a lovely sunday.

Attachments (2)

21187.diff (844 bytes) - added by imath 3 years ago.
21187.2.diff (981 bytes) - added by SergeyBiryukov 3 years ago.

Download all attachments as: .zip

Change History (15)

@imath3 years ago

comment:1 @Ipstenu3 years ago

Checked it with two more plugins (one I wrote) and network true is being ignored, which is problematic :)

comment:3 follow-up: @imath3 years ago

I'm sorry Sergey, my poor english skills are not helpful. I read the ticket you mentioned. If i understand well it says that the plugins activated on the network should be visible in the plugin lists of child blog. I guess it's actually an interesting information for admins. But it also says that this plugins shouldn't be "activable".

The problem i report is that since 3.4, Network plugins (having the tag Network:true in their header) if not activated are viewable and "activable" by administrator of child blogs (if plugins menu is enabled by superadmin).

That's why i suggested the diff file i attached to my ticket, because i think it can be problematic for "Network:true" plugins...

comment:4 @nacin3 years ago

  • Milestone changed from Awaiting Review to 3.4.2
  • Priority changed from normal to high

@SergeyBiryukov3 years ago

comment:5 @SergeyBiryukov3 years ago

Considering that network-activated plugins are still hidden fron non-network Plugins screen (i.e. #20104 is not implemented yet), 21187.diff makes sense to me.

However, it also hides network plugins from single site Plugins screen, which was not the case in 3.3. 21187.2.diff restores 3.3 behaviour by adding is_multisite() check.

comment:6 in reply to: ↑ 3 @SergeyBiryukov3 years ago

Replying to imath:

If i understand well it says that the plugins activated on the network should be visible in the plugin lists of child blog. I guess it's actually an interesting information for admins. But it also says that this plugins shouldn't be "activable".

That's right. I've added a link to that ticket because the changeset where the logic was altered ([20525]) was made there.

comment:7 @imath3 years ago

Hi Sergey,

many thanks for your explanation, replies and correction with the is_multisite() check.

comment:8 @nacin3 years ago

  • Keywords has-patch added

comment:9 @scribu3 years ago

Note that if you activate a network only plugin from a single site, it will actually be network activated, and just disappear from the list. Magic. :)

comment:10 @nacin3 years ago

In [21700]:

Only show network-only plugins in the network admin. props SergeyBiryukov. see #21187, for trunk.

comment:11 @scribu3 years ago

As nacin pointed out, non-super-admins can currently network-activate network-only plugins.

I suppose it's pretty rare to keep around a network-only plugin without activating it, but still.

With [21700], regular admins can no longer see the deactivated network-only plugins, but they can still activate them, if they can guess the plugin basename.

comment:12 @nacin3 years ago

In [21740]:

Only allow operations on network plugins through the network admin. see #21187, for trunk.

comment:13 @nacin3 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In [21741]:

Only allow operations on network plugins through the network admin. fixes #21187. merges [21700] and [21740] to the 3.4 branch.

Note: See TracTickets for help on using tickets.