Open datgausaigon opened 4 months ago
Can you provide a package of your configuration (Pods Admin > Migrate Packages) using the Migrate Packages component (Pods Admin > Components)? That might help us to see if we can reproduce the issue.
I'm unable to reproduce this issue with only Title + Quick Edit enabled like in your screenshot. I see the argument coming through both $_REQUEST
and $_POST
as post_id
.
Here's my debug output:
["$_REQUEST"]=>
array(4) {
["name"]=>
string(10) "banner.png"
["action"]=>
string(17) "upload-attachment"
["_wpnonce"]=>
string(10) "xxxxxxx"
["post_id"]=>
string(4) "9674"
}
["$_POST"]=>
array(4) {
["name"]=>
string(10) "banner.png"
["action"]=>
string(17) "upload-attachment"
["_wpnonce"]=>
string(10) "xxxxxxx"
["post_id"]=>
string(4) "9674"
}
I see post_id
coming through regardless of whether I use the Plupload or Media Library uploader.
Hi @sc0ttkclark ❤️
Thank you very much for your attention to my problem. I would like to send you export json Pods for this Issue. pods-package-2024-07-16.json
Description
I need to create a Custom Post Type (CPT) with "Editor" having to be "Disabled".
This CTP has other Custom Fields, and has an Upload Image Custom Field (Pods Image Field). And I need to programmatically handle uploading images to CPT with Custom Filed via Hook-Filter "wp_handle_upload_prefilter". If a CPT has Enable Editor then I can get the post_id in Hook-Filter "wp_handle_upload_prefilter" with code like this:
$post_id = intval( $_REQUEST['post_ID'] ?? $_REQUEST['post_id'] ?? $_REQUEST['post'] ?? 0 );
But if Editor is "Disabled", $post_id will be 0 with the above code.
I tried logging debug with the code:
error_log( print_r( $_REQUEST, true ) );
Then in the log I get an array of:
If I ENABLE "Editor" I can get $post_id as well. The log will be:
So is there now a way for me to get the post_id when a CTP disable "Editor"?
Thanks ❤️
Version
3.2.2