Uploading to server - no style on Homepage (only) and login problem

Silverstripe Version: 4.3.3

Sorry for long intro, but I it all seems complicated and I spend hours to find out what goes on, obviously without result…

I upgraded a SS3.6 to SS4.2.1 locally and then before I decided to upload it to the host I decided to upgrade it to SS4.3.3 which works fine on my local installation (WAMP).
When I uploaded it to the host (FTP, reused old db from 3.6) the Homepage shows only the content on a grey background without any styling, navigation etc…
If I navigate to the About page by adding /about to the url, the page is styled and shows the correct content, the navigation is there fully functional, so all the other pages are there (styled) as expected.
How do I get the styling for the Homepage right? I thought I need to get into the backend and check if the Homepage a HomePage as I think it is only a normal ‘Page’, but I couldn’t log in.
The db connection is there, the admin password is correct (ended up copy and pasting it after several attempts), but I got an error message that something with my credentials must be wrong, which isn’t.
This morning I tried it again and checked the error log, which comes up with error-log.ERROR: Uncaught Exception PDOException: "SQLSTATE[08004] [1040] Too many connections"

I went away for an hour or so and tried to use a different browser (although I constantly did my ?flush=all) and managed to login, but got an unstyled, stuck in ‘loading’, not being able to navigate screen:

Has anybody had this before or knows/has an idea what went wrong? Or how/where to look for any clues?
By the way, my browsers are all up to date…

Any help is really appreciated!

Thank you very much.

Hi @Kimk

Are you using a “public” folder? If so, does /public/resources exist?

Typically, you’d run composer vendor-expose which would put the relevant CSS files in a public folder (assuming you’re using this). But if you’re using the ZIP file instead of composer, I believe it includes all this by default.

Is the value of the base_href tag set correctly?

Hi Parker1090 and LanceH,

Thank you for your suggestions.
The only problem I still have is that I can’t login to the backend and don’t get an error message.
Not sure how I can debug this or how else to get an error message for this. Any idea?

The Homepage without style is solved by getting into the database and added the namespace in front of the HomePage and those pages that were customised as I forgot to set the

SilverStripe\ORM\DatabaseAdmin:
  classname_value_remapping:
    HomePage: namespace\HomePage etc. 

in the .yaml file.
The website itself is working now including all the files/images and styles.
It is just that I can’t log in although my credentials are correct (db and password exactly as in old 3.6 version). It gets stuck on the /admin/pages screen (screeshot above).

Has anybody any idea?

Thank you very much.

Hi Parker1090,

After thinking a bit more in depth about your answer, I had a look into the browser Dev-tool and noticed it has indeed to do with not getting the resources from the vendors.
I did a composer vendor-expose copy and transferred (FTP) those files as I did with my themes files. So, why do the themes files work, but not the vendor files?

Hi Parker1090,

Thank you so much!! You really pointed me to the right direction.
I found the error!
For some strange reason there was a client folder within the client folder in the admin folder.

Everything works perfectly fine now.

Thank goodness :grin:

1 Like