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

Attempt adding a multi checkbox field #143 #176

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Mark-H
Copy link
Member

@Mark-H Mark-H commented Oct 24, 2019

In progress. Throws a JS error due field.items for some reason.

utilities.js:67 Uncaught TypeError: nodeToRecurse.items.each is not a function
    at constructor.clearDirty (utilities.js:67)
    at constructor.<anonymous> (utilities.js:71)
    at Ext.util.MixedCollection.each (ext-all.js:21)
    at constructor.clearDirty (utilities.js:67)
    at MODx.FormPanel.clearDirty (modx.panel.js:210)
    at new MODx.FormPanel (modx.panel.js:63)
    at Object.create (ext-all.js:21)
    at S.createComponent (ext-all.js:21)
    at S.lookupComponent (ext-all.js:21)
    at S.add (ext-all.js:21)
    at S.<anonymous> (ext-all.js:21)
    at Object.each (ext-base.js:21)
    at S.add (ext-all.js:21)
    at S.initComponent (ext-all.js:21)
    at S.initComponent (ext-all.js:21)
    at S.Ext.Component [as constructor] (ext-all.js:21)
    at S [as constructor] (ext-base.js:21)
    at S [as constructor] (ext-base.js:21)
    at new S (ext-base.js:21)
    at Object.create (ext-all.js:21)
    at MODx.load (modx.js?v=01800b12:85)
    at ClientConfig.page.Home._loadComponents (modx.component.js:68)
    at ClientConfig.page.Home.MODx.Component [as constructor] (modx.component.js:10)
    at new ClientConfig.page.Home (home.js:60)
    at Object.create (ext-all.js:21)
    at MODx.load (modx.js?v=01800b12:85)
    at ?a=home&namespace=clientconfig:159
    at ext-all.js:21
    at b (ext-all.js:21)

#143

opengeek added a commit to modxcms/revolution that referenced this pull request Mar 22, 2024
### What does it do?
This makes sure the JS doesn't throw an error in the case that the
items-object is an array, just like in
#16404 for 3.x

### Why is it needed?
When using ExtJS to create components of the xtype: 'radiogroup' to be
used in CMPs inside a form,
this function gets called and tries to iterate over it's items array
with a method that doesn't exist.

This PR isn't changing the way forms or the clearDirty-method are
handled, it just assures no error is thrown when using
radiogroup-components.

### Related issue(s)/PR(s)
Resolves modmore/ClientConfig#202
Resolves modmore/ClientConfig#176
Resolves modmore/ClientConfig#143

---------

Co-authored-by: Jason Coward <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant