V5.3 - first pageload for profilePage fails to render correctly, page reload succeeds

Hello dear people!

I have a weird behaviour with Version 5.2 and 5.3 and i have no idea where to start debugging…i installed a sample version for demonstration / reproduction here:

http://www1.ssv-schrobenhausen.de/admin
user: admin
pwd: password

When i login and click on the edit profile page in the leftMenu, the page renders weird stuff like
{“Content”:"
\n\n\t
\n\t\t\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t
\n\t\n\t\t\n\t\t\tMy Profile</span>\n\t\t\n\t\n</div>\n\n\t\t\t\t\n\t\t\t</div>\n\t\t\t\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t… and so on…

Now i hit F5 to relaod the page and everything renders just fine… This happens with several pages in the admin area.

Has anyone an idea what could cause such an error?

Best regards
Alex

OK, so the underlying cause might be difficult to work out, but it looks like the request for the edit form is being responded to with the wrong content type.

Your server seems to be returning a text/html response, whereas I think it should be application/json or similar.

How is the site hosted?

Hello Tim,

sorry i missed your answer… i installed the site on 2 different hostings (different providers)

One is IONOS, the other one is Hosteurope. both are running php 8.2
Silverstripe 3.6 ran fine…on my local development setup this error does not occur…

i do not know what additional information you’d need to help me…can you tell me where to look?

Greetings
Alex

This statement is higly suspicious. Silverstripe 3.6 does not run on PHP 8:

Hi ntd,

i just wanted to say that in former times, with the same Hosting-Provider (former webserver running php 5.x) Silverstripe 3.6 ran fine.

… the current Silverstripe Version is 5.2, the php-version of both hostings is 8.2. (tried 8.3 as well, same behaviour)

thought it might help to add that info, but admittedly was just confusing…

Greetz
Alex

Hello,

i added this:
PHP 8.2.25-bookworm.0 - phpinfo() (HOSTEUROPE)
PHP 8.3.16 - phpinfo() (IONOS)

hope it can help.

Hello everyone, i found the problem and just wanted to share it, in case anyone runs into the same thing.

I made a simple error i constantly oversaw all the time. in 2 of my php-Files (DataObjects and stuff), my code started with a blank line instead of “<? php”.

Greetings!
Alex

1 Like