Coder Social home page Coder Social logo

10up / convert-to-blocks Goto Github PK

View Code? Open in Web Editor NEW
131.0 57.0 15.0 5.15 MB

Convert to Blocks is a WordPress plugin that transforms classic editor content to blocks on the fly.

Home Page: https://wordpress.org/plugins/convert-to-blocks/

License: GNU General Public License v2.0

JavaScript 16.17% Shell 8.43% PHP 75.39%
gutenberg block block-migration gutenberg-migration gutenberg-conversion migration conversion

convert-to-blocks's Introduction

Convert to Blocks

Transforms classic editor content to blocks on-the-fly.

Support Level WordPress Plugin Version WordPress Plugin: Tested WP Version WordPress Plugin Required PHP Version WordPress Plugin: Required WP Version GPL-2.0-or-later License

E2E test Linting Dependency Review

Overview

Convert to Blocks is a WordPress plugin that transforms classic editor content to blocks on-the-fly. After installing Gutenberg or upgrading to WordPress 5.0+, your content will be displayed in "Classic Editor Blocks". While these blocks are completely functional and will display fine on the frontend of your website, they do not empower editors to fully make use of the block editing experience. In order to do so, your classic editor posts need to be converted to blocks. This plugin does that for you "on the fly". When an editor goes to edit a classic post, the content will be parsed into blocks. When the editor saves the post, the new structure will be saved into the database. This strategy reduces risk as you are only altering database values for content that needs to be changed.

When combined with the Block Catalog Plugin, Convert to Blocks can be used to bulk convert only classic editor content to blocks. This is especially useful for sites with a combination of classic and block editor content.

Bulk migration of Classic Editor items to the Block Editor

The wp convert-to-blocks start WP-CLI command that converts posts iteratively in the browser without requiring any manual input. One caveat worth mentioning is that Gutenberg is a CPU intensive application. You will want to keep your computer plugged in before doing this!

Demo of WP-CLI command

Requirements

  • Inner Blocks Transforms is only supported with the Gutenberg Plugin 10.9.0+

Installation

  1. Clone the repository into your /plugins directory.
  2. Inside the repository directory, run npm install and then npm run build.
  3. Inside the repository directory, run composer install.

Command Line Options

NAME

  wp convert-to-blocks start

DESCRIPTION

  Starts a new Migration. The command prints the URL that must be opened in a browser to connect it to the WP CLI.

SYNOPSIS

  wp convert-to-blocks start [--post_type=<post_type>] [--per_page=<per_page>] [--page=<page>] [--only=<only>] [--catalog] [--reset]

OPTIONS

  [--post_type=<post_type>]
    Optional comma delimited list of post types to migrate. Defaults to post,page

  [--per_page=<per_page>]
    Optional number of posts to migrate per batch. Defaults to no limit. Combine with --page to paginate.

  [--page=<page>]
    Optional page number to start migration from. Defaults to 1.

  [--only=<only>]
    Optional comma delimited list of post ids to migrate.

  [--catalog]
    Optional flag to only migrate classic editor tagged posts. Requires that Block
    Catalog plugin is present and has been indexed.

  [--reset]
    Stops any currently running migration and resets the migration state.

NAME

  wp convert-to-blocks stop

DESCRIPTION

  Stops the currently running migration if active.

NAME

  wp convert-to-blocks status

DESCRIPTION

  Prints the status of the currently running migration.

Frequently Asked Questions

How Do I Know It's Working?

Find a classic editor in the post, try to navigate away from the page. You will get an error saying your changes will be discarded. This is because Convert to Blocks converted your content to blocks on the fly and those changes will be saved when you update the post.

Will Convert to Blocks Handle My Custom Blocks?

By default it will not.

Will Convert to Blocks Handle Nested Blocks?

Nested / Inner Block support does not work with Gutenberg bundled with WordPress Core <=5.7.2. This feature needs the Gutenberg Plugin >=10.9.0.

Support Level

Stable: 10up is not planning to develop any new features for this, but will still respond to bug reports and security concerns. We welcome PRs, but any that include new features should be small and easy to integrate and should not include breaking changes. We otherwise intend to keep this tested up to the most recent version of WordPress.

Changelog

A complete listing of all notable changes to Convert to Blocks are documented in CHANGELOG.md.

Contributing

Please read CODE_OF_CONDUCT.md for details on our code of conduct, CONTRIBUTING.md for details on the process for submitting pull requests to us, and CREDITS.md for a listing of maintainers of, contributors to, and libraries used by Convert to Blocks.

Like what you see?

convert-to-blocks's People

Contributors

akshitsethi avatar barneyjeffries avatar barryceelen avatar c0ntax avatar cadic avatar dependabot[bot] avatar dinhtungdu avatar dkotter avatar dsawardekar avatar faisal-alvi avatar hashimwarren avatar iamdharmesh avatar jayedul avatar jeffpaul avatar kmgalanakis avatar mehul0810 avatar petersorensen10up avatar peterwilsoncc avatar ravinderk avatar rodrigo-arias avatar sidsector9 avatar tlovett1 avatar tylerb24890 avatar zamanq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

convert-to-blocks's Issues

Release version 1.2.2

This issue is for tracking changes for the 1.2.2 release. Target release date: October 2023.

Release steps

  • Branch: Starting from develop, cut a release branch named release/1.2.2 for your changes.
  • Version bump: Bump the version number in config.php, convert-to-blocks.php, readme.txt, package.json and package-lock.json if it does not already reflect the version being released. Update both the plugin "Version:" property in convert-to-blocks.php and the plugin $plugin_version constant in config.php.
  • Changelog: Add/update the changelog in CHANGELOG.md and readme.txt.
  • Props: update CREDITS.md with any new contributors, confirm maintainers are accurate.
  • New files: Check to be sure any new files/paths that are unnecessary in the production version are included in .distignore.
  • Readme updates: Make any other readme changes as necessary. README.md is geared toward GitHub and readme.txt contains WordPress.org-specific content. The two are slightly different.
  • Merge: Make a non-fast-forward merge from your release branch to develop (or merge the pull request), then do the same for develop into trunk, ensuring you pull the most recent changes into develop first (git checkout develop && git pull origin develop && git checkout trunk && git merge --no-ff develop). trunk contains the stable development version.
  • Push: Push your trunk branch to GitHub (e.g. git push origin trunk).
  • Compare trunk to develop to ensure no additional changes were missed.
  • Test the pre-release ZIP locally by downloading it from the Build release zip action artifact and installing it locally. Ensure this zip has all the files we expect, that it installs and activates correctly and that all basic functionality is working
  • Release: Create a new release, naming the tag and the release with the new version number, and targeting the trunk branch. Paste the changelog from CHANGELOG.md into the body of the release and include a link to the closed issues on the milestone. The release should now appear under releases.
  • SVN: Wait for the GitHub Action to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
  • Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/convert-to-blocks/. This may take a few minutes.
  • Close the milestone: Edit the milestone with release date (in the Due date (optional) field) and link to GitHub release (in the Description field), then close the milestone.
  • Punt incomplete items: If any open issues or PRs which were milestoned for 1.2.2 do not make it into the release, update their milestone to 1.3.0, or Future Release

Widgets to blocks

Is your enhancement related to a problem? Please describe.

Describe the solution you'd like
With the new block based widget screen included in WordPress 5.8, it would be amazing auto magically convert widgets to blocks.

Designs

Describe alternatives you've considered

Additional context

Custom Flag to support Block deprecations

Is your enhancement related to a problem? Please describe.

The current WP CLI based bulk migration feature can also be used to assist with Block migrations. When you implement Block migrations you need to reopen and save the Post for the migration to persist to the database.

We could implement a custom flag like --always-save to ensure that even posts that do not have CE content are resaved by the plugin during bulk migration.

Designs

NA

Describe alternatives you've considered

NA

Code of Conduct

  • I agree to follow this project's Code of Conduct

Minimum PHP version in 1.2.0 is incorrect in composer.json

Describe the bug

I noticed in the 1.2.0 changelog that the minimum supported version of PHP has moved from 7.4 to 8.0, but the following is still in the composer file:

  "require": {
    "php": ">=7.4"
  }

This should be

  "require": {
    "php": ">=8.0"
  },

Steps to Reproduce

  1. Create a new project that specifies the version of PHP to be only 7.4 (for example "php": ">=7.4 <8.0")
  2. Run composer req wpackagist-plugin/convert-to-blocks

Expected result:
It should pull in version 1.1.1

Actual Result
It pulls in version 1.2.0

Screenshots, screen recording, code snippet

No response

Environment information

No response

WordPress information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Release version 1.1.1

This issue is for tracking changes for the 1.1.1 release. Target release date: 19 Dec 2022.

Release steps

  • Branch: Starting from develop, cut a release branch named release/1.1.1 for your changes.
  • Version bump: Bump the version number in config.php, convert-to-blocks.php, readme.txt, package.json and package-lock.json if it does not already reflect the version being released. Update both the plugin "Version:" property in convert-to-blocks.php and the plugin $plugin_version constant in config.php.
  • Changelog: Add/update the changelog in CHANGELOG.md and readme.txt.
  • Props: update CREDITS.md with any new contributors, confirm maintainers are accurate.
  • New files: Check to be sure any new files/paths that are unnecessary in the production version are included in .distignore.
  • Readme updates: Make any other readme changes as necessary. README.md is geared toward GitHub and readme.txt contains WordPress.org-specific content. The two are slightly different.
  • Merge: Make a non-fast-forward merge from your release branch to develop (or merge the pull request), then do the same for develop into trunk, ensuring you pull the most recent changes into develop first (git checkout develop && git pull origin develop && git checkout trunk && git merge --no-ff develop). trunk contains the stable development version.
  • Push: Push your trunk branch to GitHub (e.g. git push origin trunk).
  • Compare trunk to develop to ensure no additional changes were missed.
  • Test the pre-release ZIP locally by downloading it from the Build release zip action artifact and installing it locally. Ensure this zip has all the files we expect, that it installs and activates correctly and that all basic functionality is working
  • Release: Create a new release, naming the tag and the release with the new version number, and targeting the trunk branch. Paste the changelog from CHANGELOG.md into the body of the release and include a link to the closed issues on the milestone. The release should now appear under releases.
  • SVN: Wait for the GitHub Action to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
  • Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/convert-to-blocks/. This may take a few minutes.
  • Close the milestone: Edit the milestone with release date (in the Due date (optional) field) and link to GitHub release (in the Description field), then close the milestone.
  • Punt incomplete items: If any open issues or PRs which were milestoned for 1.1.1 do not make it into the release, update their milestone to 1.2.0, or Future Release

