wbraganca / yii2-dynamicform

It is widget to yii2 framework to clone form elements in a nested manner, maintaining accessibility.
Other
436 stars 439 forks source link

Uncaught TypeError: Cannot read property 'settings' of undefined & $toclone.clone is not a function #224

Closed PitBult closed 4 years ago

PitBult commented 7 years ago

Hi! After updating to Yii2 version 2.0.13.1 I have 2 errors: 1.

yii2-dynamic-form.js:90 Uncaught TypeError: Cannot read property 'settings' of undefined
    at _parseTemplate (yii2-dynamic-form.js:90)
  1. Uncaught TypeError: $toclone.clone is not a function
    at _addItem (yii2-dynamic-form.js:119)

My source code (default - jQuery JavaScript Library v3.2.1):

<script src="/backend/assets/.../jquery.js"></script>
 <script src="/backend/assets/.../yii.js"></script>
 <script src="/backend/assets/.../yii.validation.js"></script>
 <script src="/backend/assets/.../js/select2.full.js"></script>
 <script src="/backend/assets/.../js/select2-krajee.js"></script>
 <script src="/backend/assets/.../jquery.pjax.js"></script>
 <script src="/backend/assets/.../yii.activeForm.js"></script>
 <script src="/backend/assets/.../yii2-dynamic-form.js"></script>
 <script src="/backend/assets/.../js/plugins/sortable.js"></script>
 <script src="/backend/assets/.../js/plugins/purify.js"></script>
 <script src="/backend/assets/.../js/fileinput.js"></script>
 <script src="/backend/assets/.../js/bootstrap.js"></script>
 <script src="/backend/assets/.../js/extension.js"></script>

Does someone have solutions? Thank you in advance!

alex290 commented 7 years ago

Same problem. Error occurs once

yii2-dynamic-form.js:90 Uncaught TypeError: Cannot read property 'settings' of undefined
    at _parseTemplate (yii2-dynamic-form.js:90)
    at HTMLFormElement.<anonymous> (yii2-dynamic-form.js:37)
    at Function.each (jquery.js:362)
    at jQuery.fn.init.each (jquery.js:157)
    at jQuery.fn.init.init (yii2-dynamic-form.js:36)
    at jQuery.fn.init.$.fn.yiiDynamicForm (yii2-dynamic-form.js:19)
    at create:337
    at dispatch (jquery.js:5206)
    at elemData.handle (jquery.js:5014)
SteveSimpson commented 7 years ago

I am seeing the same error. Looking at the differences between 2.0.12 & 2.0.13.1 in the view source of the html page: in 2.0.12: Githubissues.

  • Githubissues is a development platform for aggregating issues.