Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when saving new agent #4188

Closed
pashiav opened this issue Nov 2, 2023 · 1 comment
Closed

Error when saving new agent #4188

pashiav opened this issue Nov 2, 2023 · 1 comment
Labels
1 - Bug Incorrect behavior of the product res:duplicate Duplicate of an existing issue

Comments

@pashiav
Copy link
Contributor

pashiav commented Nov 2, 2023

Describe the bug
When saving a new Agent in Data Entry, an error is created.

To Reproduce
Steps to reproduce the behavior:

  1. Go to: Data Entry ⇒ Agent (https://archireef-edge.test.specifysystems.org/specify/view/agent/new/)
  2. Add any inputs into any fields
    • inputs in screenshot:
      • Agent Type: Person
      • Last Name: Issue
      • First Name: Testt
      • Middle Initial: T
      • Email: testissue@email.com
  3. Click Save
  4. See error
    Specify 7 Crash Report - 2023-11-02T15_08_42.464Z.txt

Expected behavior
Should save agent without error pop up

Screenshots
Screen Shot 2023-11-02 at 10 14 18 AM

Desktop:

  • OS: macOS Monterey (12.6.5)
  • Browser: Google Chrome
  • Specify 7 Version: edge

Database Name: archireef (6.8.03)

@pashiav pashiav added the 1 - Bug Incorrect behavior of the product label Nov 2, 2023
@melton-jason
Copy link
Contributor

Duplicate of #3874

This issue should only be specific to the archireef database.

Looking at the server, their database has a malformed spdataset table:

MariaDB [archireef]> desc spdataset;
+--------------------+--------------+------+-----+---------+----------------+
| Field              | Type         | Null | Key | Default | Extra          |
+--------------------+--------------+------+-----+---------+----------------+
| id                 | int(11)      | NO   | PRI | NULL    | auto_increment |
| name               | varchar(256) | NO   |     | NULL    |                |
| columns            | longtext     | NO   |     | NULL    |                |
| uploadplan         | longtext     | YES  |     | NULL    |                |
| uploadresult       | longtext     | YES  |     | NULL    |                |
| collection_id      | int(11)      | NO   | MUL | NULL    |                |
| specifyuser_id     | int(11)      | NO   | MUL | NULL    |                |
| visualorder        | longtext     | YES  |     | NULL    |                |
| importedfilename   | longtext     | YES  |     | NULL    |                |
| remarks            | longtext     | YES  |     | NULL    |                |
| timestampcreated   | datetime(6)  | NO   |     | NULL    |                |
| timestampmodified  | datetime(6)  | NO   |     | NULL    |                |
| createdbyagent_id  | int(11)      | YES  | MUL | NULL    |                |
| modifiedbyagent_id | int(11)      | YES  | MUL | NULL    |                |
+--------------------+--------------+------+-----+---------+----------------+
14 rows in set (0.002 sec)

Compare this to the spdataset table on the fwri database:

MariaDB [fwri]> desc spdataset;
+--------------------+--------------+------+-----+---------+----------------+
| Field              | Type         | Null | Key | Default | Extra          |
+--------------------+--------------+------+-----+---------+----------------+
| id                 | int(11)      | NO   | PRI | NULL    | auto_increment |
| name               | varchar(256) | NO   |     | NULL    |                |
| columns            | longtext     | NO   |     | NULL    |                |
| data               | longtext     | NO   |     | NULL    |                |
| uploadplan         | longtext     | YES  |     | NULL    |                |
| uploaderstatus     | longtext     | YES  |     | NULL    |                |
| uploadresult       | longtext     | YES  |     | NULL    |                |
| rowresults         | longtext     | YES  |     | NULL    |                |
| collection_id      | int(11)      | NO   | MUL | NULL    |                |
| specifyuser_id     | int(11)      | NO   | MUL | NULL    |                |
| visualorder        | longtext     | YES  |     | NULL    |                |
| importedfilename   | longtext     | YES  |     | NULL    |                |
| remarks            | longtext     | YES  |     | NULL    |                |
| timestampcreated   | datetime(6)  | NO   |     | NULL    |                |
| timestampmodified  | datetime(6)  | NO   |     | NULL    |                |
| createdbyagent_id  | int(11)      | YES  | MUL | NULL    |                |
| modifiedbyagent_id | int(11)      | YES  | MUL | NULL    |                |
+--------------------+--------------+------+-----+---------+----------------+
17 rows in set (0.001 sec)

archireef is missing three very important columns in the spdataset table: data, uploaderstatus, and rowresults.

Even accessing the datasets via the Workbench button from the Navigation Menu results in an error archireef_spdataset

I made sure this was not a problem on databases that were configured as Specify expects. To test this you can:

  • Create a WorkBench dataset (Any Base Table)
  • (should be optional) upload the dataset
  • Try and merge the agent who created the Dataset

From #3874 (comment)

To prevent this issue from popping up again, I have added the three missing columns to the spdataset table:

  • data
  • uploaderstatus
  • rowresults

You should no longer receive this error from that database!

@melton-jason melton-jason closed this as not planned Won't fix, can't repro, duplicate, stale Nov 6, 2023
@melton-jason melton-jason added the res:duplicate Duplicate of an existing issue label Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - Bug Incorrect behavior of the product res:duplicate Duplicate of an existing issue
Projects
None yet
Development

No branches or pull requests

2 participants