coreui / coreui-free-bootstrap-admin-template

Free Bootstrap Admin & Dashboard Template
https://coreui.io/product/free-bootstrap-admin-template/
MIT License
11.94k stars 3.14k forks source link

demo for latest version, jQuery dependancy, how to use #578

Closed shaahid-kh closed 2 years ago

shaahid-kh commented 3 years ago

Hi there, thanks for this template. I recently found it and I am testing the admin panel. I faced some issues, appreciate your help:

1 . Apparently the demo is available for version 3.4.0 and demo for latest version (4.0) is not stable yet, right? I am looking for rtl demo based on bootstrap.

2 . I read in the documentation that bootstrap version of this template includes jQuery, but jQuery is not included in .bundle.js file nor is found in demo page (window.jQuery is undefined). Should I add jQuery separately?

Regards.

ghost commented 2 years ago

Hi @shaahid-kh, Tengo el mismo problema. Estoy usando la version 4.0.2 de la plantilla. Agregué la lib jquery 3.6.0 y me presenta este error:

Uncaught TypeError: Cannot set property 'Constructor' of undefined
    at index.js:234
    at index.js:214
    at Array.forEach (<anonymous>)
    at HTMLDocument.<anonymous> (index.js:214)
const defineJQueryPlugin = plugin => {
  onDOMContentLoaded(() => {
    const $ = getjQuery()
    /* istanbul ignore if */
    if ($) {
      const name = plugin.NAME
      const JQUERY_NO_CONFLICT = $.fn[name]
      $.fn[name] = plugin.jQueryInterface
      $.fn[name].Constructor = plugin
      $.fn[name].noConflict = () => {
        $.fn[name] = JQUERY_NO_CONFLICT
        return plugin.jQueryInterface
      }
    }
  })
}

Please, help us @mrholek

jynxy commented 2 years ago

+1 same error cant add jquery

jynxy commented 2 years ago

Think i found a fix no expert

Line 6981 defineJQueryPlugin(NAME$2); change to defineJQueryPlugin(Sidebar);

Not sure why this is not working

mrholek commented 2 years ago

@shaahid-kh @ndavilam85 @jynxy I will check where is a problem.

mrholek commented 2 years ago

@shaahid-kh @ndavilam85 @jynxy please update @coreui/coreui to 4.0.5 and reinstall it using npm install

ghost commented 2 years ago

@shaahid-kh @ndavilam85 @jynxy please update @coreui/coreui to 4.0.5 and reinstall it using npm install

Thxs I will test this solution

tgogos commented 2 years ago

Apologies if this is a silly question... so, this means that we are waiting for the 4.0.5 release? Is it available somewhere already?

ghost commented 2 years ago

Apologies if this is a silly question... so, this means that we are waiting for the 4.0.5 release? Is it available somewhere already?

HI @tgogos, no, that means that in the Package.json you must change the version of the coreui to 4.0.5. Yesterday I did it and it works perfectly