Skip to content

Conversation

@joehoyle
Copy link
Member

@joehoyle joehoyle commented Aug 7, 2025

In cases when a file is not directly in wp_upload_dir()['basedir'], Plugin::get_attachment_files will fail to include sub directories that the file is in.

$meta['sizes'] and co should always be relative to the directory that the main file is in.

In cases when a file is not directly in `wp_upload_dir()['basedir']`, Plugin::get_attachment_files will fail to include sub directories that the file is in.

`$meta['sizes']` and co should always be relative to the directory that the main file is in.
@joehoyle joehoyle requested review from Rayhatron and tomjn August 7, 2025 18:14
@joehoyle joehoyle merged commit ed85fc0 into master Aug 7, 2025
1 of 2 checks passed
@joehoyle joehoyle deleted the fix-get-attachment-files branch August 7, 2025 19:36
@hm-backport
Copy link

hm-backport bot commented Aug 7, 2025

The backport to v3-branch failed:

Not Found

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub.
git fetch
# Create new working tree.
git worktree add .worktrees/backport v3-branch
# Navigate to the new directory.
cd .worktrees/backport
# Cherry-pick all the commits of this pull request and resolve the likely conflicts.
git cherry-pick 8ffd577352d4a0979102d0db2c63476828a0cd22 b749a8b6cf57e63720a52b3d2a6ad0b658db55cf
# Create a new branch with these backported commits.
git checkout -b backport-712-to-v3-branch
# Push it to GitHub.
git push --set-upstream origin backport-712-to-v3-branch
# Go back to the original working tree.
cd ../..
# Delete the working tree.
git worktree remove .worktrees/backport

Then, create a pull request where the base branch is v3-branch and the compare/head branch is backport-712-to-v3-branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants