<p>2 factors were at play here:</p>

<ul>
<li><p>The HTML-Cache plugin was clouding my development analysis by not showing me updated templated entries.</p></li>
<li><p>I had set the local path wrong, it should have respected my Vagrant VM file structure, <code>/home/vagrant/Sites/Sitename/sitename/public</code></p></li>
</ul>

<p>Disabling the html cache plugin and repairing the <code>basePath</code> environment variable did the trick.</p>

CC BY-SA 3.0
2016-07-27T02:47:04.253Z
Good stuff, Adam. We all get trapped by such things and do  -- on the first time.... Caches can really muddy waters also, similar truth. Glad you posted, for others to find.
narration_sd
CC BY-SA 3.0
2016-07-26T15:38:16.830Z
2016-07-27T13:52:42.943Z
2016-07-27T13:52:42.943Z
Adam Menczykowski
<p>I have followed the points set out in the Craft Docs relating to environmentVariables, making sure to include <code>'*' =&gt; array()</code> before other config arrays. Here is my <code>craft/config/general.php</code>:</p>

<p>return array(</p>

<pre><code>    '*' =&gt; array(
        'omitScriptNameInUrls' =&gt; true,
        'defaultImageQuality' =&gt; 49,
    ),

    'dev.sitename' =&gt; array(
        'siteUrl' =&gt; 'http://dev.sitename/',
        'environmentVariables' =&gt; array(
            'basePath' =&gt; '/Users/adammenczykowski/Sites/Sitename/sitename/public/',
            'baseUrl' =&gt; 'http://dev.sitename/',
        )
    ),

    'sitename' =&gt; array(
        'devMode' =&gt; false,
        'siteUrl' =&gt; 'http://sitename.youi.design/',
        'environmentVariables' =&gt; array(
            'basePath' =&gt; '/home/forge/sitename/public/',
            'baseUrl'  =&gt; 'http://sitename/',
        )
    )

);
</code></pre>

<p>Asset sources reference the basePath when configuring the <code>File System Path</code> like so:</p>

<pre><code>{basePath}images/
</code></pre>

<p>Yes, the folder exists. I have been using <code>pwd</code> and copying the result into the respective <code>general.php</code> setting.</p>

<p>However, when I try to update asset indexes, I get the popup: </p>

<pre><code>The path of your source "SVG" appears to be invalid.`
</code></pre>

<p>Any tips? Thanks in advance.</p>

<p>Running <code>Craft CMS 2.6.2797</code></p>

<assets><url><config>
Asset URL's invalid
# Asset URL's invalid

(Asked by: username_0 on 2016-07-26)

I have followed the points set out in the Craft Docs relating to environmentVariables, making sure to include '*' => array() before other config arrays. Here is my craft/config/general.php:
return array(
    '*' => array(
        'omitScriptNameInUrls' => true,
        'defaultImageQuality' => 49,
    ),

    'dev.sitename' => array(
        'siteUrl' => 'http://dev.sitename/',
        'environmentVariables' => array(
            'basePath' => '/Users/adammenczykowski/Sites/Sitename/sitename/public/',
            'baseUrl' => 'http://dev.sitename/',
        )
    ),

    'sitename' => array(
        'devMode' => false,
        'siteUrl' => 'http://sitename.youi.design/',
        'environmentVariables' => array(
            'basePath' => '/home/forge/sitename/public/',
            'baseUrl'  => 'http://sitename/',
        )
    )

);

Asset sources reference the basePath when configuring the File System Path like so:
{basePath}images/

Yes, the folder exists. I have been using pwd and copying the result into the respective general.php setting.
However, when I try to update asset indexes, I get the popup: 
The path of your source "SVG" appears to be invalid.`

Any tips? Thanks in advance.
Running Craft CMS 2.6.2797

**Tags:** assets, url, config

---

## 1 answers

### Answer by username_0 on 2016-07-26. Score: 2

2 factors were at play here:

* The HTML-Cache plugin was clouding my development analysis by not showing me updated templated entries.
* I had set the local path wrong, it should have respected my Vagrant VM file structure, `/home/vagrant/Sites/Sitename/sitename/public`

Disabling the html cache plugin and repairing the `basePath` environment variable did the trick.

> **Comments:**
> **username_1**: Good stuff, Adam. We all get trapped by such things and do  -- on the first time.... Caches can really muddy waters also, similar truth. Glad you posted, for others to find.  

---

