Forums

Not working on MULTISITE Wordpress

marzillow 19 Feb, 2025

Hi 

I m running a multisite Wordpress installation and although it works on the main website of the Multisite installation it doesn't work on the sub website. It looks like it didn't create the table of CF on each sub website

I think it deserves to be fixed

Max_admin 19 Feb, 2025

Hi marzillow

Did you try to install it on the sub website ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
marzillow 19 Feb, 2025

hello

  1. once is installed on the main website it becomes available on all the other subdomains, so I can't reinstall on the subwebsite
  2. I did install ChronMyadmin and I can see that the table of wp_chronoforms8 on the sub website is not present, hence the Form Saving Error due to to unable to write on the table

I could manually do that, but I don't think It would be the right way, no?

thank you

Max_admin 19 Feb, 2025

I did not try installing Chronoforms on multisites before, but I can provide you with a code fix to try if you are comfortable updating a code file ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
marzillow 20 Feb, 2025

Yes I am

please do that, I am comfortable with that

(ha! I also realized that I answered to your signature! Silly me)

marzillow 24 Feb, 2025

Just a quick reminder that I am ready to test your code fix

thank you

Max_admin 24 Feb, 2025

Hi,

here is a code change that you can try, at the end of this file: WP/wp-content/plugins/chronoforms/chronoforms.php

find this function: function chronoforms_activation_function() {

and before the end of the function: }

add this code:

if ( is_multisite() && is_network_admin() ) {
		$site_ids = $wpdb->get_col("SELECT blog_id FROM {$wpdb->blogs} WHERE archived = '0' AND deleted = '0'");

		foreach ( $site_ids as $site_id ) {
			switch_to_blog($site_id); // Switch to the current site

			foreach($statements as $statement){
				if(!empty(trim($statement))){
					dbDelta("CREATE ".$statement);
				}
			}

			restore_current_blog(); // Switch back to the network admin site
		}
	}

Then you will need to deactivate the plugin on the main site and activate it again for this to work

Let me know if it creates the tables on sub sites or not

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
marzillow 24 Feb, 2025

Hey,

I tried that, but no, unlucky it didn't create the tables for the subsites.

I added the code, disabled the plugin and then reactivated it.

You need to login to be able to post a reply.