Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug elErrorContainer (maybe) in version 4.4.3 #1066

Closed
b4p3p opened this issue Sep 1, 2017 · 4 comments
Closed

bug elErrorContainer (maybe) in version 4.4.3 #1066

b4p3p opened this issue Sep 1, 2017 · 4 comments
Labels

Comments

@b4p3p
Copy link

b4p3p commented Sep 1, 2017

Hi!
in the version 4.4.3, i have found a little bug.
when my server sends an error message, the elErrorContainer doesn't show the error and in console i have this error:

ERROR TypeError: Cannot read property 'find' of undefined at FileInput._refreshUploadButton (eval at webpackJsonp.../../../../script-loader/addScript.js.module.exports (addScript.js:9), <anonymous>:2932:43) at FileInput._setPreviewError (eval at webpackJsonp.../../../../script-loader/addScript.js.module.exports (addScript.js:9), <anonymous>:2929:18) at eval (eval at webpackJsonp.../../../../script-loader/addScript.js.module.exports (addScript.js:9), <anonymous>:2074:26) at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:425) at Object.onInvokeTask (core.es5.js:3881) at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:424) at Zone.webpackJsonp.../../../../zone.js/dist/zone.js.Zone.runTask (zone.js:192) at webpackJsonp.../../../../zone.js/dist/zone.js.ZoneTask.invokeTask (zone.js:499) at ZoneTask.invoke (zone.js:488) at timer (zone.js:1896)

with version 4.4.2 it works fine

I'm using angular 4 with bootstrap

Thank's for all

@kartik-v
Copy link
Owner

kartik-v commented Sep 2, 2017

Are you setting removeFromPreviewOnError to true for your case?

@b4p3p
Copy link
Author

b4p3p commented Sep 2, 2017

I tried it right now after upgrade.

same error with version 4.4.3 with removeFromPreviewOnError.

however...

Version 4.4.2 with argument removeFromPreviewOnError: true, i have this error

core.es5.js:1020 ERROR TypeError: Cannot read property 'remove' of undefined
    at FileInput._setPreviewError (eval at webpackJsonp.../../../../script-loader/addScript.js.module.exports (addScript.js:9), <anonymous>:2898:23)
    at eval (eval at webpackJsonp.../../../../script-loader/addScript.js.module.exports (addScript.js:9), <anonymous>:2068:26)
    at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:425)
    at Object.onInvokeTask (core.es5.js:3881)
    at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:424)
    at Zone.webpackJsonp.../../../../zone.js/dist/zone.js.Zone.runTask (zone.js:192)
    at webpackJsonp.../../../../zone.js/dist/zone.js.ZoneTask.invokeTask (zone.js:499)
    at ZoneTask.invoke (zone.js:488)
    at timer (zone.js:1896)

Version 4.4.2 without argument removeFromPreviewOnError works fine

this is my config

this.txtFileLibri = this.guiService.initBootstrapFileinput($("#file_libri"), {
      removeFromPreviewOnError: true,
      elErrorContainer:"#file_libri_error",
      uploadUrl:"/api/libri/import",
      allowedFileExtensions: ["xlsx"],
      showUpload: false,
      uploadExtraData: function () {
        return {
          scuola: self.dataService.scuolaSelezionata.getID(),
          nome_classe: self.nome_classe  }
      },
      onError: function (err) {
        self.messageService.error("Impossibile importare gli elementi", err)
      },
      onSuccess:function (ris) {
        self.ris_upload_anagrafiche = ris;
      },
      onChange:()=>{ self.hasFileLibri = true; },
      onFileClear:()=>{ self.hasFileLibri = false; },
    });

@kartik-v kartik-v added the bug label Sep 3, 2017
@kartik-v
Copy link
Owner

kartik-v commented Sep 3, 2017

Ok this will be fixed... there are some significant updates coming up shortly with enhancements for Bootstrap v4.x (#1065).

@kartik-v
Copy link
Owner

kartik-v commented Sep 9, 2017

Resolved via updates to release v4.4.4.

@kartik-v kartik-v closed this as completed Sep 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants