Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support wp_crop_image in import wxr #1357

Merged
merged 1 commit into from
May 3, 2024
Merged

Conversation

bgrgicak
Copy link
Collaborator

@bgrgicak bgrgicak commented May 2, 2024

What is this PR doing?

It adds support for wp_crop_image in the importWXR step.

What problem is it solving?

It allows cropping images during WXR imports.

How is the problem addressed?

By requiring /wp-admin/includes/image.php if wp_crop_image doesn't exist

Testing Instructions

  • Checkout this branch
  • Open this blueprint
  • Confirm that there are no PHP errors and that new posts are imported with images

image

@bgrgicak bgrgicak added [Type] Bug An existing feature does not function as intended [Feature] Import Export labels May 2, 2024
@bgrgicak bgrgicak requested a review from a team May 2, 2024 08:13
@bgrgicak bgrgicak self-assigned this May 2, 2024
@brandonpayton
Copy link
Member

I am seeing the following PHP-related error and am unsure if it is related:

[02-May-2024 17:22:47 UTC] PHP Notice:  Function wpdb::prepare was called incorrectly. Unsupported value type (object). Please see <a>Debugging in WordPress</a> for more information. (This message was added in version 4.8.2.) in /wordpress/wp-includes/functions.php on line 135

Will try to find out more.

@brandonpayton
Copy link
Member

Actually, that is a PHP notice, not an error.

Copy link
Member

@brandonpayton brandonpayton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PHP notice also appears when executing the blueprint on trunk, so it seems unrelated. This looks good!

@bgrgicak bgrgicak merged commit 3f83623 into trunk May 3, 2024
5 checks passed
@bgrgicak bgrgicak deleted the fix/import-wxr-image-crop branch May 3, 2024 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Import Export [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants