UpgradeMODx 2.1.2 no widget shows (MODx 2.7.3)

After installing UpgradeMODx extra v2.1.2 I do not see a dashboard widget.

I have a main site and a staging site that are almost identical. I installed UpgradeMODx on the staging site, the widget showed and I used it to upgrade from 2.7.3 to 2.8.1 successfully. Very easy very nice, thanks to Bob and the other developers.
But when I tried to do the same on my main site I didn’t see the widget in the dashboard.
The UpgradeMODX resource was installed so I opened (viewed) it only to get a blank page and still no widget. I did notice that the page output from the UpgradeMODX resource included ugm_config = {“ugm_setup_url”:“https://mop-db.shortsnet.com/setup/index.php”}; but I don’t have a setup folder.

It looks like the contents of the upgrademodx folders in core and assets are the same on both sites, so it looks like it did install on both.

I have moved the core out of public_html on both staging and main sites. Both sites are on the same server and use the same PHP version (7.3.23).

I confess that there was a difference between my staging site and my main one at first, I had renamed the manager folder for hardening. I undid that rename, modifying config.inc.php too, uninstalled and removed the extra, cleared the cache, uploaded the extra again and installed again. Same result.
I did not install and run setup after modifying config.inc.php, don’t know if I should have.

The install output looked like installation succeeded. The only errors I see are in the error log:
[2021-01-31 05:46:43] (ERROR in xPDO::getService @ …/core/xpdo/xpdo.class.php : 1234) modRestClient::__construct is deprecated since version 2.3.0. Use the modRest classes instead.
[2021-01-31 05:46:43] (ERROR in modRestCurlClient::__construct @ …/core/model/modx/rest/modrestcurlclient.class.php : 26) modRestClient::__construct is deprecated since version 2.3.0. Use the modRest classes instead.

Any ideas?
Mike Short.

When you click on the cog-icon in the top menu and select “Dashboards” and then go to the “Widgets” tab. Do you see an entry with the name “Upgrade MODX”?

Does the snippet with the name “UpgradeMODXWidget” exist?

halftrainedharry: Yes I have both. My Widgets tab shows the same entries on both staging and main sites. The snippet is the same on both too.

Select the “Dashboards” menu again and this time go to the “Dashboards” tab. There should be an entry with the name “Default”. (Maybe there are multiple entries if you added custom ones). Right-click the entry and select “Update Dashboard”. Do you see “Upgrade MODX” there in the list of widgets? If not, can you add it manually by clicking the button “Place Widget” and selecting it from the dropdown?

Thanks for your help. When I clicked “Update Dashboard” the list of widgets was shown with “Upgrade MODX” in it with a Rank of 1. But on opening the dashboard the widget didn’t show.
I changed the rank to 2, cleared the MODx cache, cleared my browser cache, but still no widget in the dashboard. I only have the one dashboard.

I also compared the ugm settings between staging and main sites, they are identical except for the three you would expect ugm_file_version, ugm_last_check, and ugm_latest_version.

Don’t know if it is significant there are a few changed core system settings on my main site … emailsender, password_min_length, upload_maxsize, friendly_urls, friendly_urls_strict, use_multibyte, tree_default_sort, welcome_screen, site_name, site_unavailable_message, send_poweredby_header, server_protocol.
Of those the ones I changed on my main site but not my staging site … password_min_length and site_unavailable_message.

I’m running out of ideas…

  • Are you logged in as the administrator. I think the user has to be in the ‘Administrator’ group to see the widget.
  • Under ‘Dashboards’ -> Tab ‘Widgets’ -> right-click “Update Widget” you could compare the settings with those of your other website.
  • You could (temporarily) add the following line at the top of the snippet “UpgradeMODXWidget” and then check the Dashboard to see if that shows.
//place it right after "<?php"
return "TEST MESSAGE";

Reinstalling a package that’s refusing to work can be useful to try…

Dowp!!! You got it I was not logged in as Administrator. Silly me.
I didn’t realize I had more than one user, I must have created another non-admin login for testing and somehow logged in as that. I think Chrome browser might have pushed me that way.
At the beginning I saw the code:
if (! $modx->user->isMember($groups)) {
return ‘’;
}
and thought that’s OK I am admin. Actually I’m surprised that I can take the site offline and change core system settings without being in the Administrator group.
So thanks very much for your help.

1 Like

Glad you got it working!
Permissions for user groups are configurable, so a more restricted user group wouldn’t be able to take the site offline or change system settings.
On the other hand, you could also create a new user group and give it the same full permissions as the Administrator group but call it something else, and that group could then do anything an Administrator could do.