You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can confirm the 'sources' entries are bad. On windows servers it also includes the drive letter. HOWEVER, the correct entry should only be the relative path on the web server...so the example above a correct 'sources' entry would be 'less_php/theme.less'.
The full path is supposed to be trimmed in the Generator->normalizeFilename() function, HOWEVER the passed filename is TOO full so that the sourceMapBasepath can't be found/replaced by the strpos/substr calls.
Since the standard is for the sources to be a relative path, the real fix is to pass a 'sourceMapBaseName' of the root part of the path which when stripped from the full path by the parser will create a relative path. In your case the correct param passed should be:
Hello guys, this is my first use of less.php, so here is my exemple:
The web DocumentRoot is public_html/ , which includes these files :
index.php
theme.less
footer.less
header.less
components/buttons.less
The generated theme.css
The issue
the generated theme.map looks like this
The "sources" values shouldn't be absolute, because when using the navigator inspector, the navigator can't access to them.
The fix
vendor/wikimedia/less.php/lib/Less/SourceMap/Generator.php
I removed this block :
And I changed this line :
to become :
So the result of the new generated theme.map is :
And everything is ok in the navigator inspector 💯
Thank you for your help and suggestions 👍
The text was updated successfully, but these errors were encountered: