Multisite Bug Scrub Recap (April 28, 2016)

Multisitemultisite Used to describe a WordPress installation with a network of multiple blogs, grouped by sites. This installation type has shared users tables, and creates separate database tables for each blog (wp_posts becomes wp_0_posts). See also network, blog, site office hours are held every Tuesday at 16:00 UTC in #core-multisite. The next will be Tuesday 16:00 UTC. A more casual bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. scrub is held on Thursday 20:00 UTC.

The weekly agenda for the bug scrub is to discuss 1 or more multisite focused bugs to help move it along. 🐛

Today’s chat log

Attendees: @websupporter, @flixos90, @jeremyfelt, @nerrad, @mensmaximus

Tickets Covered

#31746get_blogs_of_user() can be very slow when a user is a member of thousands of sites. This is a hefty ticketticket Created for both bug reports and feature development on the bug tracker. and several possibilities have been covered as solutions for the problem.

  • Create an additional table to specifically map user capabilities to sites so that the data is more queryable from both the perspective of the user and the perspective of the site.
  • Create an additional site’s metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. table (wp_blogmeta) that would do a better job of maintaining a many (users) to one (site) relationship for certain things.
  • Maintain static $blogs data during the request so that only one set is requested during a page view if necessary.
  • Add a filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output.!

We decided to open #36707 as a short term solution. The pre_get_blogs_of_user filter will allow large networks to short circuit the function completely and provide their own results. This will also enable the exploration of other solutions through a pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party. #31746 will remain open as a place to discuss solutions for get_blogs_of_user() as a whole.

Next, we discussed #33887, which was closed as a duplicate in favor of #31405upgrade.php fails with mixed HTTPSHTTPS HTTPS is an acronym for Hyper Text Transfer Protocol Secure. HTTPS is the secure version of HTTP, the protocol over which data is sent between your browser and the website that you are connected to. The 'S' at the end of HTTPS stands for 'Secure'. It means all communications between your browser and the website are encrypted. This is especially helpful for protecting sensitive data like banking information. (SSLSSL Secure Sockets Layer. Provides a secure means of sending data over the internet. Used for authenticated and private actions.) and simple HTTPHTTP HTTP is an acronym for Hyper Text Transfer Protocol. HTTP is the underlying protocol used by the World Wide Web and this protocol defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands. sites. The problem here is that set_url_scheme() applies the scheme of the current page view, even when in an ms_is_switched() state.

We tossed around a few solutions and landed on adding an original scheme to set_url_scheme() that could be used when calling something like admin_url() in a switched state. This would leave the original scheme of the URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org untouched and still allow various filters to fire. A patchpatch A special text file that describes changes to code, by identifying the files and lines which are added, removed, and altered. It may also be referred to as a diff. A patch can be applied to a codebase for testing. is up for feedback on #31405.

And that’s it. Discussion for each of these tickets was great. #36406 is on the list to discuss during Tuesday’s office hours. If you have other tickets you’d like to see covered, drop a note in the comments. 😃

#multisite, #networks-sites