Hi @seddinger ,
I had my trained on openemr AI traced the OpenEMR 8.2.0 login flow, and it appears we are seeing two separate problems.
The login form is submitting this request:
POST /interface/main/main_screen.php?auth=login&site=
Notice that site= is empty. main_screen.php loads globals.php before authentication. Without a site ID in either the session or request, OpenEMR throws a missing-site exception, which returns the HTTP 400. The expected request would contain:
site=default
The top.restoreSession is not a function console error is also important, but it occurs separately. Product-registration code is not normally called directly by main_screen.php. After a successful login, main_screen.php redirects to interface/main/tabs/main.php, and that page loads the product-registration JavaScript.
Your access log contains no successful redirect or request to tabs/main.php. Instead, the product-registration scripts are being loaded by login.php before the login POST. Stock OpenEMR 8.2.0 should not load those scripts on the unauthenticated login page.
This points toward a mixed or incomplete upgrade, a customized/stale login template, stale PHP OPcache, or a session problem. The empty siteID and product-registration code appearing on the login page may both be symptoms of that underlying issue.
Please view the login page source and check whether the form action contains:
main_screen.php?auth=login&site=
Also search that source for:
product_registration_service.js
If both are present, that confirms the server is generating an incorrect login page. I would then restart Apache/PHP to clear OPcache, clear the browser cookies for this OpenEMR domain, and compare these files against the official 8.2.0 package:
interface/login/login.php
interface/globals.php
templates/login/partials/html/login_details.html.twig
interface/main/tabs/main.php
I am pretty certain this is not an openemr bug as I see many upgrades to 8.2.0 from telemetry data.
I’d not fight this issue and bypass to an 8.3.0 upgrade. I tend to believe a corrupted source is issue.
I hope this helps. One last thing I’ll do is try to force the error to prove error sequence.