Add settings UI to opt CPTs into convert-to-blocks support

Describe the bug

When enabled, my custom post type, even when set to supports:editor is loading with the Classic Editor, not Gutenberg

Steps to Reproduce

  1. Create a custom post type using CPTUI - set it to support editor
  2. Create a new post
  3. Classic editor is displayed

Expected behavior

Gutenberg editor should be displayed

Screenshots

https://drive.google.com/file/d/18g7ZA3PO_7z0SYCS988aDoY3gX1bGHTR/view?usp=sharing

https://drive.google.com/file/d/18guVcMb80axpMMwVhFf1Dno69k2G9YIQ/view?usp=sharing

https://drive.google.com/file/d/18hc4ye0AJTdkV9jFrJTyrVGPhomfXxRs/view?usp=sharing

Environment information

WordPress 5.7

Bulk conversion

Is your enhancement related to a problem? Please describe.
As noted on Twitter (and in a couple other dotorg/etc. places), some folks are requesting the ability to bulk convert posts vs. the one-at-a-time approach that C2B was built for.

It works wonderfully, but there's no bulk conversion option. Anyone with more than a few hundred posts has got a ton of manual work ahead of them. CLI is always preferred (over a Bulk Edit dropdown on the All Posts table list view).

Is there a way to to this function in bulk without having to open every single post?

Describe the solution you'd like
Initial approach is probably a CLI command as that limits the use to more technical users who we can gain initial feedback from before considering whether to expose this in a Bulk Edit dropdown option or not.

Designs
The CLI command could default to all posts in a specified post type, but accept a list or range of IDs to convert as an option? Open to how we might structure the commend / input / output.

Describe alternatives you've considered

Additional context

Unit tests are broken

Describe the bug

Running unit tests from the existing package produce an error:

Error: The PHPUnit Polyfills library is a requirement for running the WP test suite.
If you are trying to run plugin/theme integration tests, make sure the PHPUnit Polyfills library (https://github.com/Yoast/PHPUnit-Polyfills) is available and either load the autoload file of this library in your own test bootstrap before calling the WP Core test bootstrap file; or set the absolute path to the PHPUnit Polyfills library in a "WP_TESTS_PHPUNIT_POLYFILLS_PATH" constant to allow the WP Core bootstrap to load the Polyfills.

Steps to Reproduce

https://github.com/10up/convert-to-blocks/runs/6590048961?check_suite_focus=true

Screenshots, screen recording, code snippet

No response

Environment information

No response

WordPress information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Test against WordPress 5.7

Is your enhancement related to a problem? Please describe.
Once WordPress 5.7 is released, we'll want to test Convert to Blocks to see if any incompatibility issues arise.

Describe the solution you'd like

  • test Convert to Blocks on WordPress 5.7
  • open issues for any incompatibilities noted in testing
  • resolve issues identified in testing
  • bump "tested up to" version
  • if code changes needed due to incompatibilities, ship a plugin release

Designs
n/a

Describe alternatives you've considered
none

Additional context
Related: #23

PHP warning on new page creation / save / edit

Describe the bug

I'm seeing these warnings in my PHP logs on a completely vanilla WP installation and only Convert To Blocks installed:

PHP Warning:  Undefined array key "content" in public/wp-content/plugins/convert-to-blocks/includes/ConvertToBlocks/RESTSupport.php on line 91
PHP Warning:  Trying to access array offset on value of type null in public/wp-content/plugins/convert-to-blocks/includes/ConvertToBlocks/RESTSupport.php on line 91

Steps to Reproduce

  1. Start with a vanilla WP installation
  2. Install and activate Convert To Blocks
  3. Click Pages > Add new
  4. Check PHP logs for the warning

This happens when saving the new page too, and on subsequent attempts to edit the page.

Screenshots, screen recording, code snippet

Dumping the $data variable used on the line mentioned gives a full set of post data for the edited page, but then seems to be picking up and trying to evaluate an incomplete set of data from other pages, e.g.

[14-Mar-2023 18:57:34 UTC] Array
(
    [id] => 2
    [title] => Array
        (
            [raw] => Sample Page
            [rendered] => Sample Page
        )

    [parent] => 0
)

There's no [content] array key there, hence the warning.

Environment information

No response

WordPress information

### wp-core ###

version: 6.1.1
site_language: en_US
user_language: en_US
timezone: +00:00
permalink: undefined
https_status: true
multisite: false
user_registration: 0
blog_public: 1
default_comment_status: open
environment_type: production
user_count: 1
dotorg_communication: true

### wp-paths-sizes ###

wordpress_path: /Users/[redacted]/Sites/wordpress-vanilla/public
wordpress_size: 49.46 MB (51866323 bytes)
uploads_path: /Users/[redacted]/Sites/wordpress-vanilla/public/wp-content/uploads
uploads_size: 5.83 MB (6113895 bytes)
themes_path: /Users/[redacted]/Sites/wordpress-vanilla/public/wp-content/themes
themes_size: 2.51 MB (2636074 bytes)
plugins_path: /Users/[redacted]/Sites/wordpress-vanilla/public/wp-content/plugins
plugins_size: 65.34 KB (66911 bytes)
database_size: 2.64 MB (2768896 bytes)
total_size: 60.51 MB (63452099 bytes)

### wp-active-theme ###

name: Twenty Twenty-Three (twentytwentythree)
version: 1.0
author: the WordPress team
author_website: https://wordpress.org
parent_theme: none
theme_features: core-block-patterns, post-thumbnails, responsive-embeds, editor-styles, html5, automatic-feed-links, block-templates, widgets-block-editor
theme_path: /Users/[redacted]/Sites/wordpress-vanilla/public/wp-content/themes/twentytwentythree
auto_update: Disabled

### wp-plugins-active (1) ###

Convert to Blocks: version: 1.1.1, author: 10up, Auto-updates disabled

### wp-media ###

image_editor: WP_Image_Editor_Imagick
imagick_module_version: 1808
imagemagick_version: ImageMagick 7.1.0-61 Q16-HDRI aarch64 20866 https://imagemagick.org
imagick_version: 3.7.0
file_uploads: File uploads is turned off
post_max_size: 10G
upload_max_filesize: 10G
max_effective_size: 10 GB
max_file_uploads: 20
imagick_limits: 
	imagick::RESOURCETYPE_AREA: 256 GB
	imagick::RESOURCETYPE_DISK: 9.2233720368548E+18
	imagick::RESOURCETYPE_FILE: 192
	imagick::RESOURCETYPE_MAP: 128 GB
	imagick::RESOURCETYPE_MEMORY: 64 GB
	imagick::RESOURCETYPE_THREAD: 1
imagemagick_file_formats: 3FR, 3G2, 3GP, AAI, AI, APNG, ART, ARW, ASHLAR, AVI, AVIF, AVS, BAYER, BAYERA, BGR, BGRA, BGRO, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CR3, CRW, CUBE, CUR, CUT, DATA, DCM, DCR, DCRAW, DCX, DDS, DFONT, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FARBFELD, FAX, FF, FILE, FITS, FL32, FLV, FRACTAL, FTP, FTS, FTXT, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, HALD, HDR, HEIC, HEIF, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, JXL, K25, KDC, KERNEL, LABEL, M2V, M4V, MAC, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORA, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PHM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, POCKETMOD, PPM, PS, PS2, PS3, PSB, PSD, PTIF, PWP, QOI, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGB565, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, STRIMG, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TM2, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBM, WEBP, WMV, WPG, X3F, XBM, XC, XCF, XPM, XPS, XV, YAML, YCbCr, YCbCrA, YUV
gd_version: 2.3.3
gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM
ghostscript_version: 10.00.0

### wp-server ###

server_architecture: Darwin 22.3.0 arm64
httpd_software: Apache/2.4.55 (Unix) OpenSSL/1.1.1t PHP/8.0.27
php_version: 8.0.27 64bit
php_sapi: apache2handler
max_input_variables: 1000
time_limit: 30
memory_limit: 128M
admin_memory_limit: 256M
max_input_time: 60
upload_max_filesize: 10G
php_post_max_size: 10G
curl_version: 7.87.0 (SecureTransport) OpenSSL/1.1.1t
suhosin: false
imagick_availability: true
pretty_permalinks: true
htaccess_extra_rules: false

### wp-database ###

extension: mysqli
server_version: 5.7.41
client_version: mysqlnd 8.0.27
max_allowed_packet: 4194304
max_connections: 151

### wp-constants ###

WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /Users/[redacted]/Sites/wordpress-vanilla/public/wp-content
WP_PLUGIN_DIR: /Users/[redacted]/Sites/wordpress-vanilla/public/wp-content/plugins
WP_MEMORY_LIMIT: 40M
WP_MAX_MEMORY_LIMIT: 256M
WP_DEBUG: false
WP_DEBUG_DISPLAY: true
WP_DEBUG_LOG: false
SCRIPT_DEBUG: false
WP_CACHE: false
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_ENVIRONMENT_TYPE: Undefined
DB_CHARSET: utf8
DB_COLLATE: undefined

### wp-filesystem ###

wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable

Code of Conduct

  • I agree to follow this project's Code of Conduct

Test against WordPress 6.0

Is your enhancement related to a problem? Please describe.

Is your enhancement related to a problem? Please describe.
Once WordPress 6.0 is released, we'll want to test Convert to Blocks to see if any incompatibility issues arise.

Describe the solution you'd like

  • test Convert to Blocks on WordPress 6.0
  • open issues for any incompatibilities noted in testing
  • resolve issues identified in testing
  • bump "tested up to" version
  • if code changes needed due to incompatibilities, ship a plugin release, otherwise use "Plugin asset/readme update" action to update "tested up to" version on .org repo

Designs
n/a

Describe alternatives you've considered
None

Additional context
Related: #58, #49, #32, #23.

Designs

No response

Describe alternatives you've considered

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

All posts showing as Classic Editor even though they're not

Describe the bug
On my local test install with a minimal number of posts where only the most recent one was created using the classic editor via the Classic Editor plugin, all posts are showing as Classic Editor.

Steps to Reproduce

  • Create posts using the block editor and the classic editor
  • See that all posts in the posts list table show as "Classic Editor"

Expected behavior
I would expect this to show me that some posts were written using the block editor. In my screenshot, that should be everything except Classic editor test.

Screenshots
Screen Shot 2020-11-23 at 1 41 34 PM

Environment information

  • Device: Mac Mini
  • OS: MacOS 11.0.1
  • Browser and version: Firefox 84.0b1
  • WordPress version: 5.5.3
Site Health Info:
### wp-core ###

version: 5.5.3
site_language: en_US
user_language: en_US
timezone: +00:00
permalink: /%postname%/
https_status: false
multisite: true
user_registration: false
blog_public: 2
default_comment_status: open
environment_type: production
user_count: 3
site_count: 8
network_count: 1
dotorg_communication: true

wp-dropins (1)

sunrise.php: true

wp-active-theme

name: Twenty Twenty (twentytwenty)
version: 1.5
author: the WordPress team
author_website: https://wordpress.org/
parent_theme: none
theme_features: core-block-patterns, automatic-feed-links, custom-background, post-thumbnails, custom-logo, title-tag, html5, align-wide, responsive-embeds, customize-selective-refresh-widgets, editor-color-palette, editor-font-sizes, editor-styles, widgets, menus, editor-style
theme_path: /var/www/html/wp-content/themes/twentytwenty
auto_update: Disabled

wp-themes-inactive (5)

10up internal blog: version: 1.0, author: 10up,Auto-updates disabled
ClassifAI Theme: version: 1.0, author: 10up,Auto-updates disabled
Twenty Nineteen: version: 1.6, author: the WordPress team (latest version: 1.7),Auto-updates disabled
Twenty Seventeen: version: 2.4, author: the WordPress team,Auto-updates disabled
Twenty Sixteen: version: 2.2, author: the WordPress team,Auto-updates disabled

wp-mu-plugins (1)

hhs-stuff.php: author: (undefined), version: (undefined)

wp-plugins-active (12)

Admin Color Schemer: version: 1.1, author: WordPress Core Team, Auto-updates disabled
Ad Refresh Control: version: 1.0.0, author: 10up (latest version: 1.0.2), Auto-updates disabled
Ads.txt Manager: version: 1.3.0, author: 10up, Auto-updates disabled
Application Passwords: version: 0.1.1, author: George Stephanis (latest version: 0.1.2), Auto-updates disabled
Autoshare for Twitter: version: 1.0.3, author: 10up (latest version: 1.0.4), Auto-updates disabled
Convert to Blocks: version: 1.0.0, author: 10up, Auto-updates disabled
Distributor: version: 1.6.2, author: 10up Inc., Auto-updates disabled
Insert Special Characters: version: 1.0.1, author: 10up (latest version: 1.0.2), Auto-updates disabled
Restricted Site Access: version: 7.2.0, author: Jake Goldman, 10up, Oomph, Auto-updates disabled
Simple Podcasting: version: 1.1.1, author: 10up (latest version: 1.2.0), Auto-updates disabled
User Switching: version: 1.5.5, author: John Blackbourn & contributors (latest version: 1.5.6), Auto-updates disabled
WordPress MU Domain Mapping: version: 0.5.5.1, author: Donncha O Caoimh, Auto-updates disabled

wp-plugins-inactive (19)

10up Docs Site Tweaks: version: 0.1, author: 10up, Auto-updates disabled
10up Slack Commands: author: (undefined), version: (undefined), Auto-updates disabled
Akismet Anti-Spam: version: 4.1.6, author: Automattic (latest version: 4.1.7), Auto-updates disabled
Block for Apple Maps: version: 1.0.1, author: 10up, Auto-updates disabled
CDCR Accessibility Scanner: version: 1.1.8, author: 10up, Auto-updates disabled
Classic Editor: version: 1.6, author: WordPress Contributors, Auto-updates disabled
ClassifAI: version: 1.6.0, author: 10up, Auto-updates disabled
Eight Day Week: version: 1.1.0, author: 10up (latest version: 1.1.2), Auto-updates disabled
ElasticPress: version: 3.4.3, author: 10up (latest version: 3.5.1), Auto-updates disabled
External Media without Import: version: 1.1.2, author: Zhixiang Zhu, Auto-updates disabled
Gutenberg: version: 7.7.2, author: Gutenberg Team (latest version: 9.4.1), Auto-updates disabled
Hello Dolly: version: 1.7.2, author: Matt Mullenweg, Auto-updates disabled
Log HTTP Requests: version: 1.2, author: FacetWP, LLC, Auto-updates disabled
Members: version: 3.0.10, author: MemberPress (latest version: 3.1.3), Auto-updates disabled
Microsoft Azure Storage for WordPress: version: 4.3.1, author: 10up, Microsoft Open Technologies, Auto-updates disabled
Safe Redirect Manager: version: 1.9.2, author: 10up (latest version: 1.9.3), Auto-updates disabled
Simple Local Avatars: version: 2.1.1, author: Jake Goldman, 10up (latest version: 2.2.0), Auto-updates disabled
Simple Page Ordering: version: 2.3.4, author: Jake Goldman, 10up, Auto-updates disabled
Yoast SEO: version: 14.8, author: Team Yoast (latest version: 15.3), Auto-updates disabled

wp-media

image_editor: WP_Image_Editor_Imagick
imagick_module_version: 1690
imagemagick_version: ImageMagick 6.9.10-86 Q16 x86_64 2020-01-13 https://imagemagick.org
file_uploads: File uploads is turned off
post_max_size: 150m
upload_max_filesize: 150m
max_effective_size: 150 MB
max_file_uploads: 20
imagick_limits:
imagick::RESOURCETYPE_AREA: 4 GB
imagick::RESOURCETYPE_DISK: 9.2233720368548E+18
imagick::RESOURCETYPE_FILE: 786432
imagick::RESOURCETYPE_MAP: 4 GB
imagick::RESOURCETYPE_MEMORY: 2 GB
imagick::RESOURCETYPE_THREAD: 3
gd_version: 2.2.5
ghostscript_version: not available

wp-server

server_architecture: Linux 5.4.39-linuxkit x86_64
httpd_software: nginx/1.15.12
php_version: 7.3.16 64bit
php_sapi: fpm-fcgi
max_input_variables: 1000
time_limit: 30
memory_limit: 128M
admin_memory_limit: 256M
max_input_time: 60
upload_max_filesize: 150m
php_post_max_size: 150m
curl_version: 7.61.1 OpenSSL/1.1.1c
suhosin: false
imagick_availability: true
pretty_permalinks: true

wp-database

extension: mysqli
server_version: 5.7.25
client_version: mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $

wp-constants

WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /var/www/html/wp-content
WP_PLUGIN_DIR: /var/www/html/wp-content/plugins
WP_MAX_MEMORY_LIMIT: 256M
WP_DEBUG: true
WP_DEBUG_DISPLAY: true
WP_DEBUG_LOG: false
SCRIPT_DEBUG: true
WP_CACHE: false
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_LOCAL_DEV: undefined
DB_CHARSET: utf8
DB_COLLATE: undefined

wp-filesystem

wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable
mu-plugins: writable

distributor

0: 1.6.2
1:
Override Author Byline: Yes
Media Handling: Featured image only
2:
ClassifAI:

Additional context

Fails to convert blocks where an image has no alt text

Describe the bug

In my classic text I have many images throughout but all are lacking alt text.
After importing my content and enabling this plugin, any paragraph that includes an image displays an error instead.
Original:
<img class="alignnone size-full wp-image-40771" src="https://mywebsiteaddress.com/wp-content/uploads/2023/04/A3_Incomplete_6.png" alt="" width="687" height="484" />
After conversion:
<img class="alignnone size-full wp-image-40771" src="https://mywebsiteaddress.com/wp-content/uploads/2023/04/A3_Incomplete_6.png" alt=" width=" 687"="" height="484">

Steps to Reproduce

  1. Create a post using the classic editor including text and an image where there is no "alt=" value.
  2. Enable the Convert to Blocks plugin
  3. Refresh the article
  4. See the error: "This block has encountered an error and cannot be previewed." where the image should've been.

Screenshots, screen recording, code snippet

image
image

Original text:
<img class="alignnone size-full wp-image-40771" src="https://supportportal.covetrus.com/wp-content/uploads/2019/08/A3_Incomplete_6.png" alt="" width="687" height="484" />

Converted text:
<img class="alignnone size-full wp-image-40771" src="https://attractive-fowl.flywheelsites.com/wp-content/uploads/2023/04/A3_Incomplete_6.png" alt=" width=" 687"="" height="484">

Environment information

  • Device: Windows PC
  • OS: Windows 10 Version 22H2 Build 19045.3208
  • Browser and version: Chrome Version 115.0.5790.102 (Official Build) (64-bit)

WordPress information

`

wp-core

version: 6.2.2
site_language: en_AU
user_language: en_AU
timezone: Australia/Brisbane
permalink: /%category%/%postname%/
https_status: true
multisite: false
user_registration: 0
blog_public: 1
default_comment_status: undefined
environment_type: production
user_count: 13
dotorg_communication: true

wp-paths-sizes

wordpress_path: /wordpress
wordpress_size: loading...
uploads_path: /www/wp-content/uploads
uploads_size: loading...
themes_path: /www/wp-content/themes
themes_size: loading...
plugins_path: /www/wp-content/plugins
plugins_size: loading...
database_size: loading...
total_size: loading...

wp-dropins (1)

db-error.php: true

wp-active-theme

name: Hello Elementor (hello-elementor)
version: 2.7.1 (latest version: 2.8.1)
author: Elementor Team
author_website: https://elementor.com/?utm_source=wp-themes&utm_campaign=author-uri&utm_medium=wp-dash
parent_theme: none
theme_features: core-block-patterns, widgets-block-editor, menus, post-thumbnails, automatic-feed-links, title-tag, html5, custom-logo, editor-style, align-wide, woocommerce, wc-product-gallery-zoom, wc-product-gallery-lightbox, wc-product-gallery-slider, widgets
theme_path: /www/wp-content/themes/hello-elementor
auto_update: Disabled

wp-themes-inactive (1)

Twenty Twenty-Three: version: 1.1, author: the WordPress team, Auto-updates disabled

wp-plugins-active (37)

BetterDocs: version: 2.3.7, author: WPDeveloper, Auto-updates disabled
BetterDocs Pro: version: 2.2.7, author: WPDeveloper, Auto-updates disabled
Convert to Blocks: version: 1.2.0, author: 10up, Auto-updates disabled
Elementor: version: 3.14.0, author: Elementor.com (latest version: 3.14.1), Auto-updates disabled
Elementor Pro: version: 3.14.0, author: Elementor.com (latest version: 3.14.1), Auto-updates disabled
Essential Addons for Elementor: version: 5.8.0, author: WPDeveloper (latest version: 5.8.3), Auto-updates disabled
Essential Addons for Elementor - Pro: version: 5.4.11, author: WPDeveloper (latest version: 5.5.0), Auto-updates disabled
Essential Blocks: version: 4.1.2, author: WPDeveloper (latest version: 4.1.5), Auto-updates disabled
Favorites: version: 2.3.3, author: Kyle Phillips, Auto-updates disabled
IdeaPush - Feature Request Manager: version: 8.46, author: Martin Gibson, Auto-updates disabled
If Menu - Visibility control for menus: version: 0.17.0, author: Layered, Auto-updates disabled
Mammoth .docx converter: version: 1.20.0, author: Michael Williamson, Auto-updates disabled
Managed Plugin Updates: version: 5.17.7, author: Flywheel, Auto-updates disabled
MemberPress Account Nav Tabs: version: 1.0.0, author: Caseproof, LLC, Auto-updates disabled
MemberPress Courses: version: 1.2.10, author: Caseproof LLC (latest version: 1.2.11), Auto-updates disabled
MemberPress Elementor Content Protection: version: 1.0.6, author: Caseproof, LLC, Auto-updates disabled
MemberPress Importer: version: 1.6.15, author: Caseproof, LLC, Auto-updates disabled
MemberPress Pro: version: 1.11.6, author: Caseproof, LLC (latest version: 1.11.12), Auto-updates enabled
Members: version: 3.2.5, author: MemberPress, Auto-updates disabled
OoohBoi Steroids for Elementor: version: 2.1.5, author: OoohBoi, Auto-updates disabled
OTGS Installer: version: 3.0.3, author: OnTheGoSystems, Auto-updates disabled
Rank Math SEO: version: 1.0.117.1, author: Rank Math (latest version: 1.0.119.1), Auto-updates disabled
Rank Math SEO PRO: version: 3.0.38, author: Rank Math (latest version: 3.0.40), Auto-updates disabled
Relevanssi Premium: version: 2.23.0, author: Mikko Saari, Auto-updates disabled
Remove Dashboard Access: version: 1.1.5, author: TrustedLogin, Auto-updates disabled
Simple Feature Requests: version: 2.2.5.1, author: Mindsize, Auto-updates disabled
The Plus Addons for Block Editor: version: 3.0.1, author: POSIMYTH (latest version: 3.0.4), Auto-updates disabled
The Plus Addons for Elementor: version: 5.2.8, author: POSIMYTH (latest version: 5.2.12), Auto-updates disabled
Toolset Access: version: 2.8.16, author: OnTheGoSystems, Auto-updates disabled
Toolset Blocks: version: 1.6.7, author: OnTheGoSystems, Auto-updates disabled
Toolset Forms: version: 2.6.16, author: OnTheGoSystems, Auto-updates disabled
Toolset Types: version: 3.4.19, author: OnTheGoSystems, Auto-updates disabled
User Switching: version: 1.7.0, author: John Blackbourn & contributors, Auto-updates disabled
WP All Export Pro: version: 1.8.3, author: Soflyy, Auto-updates disabled
WP All Import - Toolset Types Add-On Pro: version: 1.0.6, author: Soflyy, Auto-updates disabled
WP All Import - User Import Add-On Pro: version: 1.1.8, author: Soflyy, Auto-updates disabled
WP All Import Pro: version: 4.8.0, author: Soflyy, Auto-updates disabled

wp-plugins-inactive (2)

MemberPress Corporate Accounts: version: 1.5.31, author: Caseproof, LLC, Auto-updates disabled
Sucuri Security - Auditing, Malware Scanner and Hardening: version: 1.8.39, author: Sucuri Inc., Auto-updates disabled

wp-media

image_editor: WP_Image_Editor_Imagick
imagick_module_version: 1690
imagemagick_version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 https://imagemagick.org
imagick_version: 3.7.0
file_uploads: File uploads is turned off
post_max_size: 300M
upload_max_filesize: 300M
max_effective_size: 300 MB
max_file_uploads: 20
imagick_limits:
imagick::RESOURCETYPE_AREA: 51 GB
imagick::RESOURCETYPE_DISK: 1.844674407371E+19
imagick::RESOURCETYPE_FILE: 786432
imagick::RESOURCETYPE_MAP: 51 GB
imagick::RESOURCETYPE_MEMORY: 25 GB
imagick::RESOURCETYPE_THREAD: 1
imagick::RESOURCETYPE_TIME: 1.844674407371E+19
imagemagick_file_formats: 3FR, 3G2, 3GP, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DNG, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, JBG, JBIG, JNG, JNX, JPE, JPEG, JPG, JPS, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBP, WMV, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
gd_version: 2.3.3
gd_formats: GIF, JPEG, PNG, WebP, BMP, AVIF, XPM
ghostscript_version: unknown

wp-server

server_architecture: Linux 5.15.89+ x86_64
httpd_software: Flywheel/5.1.0
php_version: 8.1.20 64bit
php_sapi: fpm-fcgi
max_input_variables: 10000
time_limit: 178
memory_limit: 200M
max_input_time: 60
upload_max_filesize: 300M
php_post_max_size: 300M
curl_version: 7.68.0 OpenSSL/1.1.1f
suhosin: false
imagick_availability: true
pretty_permalinks: true
htaccess_extra_rules: true

wp-database

extension: mysqli
server_version: 5.7.42-google
client_version: mysqlnd 8.1.20
max_allowed_packet: 33554432
max_connections: 4030

wp-constants

WP_HOME: https://attractive-fowl.flywheelsites.com
WP_SITEURL: https://attractive-fowl.flywheelsites.com
WP_CONTENT_DIR: /www/wp-content
WP_PLUGIN_DIR: /www/wp-content/plugins
WP_MEMORY_LIMIT: 200M
WP_MAX_MEMORY_LIMIT: 200M
WP_DEBUG: false
WP_DEBUG_DISPLAY: true
WP_DEBUG_LOG: false
SCRIPT_DEBUG: false
WP_CACHE: false
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_ENVIRONMENT_TYPE: Undefined
DB_CHARSET: utf8
DB_COLLATE: undefined

wp-filesystem

wordpress: not writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable
mu-plugins: writable

`

Code of Conduct

  • I agree to follow this project's Code of Conduct

Release version 1.0.1

This issue is for tracking changes for the 1.0.0 release. Target release date: TBD.

Release steps

  • Branch: Starting from develop, cut a release branch named release/1.0.0 for your changes.
  • Version bump: Bump the version number in convert-to-blocks.php, readme.txt, and package.json if it does not already reflect the version being released. Update both the plugin "Version:" property in convert-to-blocks.php and the plugin $plugin_version constant in config.php.
  • Changelog: Add/update the changelog in CHANGELOG.md and readme.txt.
  • Props: update CREDITS.md file with any new contributors, confirm maintainers are accurate.
  • New files: Ensure any new files/paths that are unnecessary in the production version are included in .distignore.
  • Readme updates: Make any other readme changes as necessary. README.md is geared toward GitHub and readme.txt contains WordPress.org-specific content. The two are slightly different.
  • Merge: Make a non-fast-forward merge from your release branch to develop (or merge the Pull Request), then do the same for develop into trunk (git checkout trunk && git merge --no-ff develop). trunk contains the stable development version.
  • Push: Push your trunk branch to GitHub (e.g. git push origin trunk).
  • Release: Create a new release, naming the tag and the release with the new version number, and targeting the trunk branch. Paste the changelog from CHANGELOG.md into the body of the release and include a link to the closed issues on the milestone. The release should now appear under releases.
  • SVN: Wait for the GitHub Action to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
  • Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/convert-to-blocks/. This may take a few minutes.
  • Close milestone: Edit the 1.0.0 milestone with release date (in the Due date (optional) field) and link to GitHub release (in the Description field), then close the milestone.
  • Punt incomplete items: If any open issues or PRs which were milestoned for 1.0.0 do not make it into the release, update their milestone to 1.1.0 or Future Release.

unknown parameter on CLI command

Describe the bug

when attempting to use the --only param on the CLI command, the standard "unknown parameter" is returned on the terminal. the --post_type param DOES work as expected.

Steps to Reproduce

  1. enter WP-CLI
  2. enter the command wp convert-to-blocks start --only=123,456,789 (changing IDs to ones that exist)
  3. run the command

Screenshots, screen recording, code snippet

Screen Shot 2022-08-05 at 2 01 54 PM

Environment information

No response

WordPress information

`

wp-core

version: 6.0.1
site_language: en_US
user_language: en_US
timezone: America/New_York
permalink: /%year%/%monthnum%/%postname%/
https_status: false
multisite: false
user_registration: 0
blog_public: 1
default_comment_status: undefined
environment_type: staging
user_count: 8
dotorg_communication: true

wp-paths-sizes

wordpress_path: /srv/www/nasadotgov/public_html
wordpress_size: loading...
uploads_path: /srv/www/nasadotgov/public_html/wp-content/uploads
uploads_size: loading...
themes_path: /srv/www/nasadotgov/public_html/wp-content/themes
themes_size: loading...
plugins_path: /srv/www/nasadotgov/public_html/wp-content/plugins
plugins_size: loading...
database_size: loading...
total_size: loading...

wp-active-theme

name: NASA (nasa)
version: 1.1.1
author: Lone Rock Point
author_website: https://lonerockpoint.com/
parent_theme: none
theme_features: widgets-block-editor, disable-custom-font-sizes, editor-font-sizes, disable-custom-colors, editor-color-palette, automatic-feed-links, editor-styles, align-wide, title-tag, post-thumbnails, menus, html5, custom-background, customize-selective-refresh-widgets, custom-logo
theme_path: /srv/www/nasadotgov/public_html/wp-content/themes/nasa

wp-themes-inactive (3)

NASA 2021 PBrocks: version: 1.3.6, author: pbrocks
Twenty Twenty-One: version: 1.1, author: the WordPress team (latest version: 1.6)
Twenty Twenty-Two: version: 1.1, author: the WordPress team (latest version: 1.2)

wp-mu-plugins (38)

Admin Notice: version: 0.1.0, author: WordPress VIP
Advanced Post Caching: version: 0.2, author: Automattic
Akismet Anti-Spam: version: 4.2.4, author: Automattic
Async Publish Actions: author: Automattic, version: (undefined)
blogpublic-notice.php: author: (undefined), version: (undefined)
Cron Control: version: 3.1, author: Erick Hitter, Automattic
Debug Bar: version: 1.1.3, author: wordpressdotorg
HTTP Concat: version: 1.0, author: Automattic
Jetpack: version: 10.9, author: Automattic
Lightweight Term Count Update: version: 0.1.0, author: Automattic, Alley Interactive
Query Monitor: version: 3.8.2, author: John Blackbourn
REST API Enhancements: version: 0.1, author: Erick Hitter, Automattic
Rewrite Rules Inspector: version: 1.3.1, author: Automattic, Daniel Bachhuber
VaultPress: version: 2.2.1, author: Automattic
VIP AllOptions Safeguard: author: Automattic, version: (undefined)
VIP Back-compat: version: 1.0, author: Automattic
VIP Cache Manager: version: 1.1, author: Automattic
VIP Client mu-plugins: author: Automattic, version: (undefined)
VIP Codebase Manager: version: 1.0.0, author: Automattic
VIP Dashboard: version: 3.0.0, author: Scott Evans, Filipe Varela, Pau Argelaguet
VIP Feed Cache: author: Automattic, version: (undefined)
VIP File Service: version: 0.2, author: Automattic
VIP Force Two Factor: author: Automattic, version: (undefined)
VIP Go Core Modifications: author: Automattic, version: (undefined)
VIP Go Plugin Compat: version: 1.0, author: Automattic
VIP Hosting Miscellaneous: version: 1.1, author: Automattic
VIP Init: author: Automattic, version: (undefined)
VIP Mail: version: 1.0, author: Automattic
VIP Parse.ly Integration: version: 1.0, author: Automattic
VIP Performance: version: 1.0, author: Automattic
VIP Plugins: version: 1.0.0, author: Automattic
VIP Schema: author: Automattic, version: (undefined)
VIP Security: version: 1.2, author: Automattic
VIP Stats: author: Automattic, version: (undefined)
WooCommerce: VIP Specific Changes: version: 1.0.0, author: Automattic
WordPress Importer: version: 0.6.4, author: wordpressdotorg
WordPress VIP Support: version: 3.1.0, author: Automattic
WP-CLI for VIP Go: author: Automattic, version: (undefined)

wp-plugins-active (15)

CMB2: version: 2.10.1, author: CMB2 team
Co-Authors Plus: version: 3.5.2, author: Mohammad Jangda, Daniel Bachhuber, Automattic
Convert to Blocks: version: 1.1.0, author: 10up
F4 Media Taxonomies: version: 1.1.1, author: FAKTOR VIER
NASA Dashboard Manager: version: 0.0.1-dev, author: Lone Rock Point
NASA Data Migration: version: 0.0.1-dev, author: Lone Rock Point
NASA Gutenberg Blocks: version: 2.3.1, author: Lone Rock Point
NASA Horizon Design System Core Setup: version: 0.0.1-dev, author: Lone Rock Point
NASA User Role Scoping: version: 0.0.1-dev, author: Lone Rock Point
Newspack Content Converter Forked: version: 11.11.1970, author: Automattic / Norcross
OneLogin SAML SSO: version: 3.4.0, author: OneLogin, Inc.
Public Post Preview: version: 2.9.3, author: Dominik Schilling
Safe SVG: version: 2.0.2, author: 10up
Simple Local Avatars: version: 2.5.0, author: Jake Goldman, 10up
WP-Sweep: version: 1.1.5, author: Lester 'GaMerZ' Chan

wp-plugins-inactive (14)

Accessibility Checker: version: 1.2.11, author: Equalize Digital (latest version: 1.2.12)
Accessibility Checker Pro: version: 1.1.6, author: Equalize Digital
Admin Columns Pro: version: 5.7.2, author: AdminColumns.com
Gravity Forms: version: 2.4.24, author: Gravity Forms
Gravity Forms Quiz Add-On: version: 3.7, author: Gravity Forms
JSM's Show Post Metadata: version: 3.0.4, author: JS Morisset
JSM's Show User Metadata: version: 3.0.4, author: JS Morisset
NASA Editorial Content Pitch: version: 0.0.1-dev, author: Lone Rock Point
NASA Training Site Setup: version: 0.0.1-dev, author: Lone Rock Point
Post Type Switcher: version: 3.2.1, author: Triple J Software, Inc.
Pre-Publish Checklist: version: 1.1.1, author: Brainstorm Force
Rank Math SEO: version: 1.0.92.1, author: Rank Math (latest version: 1.0.94)
Rank Math SEO PRO: version: 3.0.15, author: Rank Math
Regenerate Thumbnails: version: 3.1.5, author: Alex Mills (Viper007Bond)

wp-media

image_editor: WP_Image_Editor_Imagick
imagick_module_version: 1690
imagemagick_version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 https://imagemagick.org
imagick_version: 3.7.0
file_uploads: File uploads is turned off
post_max_size: 1024M
upload_max_filesize: 1024M
max_effective_size: 1 GB
max_file_uploads: 20
imagick_limits:
imagick::RESOURCETYPE_AREA: 122 MB
imagick::RESOURCETYPE_DISK: 1073741824
imagick::RESOURCETYPE_FILE: 768
imagick::RESOURCETYPE_MAP: 512 MB
imagick::RESOURCETYPE_MEMORY: 256 MB
imagick::RESOURCETYPE_THREAD: 1
imagemagick_file_formats: 3FR, 3G2, 3GP, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DNG, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, JBG, JBIG, JNG, JNX, JPE, JPEG, JPG, JPS, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBP, WMV, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
gd_version: 2.3.3
gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM
ghostscript_version: 9.50

wp-server

server_architecture: Linux 5.4.0-91-generic x86_64
httpd_software: nginx/1.23.0
php_version: 8.0.21 64bit
php_sapi: fpm-fcgi
max_input_variables: 1000
time_limit: 300
memory_limit: 128M
admin_memory_limit: 256M
max_input_time: 60
upload_max_filesize: 1024M
php_post_max_size: 1024M
curl_version: 7.68.0 OpenSSL/1.1.1f
suhosin: false
imagick_availability: true
pretty_permalinks: true

wp-database

extension: mysqli
server_version: 10.5.16-MariaDB-1:10.5.16+maria~focal
client_version: mysqlnd 8.0.21
max_allowed_packet: 134217728
max_connections: 151

wp-constants

WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /srv/www/nasadotgov/public_html/wp-content
WP_PLUGIN_DIR: /srv/www/nasadotgov/public_html/wp-content/plugins
WP_MEMORY_LIMIT: 40M
WP_MAX_MEMORY_LIMIT: 256M
WP_DEBUG: true
WP_DEBUG_DISPLAY: false
WP_DEBUG_LOG: true
SCRIPT_DEBUG: true
WP_CACHE: false
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_ENVIRONMENT_TYPE: staging
DB_CHARSET: utf8
DB_COLLATE: undefined

wp-filesystem

wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable
mu-plugins: writable

jetpack

site_id: false
ssl_cert: No
time_diff: false
version_option: 9.4.1:1614723894
old_version: 9.4.1:1614723894
public: Private
master_user: No master user set.
current_user: #1 norcross
tokens_set: None
blog_token: Not set.
user_token: Not set.
version: 10.9
jp_plugin_dir: /srv/www/nasadotgov/public_html/wp-content/mu-plugins/jetpack-10.9/
plan: free
protect_header: false
full_sync: {"started":"Thu, 01 Jan 1970 00:00:00 +0000","finished":"Thu, 01 Jan 1970 00:00:00 +0000","progress":[],"config":[]}
sync_size: undefined
sync_lag: 0 seconds
full_sync_size: undefined
full_sync_lag: 0 seconds
idc_urls: {"home":"http://nasadotgov.test","siteurl":"http://nasadotgov.test","WP_HOME":"","WP_SITEURL":""}
idc_error_option: false
idc_optin: true
cxn_tests: All Pass.

`

Code of Conduct

  • I agree to follow this project's Code of Conduct

Release version 1.0.2

This issue is for tracking changes for the 1.0.2 release. Target release date: 12 July 2021.

Release steps

  • Branch: Starting from develop, cut a release branch named release/1.0.2 for your changes.
  • Version bump: Bump the version number in config.php, convert-to-blocks.php, readme.txt, and package.json if it does not already reflect the version being released. Update both the plugin "Version:" property in convert-to-blocks.php and the plugin $plugin_version constant in config.php.
  • Changelog: Add/update the changelog in CHANGELOG.md and readme.txt.
  • Props: update CREDITS.md file with any new contributors, confirm maintainers are accurate.
  • New files: Ensure any new files/paths that are unnecessary in the production version are included in .distignore.
  • Readme updates: Make any other readme changes as necessary. README.md is geared toward GitHub and readme.txt contains WordPress.org-specific content. The two are slightly different.
  • Merge: Make a non-fast-forward merge from your release branch to develop (or merge the Pull Request), then do the same for develop into trunk (git checkout trunk && git merge --no-ff develop). trunk contains the stable development version.
  • Push: Push your trunk branch to GitHub (e.g. git push origin trunk).
  • Release: Create a new release, naming the tag and the release with the new version number, and targeting the trunk branch. Paste the changelog from CHANGELOG.md into the body of the release and include a link to the closed issues on the milestone. The release should now appear under releases.
  • SVN: Wait for the GitHub Action to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
  • Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/convert-to-blocks/. This may take a few minutes.
  • Close milestone: Edit the milestone with release date (in the Due date (optional) field) and link to GitHub release (in the Description field), then close the milestone.
  • Punt incomplete items: If any open issues or PRs which were milestoned for 1.0.2 do not make it into the release, update their milestone to 1.1.0 or Future Release.

Outdated version of nodejs is required

Describe the bug

The current nvmrc file requires node 16 is end of life. Would fixing this be within the purview of stable support?

Steps to Reproduce

Using a system that has nvm detection,

  1. git clone https://github.com/10up/convert-to-blocks.git
  2. cd convert-to-blocks

Note:
Found '/path/convert-to-blocks/.nvmrc' with version
Now using node v16.20.2 (npm v8.19.4)

Screenshots, screen recording, code snippet

No response

Environment information

Followed the instructions at https://github.com/nvm-sh/nvm?tab=readme-ov-file#calling-nvm-use-automatically-in-a-directory-with-a-nvmrc-file to support autodetecting nvmrc files

WordPress information

n/a

Code of Conduct

  • I agree to follow this project's Code of Conduct

Setup Cypress for E2E testing

Is your enhancement related to a problem? Please describe.

See overall concept in the OSBP guide and example setups on Simple Podcasting, Restricted Site Access, and 10up/ElasticPress#2446.

Describe the solution you'd like

  • add base GitHub Action
  • add .wp-env.json
  • add base docker files
  • update package.json / package lock files
  • add cypress tests
  • remove any WP Acceptance components

Designs

n/a

Describe alternatives you've considered

n/a

Additional context

https://github.com/10up/cypress-wp-setup/ && https://github.com/10up/cypress-wp-utils will be helpful in getting this spun up and some initial test commands to leverage.

Release version 1.1.0

This issue is for tracking changes for the 1.1.0 release. Target release date: 28 July 2022.

Release steps

  • Branch: Starting from develop, cut a release branch named release/1.1.0 for your changes.
  • Version bump: Bump the version number in config.php, convert-to-blocks.php, readme.txt, and package.json if it does not already reflect the version being released. Update both the plugin "Version:" property in convert-to-blocks.php and the plugin $plugin_version constant in config.php.
  • Changelog: Add/update the changelog in CHANGELOG.md and readme.txt.
  • Props: update CREDITS.md file with any new contributors, confirm maintainers are accurate.
  • New files: Ensure any new files/paths that are unnecessary in the production version are included in .distignore.
  • Readme updates: Make any other readme changes as necessary. README.md is geared toward GitHub and readme.txt contains WordPress.org-specific content. The two are slightly different.
  • Merge: Make a non-fast-forward merge from your release branch to develop (or merge the Pull Request), then do the same for develop into trunk (git checkout trunk && git merge --no-ff develop). trunk contains the stable development version.
  • Push: Push your trunk branch to GitHub (e.g. git push origin trunk).
  • Release: Create a new release, naming the tag and the release with the new version number, and targeting the trunk branch. Paste the changelog from CHANGELOG.md into the body of the release and include a link to the closed issues on the milestone. The release should now appear under releases.
  • SVN: Wait for the GitHub Action to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
  • Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/convert-to-blocks/. This may take a few minutes.
  • Close milestone: Edit the milestone with release date (in the Due date (optional) field) and link to GitHub release (in the Description field), then close the milestone.
  • Punt incomplete items: If any open issues or PRs which were milestoned for 1.1.0 do not make it into the release, update their milestone to 1.2.0 or Future Release.

Classic editor links showing all the time

Is your enhancement related to a problem? Please describe.
I understand that this plugin is meant as a stepping stone from sites that are in a classic editor workflow adjusting to the block editor. However, the Classic Editor links (admin menu and h2) were unexpected to me when I had the Classic Editor plugin deactivated.

Describe the solution you'd like
I think the links should only show if the Classic Editor plugin is active.

Designs
n/a

Describe alternatives you've considered
n/a

Additional context

Not all "Convert to Blocks" links are processed

Note: I originally reported this issue in the wordpress.org support forums (https://wordpress.org/support/topic/doesnt-seem-to-catch-all-classic-editor-blocks/), but conversation stalled and I wasn't sure if this is a more preferred avenue than there, so I'm reposting here.

Describe the bug
Not all "Convert to Blocks" links are processed.

Steps to Reproduce

  1. Create a basic post that has the post_content from this gist: https://gist.github.com/MadtownLems/42b65929ec2000bbe338e8f3b99f533a

(2 columns, each with a freeform block in it).
2. Activate "Convert to Blocks"
3. Go to Edit the Post

Expected behavior
I expect the freeform/classic blocks to be converted into basic Paragraph blocks on page load.

Screenshots
(attached)
2021-06-03 07_28_22-Window

Environment information

  • Device: Desktop PC
  • OS: Windows 10
  • Browser and version: Chrome 91
  • WordPress version: 5.7.2

Thank you so much for looking into this! I believe this plugin is going to be a HUGE timesaver as we start to migrate our content, but I don't think it's quite working for us as expected at this time. I'm more than happy to provide more details, try out new versions, or even jump on a call to discuss or work through things together. Cheers!

Upgrade Cypress to version 13

Is your enhancement related to a problem? Please describe.

Cypress 13 was recently released, and Cypress 12 contains some breaking changes as listed below. We need to update our tests to make them work with the latest version and fix any issues that may arise.

  • Upgrade cypress to 13.0.0 (or latest version at the time of working on this)
  • Upgrade @10up/cypress-wp-utils to 0.2.0
  • Replace legacy API usage such as Cookies.defaults with the new replacements.

Breaking changes we need to be aware of

  • Cypress dropped support for Node.js 12
  • In Cypress 12, we enforce running tests in a clean browser context through test isolation.
  • The Cookies.defaults and Cookies.preserveOnce APIs have been removed. Use the new cy.session() command to preserve cookies between tests.

Designs

No response

Describe alternatives you've considered

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Release version 1.3.0

Describe your question

This issue is for tracking changes for the 1.3.0 release. Target release date: May 2024.

Release steps

  • Branch: Starting from develop, cut a release branch named release/1.3.0 for your changes.
  • Version bump: Bump the version number in config.php, convert-to-blocks.php, readme.txt, package.json and package-lock.json if it does not already reflect the version being released. Update both the plugin "Version:" property in convert-to-blocks.php and the plugin $plugin_version constant in config.php.
  • Changelog: Add/update the changelog in CHANGELOG.md and readme.txt.
  • Props: update CREDITS.md with any new contributors, confirm maintainers are accurate.
  • New files: Check to be sure any new files/paths that are unnecessary in the production version are included in .distignore.
  • Readme updates: Make any other readme changes as necessary. README.md is geared toward GitHub and readme.txt contains WordPress.org-specific content. The two are slightly different.
  • Merge: Make a non-fast-forward merge from your release branch to develop (or merge the pull request), then do the same for develop into trunk, ensuring you pull the most recent changes into develop first (git checkout develop && git pull origin develop && git checkout trunk && git merge --no-ff develop). trunk contains the stable development version.
  • Push: Push your trunk branch to GitHub (e.g. git push origin trunk).
  • Compare trunk to develop to ensure no additional changes were missed.
  • Test the pre-release ZIP locally by downloading it from the Build release zip action artifact and installing it locally. Ensure this zip has all the files we expect, that it installs and activates correctly and that all basic functionality is working
  • Release: Create a new release, naming the tag and the release with the new version number, and targeting the trunk branch. Paste the changelog from CHANGELOG.md into the body of the release and include a link to the closed issues on the milestone. The release should now appear under releases.
  • SVN: Wait for the GitHub Action to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
  • Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/convert-to-blocks/. This may take a few minutes.
  • Close the milestone: Edit the milestone with release date (in the Due date (optional) field) and link to GitHub release (in the Description field), then close the milestone.
  • Punt incomplete items: If any open issues or PRs which were milestoned for 1.3.0 do not make it into the release, update their milestone to 1.4.0, or Future Release

Code of Conduct

  • I agree to follow this project's Code of Conduct

Add WP-Admin Dashboard Screen for Bulk Migration

Is your enhancement related to a problem? Please describe.

In the PR #70, I've implemented an Agent object that backs the WP CLI. We can also implement a WP-Admin based version that does not require WP CLI. One important thing to note when implementing this is the HTTP connection limit per server. We need to build support for retries / timeouts to support this.

https://github.com/10up/convert-to-blocks/blob/develop/includes/ConvertToBlocks/MigrationAgent.php

Designs

NA

Describe alternatives you've considered

NA

Code of Conduct

  • I agree to follow this project's Code of Conduct

Release version 1.2.0

Describe your question

This issue is for tracking changes for the 1.2.0 release. Target release date: June 2023.

Release steps

  • Branch: Starting from develop, cut a release branch named release/1.2.0 for your changes.
  • Version bump: Bump the version number in config.php, convert-to-blocks.php, readme.txt, package.json and package-lock.json if it does not already reflect the version being released. Update both the plugin "Version:" property in convert-to-blocks.php and the plugin $plugin_version constant in config.php.
  • Changelog: Add/update the changelog in CHANGELOG.md and readme.txt.
  • Props: update CREDITS.md with any new contributors, confirm maintainers are accurate.
  • New files: Check to be sure any new files/paths that are unnecessary in the production version are included in .distignore.
  • Readme updates: Make any other readme changes as necessary. README.md is geared toward GitHub and readme.txt contains WordPress.org-specific content. The two are slightly different.
  • Merge: Make a non-fast-forward merge from your release branch to develop (or merge the pull request), then do the same for develop into trunk, ensuring you pull the most recent changes into develop first (git checkout develop && git pull origin develop && git checkout trunk && git merge --no-ff develop). trunk contains the stable development version.
  • Push: Push your trunk branch to GitHub (e.g. git push origin trunk).
  • Compare trunk to develop to ensure no additional changes were missed.
  • Test the pre-release ZIP locally by downloading it from the Build release zip action artifact and installing it locally. Ensure this zip has all the files we expect, that it installs and activates correctly and that all basic functionality is working
  • Release: Create a new release, naming the tag and the release with the new version number, and targeting the trunk branch. Paste the changelog from CHANGELOG.md into the body of the release and include a link to the closed issues on the milestone. The release should now appear under releases.
  • SVN: Wait for the GitHub Action to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
  • Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/convert-to-blocks/. This may take a few minutes.
  • Close the milestone: Edit the milestone with release date (in the Due date (optional) field) and link to GitHub release (in the Description field), then close the milestone.
  • Punt incomplete items: If any open issues or PRs which were milestoned for 1.2.0 do not make it into the release, update their milestone to 1.2.1, or Future Release

Code of Conduct

  • I agree to follow this project's Code of Conduct

Deactivates Gutenberg editor on custom post types not explicitly returning true from function hooked to `post_type_supports_convert_to_blocks` filter

Describe the bug
I have a site with pages and a series of custom post types. When I activate this plugin, any custom post types not explicitly returning true from a function hooked to the post_type_supports_convert_to_blocks filter have the Gutenberg editor completely deactivated and they revert to the classic editor.

Steps to Reproduce

  1. Define a post type using register_post_type() that has show_in_rest set to true, so the Gutenberg editor is active for that post type.
  2. Activate the plugin.
  3. See that the custom post type has switched back to the classic editor from the Gutenberg editor.

Expected behavior
The plugin should not affect the Gutenberg editor on post types that do not return true from a function hooked to the post_type_supports_convert_to_blocks filter.

Environment information

  • Device: MacBook Pro
  • OS: 11.6.1
  • Browser and version: Chrome 96
  • WordPress version: 5.8.2
  • Site Health Info: I can't paste these here because the site is in development for a client. I would be happy to share specifics if necessary, but this should be easy to replicate as I've tested this on a vanilla WordPress 5.8.2 installation with no plugins or adjustments other than a single custom post type and this plugin.

Settings Screen to allow configuring the Plugin without code

Is your enhancement related to a problem? Please describe.
Yes. The plugin can't be extended to custom post types without code.

Describe the solution you'd like
A settings page which allows users to configure the plugin would make it easier to install & adapt the plugin. MVP would be a settings section which allows uses to select the list of Post Types that should use Convert to blocks.

Designs
A multi-checkbox should suffice.

Describe alternatives you've considered
NA

Additional context
A Filter hook was needed to tell the plugin to load on custom post types.

Test against WordPress 5.9

Is your enhancement related to a problem? Please describe.

Describe the solution you'd like

  • test WP New Relic on WordPress 5.9
  • open issues for any incompatibilities noted in testing
  • resolve issues identified in testing
  • bump "tested up to" version
  • if code changes needed due to incompatibilities, ship a plugin release, otherwise use "Plugin asset/readme update" action to update "tested up to" version on .org repo

Designs
n/a

Describe alternatives you've considered
None

Additional context

Add filter to modify posts query parameters

Is your enhancement related to a problem? Please describe.

Recently, we used this plugin on a migration project to convert the posts content into blocks. There were many posts, so it times out occasionally, and we had to manually modify the query parameters here - https://github.com/10up/convert-to-blocks/blob/develop/includes/ConvertToBlocks/MigrationAgent.php#L178-L184, from:

$query_params = [
	'post_type'           => $post_type,
	'post_status'         => 'publish',
	'fields'              => 'ids',
	'posts_per_page'      => -1,
	'ignore_sticky_posts' => true,
];

to:

$query_params = [
	'post_type'           => $post_type,
	'post_status'         => 'publish',
	'fields'              => 'ids',
	'posts_per_page'      => 100,
	'ignore_sticky_posts' => true,
        'offset'              => 0, // Keep increasing by 100
        'orderby'             => 'ID',
        'order'               => 'ASC',
];

So, a filter to modify the query parameters will make more sense before this line - https://github.com/10up/convert-to-blocks/blob/develop/includes/ConvertToBlocks/MigrationAgent.php#L194.

Please let me know your thought! If you agree, I can add that filter and create a PR soon! :)

Designs

No response

Describe alternatives you've considered

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Bump WordPress and PHP minimums

Bump WP & PHP Minimums to the following

  • WordPress to 5.7
  • PHP to 7.4
  • Remove any no-longer-needed conditional code for older version support.
  • Take a look at adjusting our testing matrices, if applicable.
  • Bump the minimums in plugin documentation and header fields.

Add a "Build release zip" GitHub Action

Is your enhancement related to a problem? Please describe.

A new Action is released: https://github.com/10up/action-wordpress-plugin-build-zip/. This is already set up in a few PRs: Insert Special Characters, Autoshare for Twitter and Simple Podcasting. As an example, you can see/download the Simple Podcasting zip here.

Please go ahead and create the same in this repository.

Designs

No response

Describe alternatives you've considered

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Release version 1.2.1

This issue is for tracking changes for the 1.2.1 release. Target release date: JULY 25 2023.

Pre-Release Steps

Release steps

  • Branch: Starting from develop, cut a release branch named release/1.2.1 for your changes.
  • Version bump: Bump the version number in config.php, convert-to-blocks.php, readme.txt, package.json and package-lock.json if it does not already reflect the version being released. Update both the plugin "Version:" property in convert-to-blocks.php and the plugin $plugin_version constant in config.php.
  • Changelog: Add/update the changelog in CHANGELOG.md and readme.txt.
  • Props: update CREDITS.md with any new contributors, confirm maintainers are accurate.
  • New files: Check to be sure any new files/paths that are unnecessary in the production version are included in .distignore.
  • Readme updates: Make any other readme changes as necessary. README.md is geared toward GitHub and readme.txt contains WordPress.org-specific content. The two are slightly different.
  • Merge: Make a non-fast-forward merge from your release branch to develop (or merge the pull request), then do the same for develop into trunk, ensuring you pull the most recent changes into develop first (git checkout develop && git pull origin develop && git checkout trunk && git merge --no-ff develop). trunk contains the stable development version.
  • Push: Push your trunk branch to GitHub (e.g. git push origin trunk).
  • Compare trunk to develop to ensure no additional changes were missed.
  • Test the pre-release ZIP locally by downloading it from the Build release zip action artifact and installing it locally. Ensure this zip has all the files we expect, that it installs and activates correctly and that all basic functionality is working
  • Release: Create a new release, naming the tag and the release with the new version number, and targeting the trunk branch. Paste the changelog from CHANGELOG.md into the body of the release and include a link to the closed issues on the milestone. The release should now appear under releases.
  • SVN: Wait for the GitHub Action to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
  • Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/convert-to-blocks/. This may take a few minutes.
  • Close the milestone: Edit the milestone with release date (in the Due date (optional) field) and link to GitHub release (in the Description field), then close the milestone.
  • Punt incomplete items: If any open issues or PRs which were milestoned for 1.2.1 do not make it into the release, update their milestone to 1.3.0, or Future Release

Add Test Cases on Test Lodge

Describe your question

Add Test Cases on Test Lodge

Code of Conduct

  • I agree to follow this project's Code of Conduct

Conversion doesn't start when URL opened in browser

Describe the bug

I've used this plugin via CLI before with success, but on a project I'm currently working on, the conversion doesn't start once the URL is opened in the browser.

Steps to Reproduce

I ran this in the terminal -

wp convert-to-blocks start --post_type=news

  • and got the following prompt -

Migration started... Please open the following URL in a browser to start the migration agent. /wp-admin/post.php?post=1127&action=edit&ctb_client=1127 Converting 564 Posts ...

  • but when I opened the URL in my browser, I just got the post edit screen and nothing further happened.

Not quite sure where to start debugging this?

Screenshots, screen recording, code snippet

No response

Environment information

Device: Macbook Air M2
OS: Sonoma 14.1.1
Browser: Chrome 119.0.6045.159

WordPress information

`

wp-core

version: 6.4.1
site_language: en_US
user_language: en_US
timezone: Europe/London
permalink: /blog/%year%/%monthnum%/%day%/%postname%/
https_status: true
multisite: true
user_registration: false
blog_public: 1
default_comment_status: open
environment_type: production
site_count: 2
network_count: 1
user_count: 49
dotorg_communication: true

wp-active-theme

name: DID - 2023 (bureau-did-2023)
version: 1.3
author: The Bureau
author_website: https://www.thebureaulondon.com
parent_theme: none
theme_features: widgets-block-editor, html5, post-thumbnails, title-tag, responsive-embeds, editor-styles, menus, editor-style
theme_path: /Users/steve/Sites/did-2023/public/wp-content/themes/bureau-did-2023
auto_update: Disabled

wp-themes-inactive (1)

Biro Base: version: 2.0, author: The Bureau, Auto-updates disabled

wp-plugins-active (18)

Admin Columns Pro: version: 6.3.5, author: AdminColumns.com, Auto-updates disabled
Advanced Custom Fields PRO: version: 6.2.2, author: WP Engine (latest version: 6.2.3), Auto-updates disabled
Convert to Blocks: version: 1.2.2, author: 10up, Auto-updates disabled
Disable Comments: version: 2.4.5, author: WPDeveloper, Auto-updates disabled
Disable Embeds: version: 1.5.0, author: Pascal Birchler, Auto-updates disabled
Disable Emojis (GDPR friendly): version: 1.7.6, author: Ryan Hellyer, Auto-updates disabled
Disable WP REST API: version: 2.6.1, author: Jeff Starr, Auto-updates disabled
Gravity Forms: version: 2.7.17, author: Gravity Forms, Auto-updates enabled
Members: version: 3.2.8, author: MemberPress, Auto-updates disabled
Redirection: version: 5.3.10, author: John Godley, Auto-updates disabled
SearchWP: version: 4.3.9, author: SearchWP, Auto-updates disabled
Simple History: version: 4.7.2, author: Pär Thernström, Auto-updates disabled
Simple Local Avatars: version: 2.7.5, author: 10up, Auto-updates disabled
Simple Page Ordering: version: 2.6.3, author: 10up, Auto-updates disabled
User Switching: version: 1.7.0, author: John Blackbourn & contributors (latest version: 1.7.2), Auto-updates disabled
WP-PageNavi: version: 2.94.1, author: Lester 'GaMerZ' Chan, Auto-updates disabled
WP Mail SMTP: version: 3.10.0, author: WP Mail SMTP, Auto-updates disabled
WPS Hide Login: version: 1.9.9, author: WPServeur, NicolasKulka, wpformation, Auto-updates disabled

wp-plugins-inactive (1)

GTM4WP: version: 1.18.1, author: Thomas Geiger, Auto-updates disabled

wp-media

image_editor: WP_Image_Editor_Imagick
imagick_module_version: 1809
imagemagick_version: ImageMagick 7.1.1-21 Q16-HDRI aarch64 21667 https://imagemagick.org
imagick_version: 3.7.0
file_uploads: 1
post_max_size: 8M
upload_max_filesize: 2M
max_effective_size: 2 MB
max_file_uploads: 20
imagick_limits:
imagick::RESOURCETYPE_AREA: 64 GB
imagick::RESOURCETYPE_DISK: 9.2233720368548E+18
imagick::RESOURCETYPE_FILE: 192
imagick::RESOURCETYPE_MAP: 32 GB
imagick::RESOURCETYPE_MEMORY: 16 GB
imagick::RESOURCETYPE_THREAD: 1
imagick::RESOURCETYPE_TIME: 9.2233720368548E+18
imagemagick_file_formats: 3FR, 3G2, 3GP, AAI, AI, APNG, ART, ARW, ASHLAR, AVI, AVIF, AVS, BAYER, BAYERA, BGR, BGRA, BGRO, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CR3, CRW, CUBE, CUR, CUT, DATA, DCM, DCR, DCRAW, DCX, DDS, DFONT, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FARBFELD, FAX, FF, FILE, FITS, FL32, FLV, FRACTAL, FTP, FTS, FTXT, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, HALD, HDR, HEIC, HEIF, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, JXL, K25, KDC, KERNEL, LABEL, M2V, M4V, MAC, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MPO, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORA, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PHM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, POCKETMOD, PPM, PS, PS2, PS3, PSB, PSD, PTIF, PWP, QOI, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGB565, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, STRIMG, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TM2, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBM, WEBP, WMV, WPG, X3F, XBM, XC, XCF, XPM, XPS, XV, YAML, YCbCr, YCbCrA, YUV
gd_version: 2.3.3
gd_formats: GIF, JPEG, PNG, WebP, BMP, AVIF, XPM
ghostscript_version: 10.02.1

wp-server

server_architecture: Darwin 23.1.0 arm64
httpd_software: Apache/2.4.58 (Unix) OpenSSL/3.1.4 PHP/8.2.12
php_version: 8.2.12 64bit
php_sapi: apache2handler
max_input_variables: 1000
time_limit: 30
memory_limit: 128M
admin_memory_limit: 256M
max_input_time: 60
upload_max_filesize: 2M
php_post_max_size: 8M
curl_version: 8.4.0 (SecureTransport) OpenSSL/3.1.4
suhosin: false
imagick_availability: true
pretty_permalinks: true
htaccess_extra_rules: true
current: 2023-11-23T10:31:55+00:00
utc-time: Thursday, 23-Nov-23 10:31:55 UTC
server-time: 2023-11-23T10:31:54+00:00

wp-database

extension: mysqli
server_version: 5.7.44
client_version: mysqlnd 8.2.12
max_allowed_packet: 4194304
max_connections: 151

wp-constants

WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /Users/steve/Sites/did-2023/public/wp-content
WP_PLUGIN_DIR: /Users/steve/Sites/did-2023/public/wp-content/plugins
WP_MEMORY_LIMIT: 64M
WP_MAX_MEMORY_LIMIT: 256M
WP_DEBUG: true
WP_DEBUG_DISPLAY: true
WP_DEBUG_LOG: false
SCRIPT_DEBUG: false
WP_CACHE: false
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_ENVIRONMENT_TYPE: Undefined
WP_DEVELOPMENT_MODE: undefined
DB_CHARSET: utf8
DB_COLLATE: undefined

wp-filesystem

wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable

wp_mail_smtp

version: 3.10.0
license_key_type: lite
debug: No debug notices found.
lite_install_date: Jun 17, 2022 @ 10:20am

`

Code of Conduct

  • I agree to follow this project's Code of Conduct

Test against WordPress 5.8

Is your enhancement related to a problem? Please describe.
Once WordPress 5.8 is released, we'll want to test Convert to Blocks to see if any incompatibility issues arise.

Describe the solution you'd like

  • test Convert to Blocks on WordPress 5.8
  • open issues for any incompatibilities noted in testing
  • resolve issues identified in testing
  • bump "tested up to" version
  • if code changes needed due to incompatibilities, ship a plugin release

Designs
n/a

Describe alternatives you've considered
none

Additional context
Related: #23, #32.

Test against WordPress 5.6

Is your enhancement related to a problem? Please describe.
Once WordPress 5.6 is released, we'll want to test Convert to Blocks to see if any incompatibility issues arise.

Describe the solution you'd like

  • test Convert to Blocks on WordPress 5.6
  • open issues for any incompatibilities noted in testing
  • resolve issues identified in testing
  • bump "tested up to" version
  • if code changes needed due to incompatibilities, ship a plugin release

Designs
n/a

Describe alternatives you've considered
none

Additional context
n/a

Editor selection unexpectedly defaults to previous choice

Describe the bug
Feedback from @tlovett1's testing:

When I click Edit (Classic) on a post. The next post I edit opens in classic mode even if I just clicked the regular edit. Seems like it remembers your choice. That surprised me. I don't think it should remember your choice.

Additional context
It's possible this is coming from the Classic Editor plugin itself, so we'll want to diagnose if this is an issue with Convert to Blocks or Classic Editor.

Post types not marked as "Supported Post Types" are forced to use the Classic Editor

Describe the bug

The enable_block_editor method will remove block editor support from all post types not added to the settings page as a classic editor post type, regardless of how it is registered.

Not positive if this was intentional. For my use case, I am using this plugin on a Gutenberg site to convert migrated blog content to Gutenberg blocks instead of displaying the content as a classic block. I can check support for the custom post type, but it took awhile to debug since I didn't think this plugin would remove block editor support.

Steps to Reproduce

  1. Register a post type with editor support and show_in_rest set to true
  2. Ensure that post type isn't checked off in the "Convert to Blocks" settings page.
  3. Edit a post in that custom post type

Screenshots, screen recording, code snippet

Disables the block editor if the post type isn't added as a supported post type.

includes/ConvertToBlocks/ClassicEditorSupport.php 

/**
 * Disables the block editor if classic parameter is specified
 *
 * @param bool    $enabled The enabled state
 * @param WP_Post $post The current post
 * @return bool
 */
public function enable_block_editor( $enabled, $post ) {
	if ( ! $this->container->post_supports_convert_to_blocks( $post ) ) {
		return false;
	}

	if ( $this->container->has_classic_param() ) {
		return false;
	}

	return true;
}

Environment information

No response

WordPress information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Update icons to denote difference between block/classic editor

Is your enhancement related to a problem? Please describe.
Feedback from @tlovett1's testing:

The "Editor" admin column needs different icons to indicated block/classic. The current icons are not even close to self-explanatory to me.

Describe the solution you'd like

Designs

Describe alternatives you've considered

Additional context

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.