Skip to main content
deleted 260 characters in body
Source Link

So interestingly, I moved my main plugin file into a folder within the plugin directory. Where before the register_activation_hook worked perfectly well, it now does not work; however, the register_deactivation_hook still works perfectly, and it is currently being called from within the same file. I have attempted explicitly defining a path as well for the activation hooks instead of just relying on the __FILE__ keyword. Any insight that can be offered as to why the plugin no longer calls to hook on actviation would be much appreciated, thank you.

//define paths
define('QUEST_MANAGER_PATH', WP_PLUGIN_DIR . '/QuestManager/');
require_once(QUEST_MANAGER_PATH . 'quest-manager.php');

//define table names
$skirmish_table_name = $wpdb->prefix . 'skirmishes';
 
//table function
function skirmish_create_db() {
  global $wpdb;
  $charset_collate = $wpdb->get_charset_collate();
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); 

  //* Create the skirmish tablethetable
  global $skirmish_table_name;
  $sql = "CREATE TABLE". TABLE $skirmish_table_name ."(
  skirmish_id INTEGER NOT NULL AUTO_INCREMENT,
  skirmish_SID TEXT NOT NULL,
  skirmish_name TEXT NOT NULL,
  skirmish_visibility TEXT NOT NULL,
  skirmish_public_tries TEXT NOT NULL,
  PRIMARY KEY  (skirmish_id)
  ) $charset_collate;";
   dbDelta( $sql );
  }
register_activation_hook( QUEST_MANAGER_PATH . 'quest-manager.php'register_activation_hook(__FILE__, 
 'skirmish_create_db' );

is the basic structure of the code, tried using both __FILE__ etc...

UPDATE: AsAs it turns out, I reverted the plugin back to its original format and the tables are still not being generated. I have attempted deactivating all of the plugins that had been activated previously, but it still seems that something is interfering with the plugin's ability to CREATE tables in the mysql database. Any insight into why this is going on would be much appreciated.

I have attempted checking all of the various logs, but cannot figure out what is going on. I have no idea why this is suddenly not working, when it was working perfectly well before. Either something is going on with the activation hook, or for some reason the server is rejecting/dropping the create table requests....

So interestingly, I moved my main plugin file into a folder within the plugin directory. Where before the register_activation_hook worked perfectly well, it now does not work; however, the register_deactivation_hook still works perfectly, and it is currently being called from within the same file. I have attempted explicitly defining a path as well for the activation hooks instead of just relying on the __FILE__ keyword. Any insight that can be offered as to why the plugin no longer calls to hook on actviation would be much appreciated, thank you.

//define paths
define('QUEST_MANAGER_PATH', WP_PLUGIN_DIR . '/QuestManager/');
require_once(QUEST_MANAGER_PATH . 'quest-manager.php');

//define table names
$skirmish_table_name = $wpdb->prefix . 'skirmishes';
 
//table function
function skirmish_create_db() {
  global $wpdb;
 $charset_collate = $wpdb->get_charset_collate();
 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
 //* Create the skirmish table
 global $skirmish_table_name;
 $sql = "CREATE TABLE".  $skirmish_table_name ."(
 skirmish_id INTEGER NOT NULL AUTO_INCREMENT,
 skirmish_SID TEXT NOT NULL,
 skirmish_name TEXT NOT NULL,
 skirmish_visibility TEXT NOT NULL,
 skirmish_public_tries TEXT NOT NULL,
 PRIMARY KEY  (skirmish_id)
 ) $charset_collate;";
 dbDelta( $sql );
}
register_activation_hook( QUEST_MANAGER_PATH . 'quest-manager.php', 
 'skirmish_create_db' );

is the basic structure of the code, tried using both __FILE__ etc...

UPDATE: As it turns out, I reverted the plugin back to its original format and the tables are still not being generated. I have attempted deactivating all of the plugins that had been activated previously, but it still seems that something is interfering with the plugin's ability to CREATE tables in the mysql database. Any insight into why this is going on would be much appreciated.

So interestingly, I moved my main plugin file into a folder within the plugin directory. Where before the register_activation_hook worked perfectly well, it now does not work; however, the register_deactivation_hook still works perfectly, and it is currently being called from within the same file. I have attempted explicitly defining a path as well for the activation hooks instead of just relying on the __FILE__ keyword. Any insight that can be offered as to why the plugin no longer calls to hook on actviation would be much appreciated, thank you.

//define paths
$skirmish_table_name = $wpdb->prefix . 'skirmishes';

function skirmish_create_db() {
  global $wpdb;
  $charset_collate = $wpdb->get_charset_collate();
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); 

  //* Create thetable
  global $skirmish_table_name;
  $sql = "CREATE TABLE $skirmish_table_name (
  skirmish_id INTEGER NOT NULL AUTO_INCREMENT,
  skirmish_SID TEXT NOT NULL,
  skirmish_name TEXT NOT NULL,
  skirmish_visibility TEXT NOT NULL,
  skirmish_public_tries TEXT NOT NULL,
  PRIMARY KEY (skirmish_id)
  ) $charset_collate;";
   dbDelta( $sql );
  }
  register_activation_hook(__FILE__, 'skirmish_create_db' );

is the basic structure of the code.

As it turns out, I reverted the plugin back to its original format and the tables are still not being generated. I have attempted deactivating all of the plugins that had been activated previously, but it still seems that something is interfering with the plugin's ability to CREATE tables in the mysql database. Any insight into why this is going on would be much appreciated.

I have attempted checking all of the various logs, but cannot figure out what is going on. I have no idea why this is suddenly not working, when it was working perfectly well before. Either something is going on with the activation hook, or for some reason the server is rejecting/dropping the create table requests....

deleted 6 characters in body
Source Link

So interestingly, I moved my main plugin file into a folder within the plugin directory. Where before the register_activation_hook worked perfectly well, it now does not work; however, the register_deactivation_hook still works perfectly, and it is currently being called from within the same file. I have attempted explicitly defining a path as well for the activation hooks instead of just relying on the __FILE__ keyword. Any insight that can be offered as to why the plugin no longer calls to hook on actviation would be much appreciated, thank you.

//define paths
define('QUEST_MANAGER_PATH', WP_PLUGIN_DIR . '/QuestManager/');
require_once(QUEST_MANAGER_PATH . 'quest-manager.php');

//define table names
$skirmish_table_name = $wpdb->prefix . 'skirmishes';

//table function
function skirmish_create_db() {
  global $wpdb;
 $charset_collate = $wpdb->get_charset_collate();
 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
 //* Create the skirmish table
 global $skirmish_table_name;
 $sql = "CREATE TABLE".  $skirmish_table_name ."(
 skirmish_id INTEGER NOT NULL AUTO_INCREMENT,
 skirmish_SID TEXT NOT NULL,
 skirmish_name TEXT NOT NULL,
 skirmish_visibility TEXT NOT NULL,
 skirmish_public_tries TEXT NOT NULL,
 PRIMARY KEY  (skirmish_id)
 ) $charset_collate;";
 dbDelta( $sql );
}
register_activation_hook( QUEST_MANAGER_PATH . 'quest-manager.php', 
'skirmish_create_db' );

is the basic structure of the code, tried using both __FILE__ etc...

UPDATE: Well, asAs it turns out, I reverted the plugin back to its original format and the tables are still not being generated. I have attempted deactivating aallall of the plugins that had been activated previously, but it still seems that something is interfering with the plugin's ability to CREATE tables in the mysql database. Any insight into why this is going on would be much appreciated.

So interestingly, I moved my main plugin file into a folder within the plugin directory. Where before the register_activation_hook worked perfectly well, it now does not work; however, the register_deactivation_hook still works perfectly, and it is currently being called from within the same file. I have attempted explicitly defining a path as well for the activation hooks instead of just relying on the __FILE__ keyword. Any insight that can be offered as to why the plugin no longer calls to hook on actviation would be much appreciated, thank you.

//define paths
define('QUEST_MANAGER_PATH', WP_PLUGIN_DIR . '/QuestManager/');
require_once(QUEST_MANAGER_PATH . 'quest-manager.php');

//define table names
$skirmish_table_name = $wpdb->prefix . 'skirmishes';

