no css styles in news details
no css styles in news details
I just installed cmsms 2.2.19
After setting up my templates and some content, I struggle now with the news detail view, it shows up without css. I have already set up a specific page to display it in and made sure that page is used and it is
{news detailpage="news-detail"}
now what specially confuses me is, in content editor when I look at the preview tab of the news article, it looks perfectly fine including CSS styles.
But when I go to the frontend of my website and click the detail link from the news summary, the page comes up without any CSS. The link to the stylesheets looks fine when I check the sourcecode, it looks identical to the normal content pages which show correctly with CSS.
I already deleted the cache in cmsms. No change.
Appreciate any hints.
Regards
Tom
After setting up my templates and some content, I struggle now with the news detail view, it shows up without css. I have already set up a specific page to display it in and made sure that page is used and it is
{news detailpage="news-detail"}
now what specially confuses me is, in content editor when I look at the preview tab of the news article, it looks perfectly fine including CSS styles.
But when I go to the frontend of my website and click the detail link from the news summary, the page comes up without any CSS. The link to the stylesheets looks fine when I check the sourcecode, it looks identical to the normal content pages which show correctly with CSS.
I already deleted the cache in cmsms. No change.
Appreciate any hints.
Regards
Tom
Re: no css styles in news details
Hard to say without seeing it, but perhaps there's a mixed content issue? Check the console to see if there's any warnings. If that's not it, make sure the html validates. Feel free to share a link if you need further help.
Not getting the answer you need? CMSMS support options
Re: no css styles in news details
thanks for the input, Digi
So far I found no other solution then to hardcode the link to all stylesheets in the main template of my site. Not how it should be, but it works for now.
Looks like a bug to me, specially because it works in the preview.
this is the site in progress https://www.ziegelei-museum.ch/2024/index.php
So far I found no other solution then to hardcode the link to all stylesheets in the main template of my site. Not how it should be, but it works for now.
Looks like a bug to me, specially because it works in the preview.
this is the site in progress https://www.ziegelei-museum.ch/2024/index.php
Re: no css styles in news details
Looking at the HTML source shows that the "<!DOCTYPE" header uses XHTML syntax and it does not start at line 1.
This will switch browsers into "quirks mode"
you should replace the XHTML doctype by:
your template should start with {process_pagedata} using {strip} and {/strip}:
When using {cms_stylesheet} you can open the CSS file "/tmp/cache/stylesheet_combined_longstring.css" and see if any linked CSS file in your design manager is missing. Also the sorting in the design manager could be relevant.
This will switch browsers into "quirks mode"
you should replace the XHTML doctype by:
Code: Select all
<!DOCTYPE html>
Code: Select all
{strip}{process_pagedata}
<!DOCTYPE html>
.....
{/strip}<head>{strip}
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{$title}</title>
{metadata|strip}
{cms_stylesheet|strip}
....
{/strip}</head>
Re: no css styles in news details
thank you creopard, but the template is exactly like your example
<!DOCTYPE html ...
identical to the standard minimal template that comes with cmsms
<!DOCTYPE html ...
identical to the standard minimal template that comes with cmsms
Re: no css styles in news details
I wasn't able to reproduce this as a bug, but if you're able to make a copy of the page and template with the cms_stylesheet method so we can see the problem in action, that would be helpful (we may notice something you missed). Otherwise if you can give us steps to reproduce the problem in a clean installation, please file a bug report so we can work on a fix.
Not getting the answer you need? CMSMS support options
Re: no css styles in news details
I see this on all your page sources...
Re: no css styles in news details
yes like I said, the styles links are correct, and the pages are displayed correctly in preview, but from the frontend, CSS is not rendered.
Re: no css styles in news details
well I must correct my last post: Right now the css links are hardcoded and that way everything is working. It was before with relative links that css was not rendered in the frontend, only in backend preview, despite the links in sourcecode looked exactly the same as they do now.
Re: no css styles in news details
I'm puzzled, because your current site does not look as it's based on the minimal template.
As Dr. CSS already mentioned, the HTML source looks completely different.
You can also try to set
Code: Select all
<base href="https://www.ziegelei-museum.ch/">
or use
Code: Select all
$config['show_base'] = true;
-
- New Member
- Posts: 1
- Joined: Thu May 16, 2024 8:52 am
Re: no css styles in news details
I also have the same problem, please tell me the correct way to handle it.thomahawk wrote: ↑Mon May 13, 2024 10:51 pm yes like I said, the styles links are correct, and the pages are displayed correctly in preview, but from the frontend, CSS is not rendered. papa's games
-
- New Member
- Posts: 7
- Joined: Fri Dec 30, 2022 3:32 pm
Re: no css styles in news details
@agelababypp please post a link : )
@thomahawk looking at https://www.ziegelei-museum.ch - checking news, everything looks good?
news details? https://www.ziegelei-museum.ch/news/125 ... -Aspermont
https://www.ziegelei-museum.ch/2024/index.php#top here I just can't click anything on news? Because under it there is a calendar?
@thomahawk looking at https://www.ziegelei-museum.ch - checking news, everything looks good?
news details? https://www.ziegelei-museum.ch/news/125 ... -Aspermont
https://www.ziegelei-museum.ch/2024/index.php#top here I just can't click anything on news? Because under it there is a calendar?