CMS Blog on my new website

After publishing my new website, I’m having an issue with the CMS Blog. When I preview in Elements, everything works as expected, but once I publish to the server, my blog does not appear. It only shows as in the image below. I’ve reviewed all my md-files but can’t find any errors. Link: Kaffesystemer | Blogg

1 Like

It’s hard to diagnose without seeing the project, can you share a link via Elements Cloud?

1 Like

I have send you an e-mail.

Hi @dan

I found this error_log file in the blog folder on the server. Does it tell you anything?
error_log.txt (100.4 KB)

Hi @mrTablet,

I had a closer look at your project, and one clear issue is that your custom component includes <body>, <head>, and <!doctype> tags. These should never be part of a custom component, as they’re already handled by the main page. Including them inside a component will confuse browsers and cause rendering problems.

Change that top portion of code I have highlighted in the above screenshot to the following:

@portal(headEnd)
<style>
#gdpr-banner {
    position: sticky;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f0f0f0;
    padding: 10px;
    text-align: center;
    z-index: 1000; /* Sørg for at banneret er over annet innhold */
    }
  #gdpr-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
  }
</style>
@endportal

btw. I’m using the @portal syntax to transport the styles to the area of the page where it belongs.


I also looked at the log file, and it essentially says “The server’s PHP is missing the mbstring extension”. However, before we try and tackle that (as it may be a red herring) let’s first see if fixing your custom component fixes the blog for you.

Let me know how you get on with those changes.

Canged custom component. Didn’t fix the problem.

Hi @dan
I enabled mbstring and now the blog works :slight_smile:
Thank you so much for your help!

1 Like

Woohoo, I’m so pleased we got there in the end :tada:

1 Like

very nice site, just a question individual blog items text are very greyed, was this meant

1 Like

Hi @dan

Yes.

it looks like this just in case didn’t explain properly, ignore me if this was intended, I will delete if you need me too

1 Like

Strange! This is how it looks on my PC and Mobile

Not sure but my laptop is always in dark mode is yours in dark mode

I switched to light mode and it is the same as yours now, but I leave in dark mode

My mistake. Forgot to adjust for Dark Mode :face_with_peeking_eye:

we all forget something, the site looks great

just another point did you mean this or is it a dark mode issue

I’ll have to check this out more. Thanks!

perhaps switch to dark mode on mac

1 Like

I switched to light mode and the menu is fine

I can only use dark mode now so long using it

1 Like

Have a look at some of your blogg photos. This one seems to be a very large png file - Kaffesystemer blogg - Smaker kaffen ikke like godt som før? Start med å rense maskinen! - @mrTablet