//table function
function skirmish_create_db() {
  global $wpdb;
 $charset_collate = $wpdb->get_charset_collate();
 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
 //* Create the skirmish table
 global $skirmish_table_name;
 $sql = "CREATE TABLE".  $skirmish_table_name ."(
 skirmish_id INTEGER NOT NULL AUTO_INCREMENT,
 skirmish_SID TEXT NOT NULL,
 skirmish_name TEXT NOT NULL,
 skirmish_visibility TEXT NOT NULL,
 skirmish_public_tries TEXT NOT NULL,
 PRIMARY KEY  (skirmish_id)
 ) $charset_collate;";
 dbDelta( $sql );
}
register_activation_hook( QUEST_MANAGER_PATH . 'quest-manager.php', 
'skirmish_create_db' );

is the basic structure of the code, tried using both __FILE__ etc...

UPDATE: Well, as it turns out, I reverted the plugin back to its original format and the tables are still not being generated. I have attempted deactivating aall of the plugins that had been activated previously, but it still seems that something is interfering with the plugin's ability to CREATE tables in the mysql database. Any insight into why this is going on would be much appreciated.

So interestingly, I moved my main plugin file into a folder within the plugin directory. Where before the register_activation_hook worked perfectly well, it now does not work; however, the register_deactivation_hook still works perfectly, and it is currently being called from within the same file. I have attempted explicitly defining a path as well for the activation hooks instead of just relying on the __FILE__ keyword. Any insight that can be offered as to why the plugin no longer calls to hook on actviation would be much appreciated, thank you.

//define paths
define('QUEST_MANAGER_PATH', WP_PLUGIN_DIR . '/QuestManager/');
require_once(QUEST_MANAGER_PATH . 'quest-manager.php');

//define table names
$skirmish_table_name = $wpdb->prefix . 'skirmishes';

//table function
function skirmish_create_db() {
  global $wpdb;
 $charset_collate = $wpdb->get_charset_collate();
 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
 //* Create the skirmish table
 global $skirmish_table_name;
 $sql = "CREATE TABLE".  $skirmish_table_name ."(
 skirmish_id INTEGER NOT NULL AUTO_INCREMENT,
 skirmish_SID TEXT NOT NULL,
 skirmish_name TEXT NOT NULL,
 skirmish_visibility TEXT NOT NULL,
 skirmish_public_tries TEXT NOT NULL,
 PRIMARY KEY  (skirmish_id)
 ) $charset_collate;";
 dbDelta( $sql );
}
register_activation_hook( QUEST_MANAGER_PATH . 'quest-manager.php', 
'skirmish_create_db' );

is the basic structure of the code, tried using both __FILE__ etc...

UPDATE: As it turns out, I reverted the plugin back to its original format and the tables are still not being generated. I have attempted deactivating all of the plugins that had been activated previously, but it still seems that something is interfering with the plugin's ability to CREATE tables in the mysql database. Any insight into why this is going on would be much appreciated.

added 402 characters in body
Source Link

So interestingly, I moved my main plugin file into a folder within the plugin directory. Where before the register_activation_hook worked perfectly well, it now does not work; however, the register_deactivation_hook still works perfectly, and it is currently being called from within the same file. I have attempted explicitly defining a path as well for the activation hooks instead of just relying on the __FILE__ keyword. Any insight that can be offered as to why the plugin no longer calls to hook on actviation would be much appreciated, thank you.

//define paths
define('QUEST_MANAGER_PATH', WP_PLUGIN_DIR . '/QuestManager/');
require_once(QUEST_MANAGER_PATH . 'quest-manager.php');

//define table names
$skirmish_table_name = $wpdb->prefix . 'skirmishes';

//table function
function skirmish_create_db() {
  global $wpdb;
 $charset_collate = $wpdb->get_charset_collate();
 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
 //* Create the skirmish table
 global $skirmish_table_name;
 $sql = "CREATE TABLE".  $skirmish_table_name ."(
 skirmish_id INTEGER NOT NULL AUTO_INCREMENT,
 skirmish_SID TEXT NOT NULL,
 skirmish_name TEXT NOT NULL,
 skirmish_visibility TEXT NOT NULL,
 skirmish_public_tries TEXT NOT NULL,
 PRIMARY KEY  (skirmish_id)
 ) $charset_collate;";
 dbDelta( $sql );
}
register_activation_hook( QUEST_MANAGER_PATH . 'quest-manager.php', 
'skirmish_create_db' );

