WordPress / WordPress/create-block-theme

Consider improving media error handling

Open
#295 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
417
Forks
66
PR merge metrics
No merged PRs in 30d

Description

It would be good to improve the error handling around adding media to themes, especially things like handling errors caused by PHP config settings.

e.g. the plugin could check for config settings such as upload_max_filesize and post_max_size before running add_media_to_local. There are probably more config settings to check for.

Originally mentioned in https://github.com/WordPress/create-block-theme/pull/291.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the media-addition path around add_media_to_local and review how PHP settings such as upload_max_filesize and post_max_size affect it. Done means the relevant configuration-related failures are handled before media is added, with behavior checked for oversized uploads and other settings identified during investigation.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.