Version: 3.4.1 Reporter: TJ Draper —
This is an archived bug report. If you are experiencing a similar issue, upgrade to the latest release and if that does not solve the problem, submit a new bug report
Sorry, don’t know of a better way to describe this problem. Essentially, if I click a button in my add-on that triggers a filepicker, it works fine the first time, passing the file to my specified method. However, if I click another button that calls the file picker, it runs the callback function for both buttons. If I click a third button, it runs the callback function on all three, and so on. So once a button has been clicked, the file picker will run the callback method on any filepicker button that has been previously clicked. This, as you might imagine, is causing me a fair amount of grief.
Here is the code where I add the callback method:
$addBtn.FilePicker({
callback: function(file, references) {
// Close the modal
references.modal.find('.m-close').click();
// Set the file
_this.file = file;
// Set the button that initialized call to an object variable
_this.$addBtn = $addBtn;
// Show loading animation
F.loading.add();
// Run image capture
_this.startImageCapture();
}
});
I’ve narrowed this down to something that changed between 3.3.4 and 3.4.1 since it does not happen on 3.3.4 but it does on 3.4.1 (sorry, didn’t catch it on 3.4.0 but that’s probably where this bug was introduced).
Backup and replace themes/ee/asset/javascript/compressed/cp/files/picker.js
with 2016-08-15-picker.js_.zip
ExpressionEngine implements Markdown Extra and BBCode. Please see the Markdown Extra docs and the BBCode Wikipedia article for a full reference.
**bold**
, __bold__
, *italics*
, _italics_
, ~strike/del~
, `code()`
bold, italics, strike/del, code()
Link: [link title](https://example.com)
Image: ![alt text](https://example.com/image.jpg)
[blockquote]...[/blockquote]
, [quote]...[/quote]
, and Markdown style:
> Some quoted text. > > This is all one quote.
[code]...[/code]
, and you can also specify the language for syntax highlighting, [code=php]...[/code]
GitHub flavored Markdown code fences are also supported:
``` public function decoderRing($str) { return str_rot13($str); } ```