is the basic structure of the code, tried using both __FILE__ etc...

UPDATE: Well, as it turns out, I reverted the plugin back to its original format and the tables are still not being generated. I have attempted deactivating aall of the plugins that had been activated previously, but it still seems that something is interfering with the plugin's ability to CREATE tables in the mysql database. Any insight into why this is going on would be much appreciated.

So interestingly, I moved my main plugin file into a folder within the plugin directory. Where before the register_activation_hook worked perfectly well, it now does not work; however, the register_deactivation_hook still works perfectly, and it is currently being called from within the same file. I have attempted explicitly defining a path as well for the activation hooks instead of just relying on the __FILE__ keyword. Any insight that can be offered as to why the plugin no longer calls to hook on actviation would be much appreciated, thank you.

//define paths
define('QUEST_MANAGER_PATH', WP_PLUGIN_DIR . '/QuestManager/');
require_once(QUEST_MANAGER_PATH . 'quest-manager.php');

//define table names
$skirmish_table_name = $wpdb->prefix . 'skirmishes';

//table function
function skirmish_create_db() {
  global $wpdb;
 $charset_collate = $wpdb->get_charset_collate();
 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
 //* Create the skirmish table
 global $skirmish_table_name;
 $sql = "CREATE TABLE".  $skirmish_table_name ."(
 skirmish_id INTEGER NOT NULL AUTO_INCREMENT,
 skirmish_SID TEXT NOT NULL,
 skirmish_name TEXT NOT NULL,
 skirmish_visibility TEXT NOT NULL,
 skirmish_public_tries TEXT NOT NULL,
 PRIMARY KEY  (skirmish_id)
 ) $charset_collate;";
 dbDelta( $sql );
}
register_activation_hook( QUEST_MANAGER_PATH . 'quest-manager.php', 
'skirmish_create_db' );

is the basic structure of the code, tried using both __FILE__ etc...

So interestingly, I moved my main plugin file into a folder within the plugin directory. Where before the register_activation_hook worked perfectly well, it now does not work; however, the register_deactivation_hook still works perfectly, and it is currently being called from within the same file. I have attempted explicitly defining a path as well for the activation hooks instead of just relying on the __FILE__ keyword. Any insight that can be offered as to why the plugin no longer calls to hook on actviation would be much appreciated, thank you.

//define paths
define('QUEST_MANAGER_PATH', WP_PLUGIN_DIR . '/QuestManager/');
require_once(QUEST_MANAGER_PATH . 'quest-manager.php');

//define table names
$skirmish_table_name = $wpdb->prefix . 'skirmishes';

//table function
function skirmish_create_db() {
  global $wpdb;
 $charset_collate = $wpdb->get_charset_collate();
 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
 //* Create the skirmish table
 global $skirmish_table_name;
 $sql = "CREATE TABLE".  $skirmish_table_name ."(
 skirmish_id INTEGER NOT NULL AUTO_INCREMENT,
 skirmish_SID TEXT NOT NULL,
 skirmish_name TEXT NOT NULL,
 skirmish_visibility TEXT NOT NULL,
 skirmish_public_tries TEXT NOT NULL,
 PRIMARY KEY  (skirmish_id)
 ) $charset_collate;";
 dbDelta( $sql );
}
register_activation_hook( QUEST_MANAGER_PATH . 'quest-manager.php', 
'skirmish_create_db' );

is the basic structure of the code, tried using both __FILE__ etc...

UPDATE: Well, as it turns out, I reverted the plugin back to its original format and the tables are still not being generated. I have attempted deactivating aall of the plugins that had been activated previously, but it still seems that something is interfering with the plugin's ability to CREATE tables in the mysql database. Any insight into why this is going on would be much appreciated.

added 1038 characters in body
Source Link
Loading
Source Link
Loading