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.

MSM module results in weird site behavior

February 08, 2012 4:30pm

Subscribe [2]
  • #1 / Feb 08, 2012 4:30pm

    noregt

    360 posts

    Hi,

    I’ve been installing the MSM module to serve two sites:

    The main site: http://cellaglasenrvs.nl/
    This works as expected.

    The second domain resides in a subfolder, it works ‘sort of’ but without the entries
    http://www.glashandelschraven.nl/

    The thing is:
    - I can’t update template through files, I have to save them through the CP
    - It pulls categories, but all of them, no matter what, even with another channel, and only the ones that belong to the ‘schraven’  site. “show= ” has no influence whatsoever
    - Entries don’t work

    This all used to work with the ‘classic manual method’, so it’s strange that it won’t with the module?

    Used this in the index.php

    $assign_to_config['site_name']  = 'schraven';
     $assign_to_config['cp_url'] = 'http://www.glashandelschraven.nl/admin.php';
     $assign_to_config['site_url'] = 'http://www.glashandelschraven.nl';

    and this in the admin file:

    $assign_to_config['site_name']  = 'schraven';
     $assign_to_config['cp_url'] = 'http://www.glashandelschraven.nl/admin.php';

    Any help would be welcome

    EDIT: at the moment the site is completely dead. That’s hopefully unrelated > an index.html file DOES work however…
    EDIT 2: the site is working again, a slight typo in the config file

  • #2 / Feb 09, 2012 11:43am

    noregt

    360 posts

    A day later I’ve been able to solve most of the issues:

    While moving the content from a channel to the new MSM site the old stuff remains there; channels, categories, templates. removing the old stuff did help a lot.

    What still doen’t work (and might be a bugs):
    - It won’t update template saved as files from the subfolder sites. I am forced to synchronise the templates before anything happens. That makes saving as files pretty useless. It DOES work with the default site however.
    - When a category has the same segment URL name as a category from the default site, it’s unable to retrieve the entries. I’m using links as titles. That makes it hard to have separate sites if I have to check whether independent sites are using the same category names (like home/contact)

  • #3 / Feb 09, 2012 4:15pm

    Dan Decker

    7338 posts

    Hi noregt,

    I am sorry to see you having so much trouble with MSM. Can you tell me what version of ExpressionEngine and MSM you are using?

    The version of MSM that is available for download, 2.1.2, is intended to be used only with ExpressionEngine 2.4. If you are using MSM 2.1.2 with an earlier version of EE, it may not work as expected.

    Cheers!

  • #4 / Feb 09, 2012 4:19pm

    noregt

    360 posts

    Hi Dan,

    I had already upgraded everything to the latest version!

  • #5 / Feb 10, 2012 6:29am

    noregt

    360 posts

    And something else:

    If I log in as a member that is only allowed to post entries in one specific sub-site, it will start with the default site and then block access when you want tp publish something.

    Is that default behaviour? It should of course hide sites without access?

    EDIT: forget this one, I noticed you can set member group prefs on a site basis. blocking CP access also removes the site link.

  • #6 / Feb 13, 2012 1:18pm

    Shane Eckert

    7174 posts

    Hello noregt,

    I am sorry to hear you are still running into a few snags.

    Let’s take the two remaining issues and solve them!

    First Question
    Where are you saving the templates to?

    Sites under the Multiple Site Manager have their own preferences for saving templates as text files. As such, when setting up a new Site under the Multiple Site Manager, you must set up a new location for saving those templates.

    When importing or duplicating to a new Site in the Multiple Site Manager, if you wish to use existing templates which are saved as text files, then the template directory must be manually copied to the directory for the new Site.

    Can you double check to make sure the above procedure has been followed?

    Second Question
    MSM is not category aware. That means that the golden rule of “No categories with the same URL title” applies here as well. A better way to approach this might be to use Pages Module.

    I hope this helps.

    If you have any more questions, please let me know.

    Cheers,

  • #7 / Feb 14, 2012 6:28am

    noregt

    360 posts

    Where are you saving the templates to?

    Templates are saved to their own site folder, so that seems to work correct. Basically it works because I can force it through synchronizing the templates in the CP. If I don’t do that it will pick up the old one in the database. Essentially, it uses the database template only. The default site uses the file version.

    MSM is not category aware. That means that the golden rule of “No categories with the same URL title” applies here as well. A better way to approach this might be to use Pages Module.

    That’s a major disappointment. I am running an old school MSM too (1.x) without the module. And that uses categories with the same name in different sites without any problems. So how come this doesn’t work for the module then? It’s addressing different channels and templates and it doesn’t pull the entries of the default site?

    EDIT: basically this would mean that you can’t safely use category by names in the URL in combination with MSM, unless you admin all sites and you are able to compare the category names. That would be worthwhile knowing before installing the module?

  • #8 / Feb 15, 2012 4:38pm

    Dan Decker

    7338 posts

    Hi noregt,

    That’s a major disappointment. I am running an old school MSM too (1.x) without the module. And that uses categories with the same name in different sites without any problems. So how come this doesn’t work for the module then? It’s addressing different channels and templates and it doesn’t pull the entries of the default site?

    That was my misunderstanding and I do apologize. Shane was working off of information I gave him.

    You can have Categories with matching URL Titles across sites. They key to this working would be judicious use of the site= parameter. Without that, channel entries for example, would pull all entries from all sites that matched your category URL title.

    The caveat is that each site requires you to create the categories fresh, which can be tedious.

    I made sure to get clarification from our developers before opening my big mouth again 😉

    Now that we have that out of the way, we can focus on your template as files problems.

    Can you look in your second site’s template directory and see if you have any files without extensions that match the names of your templates? Your issue sounds related to this bug, but I need to get some more info about what you see on the server.


    Thanks for your patience!

    Cheers,

  • #9 / Feb 15, 2012 5:44pm

    noregt

    360 posts

    Dan, I’ve checked the server, but all templates have the regular html extension. Also, I’ve never allowed PHP in these templates. Just checked to be really sure.

    I’ll do a test tomorrow morning with categories. It should work if I make new categories with the same name in different sites then.

  • #10 / Feb 19, 2012 2:07pm

    Sean C. Smith

    3818 posts

    noregt,

    Have you had a chance to do the test you were going to run? Do you need further assistance?

    Sean

  • #11 / Feb 20, 2012 5:41am

    noregt

    360 posts

    Sean, that test was for the categories issue, I still can’t update template as files.

    _________________________


    About categories and MSM

    You can have Categories with matching URL Titles across sites. They key to this working would be judicious use of the site= parameter. Without that, channel entries for example, would pull all entries from all sites that matched your category URL title.

    The caveat is that each site requires you to create the categories fresh, which can be tedious.

    The site = parameter doesn’t make much of a difference. Creating fresh categories does however (I changed the url’s from existing categories slightly which helped too). Apparently it’s best to create the MSM before inserting categories and content, because it results in some buggerish behavior (for instance entries weren’t deleted from the old site while moving, resulting in categories without content)

  • #12 / Feb 23, 2012 5:57pm

    Dan Decker

    7338 posts

    noregt,

    I still can’t update template as files.

    Let’s get down to that then.
    If you create a new template in the via the Template Manager on the second MSM site and select to save that template as a file, does it save to the server properly?

    Now, if you edit that template file outside of the Control Panel are you changes then reflected in the template manager without having to sync?

    It has been my experience that if I create the files directly on the server *first* they are not reflected in the Control Panel until I sync. However, the reverse works without issue.

    I look forward to your response.

    Cheers,

  • #13 / Feb 24, 2012 3:05am

    noregt

    360 posts

    If you create a new template in the via the Template Manager on the second MSM site and select to save that template as a file, does it save to the server properly?

    yes, I re-tested it and i get a test.html file on the server.

    Now, if you edit that template file outside of the Control Panel are you changes then reflected in the template manager without having to sync?

    If I check the template in the CP it gets the data form the file directly and thus shows the changes. But if I view the template as it is parsed, it does not. It then gets the data from the database, which is not updated. Not sure if this is related, but if I click view template, it doubles the index.php segment (index.php/index.php/...). If I remove the second segment, it shows the template, but from the unsynced database.

    To be clear: the main site works without problems.

  • #14 / Feb 24, 2012 7:33pm

    Sean C. Smith

    3818 posts

    noregt,

    I would like you to turn off “allow templates to be saved as files” Design > Templates > Global Preferences and then create a new folder for your templates (don’t delete the old one for now) set the permissions to 777 and put in the new Basepath to Template File Directory and then syncronize your templates into the new folder.

    Now when editing files is it working as expected?

    Also could you go to Admin > General Configuration and see what you have for the Name of your Site’s index page? it should be index.php but wondering if somehow you have it as index.php/index.php/

  • #15 / Feb 25, 2012 3:43am

    noregt

    360 posts

    Sean, I think I’ve got it. The specific template groups all had permission 777. But the folder that contained those groups had 700. Apparently that makes a difference. Now the templates can be saved as files for the second site too! I assume that’s because the system needs 777 access to to that particular folder.

    noregt,

    Also could you go to Admin > General Configuration and see what you have for the Name of your Site’s index page? it should be index.php but wondering if somehow you have it as index.php/index.php/

    The settings are in order. It does work for the main site. This is not a major issue (I’m the only one bothered with it), but still, it appears to be a bug.

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

ExpressionEngine News!

#eecms, #events, #releases