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

Cannot delete custom fields - hangs indefinitely after confirm with spinning gear #1884

Closed
wirerydr opened this issue Aug 28, 2017 · 3 comments

Comments

@wirerydr
Copy link

Steps to reproduce

  1. Install a fresh copy of latest development commit 716c1b8.
  2. Create folder testfolder and role testrole.
  3. Create category testcategory, and set it to show in folder testfolder.
  4. Inside category testcategory, create custom field testfield.
  5. Either leave Custom item fields enabled set to Yes, or No - it doesn't matter.
  6. Select field testfield, and then click <Delete>.
  7. When the Confirm popup appears, click <Confirm>.

Expected behaviour

The Confirm popup should disappear, and the Custom Fields page should be redisplayed with field testfield now gone.

Actual behaviour

The Confirm popup remains indefinitely, and the gear continues to spin indefinitely. The page is not redisplayed. There is absolutely no output in the Apache logs (error or otherwise). <Confirm> can be clicked as many times as you want - nothing changes.
05_after_confirm_clicked
If <Cancel> is pressed, then the operation cancels properly and the Custom Fields page is redisplayed. the custom-field testfield is still present.

Server configuration

Operating system: Fedora 26 (x86_64)

Web server: Apache 2.4.27

Database: 10.1.25

PHP version: 7.1

Teampass version: development commit 716c1b8

Updated from an older Teampass or fresh install: Freshly installed

Client configuration

Browser: FireFox 55.0.3 (64-bit)

Operating system: Windows 10

Logs

Web server error log

No logging output generated

State of database tables right before clicking <Confirm>

01_teampass_categories
02_teampass_categories_folders
03_teampass_categories_items

@nilsteampassnet
Copy link
Owner

I could reproduce this error.
Thank you for reporting.

Note: Thank you for the good level of details you provide in your tickets. I really appreciate this.

@nilsteampassnet
Copy link
Owner

I will commit the fix just after.

To fix this manually, open file admin.settings.load.php, search for

                } else if ($("#post_type").val() === "changeFieldType") {
                    data = $("#changeFieldType").val();
                }
                if (data === "") {
                    return false;
                }

and replace by

                } else if ($("#post_type").val() === "changeFieldType") {
                    data = $("#changeFieldType").val();
                } else if ($("#post_type").val() === "deleteCategory") {
                    data = "no_data";
                }
                if (data === "") {
                    return false;
                }

nilsteampassnet added a commit that referenced this issue Aug 28, 2017
Fix for #1884
Started to remove usage of hide()
@wirerydr
Copy link
Author

Tested, and confirmed fixed by development commit 7dd9f6c - thanks for the very quick turnaround. Closing this issue...

Thank you for the good level of details you provide in your tickets. I really appreciate this.

Happy to help. I made sure to drink more coffee this time...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants