Form Customisation working only partially

I cannot get Form Customisation word fully.It works for all Administrators, but not for other Users.

For other users only some parts works like hiding some regions, like mode-resource-main-right-middle, but not single fields, like link_attributes. Also moving Template-Variables to other regions fails.

In using MODx 3.0.4.

Any ideas? Thanks

So it’s a permissions issue?

Can you describe in more detail what permissions these “other Users” have, so that it is possible to recreate the issue?

Also, when you open the developer tools in the browser, are there maybe errors in the console that prevent the Form Customization code from running?

But why I can hide the modx-resource-main-right-buttom for this user-group, but hiding the link_attributes, which are part of this region, not? And the funny thing is, I have create a ruleset before with the same customisation. If I active this and deactivate the other, it also fails for the administrators.

I exported both sets. And in the working xml the values seams ok. For example the visibility tag for link attributes is empty. For the non working xml the visibility tag is set to 1.

Because of this I don‘t thinks it‘s an permission problem. The console shows no errors.

And now, after playing around, deleting the cache, none of them works, also for the Administrator. I found this topic here: 3.0.3: form customization doesn't work after upgrade. But not sure if this is still valid.

No, this issue should already be fixed in MODX 3.0.4.

There must be something different causing the problem here.
Are there any special settings you use in your customization profile? Is for example a user group assigned in the tab “User Groups”? Or do you use a “Constraint” in the set?

Is the set “active” and “Template” set correctly?

Form Customization creates javascript code like this in the head of the HTML page.

Ext.onReady(function() {
	MODx.renameLabel("modx-panel-resource", "pagetitle", "different value for pagetitle");
	MODx.hideField("modx-panel-resource", "link_attributes");
	MODx.moveTV("tv3", "modx-resource-main-right");

Can you find such code in the page source?

  • I tried with and without usergroups. No differences.
  • Yes all are active.
  • Yes a constraint is set: parent = 19
  • yes I can find the JS code, but has no effect :frowning:
Ext.onReady(function() {
        MODx.hideRegion("modx-resource-tabs", "modx-resource-main-right-middle");
        MODx.hideRegion("modx-resource-tabs", "modx-page-settings");
        MODx.renameLabel("modx-panel-resource", "introtext", "testlabel");
        MODx.hideField("modx-panel-resource", "modx-resource-content");
        MODx.hideField("modx-panel-resource", "template");
        MODx.hideField("modx-panel-resource", "hidemenu");
        MODx.hideField("modx-panel-resource", "menutitle");
        MODx.hideField("modx-panel-resource", "link_attributes");

BTW: I have this issue on other pages too. I tested three.

This is very weird.

So if you open the developer tools in the browser, then go to the “Console” tab and enter the javascript line

MODx.renameLabel("modx-panel-resource", "introtext", "TEST");

and press “Enter”, nothing happens?

No in this case it will be renamed. I also tried

MODx.hideField("modx-panel-resource", "link_attributes");

and this works too.

I tried all the lines from my code above. For example hiding the template doesn’t work, because it’s already hidden. But for link_attributes it works, because it wasn’t hidden.

BTW: I tried others browsers too, same effect.

Now I got an JS error:

Don’t know why I got it not before.

This looks a lot like the error in MODX 3.0.3 that should be fixed now in MODX 3.0.4 with this PR:

Is this a fresh installation of MODX 3.0.4 or an update from an older version? Maybe try deleting the browser cache to make sure the JS files are up-do-date.

Now it works. Thanks.

But why they are not updated, during the update from 3.0.3 to 3.0.4. And what else was not updated. This makes me worry. I used the UpgradeMODX Extra. Could this be the reason. Can I upgrade manually like in older versions (2.X) too?

When you upgrade MODX on the server, then the JS file on the server gets changed.

But if you don’t clear the cache of your browser, then it’s still possible that the browser uses the old file from the browser cache instead of loading the changed file (with the same name) from the server.

This doesn’t mean that something went wrong with the upgrade.
And upgrading manually doesn’t make a difference. The process is exactly the same as with UpgradeMODX, you just do every step manually.

Hopefully. I’ll mark this as solved. Thanks for your help.

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”.