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

Editing a form definition using the Visual Editor in 7 leads to the form being unopenable in 6 #4837

Closed
combs-a opened this issue Apr 24, 2024 · 0 comments · Fixed by #4846
Closed
Assignees
Labels
1 - Bug Incorrect behavior of the product 2 - App Resources Issues that are related to app resources
Milestone

Comments

@combs-a
Copy link
Collaborator

combs-a commented Apr 24, 2024

Describe the bug
When creating a new form definition from a default view in 7, the form in 6 can no longer open. So far as I've tested, the issue hasn't shown up when I do manual edits to the XML.

To Reproduce
Steps to reproduce the behavior:

  1. In Specify 7, go to App Resources
  2. Create a new form definition using a default and save (I used mammals at the user level)
  3. Check in 6 to see that you can still access the Collection Object
  4. In 7's Visual Editor, open up the CollectionObject table in the form def you just created
  5. Do a small change, i.e. adding an extra space somewhere
  6. Save it
  7. Quit and then reopen 6
  8. Try and open the Collection Object form (either add new or existing)
  9. See that it doesn't open

Expected behavior
Form should be able to open.

Screenshots
If applicable, add screenshots to help explain your problem.

This video is too big to upload directly to Github. 🥲 Here it is in Google Drive:
https://drive.google.com/file/d/1PuXlXl6e4KVY_LSCvrNg1RqJxQYDJ4KQ/view?usp=sharing

Powershell at the end of video:
powershell_jeaHaYd1Bc

Please, also fill out the following information manually:

  • OS: Windows 10
  • Browser: Firefox
  • Specify 6 Version: 6.8.03
  • Specify 7 Version: production
  • Database Name: specifya
  • Collection name: beafts
  • User Name: ac
  • Password: combs

Additional context
Database is a local one I made through the Specify 6 wizard, and I used the default mammals view. Specify 7 currently condenses and reformats the entire form definition upon saving a form def for a specific table, though I couldn't see anything that could break it in that case. It removed CDATA (while keeping the text inside it intact) and put everything onto single lines. However, when doing this manually for a few of the tables, the error did not occur.

In particular, running Get-Content C:\Users\USERNAME\Specify\specify.log -Wait in Powershell had these two lines pop up when error occurred (right after clicking Collection Object):
15:28:57 ERROR forms.persist.ViewLoader:1287 - The Field Name [pcrPerson] was not in the Table [DNA Sequence] in ViewSet [Common]
15:28:57 ERROR forms.persist.ViewLoader:475 - Couldn't find the ViewDef for formtable definition name[Collectors]

However, checking both of these across the new form and the old form showed that they should have the same behavior; the default mammals.views doesn't seem to have a pcrPerson field name and same with the viewDef for Collectors.

Copying and pasting the default mammals.views into 7 fixed it, so the issue most likely lies with 7 condensing it down, but I really cannot tell what exactly it is.

Condensed mammals view def, condensed by 7:
7-mammals.zip

Specify 7 System Information - 2024-04-24T20 52 22.756Z.txt

I'm crossing my fingers that this is a weird edge case that's only with this DB, especially since others have not had trouble with opening the form. 😓

@combs-a combs-a added 1 - Bug Incorrect behavior of the product 2 - App Resources Issues that are related to app resources labels Apr 24, 2024
@grantfitzsimmons grantfitzsimmons added this to the 7.9.4 milestone Apr 25, 2024
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 2 - App Resources Issues that are related to app resources
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants