Cannot upload and attach images to courses with course builder
-
I’m unable to upload an image or video using course builder. It says “Validation Error”.
Would appreciate an assistance
Looking at the debug log:
[04-Sep-2024 07:29:51 UTC] PHP Warning: Attempt to read property “post_parent” on null in C:\inetpub\vhosts\hansenwellness.co.za\httpdocs\wp-includes\link-template.php on line 479
[04-Sep-2024 07:29:51 UTC] PHP Warning: Attempt to read property “post_name” on null in C:\inetpub\vhosts\hansenwellness.co.za\httpdocs\wp-includes\link-template.php on line 517
[04-Sep-2024 07:29:51 UTC] PHP Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated in C:\inetpub\vhosts\hansenwellness.co.za\httpdocs\wp-includes\formatting.php on line 2819
[04-Sep-2024 07:29:51 UTC] PHP Warning: Attempt to read property “ID” on null in C:\inetpub\vhosts\hansenwellness.co.za\httpdocs\wp-includes\link-template.php on line 534Running JS debug it breaks on main.js line:
return JSON.parse(e)
SyntaxError: Unexpected token ‘<‘It seems to actually upload the image correctly but then it doesn’t attach it to the post/course because the response indicates that the Document has moved?
JSON Object:
{
“e”: “Document Moved\nObject MovedThis document may be found here{\”id\”:54084,\”date\”:\”2024-09-04T15:06:16\”,\”date_gmt\”:\”2024-09-04T13:06:16\”,\”guid\”:{\”rendered\”:\”https:\/\/hansenwellness.co.za\/wp-content\/uploads\/IMG_00000018-3.jpg\”,\”raw\”:\”https:\/\/hansenwellness.co.za\/wp-content\/uploads\/IMG_00000018-3.jpg\”},\”modified\”:\”2024-09-04T15:06:16\”,\”modified_gmt\”:\”2024-09-04T13:06:16\”,\”slug\”:\”img_00000018-jpg-4\”,\”status\”:\”inherit\”,\”type\”:\”attachment\”,\”link\”:\”https:\/\/hansenwellness.co.za\/img_00000018-jpg-4\/\”,\”title\”:{\”raw\”:\”IMG_00000018.jpg\”,\”rendered\”:\”IMG_00000018.jpg\”},\”author\”:1,\”featured_media\”:0,\”comment_status\”:\”\”,\”ping_status\”:\”closed\”,\”template\”:\”\”,\”meta\”:[],\”permalink_template\”:\”https:\/\/hansenwellness.co.za\/?attachment_id=54084\”,\”generated_slug\”:\”img_00000018-jpg-4\”,\”class_list\”:[\”post-54084\”,\”attachment\”,\”type-attachment\”,\”status-inherit\”,\”hentry\”],\”description\”:{\”raw\”:\”\”,\”rendered\”:\”<\/a><\/p>\n\”},\”caption\”:{\”raw\”:\”\”,\”rendered\”:\”\”},\”alt_text\”:\”\”,\”media_type\”:\”image\”,\”mime_type\”:\”image\/jpeg\”,\”media_details\”:{\”width\”:2560,\”height\”:1440,\”file\”:\”IMG_00000018-3-scaled.jpg\”,\”filesize\”:535862,\”sizes\”:{\”medium\”:{\”file\”:\”IMG_00000018-3-300×169.jpg\”,\”width\”:300,\”height\”:169,\”filesize\”:8957,\”mime_type\”:\”image\/jpeg\”,\”source_url\”:\”https:\/\/hansenwellness.co.za\/wp-content\/uploads\/IMG_00000018-3-300×169.jpg\”},\”large\”:{\”file\”:\”IMG_00000018-3-1024×576.jpg\”,\”width\”:1024,\”height\”:576,\”filesize\”:94685,\”mime_type\”:\”image\/jpeg\”,\”source_url\”:\”https:\/\/hansenwellness.co.za\/wp-content\/uploads\/IMG_00000018-3-1024×576.jpg\”},\”thumbnail\”:{\”file\”:\”IMG_00000018-3-150×150.jpg\”,\”width\”:150,\”height\”:150,\”filesize\”:4377,\”mime_type\”:\”image\/jpeg\”,\”source_url\”:\”https:\/\/hansenwellness.co.za\/wp-content\/uploads\/IMG_00000018-3-150×150.jpg\”},\”medium_large\”:{\”file\”:\”IMG_00000018-3-768×432.jpg\”,\”width\”:768,\”height\”:432,\”filesize\”:53169,\”mime_type\”:\”image\/jpeg\”,\”source_url\”:\”https:\/\/hansenwellness.co.za\/wp-content\/uploads\/IMG_00000018-3-768×432.jpg\”},\”1536×1536\”:{\”file\”:\”IMG_00000018-3-1536×864.jpg\”,\”width\”:1536,\”height\”:864,\”filesize\”:208683,\”mime_type\”:\”image\/jpeg\”,\”source_url\”:\”https:\/\/hansenwellness.co.za\/wp-content\/uploads\/IMG_00000018-3-1536×864.jpg\”},\”2048×2048\”:{\”file\”:\”IMG_00000018-3-2048×1152.jpg\”,\”width\”:2048,\”height\”:1152,\”filesize\”:357917,\”mime_type\”:\”image\/jpeg\”,\”source_url\”:\”https:\/\/hansenwellness.co.za\/wp-content\/uploads\/IMG_00000018-3-2048×1152.jpg\”},\”img-1100-450\”:{\”file\”:\”IMG_00000018-3-1100×450.jpg\”,\”width\”:1100,\”height\”:450,\”filesize\”:83022,\”mime_type\”:\”image\/jpeg\”,\”source_url\”:\”https:\/\/hansenwellness.co.za\/wp-content\/uploads\/IMG_00000018-3-1100×450.jpg\”},\”img-1120-800\”:{\”file\”:\”IMG_00000018-3-1120×800.jpg\”,\”width\”:1120,\”height\”:800,\”filesize\”:143751,\”mime_type\”:\”image\/jpeg\”,\”source_url\”:\”https:\/\/hansenwellness.co.za\/wp-content\/uploads\/IMG_00000018-3-1120×800.jpg\”},\”img-870-440\”:{\”file\”:\”IMG_00000018-3-870×440.jpg\”,\”width\”:870,\”height\”:440,\”filesize\”:62090,\”mime_type\”:\”image\/jpeg\”,\”source_url\”:\”https:\/\/hansenwellness.co.za\/wp-content\/uploads\/IMG_00000018-3-870×440.jpg\”},\”img-850-600\”:{\”file\”:\”IMG_00000018-3-850×600.jpg\”,\”width\”:850,\”height\”:600,\”filesize\”:83927,\”mime_type\”:\”image\/jpeg\”,\”source_url\”:\”https:\/\/hansenwellness.co.za\/wp-content\/uploads\/IMG_00000018-3-850×600.jpg\”},\”img-480-380\”:{\”file\”:\”IMG_00000018-3-480×380.jpg\”,\”width\”:480,\”height\”:380,\”filesize\”:30267,\”mime_type\”:\”image\/jpeg\”,\”source_url\”:\”https:\/\/hansenwellness.co.za\/wp-content\/uploads\/IMG_00000018-3-480×380.jpg\”},\”img-300-225\”:{\”file\”:\”IMG_00000018-3-300×225.jpg\”,\”width\”:300,\”height\”:225,\”filesize\”:11797,\”mime_type\”:\”image\/jpeg\”,\”source_url\”:\”https:\/\/hansenwellness.co.za\/wp-content\/uploads\/IMG_00000018-3-300×225.jpg\”},\”img-540-700\”:{\”file\”:\”IMG_00000018-3-540×700.jpg\”,\”width\”:540,\”height\”:700,\”filesize\”:60535,\”mime_type\”:\”image\/jpeg\”,\”source_url\”:\”https:\/\/hansenwellness.co.za\/wp-content\/uploads\/IMG_00000018-3-540×700.jpg\”},\”img-75-75\”:{\”file\”:\”IMG_00000018-3-75×75.jpg\”,\”width\”:75,\”height\”:75,\”filesize\”:1807,\”mime_type\”:\”image\/jpeg\”,\”source_url\”:\”https:\/\/hansenwellness.co.za\/wp-content\/uploads\/IMG_00000018-3-75×75.jpg\”},\”full\”:{\”file\”:\”IMG_00000018-3-scaled.jpg\”,\”width\”:2560,\”height\”:1440,\”mime_type\”:\”image\/jpeg\”,\”source_url\”:\”https:\/\/hansenwellness.co.za\/wp-content\/uploads\/IMG_00000018-3-scaled.jpg\”}},\”image_meta\”:{\”aperture\”:\”2.2\”,\”credit\”:\”\”,\”camera\”:\”Blackberry Z10\”,\”caption\”:\”\”,\”created_timestamp\”:\”1369493403\”,\”copyright\”:\”\”,\”focal_length\”:\”4.1\”,\”iso\”:\”70\”,\”shutter_speed\”:\”0.0005\”,\”title\”:\”\”,\”orientation\”:\”1\”,\”keywords\”:[]},\”original_image\”:\”IMG_00000018-3.jpg\”},\”post\”:null,\”source_url\”:\”https:\/\/hansenwellness.co.za\/wp-content\/uploads\/IMG_00000018-3-scaled.jpg\”,\”missing_image_sizes\”:[],\”_links\”:{\”self\”:[{\”href\”:\”https:\/\/hansenwellness.co.za\/wp-json\/wp\/v2\/media\/54084\”}],\”collection\”:[{\”href\”:\”https:\/\/hansenwellness.co.za\/wp-json\/wp\/v2\/media\”}],\”about\”:[{\”href\”:\”https:\/\/hansenwellness.co.za\/wp-json\/wp\/v2\/types\/attachment\”}],\”author\”:[{\”embeddable\”:true,\”href\”:\”https:\/\/hansenwellness.co.za\/wp-json\/wp\/v2\/users\/1\”}],\”replies\”:[{\”embeddable\”:true,\”href\”:\”https:\/\/hansenwellness.co.za\/wp-json\/wp\/v2\/comments?post=54084\”}],\”wp:action-unfiltered-html\”:[{\”href\”:\”https:\/\/hansenwellness.co.za\/wp-json\/wp\/v2\/media\/54084\”}],\”wp:action-assign-author\”:[{\”href\”:\”https:\/\/hansenwellness.co.za\/wp-json\/wp\/v2\/media\/54084\”}],\”curies\”:[{\”name\”:\”wp\”,\”href\”:\”https:\/\/api.w.org\/{rel}\”,\”templated\”:true}]}}”,
“t”: {
“silentJSONParsing”: true,
“forcedJSONParsing”: true,
“clarifyTimeoutError”: false
},
“n”: true,
“r”: false
}The page I need help with: [log in to see the link]
- The topic ‘Cannot upload and attach images to courses with course builder’ is closed to new replies.