3.0.3: form customization doesn't work after upgrade

After upgrading from 3.0.1 to 3.0.3 the Form Customization doesn’t work anymore. I hided some (for me) unneccessary fields (introtext, link_attributes etc.) and renamed/relabelled other fields but I can see these fields editing any pages.

What’s wrong? The upgrade itself went well without any problems. The problem is present on different servers with different providers with both PHP 8.0 and 8.1.

I tested it on a fresh installation of MODX 3.0.3 (with different PHP versions) and I can’t reproduce the problem.

Did you try clearing the browser cache (and the MODX cache in core/cache) to see if that resolves the issue?
If not, are there any (relevant) error messages in the developer tools (of the browser) or in the MODX error log?

Of course it’s possible that there are no problems with a fresh installation. Unfortunately, I have long-standing sites here and upgrades on them … (sorry, I’m a bit frustrated on sunday evening with that problem).

Yes, I cleared browser cache (and cookies), the modx cache and core/cache. Problem remains.

Developer tools show one error:

Uncaught TypeError: Cannot read properties of undefined (reading 'id')
    at MODx.Tabs.beforetabchange (modx.jsgrps-min.js?mv=303pl:39:64955)
    at y.Event.fire (ext-all.js:21:3547)
    at MODx.Tabs.fireEvent (ext-all.js:21:668)
    at MODx.Tabs.setActiveTab (ext-all.js:21:397813)
    at MODx.hideRegion (modx.js?mv=05740bd6:539:26)
    at ?a=resource/update&id=1:101:38
    at ext-all.js:21:2529
    at a (ext-all.js:21:17726)

… whatever that means … (I’m not a programmer, sorry).
The modx error log is empty.

Can you apply the code change from this pull request and check if it makes a difference?

The pull request actually fixes a different issue, but as your error message also mentions a beforetabchange event in a tab, it may solve this issue as well.

2 Likes

Changed the code of modx.tabs.js
Doesn’t do anything. Same problem, same error message in developer tools.

It is not critical, but annoying :sunglasses:

Thanks for your try.

As this pull request concerns Javascript code, you probably have to change the system setting compress_js to No to see the code change. (Otherwise MODX uses the minify combined file modx.jsgrps-min.js.)

You probably have to clear the cache or recompile the assets to make it work. If not please let us know on GitHub!

@halftrainedharry That’s it! Now it looks fine, many thanks!

@joshualuckers The compressed JS was the last hurdle, now the problem is solved.

Now that the problem is solved, it’s still unclear to me what caused it.
I think the Form Customization not working is just a symptom, not the root cause.

Do do have any extras installed that (for example) add a tab to the resource page in the manager?

No, I have no extras installed that are related to tabs. I don’t know what’s the cause for my problem. Tomorrow I can list here all extras installed in my modx sites. Now it’s late, time for a book, some Netflix and than time to bed.

Never mind. Eventually someone will have the same issue and we’ll figure it out.
Have a nice evening!

Ok, here are the extras installed in all my affected installations:

  • Collections
  • easycopyright
  • getResources
  • HTML2Minify
  • If
  • lastmodified
  • MIGX
  • pdoTools
  • redirectoid
  • Redirector
  • translit

Hope, you’ll find a reason for the tab problem and thanks for your work.

Same problem here. After upgrading to 3.0.3 all form customization settings not working. Same js error in the developer tools console. Set the compress_js to “no”, cleared the cache, deleted all files in /core/cache, without any effect.

Did you also download the file manager/assets/modext/widgets/core/modx.tabs.js with the code changes from the pull request I linked above?

1 Like

Thanks for the list.

I didn’t test all of them, only the more promising ones (as most of these extras don’t even have a manager component). But I still wasn’t able to reproduce the issue.

@erwin_zirmer If you have not yet downloaded the changed file or if you can’t find it, this is the current link:
https://raw.githubusercontent.com/modxcms/revolution/16a809658ee7d3965be863cde906e353110f679a/manager/assets/modext/widgets/core/modx.tabs.js
Download this file and than put it in your installation on the server in manager/assets/modext/widgets/core/modx.tabs.js

1 Like

Sorry. This works now fine for me.

Thanks for taking time to let us know that it works fine now!

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.