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.

Is there any way to switch sites in MSM via query string?

October 03, 2010 12:40pm

Subscribe [2]
  • #1 / Oct 03, 2010 12:40pm

    cbc

    5 posts

    Hi all:

    I have convenience “Edit this” links in a EE 1.6 site with MSM. But they only work if the user has selected the appropriate site in the control panel before clicking the link

    For example:

      * User is logged in to CP, and SiteA is selected from MSM.

      * User goes to visit public side of SiteB.

      * User is logged in and in the correct group, so user sees convenience link to “Edit this entry”

      * This link is a URL that looks like this

          http://foobar.uk/system/index.php?C=edit&M=edit_entry&weblog_id=7&entry_id=54

    But this results in an error, with the message “You are not authorized to post in this weblog”.

    HOWEVER, if the user returns to CP, switched to SiteB, returns to the public side of SiteB and follows the convenience link, then everything works just fine.

    QUESTION: Is there a way to switch site by adding something to the query string?

    http://foobar.uk/system/index.php?C=edit&M=edit_entry&weblog_id=7&entry_id=54&site_id=2

    doesn’t do it.

    Suggestions (other than switching to 2.x)?

    THANKS VERY MUCH

    -C

  • #2 / Oct 04, 2010 4:01am

    John Henry Donovan

    12339 posts

    cbc,

    This isn’t a feature included in EE by default so I am moving this thread to the CodeShare Corner for you.
    What I would suggest doing however is masking access to your sites. That way you can have a different domain in your URL for each Edit this link

    Does that help?

  • #3 / Oct 04, 2010 7:56am

    cbc

    5 posts

    John Henry Donovan:

    Perhaps. Will try separate masked location for each site in MLM (there are only two) and point convenience links (Edit this item, add an item) to the masked location.

    Will report back with result.

    THANKS

  • #4 / Oct 04, 2010 8:42am

    cbc

    5 posts

    John Henry Donovan:

    Great thought, thanks. But doesn’t do it. Will continue scratching head.

    THANKS

    -C

  • #5 / Mar 03, 2011 8:29am

    Joobs

    362 posts

    did you ever solve this problem?

    It looks like the only way to solve this would be if EE accepted a site_id param in the url.

    Is the site_id stored in a cookie or something?  You could possibly have some script that edited the cookie when the user clicked on the edit this link?

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

ExpressionEngine News!

#eecms, #events, #releases