After upgrade to latest JQuery we are seeing "getFile is not a function and getAttachmentData is not a function"
#1779
-
Describe the problem/questionJQuery errors in Web console after major version bump of Privatebin Did you use the FAQ section?
What you did?
What happensAfter creation of document/paste, on "page" where you are offered to copy the link: If file is attached only this error: If no file is attached, these errosr: What should happenNo JQuery Error in Web Development Tools Additional informationNo response Server addressNo response Server OSRHEL 9.6 WebserverNginx PrivateBin version2.0.3 Browser and versionFirefox Local operating system and versionWin11 Issue reproducibilityNo, I cannot reproduce it on https://privatebin.net. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Those functions don't exist in the current version of PrivateBin (2.0.3), so I see no way the current logic would call them. I can't reproduce this on the 2.0.3 codebase, either. Are you using some custom template that sideloads some custom javascript files or are you using some cache such as cloudflare, cloudfront or similar that still caches some old files from before the upgrade? Make sure you flush their caches (check your cloud vendors manuals) and be sure to check with different clients (different devices) to ensure it's not a caching issue on the client side. |
Beta Was this translation helpful? Give feedback.
Oh, is this because of the multi-upload? You would need to do some PR-archeology, then, to try and understand what the intent of the new functions is and how they are being used. This one might be a good starting point - seems that call now returns a list, as indicated in JSdoc block for the function. this is where the file names are read, using map to get a list of file names:
https://github.com/PrivateBin/PrivateBin/pull/1550/changes#diff-4c30f267da1a33c8d947890833316f48f2c58b89bc0ae567a469056ce98b96e5R5233
I had not assumed anyone would need to interact with that JS logic from the outside. They are public primarily for other parts of PrivateBin to interact with them and to allow for un…