Can't login to Modx manager

hi,

I have a modx 2.7.3 on php 7.3
I can’t login to the manager anymore, and I am sure that the logins are correct.
After I click on “login”, the screen flickers and I only see empty login fields with no error.

I checked that all the paths are correct in config & I also cleared the cache folder.
For the rest the website is working correctly in the front-end.
What is really bizarre, I have a similar site on that server, and there I can login correctly.
The site has migrated a while ago from another server, but this might not be the issue I think.

I enabled debug, and I go this debug log. How can I fix this please ? :disappointed_relieved:

[Tue Mar 05 14:28:12.933548 2024] [lsapi:error] [pid 77075:tid 139902544881408] [client 94.101.115.175:7744] [host www.mywebsitet50.be] Backend fatal error: PHP Fatal error:  Uncaught Error: Call to a member function parseProperties() on null in /home/mywebsite8764367/domains/mywebsitet50.be/public_html/core/model/modx/modelement.class.php:567\nStack trace:\n#0 /home/mywebsite8764367/domains/mywebsitet50.be/public_html/core/model/modx/modx.class.php(1666): modElement->getProperties()\n#1 /home/mywebsite8764367/domains/mywebsitet50.be/public_html/core/model/modx/modx.class.php(2511): modX->invokeEvent('OnInitCulture')\n#2 /home/mywebsite8764367/domains/mywebsitet50.be/public_html/core/model/modx/modx.class.php(560): modX->_initCulture(NULL)\n#3 /home/mywebsite8764367/domains/mywebsitet50.be/public_html/manager/index.php(53): modX->initialize('mgr')\n#4 {main}\n  thrown in /home/mywebsite8764367/domains/mywebsitet50.be/public_html/core/model/modx/modelement.class.php on line 567\n, referer: https://www.mywebsitet50.be/manager/
[Tue Mar 05 14:28:16.411784 2024] [lsapi:error] [pid 77075:tid 139902603630336] [client 94.101.115.175:7744] [host www.mywebsitet50.be] Backend fatal error: PHP Fatal error:  Uncaught Error: Call to a member function parseProperties() on null in /home/mywebsite8764367/domains/mywebsitet50.be/public_html/core/model/modx/modelement.class.php:567\nStack trace:\n#0 /home/mywebsite8764367/domains/mywebsitet50.be/public_html/core/model/modx/modx.class.php(1666): modElement->getProperties()\n#1 /home/mywebsite8764367/domains/mywebsitet50.be/public_html/core/model/modx/modx.class.php(2511): modX->invokeEvent('OnInitCulture')\n#2 /home/mywebsite8764367/domains/mywebsitet50.be/public_html/core/model/modx/modx.class.php(560): modX->_initCulture(NULL)\n#3 /home/mywebsite8764367/domains/mywebsitet50.be/public_html/manager/index.php(53): modX->initialize('mgr')\n#4 {main}\n  thrown in /home/mywebsite8764367/domains/mywebsitet50.be/public_html/core/model/modx/modelement.class.php on line 567\n, referer: https://www.mywebsitet50.be/manager/
type or paste code here

It seems that a fatal error occurs, when the code tries to run a plugin (because the parser is null for some reason).

You could try to (temporarily) disable all the plugins and check if you can login again:

  • In the database table modx_site_plugins set the column disabled to 1
  • Clear the cache folder (core/cache)

Also maybe check the system settings parser_class (and parser_class_path) in the database table modx_system_settings. Do you use another parser than the MODX parser? Is the path correct?

1 Like

hi Harry,

Thank you for your insightful tips. I applied them both, with no results unfortunately.

Do you have any tips on how I could further fix this ?

Can I give you server access and pay you to fix this ? I have lots of automatic server back-ups, so restoring to the previous version is done with one click.

Thanks :slight_smile:

Is the error message still the same?
Are you using the default MODX parser (modParser)?


No.

When I’ve seen similar symptoms, it meant that I was actually logged in to the Manager, but the redirection didn’t take. Next time, see if you can go directly to a manager page by putting something like this in the Browser’s address bar:

yoursite.com/manager/?a=resource/update&id=1

Adjust as necessary for your site (actual name of your site, the manager name, and the ID of a real doc at the end).

Thank you Bob for your contribution.In my case this did not work.

I set debug_level to 4, and then looked at core/cache/logs/error.log.

I found that something is missing in the database which is vital for logging in:

[2024-03-06 08:37:01] (ERROR @ /home/mywebsiteark8764367/domains/mywebsitearkt50.be/public_html/core/xpdo/om/xpdoobject.class.php : 1452) Error 42S02 executing statement:
INSERT INTO `modx_session` (`id`, `access`, `data`) VALUES ('b4582982af48b6e9e310bbd2d9dabf35', 1709710621, 'modx.user.contextTokens|a:0:{}modx.user.0.resourceGroups|a:1:{s:3:\"mgr\";a:0:{}}modx.user.0.attributes|a:1:{s:3:\"mgr\";a:5:{s:16:\"modAccessContext\";a:1:{s:3:\"web\";a:1:{i:0;a:3:{s:9:\"principal\";i:0;s:9:\"authority\";s:1:\"0\";s:6:\"policy\";a:1:{s:4:\"load\";b:1;}}}}s:22:\"modAccessResourceGroup\";a:0:{}s:17:\"modAccessCategory\";a:0:{}s:28:\"sources.modAccessMediaSource\";a:0:{}s:18:\"modAccessNamespace\";a:0:{}}}')
Array
(
    [0] => 42S02
    [1] => 1146
    [2] => Table 'mywebsiteark8764367_2.modx_session' doesn't exist
)

I have a print-out of the whole setting

hi Harry, I am not using the standard modxParser.
Here you can see all the settings, this could be useful for your investigation:

thank you so much!

Is there no table modx_session in your database?

1 Like

thank you so much, you’re a genius indeed …
Sometimes the solution is staring us right in the face :slight_smile:

I just added that modx_session in the database, and now I can login again ! Yay !

CREATE TABLE `modx_session` (
  `id` varchar(255) NOT NULL DEFAULT '',
  `access` int(20) UNSIGNED NOT NULL,
  `data` mediumtext DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;