When try to close resource window in manager nothing happens.
Works on chunks etc. and when template is set as none.
Templates have few image TVs (MIGX resourceimages and single image file TVs)
Setting compress_js off not help.
Disabled form customization on template. No effect.
Browser console report:
Uncaught TypeError: b.isDirty is not a function
ExtJS 3
isDirty
each
isDirty
isDirty https://www.xxxxx.fi/manager/assets/modext/modx.jsgrps-min.js:1
cancel https://www.xxxxxx.fi/manager/assets/modext/sections/resource/update.js:90
ExtJS 2
onClick
I
ext-all.js:21:600926
Should close resource window and go to start.
MODX 2.8.0 (worked in 2.7.3)
PHP 7.2
apache
mysql
browser firefox and chrome
Thank you for participating!
What do you mean by "resource window"? Quick edit window or quick create window?
Can you record video or gif?
He means the close button when editing a resource. It might be related the changes to the image TVs
Yes. Issue is with Close button on resource editing view.
Also seeing it here.
Here's a trace:
ext-all.js:21 Uncaught TypeError: b.isDirty is not a function
at MODx.panel.ImageTV.<anonymous> (ext-all.js:21)
at Ext.util.MixedCollection.each (ext-all.js:21)
at constructor.isDirty (ext-all.js:21)
at MODx.panel.Resource.isDirty (modx.panel.js:222)
at MODx.page.UpdateResource.cancel (update.js:90)
at S.onClick (ext-all.js:21)
at HTMLSpanElement.I (ext-all.js:21)
Does seem Image TV related.
Last weekend I started with a fix for this issue, sadly I didn't have time to finish it (maybe this weekend).
The close button triggers the cancel function. In this function the form panel is retrieved and the method isDirty is called:
https://github.com/modxcms/revolution/blob/985a2798acf2311d3f7c09c3f358a0f04bf6027c/manager/assets/modext/sections/resource/update.js#L88-L90
The form panel's isDirty function can be found here: https://github.com/modxcms/revolution/blob/2.x/manager/assets/modext/widgets/core/modx.panel.js#L220-L223
It retrieves a form and calls yet another isDirty function.
_This is where I had to stop my research_
I believe this particular isDirty function loops over all the items in the form and calls isDirty on each item.
The "allowBlank" PR #15106 adds new items to the resource form panel: for the image and file TV respectively the xtype modx-panel-tv-image and modx-panel-tv-file.
Those ExtJS components can be found here: https://github.com/modxcms/revolution/blob/985a2798acf2311d3f7c09c3f358a0f04bf6027c/manager/assets/modext/widgets/element/modx.panel.tv.renders.js
Both components don't seem to have the isDirty method that's causing the ext-all.js:21 Uncaught TypeError: b.isDirty is not a function error.
I can confirm that I'm seeing the same issue in MODX 2.8.1. As mentioned, the problem only appears if the resource has Image TV's from what I can see.
Resources using Image and File TV's are affected by this.
This bug is also in the 3.x branch.
This issue has been mentioned on MODX Community. There might be relevant details there:
The forum just posts a link to here.
@theboxer do you have time to look into this?
This issue has been mentioned on MODX Community. There might be relevant details there:
https://community.modx.com/t/close-button-not-always-working/3867/2
@Ibochkarev PR into 2.8 merged, but what about 3.x? Is it still relevant?
@Ibochkarev PR into 2.8 merged, but what about 3.x? Is it still relevant?
the fix was added to both branches.
@theuros I don't have a bug on 2.8.3, reset the browser cache.
Most helpful comment
Last weekend I started with a fix for this issue, sadly I didn't have time to finish it (maybe this weekend).
The close button triggers the
cancelfunction. In this function the form panel is retrieved and the methodisDirtyis called:https://github.com/modxcms/revolution/blob/985a2798acf2311d3f7c09c3f358a0f04bf6027c/manager/assets/modext/sections/resource/update.js#L88-L90
The form panel's
isDirtyfunction can be found here: https://github.com/modxcms/revolution/blob/2.x/manager/assets/modext/widgets/core/modx.panel.js#L220-L223It retrieves a form and calls yet another
isDirtyfunction._This is where I had to stop my research_
I believe this particular
isDirtyfunction loops over all the items in the form and callsisDirtyon each item.The "allowBlank" PR #15106 adds new items to the resource form panel: for the image and file TV respectively the xtype
modx-panel-tv-imageandmodx-panel-tv-file.Those ExtJS components can be found here: https://github.com/modxcms/revolution/blob/985a2798acf2311d3f7c09c3f358a0f04bf6027c/manager/assets/modext/widgets/element/modx.panel.tv.renders.js
Both components don't seem to have the
isDirtymethod that's causing theext-all.js:21 Uncaught TypeError: b.isDirty is not a functionerror.