-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSS url values broken #159
Comments
Oh and the logic error is described here: http://commonsinabox.org/groups/help-support/forum/topic/submenu-icons-iconsweets/#post-3097 |
Thanks for this report. I have been battling this issue in other contexts for a week and have been stumped. I think the sub folder hint is going to put me over the top. Will make an Infinity fix soonish if this pans out. |
@MrMaz Um, "over the top"? I hope you mean in a good way :-) |
Yes, I meant in a good way ;) |
@MrMaz Okay, glad to hear it. Phew. |
@christianwach do you have a public site which shows CSS files being enqueued in the header with the sub-site slug before /wp-content? As in your example of "/cbox/wp-content/themes" I don't have much sub-folder multisite experience, and I am trying to wrap my head around how WordPress resolves this. Does it do it with .htaccess or something? |
Sure, here you go: CSS is here: Don't know if it's useful, but here's some code to throw into print_r( array(
'theme_root' => $theme_root,
'theme_root_uri' => $theme_root_uri,
'uri_parts' => $uri_parts,
'path_length' => $path_length,
'self::$document_root' => self::$document_root,
'get_template_directory' => get_template_directory(),
'get_template_directory_uri' => get_template_directory_uri(),
'get_stylesheet_directory' => get_stylesheet_directory(),
'get_stylesheet_directory_uri' => get_stylesheet_directory_uri(),
'ABSPATH' => ABSPATH,
) ); die(); Also, FWIW, if you're sure you want to persist with the approach you're taking (ie strip scheme and domain from the CSS url value) I'd convert the paths to arrays and work with them (and Cheers, Christian |
The domain and scheme can't be used in the dynamic stylesheet url() properties because of http vs https. The document root "gotcha" which you have reported is like the 6th or 7th one since Infinity's inception, and I expect there will still be more to come. Don't even get me started on Windows servers lol. The document root length substr() strategy is used purely for performance because file_to_uri_path() can be called hundreds of times. I am definitely going to re-evaluate this decision, depending on what I find here. Thanks for all of your help so far! |
@MrMaz Sorry, I was only trying to save you some typing, not questioning your capabilities ;-) I guess you're avoiding |
I didn't take it that way at all, just explaining the reasoning behind the bass-ackwards way its handled. Can you throw this bit into the document_root() function after the parse_url() line and paste the results? global $current_blog; |
@MrMaz Sure thing, here you go: object(stdClass)#10 (12) {
["blog_id"]=>
string(1) "2"
["site_id"]=>
string(1) "1"
["domain"]=>
string(20) "my.domain.localhost"
["path"]=>
string(6) "/cbox/"
["registered"]=>
string(19) "2013-07-05 08:42:50"
["last_updated"]=>
string(19) "2013-07-05 08:42:56"
["public"]=>
string(1) "1"
["archived"]=>
string(1) "0"
["mature"]=>
string(1) "0"
["spam"]=>
string(1) "0"
["deleted"]=>
string(1) "0"
["lang_id"]=>
string(1) "0"
}
string(75) "/path/from/root/to/my.domain.localhost/httpdocs/wp-content/themes"
string(50) "http://my.domain.localhost/cbox/wp-content/themes"
array(3) {
["scheme"]=>
string(4) "http"
["host"]=>
string(20) "my.domain.localhost"
["path"]=>
string(23) "/cbox/wp-content/themes"
} The subsite's path (as you can see) is '/cbox/', and there's a .htaccess file with the standard RewriteRules that WordPress auto-generates to parse requests into query vars. I can send that your way too if you want. |
When cbox-theme is used on a subsite and WP Multisite uses subfolders,
ICE_Files::document_root()
incorrectly calculatesself::$document_root
. Please see the following thread for full details:http://commonsinabox.org/groups/help-support/forum/topic/submenu-icons-iconsweets/
Cheers,
Christian
The text was updated successfully, but these errors were encountered: