Skip to Content

Error: An error occurred while trying to submit the form (error: Internal Server Error)

ERROR: An error occurred while trying to submit the form (error: Internal Server Error)


Error:

Synopsis:  Dropping the web activity table from the database causes both data and schema loss, leading to an error when accessing the web activity logs in the GUI. To resolve this issue, we will need to recreate the table with fields, ultimately fixing the error.


(MariaDB)

Prerequisites:

MariaDB [(none)]> Show databases;

MariaDB [database_name]> Use database_name;

MariaDB [database_name]> show tables;

 Verify the existence of the table. If the table does not exist, proceed to step 1. If the table exists and the issue persists, proceed to step 1 of scenario 2.


Step 1: Execute the following MySQL commands to establish the table structure and its respective fields. (replace the table prefix from yours)

CREATE TABLE uah_webactivity_logs (
id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
user_id int(10) unsigned NOT NULL,
controller varchar(200) DEFAULT NULL,
function varchar(200) DEFAULT NULL,
objective text,
description text,
created timestamp NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (id),
KEY user_id_index (user_id),
KEY controller_index (controller));

In the second scenario, if the table hasn’t been dropped and the same error persists when accessing web activity logs, there’s no need to recreate the entire table; instead, we’ll only need to create the missing field.

Step 1: Execute the following Msql commands: (replace the table prefix from yours)

MariaDB [database_name]> alter table uah_webactivity_logs add column `reason` VARCHAR(100);

Step 2: Execute the below command to check the table fields.

MariaDB [database_name]> desc uah_webactivity_logs;

------------- --------------------- ------ ----- --------------------- ----------------
| Field        | Type                | Null | Key | Default            | Extra          |
------------- --------------------- ------ ----- --------------------- ----------------
| id           | bigint(20) unsigned | NO   | PRI | NULL               | auto_increment |
| user_id      | int(10) unsigned    | NO   | MUL | NULL               |                |
| controller   | varchar(200)        | YES  | MUL | NULL               |                |
| function     | varchar(200)        | YES  |     | NULL               |                |
| objective    | text                | YES  |     | NULL               |                |
| description  | text                | YES  |     | NULL               |                |
| created      | timestamp           | NO   |     | current_timestamp()|                |
------------- --------------------- ------ ----- --------------------- ----------------
7 rows in set (0.001 sec)


(MySQL)

Step 1: Execute the following MySQL commands to establish the table structure and its respective fields. (replace the table prefix from yours)

CREATE TABLE emsz_webactivity_logs (
id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
user_id int(10) unsigned NOT NULL,
controller varchar(200) DEFAULT NULL,
function varchar(200) DEFAULT NULL,
objective text,
description text,
created timestamp NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (id),
KEY user_id_index (user_id),
KEY controller_index (controller));

In the second scenario, if the table hasn’t been dropped and the same error persists when accessing web activity logs, there’s no need to recreate the entire table; instead, we’ll only need to create the missing field.

Step 1: Execute the following Msql commands: (replace the table prefix from yours)

mysql [database_name]> alter table emsz_webactivity_logs add column `reason` VARCHAR(100);

Step 2: Execute the below command to check the table fields.

mysql [database_name]> desc emsz_webactivity_logs;

------------- --------------------- ------ ----- --------------------- --------------------
| Field        | Type                | Null | Key | Default            | Extra             |
------------- --------------------- ------ ----- --------------------- ---------------------
| id           | bigint(20) unsigned | NO   | PRI | NULL               | auto_increment    |
| user_id      | int(10) unsigned    | NO   | MUL | NULL               |                   |
| controller   | varchar(200)        | YES  | MUL | NULL               |                   |
| function     | varchar(200)        | YES  |     | NULL               |                   |
| objective    | text                | YES  |     | NULL               |                   |
| description  | text                | YES  |     | NULL               |                   |
| created      | timestamp           | NO   |     | current_timestamp()| DEFAULT_GENERATED |
------------- --------------------- ------ ----- --------------------- ---------------------
7 rows in set (0.001 sec)


--> Execute the following single Msql command if the error consists of respective logs and check with the table fields.

mysql [database_name]> alter table emsz_serveractivity_logs add column `reason` VARCHAR(100);

mysql [database_name]> alter table emsz_gwactivity_logs add column `reason` VARCHAR(100);

mysql [database_name]> alter table emsz_authlogs add column `reason` VARCHAR(100);

mysql [database_name]> alter table emsz_mexeclogs add column `reason` VARCHAR(100);


Related articles:

Audit logs and Configurations