Domain Mapping not working properly with QuickCache

Hi all, im having a issue with Domain Mapping and QuickCache,
im using QuickCache on my network which works good with subdomain directories, yesterday i have mapped for the 1st time a domain name to a blog, everything was working great when i noticed QuickCache functions stopped working, the clear cache button or if i change something on posts or pages it doesn't update the cache with the new files. The only way is to "Wipe Cache" which it cleans all caches of all blogs inside the network.

Is there any way to fix this, or QuickCache isn't compatible with Domain Mapping?

Also im using CloudFlare (mod_cloudflare), and in "Domain mapping configuration" it displays 2 ip's which belongs to CloudFlare network and on "Server Ip Address" field i have my dedicated ip inserted on that field, is this ok? ...because before the integration of CloudFlare there was only my dedicated ip listed to make it available. Should i use the 2 ip's of CloudFlare or my dedicated Ip to users can map their domains?

Thanks

  • Ivan

    Hey Pedro,

    Hope you are having great day so far!

    I am not very familiar with the "QuickCache", but there might be some JavaScript conflict there.
    You can see how do this on the fallowing link if you are not familiar - http://codex.wordpress.org/Using_Your_Browser_to_Diagnose_JavaScript_Errors

    About the CloudFlare and the IP problems.
    You have quite a sophisticated configuration, in general CloudFlare will use different DNS, but I am not sure how often they change the IP adresses if they even change. But if they change it, you going to loose the mapped domain.
    With that said I would use my dedicated IP rather than the CloudFlare one, but that means you are not going really to use CloudFlrare service.

    There might be quite a lot of stuff there causing the problem with Domai Mapping.

    Thanks,
    Ivan

  • pedro_resina

    Hi Ivan, thanks :slight_smile:
    i have turned on debug and displays the error on screen:

    Notice: Undefined index: cf_bulk_download in /home/mcserver/public_html/wp-content/plugins/tt_cloudflare_wpmu/tt_cloudflare_wpmu.php on line 12

    I'm using a plugin recommended by CloudFlare to sync blog records automatically to CloudFlare. and this error seems from this plugin and its also the only error displayed on the screen.

    is this a possible cause of Domain Mapping or QuickCache not working properly?

    Thank you

  • pedro_resina

    Hi Ivan,
    i have mod_cloudflare installed on server and cpanel plugin also, but the options in cpanel are deactivated (grey cloud), i have added the zone manually through cloudflare web interface, and im not using or having installed CloudFlare Wordpress Plugin.

    The only plugin related with cloudflare its the tt wpmu cloudflare plugin pro which i thought it was working fine since i turned the script debug in wp config.

  • pedro_resina

    Hi all and sorry for my delay on this matter, i have been trying to understand some behaviours between Domain Mapping, QuickCache and tt Cloudflare WPMU plugin, which this last one its better to not having permanent activated because of some facts and reasons, which one of the most important reason there isn't any support from developer and also its referred by Cloudflare on their website which doesn't make any sense.

    The only issue im having is when a user try to login with his mapped domain for login to wp backend, the redirect function isn't working good here, because it always redirect to subdomain url and then it redirects again to mapped domain without redirecting the user to wp backend, but if i go manually to user backend the user is already logged in. (every time i tested different options i have always cleaned cache and cookies)

    In Domain Mapping plugin i have choose the options to user login with mapped domain to user avoid subdomain backend url because Quickcache doesn't work in both ways.

    tt cloudflare is the only plugin displaying errors on my wpmu install, and its deactivated for now!

    Also how can i avoid user to login to my network, i just want user able to login to his wp install's?

    thank you again

  • Tyler Postle

    Hey Pedro,

    Hope you're doing well today!

    I just tested this on my domain mapping install and when I login to a mapped domain with both login and admin mapping forced to the mapped domain, it logs me in and redirects me to the backend with mapped domain - all works correctly there.

    Do you mind granting support access so we can test this out on your install and see what's happening first hand?

    You can grant support access via admin dashboard - WPMU DEV > Support > Support Access > Grant Access.

    I see Ari asked that in the last message; however, It doesn't look like it was granted.

    Also how can i avoid user to login to my network, i just want user able to login to his wp install's?

    WordPress Multisite all shares one user database, so a user can login to the network from any site by default, if they don't have a user role specified on a site then they will be given a pseudo-subscriber role; however, if they try to access the backend then it will say they do not have permission for that site and list out options to the sites they do have roles on in the network.

    I can't find a plugin that will stop login all together on sites you don't have a role on, so you may need to have this custom developed if you want it implemented. You can post a job for it here:

    https://premium.wpmudev.org/wordpress-development/

    This would require core changes to WordPress.

    Look forward to hearing back Pedro!

    All the best,
    Tyler

  • pedro_resina

    Hi Tyler, thank you for your support, i was going to post here that i have figured out what was causing this issue, i forgot that i had a file inside mu-plugin folder with a redirect function:

    function ds_login_redirect( $redirect_to, $request_redirect_to, $user )
    {
        if ($user->ID != 0) {
            $user_info = get_userdata($user->ID);
            if ($user_info->primary_blog) {
                $primary_url = get_blogaddress_by_id($user_info->primary_blog) . 'wp-admin/';
                if ($primary_url) {
                    wp_redirect($primary_url);
                    die();
                }
            }
        }
        return $redirect_to;
    }
    add_filter('login_redirect','ds_login_redirect', 100, 3);

    i have commented this function and it now works 100% :slight_smile:

    Thank you again

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.