ok, so give the setup I listed above, does yours work or not work with that?
-
This reply was modified 2 years, 11 months ago by
Robin W.
I disabled cloudflare, enabled the image plugin tried again as guest which did not work and again as admin that did work. but the photos are copied into the hm_bbpui_temp folder on the server.
@clivesmith – the code in that plugin that deals with moving the uploads from the temp dir to the /hm_bbpui/### (post ID) folder is in /bbp-image-upload.php in the “hm_bbpui_insert_post” function (lines 232-277).
If you can edit line 252 and remove the “@” symbol in front, it should give you an error as to why it’s failing.
From this:
@rename($uploadDir['basedir'].'/hm_bbpui_temp/'.$match, $uploadDir['basedir'].'/hm_bbpui/'.$post->ID.'/'.$match);
To this:
rename($uploadDir['basedir'].'/hm_bbpui_temp/'.$match, $uploadDir['basedir'].'/hm_bbpui/'.$post->ID.'/'.$match);
It may display it inline as a hard/critical error, or it may just show up as an error/warning in your debug log, but the “@” is what’s silencing the error related to that.
Line 235-236 looks strange to me in a logical sense.
It’s exiting that function if the the post_type is not a topic AND post_type is not a reply. I would think it should be exiting if the the post_type is not a topic OR post_type is not a reply….. but it seems to be working so I wouldn’t touch that code for now.
@codejp3 I removed the @ on line 252, but it is still not working, the only error showing up was
[17-Jun-2023 17:50:33 UTC] PHP Deprecated: Function get_option was called with an argument that is deprecated since version 5.5.0! The “blacklist_keys” option key has been renamed to “disallowed_keys”. in C:\Users\clive\Local Sites\water-at-airports-june\app\public\wp-includes\functions.php on line 5697
Is your local test site accessible?
If not, would you be willing to migrate a copy to publicly-accessible hosting (my dev server will work if you don’t have a suitable hosting plan)?
The reason I’m asking is that I want to add var_dump() and wp_die() step-by-step through that whole process to see where it’s actually failing and what info/values are present each of those steps, and don’t want to do it on a live site since it will kill the site and expose raw values.
@codejp3 I am more than happy to Email you the zip file of my site. doyou want it sent to the Email I used the other day.
I have just found a worrying issue with the plugin, if you select the icon on the reply, the pick a photo you want to upload, then change your mind and select another both photos are sent to the server. when you submit the second photo is added to the reply (in my case as an admin) the second photo is moved, but the first one is left in the hm_bbpui_temp folder, is this a security risk ?
Hi, Any more thoughts on this, I have disabled the Image Upload for BBPress plugin and sent a mssage to them, no reply of course.
@clivesmith – Sorry for the delay. I just sent you an email. We’ll go from there 😉