Presets.less file not outputting paths correctly
Permalink
I'm developing a new theme for the marketplace and all was displaying properly locally, until I moved the site to a sub folder on my domain.
My issue involves any images that are to be editable background images and are being called from the presets.less file. Any images not called from this file are displaying correctly.
All images referenced from a standard less file get outputted correctly, even if the site is in a sub-folder. Anything that's called from presets.less ignores the sub-folder and tries to get called from the root folder.
Her's how I call a file from the presets file:
which gets called into layout.less like this:
here's how I call from layout.less file
To me this looks like I'm doing things the right way but I'm obviously missing something. Has anyone else experienced this or can you see something I'm missing? I've attached a screenshot of my folder set up in case this is part of my issue.
Any advice appreciated.
My issue involves any images that are to be editable background images and are being called from the presets.less file. Any images not called from this file are displaying correctly.
All images referenced from a standard less file get outputted correctly, even if the site is in a sub-folder. Anything that's called from presets.less ignores the sub-folder and tries to get called from the root folder.
Her's how I call a file from the presets file:
@background-1-image: '../images/background-images/background-graphic1.jpg';
which gets called into layout.less like this:
background-image: url(@background-1-image);
here's how I call from layout.less file
background: url(../images/site-images/nav.svg) no-repeat center center;
To me this looks like I'm doing things the right way but I'm obviously missing something. Has anyone else experienced this or can you see something I'm missing? I've attached a screenshot of my folder set up in case this is part of my issue.
Any advice appreciated.
oh - and I also removed all of the cache files as well.
Deleted everything from my cache folder manually, uninstalled & then reinstalled the theme & now everything is fine.
Always the simplest answer isn't it? Thanks for pointing me in far less complicated directions than I was headed myself.
Always the simplest answer isn't it? Thanks for pointing me in far less complicated directions than I was headed myself.
I'm not suggesting you do this necesssarily - just that it might be somewhere to look.
I remember I did export the tables first just in case then I removed those values and things started to work as I expected.