Hello,
today I hve the issue that I can’t delete entries with uploaded files. An alert box appears, but with no content, though “display errors” activated.
Happens with pure demo file “File Upload”.
Can you please help?
PHP version is 8.1
Thank you,
Thomas
Hello,
Alert box with no message means that error reporting OR display error is some-how not working.
You need to check php error log file and see the exact reason of the issue.
You can also inspect the ajax call response of the delete operation.
Hello,
no I checked this via browser console.
The reason are different paths. The script file itself is located in a protected folder.
Due to the accessibility the graphics are stored outside this protected folder. So everything works fine, but that’s the reason why the graphics are not displayed in grid.
So no we have to modify the line “$upload_url = explode(“/”,$_SERVER[“REQUEST_URI”]);” to point to the same folder as given as “$col[“upload_dir”] = “../../../images/uploads…”
How can I do this?
For better understanding see attached screenshot
Hi,
You can simply test hardcode the value of upload_url, e.g.
$upload_url = "https://domain.com/.../images/upload_itrena/";
If this works, you can then play with $_SERVER[“REQUEST_URL”] and remove the hardcoded text.
to debug, you can use phpgrid_error($upload_url); inside display_icon callback function.