3.1.0 Missing Left side menu

Just did a fresh install of 3.1.0-pl and everything works properly. I can log in, dashboard loads, resources, files, elements in tree all work.

But, the left hand navigation is missing all entries except collapse arrow and search. I don’t see any errors in the console.

I can manually navigate to all pages through the URL, just seems the menu is not there.

The only error I see in the error logs is:

[2025-01-05 21:02:34] (ERROR @ /var/www/[hostname]/html/core/vendor/xpdo/xpdo/src/xPDO/Om/xPDOObject.php : 227) Error 42S22 executing statement:
Array
(
[0] => 42S22
[1] => 1054
[2] => Unknown column ‘installer’ in ‘order clause’
)

Does anyone else have this issue? Or is it potentially a problem with my database installation?

I validated that just reloading the manager page adds more entries of this error to the log.

I can’t reproduce this issue.

Is this a fresh installation of MODX 3.1.0 or an upgrade from an older version?
Are the menu items shown on the “Menus” manager page → manager/?a=system/action?
Are there entries for the menu items in the database table modx_menus?

The problem could be this line of code:

Do the menu items show up again, if you set the system setting package_installer_at_top to No?

Interesting… setting that property to “no” and clearing the cache resolves the issue.

The icons look different though. The user icon with a lock is now the “Manage” menu. Maybe that’s just an update that’s part of 3.1.0? Also, checking 3.0.5, the username has display: none;. It seems like in this version it tries to display it.

The only thing I did slightly different with this is I’m testing a “managed mysql” database from Digital Ocean. I was curious how it works. So, I am connecting to a separate host rather than “localhost” for the mysql db. Also, it only had “utf8mb4” as an option for connection and character encoding. Wouldn’t think that would make a difference, but maybe.

I’ll poke around a little more and see what I can find.

This is on Mysql version 8.0.4. The character set and collation default values are a bit odd so maybe related to that?

uf8mb4
utf8mb4_0900_ai_ci

I did a localhost mysql install and changed the second value to utf8mb4_general_ci. Everything works fine and it doesn’t have the same issue.

I guess I should do one more local install with these values to see if I’m able to duplicate the issue. Otherwise, it would have to be related to the database being on a different host and accessed via HTTPS I would think.

I did some testing and this is my conclusion:

MODX basically generates this SQL query

SELECT * 
FROM `modx_menus` AS `modMenu` 
WHERE `modMenu`.`parent` = 'topnav' 
ORDER BY FIELD(modMenu.text, "installer") DESC, `modMenu`.`menuindex` ASC 

and the error message Unknown column ‘installer’ in ‘order clause’ implies that the database doesn’t parse the query incorrectly. (In particular the FIELD() function.)

The problem seems to be the double quotes (") in combination with the sql_mode “ANSI_QUOTES” in the database config (my.ini).
If I change 'installer' to single quotes (') or don’t use sql_mode="ANSI_QUOTES" (which is usually the case), the query runs correctly.

1 Like

Thanks! It’s definitely good to know that. I do see that “ANSI_QUOTES” was enabled on their managed database so that is definitely the issue.

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