indieweb / indieweb/wordpress-micropub
Error When Uploading Inaccessible File
- Dominant language
- PHP
- Stars
- 53
- Forks
- 12
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 7
Description
[15-Mar-2019 03:30:25 UTC] Micropub Input: {"type":["h-entry"],"properties":{"content":"Video note","video":["http:\/\/a\/vidjo.mov"]}}
[15-Mar-2019 03:30:25 UTC] wp_insert_post with args: {"post_content":"V","meta_input":"mf2_type":["h-entry"],"mf2_content":"Video note","mf2_video":["http:\/\/a\/vidjo.mov"]},"post_author":1,"post_status":"publish"}
[15-Mar-2019 03:30:25 UTC] PHP Fatal error: Uncaught Error: Call to undefined method WP_Error::get_message() in /srv/html/wpdev.gwg.us/wp-content/plugins/wordpress-micropub/includes/class-micropub-media.php:134
Stack trace:
#0 /wp-content/plugins/wordpress-micropub/includes/class-micropub-media.php(296): Micropub_Media::upload_from_url('http://a/vidjo....')
#1 /wp-content/plugins/wordpress-micropub/includes/class-micropub-endpoint.php(748): Micropub_Media::media_sideload_url('http://a/vidjo....', 4636, NULL)
#2 /wp-content/plugins/wordpress-micropub/includes/class-micropub-endpoint.php(474): Micropub_Endpoint::default_file_handler(4636)
#3 /wp-content/plugins/wordpress-micropub/includes/class-micropub-endpoint.php(265): Micropub_Endpoint::create(1)
#4 /wp-includes/rest-api/class-wp-rest-server.php(946): Micropub_Endpoint::post_handler(Object(WP_REST_Request))
#5 /wp-includes/rest-api/class-wp-rest-server.php(329): WP_REST_ in /wp-content/plugins/wordpress-micropub/includes/class-micropub-media.php on line 134
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in includes/class-micropub-media.php at line 134, following the stack trace from upload_from_url through media_sideload_url. Reproduce the request with the inaccessible video URL shown in the issue and inspect how the WordPress error is handled. Done means the request no longer ends in a fatal error and the failure is handled as an upload error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100