Several of my customers keep complaining they get random blank managers and the ‘undefined’ message. We cannot work out why this happens. A call from my customers ends up in endless testing of browsers, caches, other PC’s/laptops, other logins, etc. It’s becoming quite annoying since this has been there for years now. It’s affecting the service level and relationship to my customers.
Does anyone have a clue or solution?
Version of your installation and extra’s are up to date? Also ask the customers to write down when it occurs. Maybe there is a connection between the undefined and an action in the manager.
Of course, everything is uptodate. I don’t want to go through this again: it’s not me, the customers, the version, the PHP, the extra’s. It’s MODX.
hmm… If it was MODX itself, everybody would have that issue. Seems not the case.
So, it must be something environment specific.
Not easy to help without more information.
What exactly means the
Well, everybody does… That’s what I’m saying. It’s not one environment.
The ‘undefined’ message is exactly what it is: this is what you get to see in the manager. It’s an infamous error message that has been here (read the other topics about it) for years.
Some people like refering to MODX as an infinite configuration engine. The point of people asking questions about your setup is not to say “it’s your fault” or “blame extra foo instead of modx”, it’s determining what exact configuration is at the root of a problem so it can be addressed.
If the default MODX configuration had an annoying popup all the time, that would certainly be wider known. The trick, and point of people asking you configuration-related questions, is to figure out what’s different. It’s in your interest to try and help the people that are helping you, because right now this is not something that’s immediately on anyone’s but your radar as a known issue.
–
My guess is that there’s a connector request failing without a message if you get a MODX-styled alert with the literal text “undefined”.
Does it also show “200 OK”, or just “undefined”?
The easiest way to figure out what’s at the root of a connector request, is using the browsers’ network tab and inspecting the requests that happen right before the popup shows up. That’s not easy for clients to do, but if you know how to reproduce the problem yourself, that should be a feasible approach to getting the information that’s needed.
One of the responses will be invalid somehow. Could be the actual response text that’s not JSON, is empty, or a non-200 status code.
When you have the invalid response, you can see the request parameters and get the action. That corresponds to a processor which may require a certain permission or experience other issues which gets us 70% of the way to having it fixed.
Yes, thanks. I know it needs further investigation. But it’s the customers who get to see it from time to time. And when they call me, the problem is gone… They don’t know anything about network tabs, etc.
I think it’s just ‘undefined’ without any further error codes.
It happens in several installations. Haven’t figured out what could be the common problem.
@gerbenNL When you say: “Well, everybody does…”, MODX is used on hundreds of thousands or sites by hundreds of thousands of people. If everybody were having this problem, it would rise to the level of an urgent bug and we’d be receiving reports of it daily. The lack of such reports leads to the conclusion that it must be a configuration or environment issue of some kind. We’ve all been there, a missing semi-colon, an errant permissions setting, a missing table column, modsecurity or any number of issues.
I also wondered if your site users have either Sudo or limited pemissions? This is yet another variable that could be somewhere to review—especially if you’re not able to replicate the error when you log into the Manager. Checking to make sure their permissions/access match your user is something to eliminate from the search.
If you have a few half-way savvy users that use either Chrome or Firefox, you might have them do this while the Manager is blank: Fire up Dev. Tools by pressing Ctrl-Alt-i, or F12, click on the Console tab at the bottom of the screen and cut-and-paste any error messages into an email to you.
It’s very likely a JavaScript error and you may get a file and line number out of it (shown on the right side of the Console) in addition to the error details.
Well, if you look it up, the ‘undefined’ problem is happening a lot. There are a lot of topics about it. And has been going on for years.
I just want a solution, no discussion.
I don’t see how (limited) permissions for them might be the problem, because it happens randomly. Wrong permissions would either let it work or not. It looks more like a browser/cache/JavaScripting problem.
If you feel, this is a bug, you should consider to open an issue at github
The undefined problem has been experienced by people as far back as 2013. When you review each of the scenarios they are all unique. E.g. this one was an errant base_url
setting that broke things. This one was a bug in how modx worked on Media Temple’s Grid Servers. This one was an issue with a bad unzip of the MODX files in the install. I also saw issues similar to this on A2 hosting because of a misconfiguration in cloudLinux (their OS) they had on their servers which limited PHP connections or files open (I can’t recall which) and caused the manager to sporadically 500 or return errors such as undefined. They corrected the config and the hosting worked as it should.
As you can see, the symptom may be the same but the source of the issue for each was vastly different.
The MODX Revolution Manager relies heavily on the connectors and ExtJS (Javascript) for the UI and interactions and incorporates literally dozens of XHR events when using the Manager, if any one of those fails or has issues it could possibly result in the output of a literal that says undefined.
Unfortunately, this report is a phone call to a physician and saying your friend has pain but not letting them Dr. know anything about the context, your friend’s health, where the pain is, etc. Yes, other people experience pain, but each cause and cure is likely different.
Is it the same customers, same users are they located in the same geographic regions, do the sites have a WAF installed, are they on the same hosting company, do the customers use the same ISP, how was MODX installed, what Extras are installed, are the core directory or Manager directory in their default locations? We need to see the patient(s).
Are you up for the MODX Support team to review one of the sites in question?
I know I don’t have much details. That’s the problem: my customers are annoyed and barely know what browser they use. I want to offer them a reliable service.
Pain can in most cases be described in more detail than MODX issuing a rather generic message ‘undefined’. I was hoping this message would be recognized by someone.
As I said, it’s not the same customers, but many, with different MODX sites. The error message just pops up now and then.
I’m not a developer, I’m not at Github (I don’t understand Github). I’m using MODX since it promised to be a better alternative to Wordpress.
I hear your frustration and that of your customers. I truly do.
Maybe if we could focus on a single case and a single site that has more problems than others for a particular customer we could get to the bottom of that one and go from there. We have had great success on my team in debugging sites and issues like this over the years. And, if we can do it in this forum, it can lead others to potentially find clues as to what’s causing things for them and/or their customers.
Is there a public URL we could glance at to see if there are any front-end clues to start?
Yes, thanks for thinking along. I appreciate it.
I’d rather not give any public URL’s here. I instructed one of my clients, who is experiencing this issue lately, how to retrieve the error message from the dev tools. I hope I can give more details soon.
I’m still not clear on what’s happening.
Are people looking at a completely blank page with and “undefined” message, or is any part of the Manager visible (and if so, what’s visible)?
Is the error message in a popup box?
Does it happen just at login, or does it also happen later?
Is there anything in the MODX error log that could be relevant?
HI there, The only time I’ve seen this kind of behavior was related to an issue with a load balancer that the client had in front of the site, I never got to understand who he was “replicating” the site, but in some cases, the balancer sent the user was sent to the “replicated” site, and there was basically nothing there.
Start by checking your http log to see if the request did actually got to the server, and from there check error logs, both server level, and modx level, y no luck, try increasing the error level for php and modx itself.
Modx itself is pretty simple, it’s just a PHP file, that gets your request, and responds accordingly, nothing fancy, and its pretty robust and faill proff as itself, having said that, sadly, due the PHPeir nature of MODx, you can have some crazy implementations that could be causing unwanted behaviors on your site
MODX does offer logs. If you can not log into the manager, then grab the file from core\cache\logs folder. Also, my first thought is that your issue is a javascript issue, such as jQuery not being loaded, but yet it is called. As your issue, appears to be on the front end, it is highly unlikely it is a MODX issue. You can also reinstall MODX over itself to clean it and correct any corruption, but my first thought is it is a JS error.
Yes, blank manager with ‘undefined’ message. The infamous issue that has been around for years.