Skip to content

Academic Labbook Plugin 0.16.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@SeanDS SeanDS released this 12 Aug 20:30
· 153 commits to master since this release

Fourth preview release of Academic Labbook Plugin for WordPress. This change requires manual queries to update old installations. See the update procedure below.

For installation instructions, see here.

It is highly recommended to use the Labbook theme - it fully enables most of the features provided by this plugin.

Update procedure

Some taxonomies added to WordPress by ALP have been renamed. This means any terms created before installing this update will have the old taxonomy assigned to them, and will therefore not appear on the site in the correct places. To fix this, some simple database queries must be run against tables in each blog on network sites or against single sites, and the permalink structures must be refreshed. This is easiest to achieve with WP-CLI.

Here are the commands to run on a network installation (assuming BASH):

wp db query "UPDATE wp_term_taxonomy SET taxonomy = 'ssl-alp-coauthor' WHERE taxonomy = 'ssl_alp_coauthor';"
wp site list --field=blog_id | xargs -n1 -I % wp db query "UPDATE wp_%_term_taxonomy SET taxonomy = 'ssl-alp-coauthor' WHERE taxonomy = 'ssl_alp_coauthor';"
wp db query "UPDATE wp_term_taxonomy SET taxonomy = 'ssl-alp-crossreference' WHERE taxonomy = 'ssl_alp_crossreference';"
wp site list --field=blog_id | xargs -n1 -I % wp db query "UPDATE wp_%_term_taxonomy SET taxonomy = 'ssl-alp-crossreference' WHERE taxonomy = 'ssl_alp_crossreference';"
wp db query "UPDATE wp_term_taxonomy SET taxonomy = 'ssl-alp-unread-flag' WHERE taxonomy = 'ssl_alp_unread_flag';"
wp site list --field=blog_id | xargs -n1 -I % wp db query "UPDATE wp_%_term_taxonomy SET taxonomy = 'ssl-alp-unread-flag' WHERE taxonomy = 'ssl_alp_unread_flag';"
wp site list --field=url | xargs -n1 -I % wp --url=% rewrite flush

These commands first update the default network blog, then each individual blog in turn. Some commands will report errors that tables don't exist - this is fine, nothing bad happens (explanation: it's because the table wp_1_term_taxonomy doesn't exist; this would normally belong to the default blog but this instead uses wp_term_taxonomy). The last command flushes the rewrite rules to allow pretty permalinks to work again.

For single installations, the commands to run are (assuming BASH):

wp db query "UPDATE wp_term_taxonomy SET taxonomy = 'ssl-alp-coauthor' WHERE taxonomy = 'ssl_alp_coauthor';"
wp db query "UPDATE wp_term_taxonomy SET taxonomy = 'ssl-alp-crossreference' WHERE taxonomy = 'ssl_alp_crossreference';"
wp db query "UPDATE wp_term_taxonomy SET taxonomy = 'ssl-alp-unread-flag' WHERE taxonomy = 'ssl_alp_unread_flag';"
wp rewrite flush

For servers without BASH, adapt the xargs syntax as necessary, or run the queries manually.

Changes since last release

0.16.0

  • Renamed taxonomy term names. This is a BREAKING change - see above.
  • Added inventory system.
  • Changed post revisions widget to show only posts with line changes.
  • Changed post revision widget to use transients instead of cache; default
    update time set to 5 minutes.
  • Added check to remove "Uncategorised" category from posts with at least one
    other category.
  • Added check to avoid referenced posts which cannot be read by user from
    showing in the cross-references list.
  • Simplified permission checks when editing custom taxonomy terms.
  • Updated KaTeX to 0.10.2.
  • Fixed bug with coauthors not being assigned to posts on sites with existing
    posts.
  • Fixed bug with unread posts list pagination.
  • Added tool to detect pretty permalink status.
  • Expanded admin documentation.
  • Numerous minor bug fixes.