When using file upload fields in portals, users are not able to remove the files they upload. When clicking the "Remove" link, the following javascript error is thrown: Uncaught ReferenceError: rbf_doRemoveFileConfirmed is not defined. What can we do to fix this?
We'll fix that.
in progress
Where is no "Remove" link for portals - where do you see it?
This works fine in 3.6.9
Please find rbf_doRemoveFileConfirmed in main.js
I found rbf_doRemoveFileConfirmed in main.js from the latest edition of Rolbase, but it doesn't work to simply drop it in. In the latest edition, rbf_doRemoveFileConfirmed requires 4 parameters just like rbf_doRemoveFile. I've tried to hack it together, but it's not working. When I output and manually visit the URL that the AJAX request is using, I get the login page. I've verified that the Query API has full access to the object that I'm working with. The code that I'm using is below.
function rbf_doRemoveFile(pageId, etin, idin, inName) {
if(confirm("Are you sure you want to remove this file?")) {
rbf_doRemoveFileConfirmed(etin,idin,inName,pageId);
}
}
function rbf_doRemoveFileConfirmed(objName,id,fieldName,destId) {
var ajaxRreq=rbf_getXMLHTTPRequest();
if(!ajaxRreq)
return false;
ajaxRreq.onreadystatechange=function(){
if(ajaxRreq.readyState==READY_STATE_COMPLETE){
uFileDiv=document.getElementById(fieldName+'u_File');
if(uFileDiv.hasChildNodes()){
I verified that it works in the admin side, so it must be a permissions issue. Do you have any tips which permission needs to be enabled for use in a portal?
Both Record Creator and the Query API have full permissions for the object I'm working with.
This will be fixed in the next release (3.7.2)