Multi-Domains working with Domain-Mapping

I would like to know whether it is possible to use both the multi-domains & domain-mapping plugins on the same multi-site setup.

I have tried, and which resulted in a privileges problem for new users trying to sign into their dashboards.

I first added the multi-domains plugin to the platform and moved the sunrise.php file to wp-contents. Everything worked perfectly.

Then I added the domain-mapping plugin via ftp, and again moved the respective sunrise.php file to wp-contents which replaced the first sunrise.php file.

I also made the respective changes to config.php.

Domain-mapping works perfectly, however when you add a new user via the front-end, there is a problem with user privileges as stated above.

The following error does occur on site-activation as follows:

Warning: Creating default object from empty value in /home/citibuzz/public_html/wp-includes/ms-functions.php on line 1502

Line 1501 & 1502 reads as follows in the ms-functions file:

if ( empty( $current_site->site_name ) )
		$current_site->site_name = 'WordPress';

The sites do activate and can be viewed in a web-browser, and in the super-admin you can see a user assigned to the respective site, however a user just cannot login to their own admin, and nor can a super-user access the dashboard of these sites via the super-admin.

Is there any way to resolve this?

  • aristath

    Hello there @Grant, I hope you're well today!

    I would like to know whether it is possible to use both the multi-domains & domain-mapping plugins on the same multi-site setup.

    Yes, it's possible and pretty standard too!

    First of all, please make sure that you're using the latest versions of all the plugins, themes and WordPress core.
    Also please make sure that you're using our verstion of the domain mapping plugin and not another because there are a couple more with the same name.

    Then do the following:
    1. disable both plugins.
    2. delete the sunrise.php file.
    3. enable the multi-domains plugin. DO NOT COPY ANYTHING MANUALLY. The plugin will copy the sunrise.php file itself, so please make sure that your wp-content folder is writable by your webserver.
    4. Enable domain mapping. Again, do not copy anything manually. The plugin will try to patch the file.

    Let me know if that works for you!

    Cheers,
    Ari.

  • Grant

    Hello @Ari,

    Thanks a stack for your super-quick reply! Your guidance has solved my problem, thank you very much for your help :slight_smile:

    However the error-message still appears on the activation page and which I am able to hide by adding the following code to wp-config.php:

    ini_set( 'display_errors', 'off' );

    Is this error, which I have highlighted in my original message, anything to worry about, or could it impact any tables etc for new sites created?

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.