Unable to add subsite.........

When I try to add a subsite I get this error:

Notice: Undefined variable: last_gateway in /home/digitals/public_html/wp-content/plugins/pro-sites/pro-sites.php on line 2075

Warning: array_diff(): Argument #1 is not an array in /home/digitals/public_html/wp-content/plugins/pro-sites/pro-sites-files/modules/premium-plugins-manager.php on line 322

Warning: Cannot modify header information - headers already sent by (output started at /home/digitals/public_html/wp-content/plugins/pro-sites/pro-sites.php:2075) in /home/digitals/public_html/wp-includes/pluggable.php on line 1228

Support access granted.

  • Kasia Swiderska
    • Support nomad

    Hello Mike,

    So good news is that new subsites are added despite this error. I've created bunch of them in your network.
    Can you tell me if in wp-config.php you have only this line:

    define('WP_DEBUG', true);

    or all of these:

    define('WP_DEBUG', true);
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );

    if only one line, could you change it to three of them?
    Could you also grant again support access? It stopped working and hadn't chance to replicate your settings on my site - and I could not replicate the issue.

    kind regards,

  • Mike
    • The Bug Hunter

    Hi Kasia,

    Thanks for looking at it. Support access is still granted but I enabled SSL so you will probably have to log in again.

    I updated those lines in the wp-config.php. I too noticed that the sites are now creating so I went back and started putting things back one by one to see what breaks it. (I'd rather not have the error message but if site is created then its not a priority)

    It turns out the culprit is this in htaccess:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^domain.com [NC]
    RewriteRule ^(.*)$ https://www.domain.com/$1 [L,R=301]

    I am using it to direct all non www traffic to the www (so the cloudflare SSL displays correctly) and this is messing something up in network admin.

    I added it back in so you can try adding a site now and see for yourself.

    It says support access still valid but let me know if its not.


  • Mike
    • The Bug Hunter

    I revoked then granted again, hope that helps.

    Please note, I made a support ticket with siteground and I am currently going round in circles with them so if you are able to make a subsite it is probably because they removed the rewrite rule.

    It's a bit tricky because each person who answers siteground support ticket doesn't seem to read the previous comments and either removes the rule or adds it back in. I am hoping I will eventually get someone answer it that can give me the correct re-write rule that doesn't break the network admin.

    I think you will need ftp access to debug this to be honest.

  • Ash
    • WordPress Hacker

    Hello @Mike

    I hope you are doing good.

    Please check now. I have activated Premium Plugins Manager module, saved once the payment gateway page, saved once the Paypal gateway information page and saved once the premium plugin manager page. Then I have created a site 'aaaa' without any error.

    Would you please try again and let me know?

    Have an awesome day!


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.