Closed sebszocinski closed 8 years ago
I came here to report the same issue
css files can be linked up in the extension UI, but when you go to edit them no syncing occurs seems to affect css files that use get parameters
Will fix it as soon as I get back to LS plugin, working on LS web-site right now
It seems to stabilise if you strip the query strings from the stylesheets.
If you are using a Wordpress Child theme, you can use this function to patch the problem (At least it seems to patch it, have not tested it for very long at time of writing).
If you want to keep the parameters on the JS files, just remove script loader filter from the function.
If you are not using a child theme, there must be a plugin in the WP repository that strips query params, or you can use W3 Total Cache.
If you are a theme developer, just remove the params while you are developing.
PHP FUNCTION:
//Remove Query Strings from Static Resources
function remove_cssjs_ver( $src ) {
if( strpos( $src, '?ver=' ) )
$src = remove_query_arg( 'ver', $src );
return $src;
}
add_filter( 'style_loader_src', 'remove_cssjs_ver', 10, 2 );
add_filter( 'script_loader_src', 'remove_cssjs_ver', 10, 2 );`
Just to confirm, after a day or so of testing in my own environments, LS Alpha, in the context of this discussion, is stable in Chrome when editing WP stylesheets, as long as the query strings are stripped from the file location.
Fixed in v0.9.4 Chrome extension
I am using the Alpha version as the previous one stopped working.
If I have dev tools closed and click the LS button in chrome I can see all my style sheets and select one and then coding in ST will update Chrome, but once I open Dev Tools and then click on the LS icon only ONE stylesheet is listed and it is an external one hosted on a CDN...
The only difference I can see if that i'm using ?ver with Wordpress on my stylesheets.
Edit: Confirmed, if I remove ?ver=xx then it works!
Hope you can fix this!
Cheers