Cannot login anymore: $_SESSION Variable not set?

Cannot login anymore: $_SESSION Variable not set ??

I already cleared the cache through FTP and tried a ‘clean’ browser.

Looks like it is a captcha problem? I can remember this occured years ago on some sites.

It’s definitely a Captcha problem. The most likely cause is a new or altered rewrite rule in .htaccess that changes the domain the user is on, causing a loss of the session.

If you can’t find out what’s causing it, you should be able to log in if you turn off the captcha.enabled System setting in the modx_system_settings table, then manually clear the cache.

Thanks, that helped! I am able to login now. But I get a blank manager. The only thing I see is the top menu.

Have you tried manually deleting all files in the core/cache directory and putting your browser in private or incognito mode?

Yes, I did. Tried different browsers as well.

@handjes are you able to get to /manager/?a=system/dashboards by appending the site URL? It’s possible that you also have a Dashboard widget that’s 500ing the main view of the Manager.

Other than that, I’d start looking in the browser console for errors or in the browser network tab for 404s or 500s. You may also want to investigate the Errorr Log located at manager/?a=system/event

Also, what are the versions of MODX, PHP, MySQL?

Everything latest and uptodate.

Or a plugin. You can disable plugins in the modx_site_plugins directory (clear the cache manually again after making any changes).

Also a blank page.
I’m not sure if this site uses extra Dashboards. Probably.

These are errors in the console:

ReferenceError: _ is not defined



TypeError: MODx.config.upload_files is undefined




ReferenceError: _ is not defined



ExtJS 2

TypeError: MODx.user is undefined






create ExtJS



ExtJS 2

ReferenceError: _ is not defined[modx.searchbar.js:8:10](



ExtJS 2



I’m not sure what that tells us, but _ is used to represent the MODX lexicon strings in JavaScript. Turn on Dev. tools (ctrl-shift-i or F12) and check the Network tab as you reload the Manager page. You may see some 404 errors for missing JavaScript files.

If you have a site backup, it might be worth checking to see if there have been changes to the .htaccess file in the MODX root directory.

Another thing to try is turning off the two MODX feeds in the modx_system_settings table: feed_modx_news_enabled and feed_modx_security_enabled (as always, manually clear the cache after making the change).

Jay’s Dashboard suggestion is also a good one. I remember seeing an issue where the feeds weren’t working and that led to a blank dashboard, which was solved by moving the feeds to the bottom of the dashboard. You can get the IDs of the Dashboard widgets in the modx_dashboard_widget table. You can see what dashboard each one is attached to in the modx_dashboard_widget_placement table. The rank field shows the order they appear (0 appears first).

You can actually delete all the entries in the placement table (after recording the content, or backing up that table with Export). That will remove all widgets from all dashboards. It won’t delete the widgets themselves, it just disconnects them. That will give you an empty dashboard and you can try adding them back, one at a time, in System (gear icon) -> Dashboards.

1 Like

The htaccess is fine.

There are no 404 errors. Just one 401:

Extern adres:[2001:1460:2:0:1c21:1eff:fe00:10f]:443
Statuscode: Unauthorized

Some widgets (the default MODX ones) are shown in the dashboard. At the top it says ‘undefined’.

On clicking in the entries in the modx_dashboard_widget_placement table I immediately get a popup with this error:


SQL-query: Wijzigen

UPDATE `pssr_dashboard_widget_placement` SET `widget` = '1' WHERE `pssr_dashboard_widget_placement`.`dashboard` = 1 AND `pssr_dashboard_widget_placement`.`widget` = 5

#1062 - Dubbele ingang '1-1' voor zoeksleutel 'PRIMARY'

See if making yourself a sudo user fixes that. If not, it’s likely a problem with file permissions on the server and not an issue with MODX.

If it does fix it, there’s probably a missing permission in the relevant Policy.

1 Like

Hi @handjes,

Did you resolve your issue? If so, was one of the answers the solution? If not, are you able to share what ultimately solved the issue and got your site working again so that will help other folks who may encounter the same or similar issue?

I really don’t know how this was resolved. MODX is kind of curious some times.