Hi,
First, I'd like to say this is a great theme and far worth the money paid for it. It was choosen among almost one hundred different others.
The issue is: when a page has an layerslider animation, the generated URL for .../borderlesslight3d/skin.css is incorrect.
for some reason, my webserver physical folder address is being inserted in the middle of URL as shown in the picture below
My development web server root folder is: "D:\Portables\EasyPHP\data\localweb" and "atacado" is the name of my intranet site. BTW: "atacado" means wholesale in portuguese.
The correct address should be:
http://127.0.0.1/atacado/wp-content/plugins/LayerSlider/static/skins/borderlesslight3d/skin.cssIf you can send me a path, I can fix it by myself. Just need the:file, line and patched code.
thank you
Comments
.... skinsPath: 'http://127.0.0.1/atacado/wp-contentD:\Portables\EasyPHP\data\localweb\atacado\wp-content\plugins\LayerSlider/static/skins/'}) }.....
Thanks for all kindness and all "side" informations :-)
It looks like it might be problem in LayerSlider, however such issues(path rewrites) usually disappear on public servers.
I have no idea what should be patched as this is part of external plugin. However I will google about it and dig around, and maybe I will find something suspicious in their code.
Did you make any modifications that could alter this path?
PS. If you are happy with this theme please don't forget to rate us on ThemeForest - it helps us a lot! Thanks! How to rate?
With regards.
I've found the solution for the problem above:
In file: class.ls.sources.php line 129
Replace this line: return WP_CONTENT_URL. str_replace(WP_CONTENT_DIR, '', $path).'/';
By this: return WP_CONTENT_URL. str_replace(str_replace('\\', '/', WP_CONTENT_DIR), '', str_replace('\\', '/', $path)).'/';
Reason: In Windows we have the problem of backslashes.
Example taken from my debug session:
WP_CONTENT_DIR = \Portables\EasyPHP\data\localweb\atacado/wp-content
$path = \Portables\EasyPHP\data\localweb\atacado\wp-content\plugins\LayerSlider/static/skins/borderlesslight3d
The purpose of str_replace on line 129 is removing the absolute path, leaving just the relative part of it. In other words, leaving only the path that comes after "...wp-content".
The problem is: In windows you have BackSlashes and ForwardSlashes mixed in everything.
"WP_CONTENT_DIR" do not match with the begin of "$path". Due this, the whole content of "$path" is concatenated after WP_CONTENT_URL, causing de bug. The workaround is just replacing BackSlashes of the "needle" and the "haystack" before apply the str_replace.
Cheers
Thanks for detailed info. That is why I said that such problem usually
disappear on public servers.
Great that you have solved this.
With regards.