Conflict with Pro Sites 3.5 and New Blog Template

I have a problem with the integration between Pro Sites 3.5 and New Blog Templates.

When selecting New Blog Templates to display the template options as "Theme Preview" the "View Demo" button does NOT open up the template for viewing. Prior to Updating Pro Sites to 3.5 the "View Demo" button in the template selection section opened up a new tab in the browser and displayed the destination of the Template site responsible for the template. Now it just refreshes to display the purchase package option. I would appreciate a speed resolution of this issue as we are on a very small time budget and need to implement this update ASAP.

I have tried disabling the other plugins however the problem persists.

Support Access has been granted.

  • Vinod Dalvi
    • WP Unicorn

    Hi @stacy_bosel,

    I hope you are well today.

    I can see you have already created the following support topic for the same issue so could you please post your reply on your following existing topic instead of creating new one to avoid duplication of topics?

    https://premium.wpmudev.org/forums/topic/bug-with-pro-sites-35-and-new-blog-template-intergration

    Closing this topic as a duplicate of above topic.

    Thank you for being a WPMU DEV member and have a fantastic day!

    Cheers,
    Vinod Dalvi

  • Vinod Dalvi
    • WP Unicorn

    Hi @stacy_bosel,

    I am extremely sorry and apologize for closing your this thread which seems to me duplicate of your another thread in hurry.

    I have opened this thread now so that you can reply here.

    I am troubleshooting the issue you have posted here and will reply here shortly regarding it.

    Thanks,
    Vinod Dalvi

  • Vinod Dalvi
    • WP Unicorn

    Hi @stacy_bosel,

    Thank you for your patience here.

    I have just tested it on your site solutionresolution.com by creating test user account and found it's working fine for me as displayed in the attached screenshot.

    For "One Page Scrollable Design" template it's displaying scrollable-design-example-template.zeuswebsites.com as a demo site in the new tab and for the template "Multi Page Template 1" it's displaying multi-page-1.zeuswebsites.com

    Is it started working on your site or have i missed anything to test?

    Which browser are you using?

    If you can please try testing it on another browser.

    Kind Regards,
    Vinod Dalvi

  • Vinod Dalvi
    • WP Unicorn

    I found the mistake that on your site solutionresolution.com you have linked the registration link to your old site zeuswebsites as shown in the attached screenshot therefore i got redirected to it when testing.

    Now i will test again on your site from the URL solutionresolution.com/pro-site/ and will reply here.

  • Vinod Dalvi
    • WP Unicorn

    Hi @stacy_bosel,

    I could confirm the issue on your site and could also confirm it on my test site using the latest versions of following three plugins.

    New Blog Templates
    Pro Sites
    Avatars For Multisite

    I have notified the Avatars For Multisite plugin developer about this issue so that it can be fixed in the plugin.

    I developed the following custom code to resolve this conflict issue and added this code in the Quick Custom Solution Plugin on your site to resolve the issue.

    if( class_exists('ProSites') ){
    	add_action( 'signup_extra_fields', 'custom_psts_wp_enqueue_scripts' );
    }
    function custom_psts_wp_enqueue_scripts() {
    	global $current_site, $psts;
    
    	//allow overriding and changing the root site to put the checkout page on
    	$checkout_site = defined( 'PSTS_CHECKOUT_SITE' ) ? constant( 'PSTS_CHECKOUT_SITE' ) : $current_site->blog_id;
    
    	//insert new page if not existing
    	switch_to_blog( $checkout_site );
    	$checkout_page = $psts->get_setting( 'checkout_page' );
    	restore_current_blog();
    
    	if ( $checkout_page  == get_the_ID() ) {
    		wp_enqueue_script( 'jquery' );
    		wp_enqueue_script( 'avatars-signup-js', AVATARS_PLUGIN_URL . 'js/signup.js', array( 'jquery' ) );
    
    		$i18n = array(
    			'type_error' => __( 'The select file type is invalid. File must be gif, png, jpg or jpeg.', 'avatars' )
    		);
    		wp_localize_script( 'avatars-signup-js', 'avatars_signup_i18n', $i18n );
    	}
    }

    I could confirm on your site that the demo template link is working fine now.

    Could you please test it and let me know how it works for you?

    Best Regards,
    Vinod Dalvi

  • stacy_bosel
    • Site Builder, Child of Zeus

    @Vinod Dalvi Fantastic. I thought i disabled all plugins, must have missed a few.
    Thanks for resolving this.... Do you know if there will be a conflict if / when the Developer for Avatars for Multisite updates the plugin to account for this? Will i need to delete the code in the Custom plugin when i update the Avatars plugin? is there an Estimated time for the developer to make the amendments?

  • Vinod Dalvi
    • WP Unicorn

    Hi @stacy_bosel,

    Glad i could help you to make it work.

    Do you know if there will be a conflict if / when the Developer for Avatars for Multisite updates the plugin to account for this?

    There won't be any conflict. The conflict will only occur when we'll use the same function name as custom_psts_wp_enqueue_scripts but we won't do this.

    Will i need to delete the code in the Custom plugin when i update the Avatars plugin?

    You can delete the code in the Custom plugin when you update the Avatars plugin but it's not mandatory.

    is there an Estimated time for the developer to make the amendments?

    No ETA but i hope it will be ASAP.

    We will notify you on this thread when we'll release the update containing fix for this issue.

    Cheers,
    Vinod Dalvi

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.