Broken display after upgrading from 6.0.0 to 7.0.0

I used to know how to fix this. I always read the instructions for upgrading. I did a server upgrade first from ubuntu 20.04 to 22.04. Then I had to fix apache had lost connection with PHP for some reason. I restored that dependency and got PHP running. I tried npm install and that did not work.

PHP Version 8.1.2
Apache/2.4.52 (Ubuntu)

The only major error in the log is this

    OpenEMR.ERROR: Not all selected assets were included in header {"selectedAssets":[""],"foundAssets":["jquery","bootstrap","utility","main-theme","compact-theme","textformat","dialog"]} [], referer:

But it only showed up three times then stopped. Any clue what I should be looking for?

Try at command line:

composer install &&
npm install &&
npm run build &&
composer dump-autoload -o

Thanks Jerry, I had tried it already without the composer install command. But I thought I would try it again since you included the composer command. I think there is a dependency broken somewhere on the server. But I have no clue what.

I tried to do an install from the v7 code and the install process when through after fixing the documents directory permissions. And at the end of the install the screen still went back to the above screenshot. I was so sure that after fixing the smarty directory that everything would work. No such luck.
But this is a case where a backup of the system is the best thing to have. I restored the server back to the v6 and will forget about upgrading this server this way. I am going to go the route of building a new server and then when that is working properly with v7 then just move the database. What burned my cookies is that I did another upgrade before this one and it went through just fine no issues. This one took a turn to the left and just kept going down hill.

Life is like a box of chocolates!

Still concerning. Definitely a theme not loading or out of scope issue.
So this was a normal upgrade from v6 to 7? Was upgrade to v7 after OS upgrade or before? If after was v6 running okay or did ya do all at once?

I’ve seen this occasionally but didn’t see any adverse effects.

Yes, it was a normal upgrade no mods involved. I did the OS upgrade from 20.04 to 22.04 of Ubuntu first. Once that was completed and rebooted. I did not check to see if the current v6 was still working properly after the OS upgrade. I did not find out that the OS upgrade was wonky until I tried to login page of v7. That is when I found that the OS upgrade broke Apache. Apache was not parsing PHP.

This page helped to fix the issue. Once I updated the mods enabled. Then it would parse the page but it seems like the page only sends the HTML portion and not the stuff that PHP would parse during the page load. I burnt a lot of time trying stuff to fix it so that if anyone else had this issue. There could be answer out here. But nothing has panned out.

So, one of my troubleshoot tricks is to go back to the beginning and set the config to 0 so I can run the install. That is when I got this error.

   PHP Fatal error:  Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(/var/www/html/ehr/library/classes/../../sites/default/documents/6/6): Failed to open directory: Permission denied in /var/www/html/ehr/setup.php:50\nStack trace:\n#0 [internal function]: RecursiveDirectoryIterator->__construct()\n#1 /var/www/html/ehr/setup.php(50): RecursiveDirectoryIterator->getChildren()\n#2 /var/www/html/ehr/setup.php(1618): recursive_writable_directory_test()\n#3 {main}\n  thrown in /var/www/html/ehr/setup.php on line 50

I deleted the patient chart, because I could put it back later, and redid the permissions on all of the folders. Then walked through the install. That is when I could see that PHP is working normally. Go through the enter install process and created a new database. Then, no joy.

I have seen this before in the error log of v7 but as you said. No one complained about the pages not working properly, yet.

I have another clean install of v7 on PHP 8.1.3. I have not had any issues with it yet.

I checked and smarty is writing the cache directory. But still page does not display correctly.

Okay. Only time i’ve seen this and fixed is clearing browser cache and rebuild themes. We know v7 runs on 22.04 so beats me. Something to watch out for.

Though any javascript errors will prevent styles loading.

I just checked my other server that was running the same upgrade path on and it has the same issue. This time I had not applied v7. It won’t load v6 at all. So, something in the upgrade process has broken the Apache in a way that causes the javascript and css not to work. So, from now on, I will be doing a clean install of the OS. That is how the other installation was done with no issues as you stated.

I tried that also. I took it a step further and used a browser that had never gone to that site before. Same display came up. Thanks God for backups!

You’d have to be getting javascript errors in my opinion. Did you happen to look?

Yes, I looked there were none in the console.

Now that greatly surprises me! I’m curious and hope you get to the bottom and can share.

I have another server that has nothing to do with OpenEMR. I had apache running on it and I upgraded the ubuntu OS to 22.04.1. Apache won’t serve up any pages on that server either after upgrading the server with LAMP already in place.

I did not fix it.
I tried different approaches to fixing the LAMP but nothing worked but doing a clean install of everything. Upgrading to 22.04 from an existing LAMP on ubuntu did not work for me on 3 out of 4 servers.

I was hoping to getting so much more done that troubleshooting. Burned a whole day and …

Still useful information Sherwin. Once you figure out why, please post.