I'm branching this off of another question: Assets 2 MSM Cannot Upload or view images
I'm not seeing any tag output from Assets in the second site.
I'm running EE 2.5.5 with Assets 2.0.5.
This is a site that I've been migrating from an older site, so it's a clean slate. It's not an upgrade. I've migrated entries into the new database and updated templates that I've copied in.
Yesterday I set up a second site using MSM. I'm using Master Config, so there were a few issues with paths for third_party add-ons and templates, but those have been resolved. My templates are outputting correctly now.
I have content in a channel on the 1st site (Site1): That channel's name is experience
. If I drop the following code into a template on Site1, it works fine, including outputting the URLs of the Assets field's image ({event-story-gallery-image}
):
{exp:channel:entries site="default_site" channel="experience" orderby="event-story-sort-order" sort="asc" dynamic="off"}
<a class="story-link" href="/experience/story/{url_title}"><span class="view">View</span><span class="border"><!-- empty div --></span>
<img src="{main_url}{event-story-gallery-image}" width="320" height="230" />
<span class="caption1">{title}</span>
<div class="divider"><!-- empty div --></div>
</a>
{/exp:channel:entries}
If I drop that same code into a template in Site2, everything outputs correctly except the {event-story-gallery-image}
tag. That outputs nothing. It's not an incorrect path, it's just not outputting.
I have the following in Master Config:
$config['assets_site_url'] = '/index.php';
$config['assets_cp_path'] = 'admin/';
To be able to view the CP under Site2, I have to change the master config as follows:
// $base_url = $protocol . $_SERVER['HTTP_HOST'];
$base_url = 'http://ee2.morinsfinecatering.localhost:8888';
//$base_path = $_SERVER['DOCUMENT_ROOT'];
$base_path = dirname(__FILE__).'/../../../public';
That lets me see the CP correctly in Site2.
Accordingly, I changed my Assets settings as follows:
$config['assets_site_url'] = 'http://ee2.morinsfinecatering.localhost:8888/index.php';
$config['assets_cp_path'] = 'http://ee2.morinsfinecatering.localhost:8888/admin/';
I still cannot see my Assets files in the CP in Site2, nor get any output from the tags.
I've confirmed that the following in my config.php is the correct path as well:
$config['third_party_path'] = $base_path . "/client_ee/add-ons/system/third_party";
echo $config['third_party_path']; exit;