WordPress / WordPress/pattern-directory
Creator: When replacing an image, the upload option is available
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 134
- Forks
- 46
- Avg merge
- 9h 4m
- Merged PRs (30d)
- 19
Description
Describe the bug
Users do not have permissions to upload media but when replacing an image, the option to upload is there. Trying to upload anything will return an error, which can be confusing since the option is there.
To Reproduce
Steps to reproduce the behavior:
- Add or edit a pattern
- Insert an image block (or media & text, etc), pick an image from the Openverse library
- Click on "Replace"
- You see the option to upload, or edit the image URL
Expected behavior
"Media library" and "Reset" should be the only available options. Ideally the image URL is not editable as well, to prevent users from inserting potentially non-CC0 images (see #494).
Screenshots
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the image block's Replace flow with a user who cannot upload media, then trace the controls shown after selecting an Openverse image. Done means the replacement UI offers only “Media library” and “Reset” for that user, with the image URL no longer editable if that restriction is included.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100