I cooked up a patch that allows to setup…

I cooked up a patch that allows to setup a 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 installation on localhost, albeit only for subfolder installations.

A possibly related niggle that I ran into while installing a test site was #12459. If your database prefix is empty as well, you’ll need that 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. as well.

The primary purpose of these two is, obviously, to allow developers to use the MS functionality without needing to constantly go back and forth with a server using SSHSSH Secure SHell - a protocol for securely connecting to a remote system in addition to or in place of a password. or FTPFTP FTP is an acronym for File Transfer Protocol which is a way of moving computer files from one computer to another via the Internet. You can use software, known as a FTP client, to upload files to a server for a WordPress website. https://codex.wordpress.org/FTP_Clients..

Please give both patches some testing so we can get both checked in before we’re in betaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process.. Doing so will give the new MS functionality a lot more exposure to testers.

#featured-bugs

Taking advantage of UUIDs

Now that we require MySQLMySQL MySQL is a relational database management system. A database is a structured collection of data where content, configuration and other options are stored. https://www.mysql.com/. 4.1.2, we can look into using UUIDs in WordPress.

Universally unique identifiers are numbers that are unique in time and space. In the database world, they’re primarily used in order to work with data that is created in a decentralized manner. It allows to characterize a piece of data that isn’t stored in the database yet, to merge data from separate databases without needing to work around ID conflicts, etc.

The lack of genuine UUIDs introduces all sorts of quirks in the WP editor when we’re dealing with yet to be saved posts. #9471, #10456, #11145, #11990, and many more underscore the architectural problem that we’re facing. The media-related tickets exacerbate the issue.

Mark recently opened #11889 and suggested that we a) always create a new post when hitting the new post button, and b) have a garbage collector clean things up periodically. It is a solution, but I feel that using UUIDs — which were designed to deal with this kind of stuff — would be simpler.

Using them would mean pre-assigning a UUID to new posts, and placing it in a hidden field. Since this UUID characterizes our yet to be saved post, we can safely pass it around to an autosave handler, a media thickbox, etc., allowing to create the post on the fly when necessary.

Further down the stream, we introduce a slight change in our insert/update post handler: when saving a post whose ID is not assigned yet, we start by verifying if that post exists already — by querying the posts table’s post_guid field to know if that UUID exists.

#featured-bugs

I’m inaugurating a new trac keyword, “…

I’m inaugurating a new tracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. keyword, “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.-hunt”, and the bug hunt report, in order to keep track of of tickets that get posted/could get posted in this blogblog (versus network, site)’s “bug hunt” posts.

Updated: I’m inaugurating a new trac keyword, “featured”, and the featured bugs report, in order to keep track of of tickets that get posted/could get posted in this blog’s “featured bugs” posts.

I’ll be tagging more tickets in due course. You’re most welcome to mark additional tickets as such, if you feel they qualify.

For information, I try to stick to batches of tickets that loosely interfere or interact with one another. The batch of tickets should then meet the two or more of following criteria:

  • It is annoying when you run into the issue
  • It underscores an architectural problem
  • Fixing it can lead to performance optimizations

Areas I plan to highlight in the future include: UUIDs, i18ni18n Internationalization, or the act of writing and preparing code to be fully translatable into other languages. Also see localization. Often written with a lowercase i so it is not confused with a lowercase L or the numeral 1. Often an acquired skill. post slugs, permalinks, rewrite rules, cache, private posts.

Btw, I’d like to stress that the point in these blog posts is try to reverse the WP bug trend:

Open WP bugs, props Hakre

Thus, I’d like to revisit two of my last post’s tickets:

  1. #10779, on optimizing our unzip method. DD32 committed the fix, but marked it as still needing testing. Here’s how. Related ticketticket Created for both bug reports and feature development on the bug tracker. #10403 is still pending, but I feel it’s extremely minor compared to #10779.
  2. #10913, on optimizing the upgrade process, is still a major niggler imo. #10611 will probably seem cosmetic if #10913 gets fixed. Two possible solutions are highlighted in the ticket’s comments. It still needs 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., and of course testing once one is around.

We need your help on both, and on future tickets that will make it in these posts. Thanks for patching/testing.

#bugs, #featured-bugs

So… Jane had asked me to come up with …

So… Jane had asked me to come up with a post now and then that discusses 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. squashing. Between the Health Check 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, chewing on the best way to do this, and noting that our lead devs were quite busy already because of the merge and custom post types, I had yet to start.

The opportunity comes courtesy of Matt’s latest wp-devel post. So here goes… If you’re wondering how you might be able to make the best of DD32’s new contributor status, here’s a selection of WordPress niggles that could use patches, second opinions, and of course lots of testing:

1. #11588 is about actually showing a message to end users during coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. upgrades. There are occurrences where the host enables an output buffer automatically. When this happens, end users a greeted with a partially loaded screen that can seem to wait forever. Status: ideas submitted for force-flushing, and needs-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..

2. #10779 is a huge source of grief on overcrowded, low-end servers. Our unzip method is slow and resource hungry, and could use some optimizations. (See also #10403 on the same topic.) Status: needs-testing.

3. Another possible optimizations for these same servers would be #10611. The idea would be to only upgrade the files that changed, when upgrading minor releases. Status: needs-patch.

4. #10913 highlights the reason why failed upgrades are such a source of grief. When using the FTPFTP FTP is an acronym for File Transfer Protocol which is a way of moving computer files from one computer to another via the Internet. You can use software, known as a FTP client, to upload files to a server for a WordPress website. https://codex.wordpress.org/FTP_Clients. transport, file stats don’t get cached, and so we end up needing to re-check the status of each of them constantly. On the slower servers, the optional clean up + unzip + upload + clean up procedure frequently fails because of it. The whole process could be optimized by caching $fs::is_file() and $fs::is_dir(). Status: needs-patch.

5. #8830 loosely relates to the filesystem, but definitely seems to cause grief for users with an open_basedir restriction in effect. From the looks of it, a simple rtrim() call could fix wp_mkdir_p() on those system. Status: needs-testing.

6. #10889 highlights inconsistent methods between the WP Filesystem methods. I’m 90% sure that it prevents the .maintenance file from being added on some sites. Status: commit?

And that’ll be the last of today’s pick of crippling install/upgrade bugs. Please keep in mind that this is the first of a hopefully long series of posts. Feedback is welcome on the way it gets presented. Should it be more focused on less specific bugs, less focused but on more bugs, less focused on less bugs, or is it reasonably balanced as above?

Next in line, I think, will be a post that discusses the use of UUIDs to fix a couple of tickets, along the lines of #11145. Now that we’ve MySQLMySQL MySQL is a relational database management system. A database is a structured collection of data where content, configuration and other options are stored. https://www.mysql.com/. 4.1.2, we might as well take advantage of them.

#bugs, #featured-bugs

Collecting ideas for the Health Check plugin

I’ve started to give some love to the Health Check 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. Quite a few PHP-related tests have been added already. Peter has a few more ideas in stock, and I plan to quickly add some MySQLMySQL MySQL is a relational database management system. A database is a structured collection of data where content, configuration and other options are stored. https://www.mysql.com/. checks.

We could use some additional ideas. I’ve opened a forum thread accordingly. Basically, if you’ve a grudge against this or that server config, or if you regularly help users who experience the same issue over and over, be sure to speak out, either in here or in the forum.