MyBB Community Forums

Full Version: No stylesheets showing up
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Just done a fresh install of 1.8 cloned directly from GitHub. No stylesheets are being loaded straight after install. Checked the source and here's the <head> section:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!-- start: index -->
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Forums</title>
<!-- start: headerinclude -->
<link rel="alternate" type="application/rss+xml" title="Latest Threads (RSS 2.0)" href="http://localhost/~euantorano/mybb/18/syndication.php" />
<link rel="alternate" type="application/atom+xml" title="Latest Threads (Atom 1.0)" href="http://localhost/~euantorano/mybb/18/syndication.php?type=atom1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<script type="text/javascript" src="http://localhost/~euantorano/mybb/18/jscripts/jquery.js?ver=1800"></script>
<script type="text/javascript" src="http://localhost/~euantorano/mybb/18/jscripts/jquery.plugins.min.js?ver=1800"></script>
<script type="text/javascript" src="http://localhost/~euantorano/mybb/18/jscripts/general.js?ver=1800"></script>


<script type="text/javascript">
<!--
	lang.unknown_error = "An unknown error has occurred.";

	var cookieDomain = "";
	var cookiePath = "/~euantorano/mybb/18/";
	var cookiePrefix = "";
	var deleteevent_confirm = "Are you sure you want to delete this event?";
	var removeattach_confirm = "Are you sure you want to remove the selected attachment from this post?";
	var loading_text = 'Loading. <br />Please Wait..';
	var saving_changes = 'Saving changes..';
	var use_xmlhttprequest = "1";
	var my_post_key = "8aa679e9deb74c25c8e9de854343b4a0";
	var rootpath = "http://localhost/~euantorano/mybb/18";
	var imagepath = "images";
  	var yes_confirm = "Yes";
	var no_confirm = "No";
	var MyBBEditor = null;
// -->
</script>
<!-- end: headerinclude -->
<script type="text/javascript">
<!--
	lang.no_new_posts = "Forum Contains No New Posts";
	lang.click_mark_read = "Click to mark this forum as read";
// -->
</script>
</head>

Also checked the headerinclude template, all looks fine there:

<link rel="alternate" type="application/rss+xml" title="{$lang->latest_threads} (RSS 2.0)" href="{$mybb->settings['bburl']}/syndication.php" />
<link rel="alternate" type="application/atom+xml" title="{$lang->latest_threads} (Atom 1.0)" href="{$mybb->settings['bburl']}/syndication.php?type=atom1.0" />
<meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/jquery.js?ver=1800"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/jquery.plugins.min.js?ver=1800"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/general.js?ver=1800"></script>

{$stylesheets}
<script type="text/javascript">
<!--
	lang.unknown_error = "{$lang->unknown_error}";

	var cookieDomain = "{$mybb->settings['cookiedomain']}";
	var cookiePath = "{$mybb->settings['cookiepath']}";
	var cookiePrefix = "{$mybb->settings['cookieprefix']}";
	var deleteevent_confirm = "{$lang->deleteevent_confirm}";
	var removeattach_confirm = "{$lang->removeattach_confirm}";
	var loading_text = '{$lang->ajax_loading}';
	var saving_changes = '{$lang->saving_changes}';
	var use_xmlhttprequest = "{$mybb->settings['use_xmlhttprequest']}";
	var my_post_key = "{$mybb->post_code}";
	var rootpath = "{$mybb->settings['bburl']}";
	var imagepath = "{$theme['imgdir']}";
  	var yes_confirm = "{$lang->yes}";
	var no_confirm = "{$lang->no}";
	var MyBBEditor = null;
// -->
</script>

Screenshot:

[Image: Ff4iIqB.png]
Probably an issue with the cache? Have you tried to resave global.css? My latest installation was yesterday and there were no issues.
Looks like it's a cache issue indeed King Louis. If the stylesheet files do not exist (eg: were not written due to a permissions issue), the code falls over here (within global.php - line 308 onwards):

if(!empty($theme_stylesheets))
{
	foreach($theme['disporder'] as $style_name => $order)
	{
		if(!empty($theme_stylesheets[$style_name]))
		{
			$stylesheets .= $theme_stylesheets[$style_name];
		}
	}
}

[Image: JJs26dD.png]

Definitely a bug as it means the css.php functionality doesn't work at all.
Ok, I'll try to look at it as I added the code Toungue
I was trying to do a git blame to point fingers but didn't have any success Toungue
Hmm after a quick look, this is a bit tricky to fix. I'll push the issue to GitHub so one of the "real" devs can look at it Toungue
Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/734

Thanks for contributing to MyBB!

Regards,
The MyBB Group
I had the same problem and I had to change the CHMOD of the chache/themes folder.
Yeah, the issue doesn't exist with cached stylesheets, only when they aren't cached. Normally the css.php should be used then.
Yeah, I had a quick look and it's going to need a rethink of that whole area of code (which IMO should really be done in a function or three anyway...).
Pages: 1 2