• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: 2 bugs in file upload process from backend

2 bugs in file upload process from backend 12 years 2 months ago #16486

  • royce
  • royce's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 52
  • Thank you received: 5
I submitted a ticket for this, but I will also put it here for others to see:

I noticed two bugs in the file upload process for forms in administrator/components/com_rsform/models/submissions.php.

1. Major bug - line 867 - If a file upload is updated from the backend, this line is overwriting the newly uploaded file with the original file! The file name is changed to the new file, but the actual file is the original file, not the new file. If the files are of different types (e.g. pdf and jpg), the resulting file is unreadable. More testing in the debugger shows that the '$value' field is never empty and so the originally uploaded file is never deleted.

2. Minor bug - line 818, the variable $fieldName is never defined or used in the function. It generates a PHP notice in the log.
The administrator has disabled public write access.

Re: 2 bugs in file upload process from backend 12 years 1 month ago #16730

  • bogdanc
  • bogdanc's Avatar
  • OFFLINE
  • Moderator
  • Posts: 669
  • Thank you received: 11
Hello,

1. The major bug is not actually a bug, it's how it was designed:
- If you have uploaded a file and edit the submission to re-upload it, it will replace the original file (exact name & extension)
- If you want to re-upload "from scratch" you have to delete the filename from the textbox and then upload the new file.

2. We have made an adjustment for this. You will just need to download RSForm! Pro again from our site and install it over your current installation of RSForm! Pro. This will act as an update for it.
The administrator has disabled public write access.

Re: 2 bugs in file upload process from backend 12 years 1 month ago #16739

  • royce
  • royce's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 52
  • Thank you received: 5
Thanks for the update, but I have never been able to get this to work. On a brand new J! 2.5.2 site and the latest copy of RSFP, when editing an image from the backend, and erasing the name of the existing file, it overwrites the newly uploaded image with the old image. The resulting image has the name of the new file, but the content is the old file.

I ended up having to hack the code to not overlay the file. We get 1000's of forms a day and our CSR's have to occasionally update the images. I have tested this extensively and have never seen it work correctly. I would like to know if anyone else has gotten a different result.

In any event, it would be much better for users to not have to manually remove the old file name. It is an extra step that is easy to miss. The program should assume that if someone went to the trouble to browse for and upload a new file, that is the file they want to use.
The administrator has disabled public write access.

Re: 2 bugs in file upload process from backend 12 years 1 month ago #16743

  • bogdanc
  • bogdanc's Avatar
  • OFFLINE
  • Moderator
  • Posts: 669
  • Thank you received: 11
Hello,

If you only rename the file, without uploading a new file, only the file name will be changed and when clicking on the new file name the old file will be downloaded(as it was not replaced when editing the submission).

If you leave the old file name, when editing a submission, and only upload a new file, then the old file name will be shown for the submission. However when clicking on the old file name the newly uploaded file will be opened.

Basically in order to replace the uploaded file when editing a submission you will have to upload a new file(in the File Upload field from the Edit Submission page) and set a new name for it(with an appropriate extension). After this the file will be replaced correctly and the new name will be shown. Now, when clicking on the new file name in the Manage Submissions screen, the newly uploaded file will be opened.
The administrator has disabled public write access.

Re: 2 bugs in file upload process from backend 12 years 1 month ago #16781

  • royce
  • royce's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 52
  • Thank you received: 5
You mean my users have to manually type in the name of the new file (with the correct unique id, filename, type, etc) and upload the same file??? LOL, I wouldn't even try to get them to do that!

You have got to admit, that is very cumbersome and user-unfriendly.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!