Thread

Getting warning's switching MSM sites in v4.0.0-rc1

November 24, 2017 3:09pm

Subscribe [2]
  • #1 / Nov 24, 2017 3:09pm

    Kurt Deutscher's avatar

    Kurt Deutscher

    813 posts

    In the control panel, trying to switch to MSM site at:

    ?/cp/msm/switch_to/2

    Getting:

    Notice

    Undefined offset: 2

    ee/EllisLab/ExpressionEngine/Model/Member/Member.php, line 406

    Severity: E_NOTICE Warning

    Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:111)

    ee/legacy/core/Input.php, line 233

    Severity: E_WARNING Warning

    Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:111)

    ee/legacy/libraries/Functions.php, line 392

    Severity: E_WARNING

  • #2 / Nov 25, 2017 11:05am

    Derek Jones's avatar

    Derek Jones

    7176 posts

    Fixed, thanks Kurt!

  • #3 / Nov 25, 2017 11:45am

    Kurt Deutscher's avatar

    Kurt Deutscher

    813 posts

    If it’s not too complicated a fix. Please send it over to me and I can do more testing of stuff for you on Sunday/Monday related to MSM sites. I have a real-world prototype I’m working on that will test quite a bit of that functionality. Hope you don’t spend your whole Sat. working.

  • #4 / Nov 25, 2017 1:12pm

    Derek Jones's avatar

    Derek Jones

    7176 posts

    Not too complicated, no. You can either edit your member’s CP homepage preference so that a channel is selected for each Site, or open system/ee/EllisLab/ExpressionEngine/Model/Member/Member.php and change around line 400:

    if ($this->cp_homepage == 'publish_form' && ! isset($cp_homepage_channel[$site_id]))
    {
        $cp_homepage = '';
    }
    else
    {
        $cp_homepage_channel = $cp_homepage_channel[$site_id];
    }

    to:

    if ($this->cp_homepage == 'publish_form')
    {
        if ( ! isset($cp_homepage_channel[$site_id]))
        {
            $cp_homepage = '';
        }
        else
        {
            $cp_homepage_channel = $cp_homepage_channel[$site_id];
        }
    }
  • #5 / Nov 27, 2017 6:09pm

    Kurt Deutscher's avatar

    Kurt Deutscher

    813 posts

    Works like a charm… thanks.

ExpressionEngine News

#eecms, #events, #releases