ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Channel Module Fails in MSM

April 27, 2012 2:18pm

Subscribe [1]
  • #1 / Apr 27, 2012 2:18pm

    JohnGribben

    111 posts

    We are unable to output any channel data in an MSM subsite. 

    Here is what we have:

    EE 2.3.1 20111017
    MSM 2.1.1 Build: 20111011

    We are using:

    Structure 3.1.3
    Adman 1.0.3
    DataGrab 1.7.0
    Freeform 3.1.1
    Wyvern 1.2.7.2

    I think we have the preferences set correctly.  The URL to the root directory is set correctly in General Preferences.  We’ve used the same setup before with no problems.

    Thanks,
    John

  • #2 / Apr 30, 2012 12:07pm

    Dan Decker

    7338 posts

    Hi John,

    That is certainly undesirable!

    Are you running the second site on a sub-domain or its own full domain?

    Is the channel available in the second site’s Control Panel? Can you post an example of the template that is giving you trouble?

    Have you checked the MSM values for the second site’s index.php and admin.php?

    Cheers,

  • #3 / Apr 30, 2012 1:15pm

    JohnGribben

    111 posts

    Hi Dan,

    Thanks for your reply!

    We are running the site on a subdomain.

    The channel is available in the control panel of the second site.  Here is a test page:

    http://beingwe.constitutioncenter.org/test

    Here is the template for the above:

    
    {exp:channel:entries url_title="asa-baran-18" site="being_we" dynamic="off"}
    {if no_results} nada{/if}
    {title}
    {/exp:channel:entries}
    
    
    
    {exp:structure:nav start_from="/" show_depth="999" css_class="site-map" site="being_we"}{/exp:structure:nav}
    
    
    
    {exp:channel:entries channel="news" dynamic="no" limit="10" site="being_we"}
    
    <div class="list row">
    
        <h3><a href="http://{page_url}">{title}</a></h3>
    <p>    {news-post-date format="%F %d, %Y"}<br />
        {news-short-text} <a href="http://{page_url}">Read More ></a></p>
    
    <p></div></p>
    
    <p>{/exp:channel:entries}

    As you can see we tried a few ways to display the channel content.

    I think we have the index and admin files configured correctly.  The name of the second site is “being_we.”

    Each contains:


    Thanks again!
    John

  • #4 / May 01, 2012 10:53am

    Dan Decker

    7338 posts

    Hey John,

    Since MSM can be a bit tricky, I keep a sample handy for the main files affected:

    //CONFIG// - typical config.php
    $config['cp_url'] = "http://engine.dev/admin.php";
    $config['doc_url'] = "http://ellislab.com/expressionengine/user-guide/";
    $config['is_system_on'] = "y";
    $config['allow_extensions'] = "y";
    $config['site_label'] = "Test 23";
    $config['cookie_prefix'] = "";
    $config['multiple_sites_enabled'] = "y";
    
    index.php and admin.php site 1
    NO CHANGES
    
    index.php and admin.php site 2
    $system_path = '../system';
    /*---------------------------*/
    $assign_to_config['site_name']  = 'msm_test';
    $assign_to_config['cp_url'] = 'http://msm.dev/admin.php';
    $assign_to_config['site_url'] = 'http://msm.dev';
    
    --- admin ---
    $system_path = '../system';
    /*---------------------------*/
    $assign_to_config['site_name']  = 'msm_test';
    $assign_to_config['cp_url'] = 'http://msm.dev/admin.php';

    Now, that’s a typical set up, with the second site as a sub-domain and its folder in the web-root of the main site.

    I do notice that your first channel entries tag isn’t using a channel= parameter, but the second loop should be pulling in entries regardless. I would expect the url_title parameter in the first loop to pull in an entry without the channel parameter too.

    But, can you add that in for a test?

    If that doesn’t square this, we might need to get a closer look.

    Cheers,

  • #5 / May 01, 2012 4:07pm

    JohnGribben

    111 posts

    Hi Dan,

    Thanks for your reply.

    I’ve checked your sample config setup against ours, and I couldn’t see any major differences:

    I did notice that the MSM configuration had not been uncommented in the master admin file.  I removed the comments and applied the values above. This didn’t fix the problem though.

    One other thing:

    Now, that’s a typical set up, with the second site as a sub-domain and its folder in the web-root of the main site.

    The second site in our case does not reside in the web-root of the main site.  It’s in a sibling httdocs directory.  I don’t know why it was set up this way.  I think it has worked in the past.

    Thanks,
    John

  • #6 / May 02, 2012 3:40pm

    Dan Decker

    7338 posts

    Hi John,

    Try these changes for me please:

    index.php SITE 2
    
    $system_path = '../httpdocs/avalon';
    /*---------------------------*/
    $assign_to_config['site_name']  = 'being_we';
    $assign_to_config['cp_url'] = 'http://beingwe.constitutioncenter.org/avalon.php';/*is this renamed admin.php?*/
    $assign_to_config['site_url'] = 'http://beingwe.constitutioncenter.org';
    
    admin.php (avalon.php) SITE 2
    
    //admin//
    $system_path = '../httpdocs/avalon';
    /*---------------------------*/
    $assign_to_config['site_name']  = 'being_we';
    $assign_to_config['cp_url'] = 'http://beingwe.constitutioncenter.org/avalon.php';

    That’s a bit closer to how it should look for your second site.

    Let me know the result of those changes.

    Cheers!

  • #7 / May 07, 2012 8:17am

    JohnGribben

    111 posts

    Hi Dan,

    I found out the issue was we forgot to add status groups to these channels.  I figured it was something simple like that.

    Thank you very much for your help!  Sorry for the confusion.

    John

  • #8 / May 08, 2012 12:19pm

    Dan Decker

    7338 posts

    Hey John!

    Oh, good! Glad to see you were able to sort it out!

    If you need anything else, just let us know.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases