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

[Bug?] Can't delete old trackers #36

Open
steveculshaw opened this issue Nov 14, 2023 · 5 comments
Open

[Bug?] Can't delete old trackers #36

steveculshaw opened this issue Nov 14, 2023 · 5 comments

Comments

@steveculshaw
Copy link

I'm finding I can't delete old trackers ...

image

And the console is showing ...

image

And if I try and open one, I get an error ...

image

And the console is showing ...

image
@steveculshaw steveculshaw changed the title Can't delete old trackers [BUG?] Can't delete old trackers Nov 14, 2023
@steveculshaw steveculshaw changed the title [BUG?] Can't delete old trackers [Bug?] Can't delete old trackers Nov 14, 2023
@SalieriC
Copy link

SalieriC commented May 5, 2024

Did this happen to you when using the API function to open a challenge tracker? I have the same issue if I do so but creating one from the UI is fine. So it appears to be an issue in the API.
Also after reloading I could delete the old trackers just fine so at least there is that.

@steveculshaw
Copy link
Author

Never used the API, just the dialog

@SalieriC
Copy link

SalieriC commented May 5, 2024

Weird. I am currently fiddling around with the old Macros for Swade Macro for creating Dramatic Tasks and had this issue appear. Never managed to get a similar issue with the UI but on closer inspection I seem to have a different error message as well. Apparently the module needs some amount of work. Shame the author appears to be MIA, it's been a staple for my games.

@Larkinabout
Copy link
Owner

Weird. I am currently fiddling around with the old Macros for Swade Macro for creating Dramatic Tasks and had this issue appear. Never managed to get a similar issue with the UI but on closer inspection I seem to have a different error message as well. Apparently the module needs some amount of work. Shame the author appears to be MIA, it's been a staple for my games.

If you can figure out the steps to reproduce, I can have a look, but it hasn't been a top priority for me as it's been otherwise stable and I've not had the issue occur on my end.

@SalieriC
Copy link

SalieriC commented May 6, 2024

If you can figure out the steps to reproduce, I can have a look, but it hasn't been a top priority for me as it's been otherwise stable and I've not had the issue occur on my end.

Good to hear you're still around. =)
I took a look at it this morning before work. Haven't figured it out entirely though. But for me it only happens to trackers created using the API and only before a reload after creation. The issue in this case is that the owner ID is not passed to the unset function here:

static async unset (ownerId, challengeTrackerId) {

This results in a "null or undefined" error message. Maybe I use the API function to create the tracker incorrectly though, I can send you the code if you think this might be the case. But after a reload of the world it works fine. Also if I add

if (!ownerId) {
  ownerId = game.userId
}

in line 70 it works just fine. This will probably break if handling trackers for other players but it is proof the ID isn't properly passed to the function for some reason. I couldn't investigate further yet as I had to start with work.

This is not the same error @steveculshaw is experiencing however. I can't reproduce his problem either.

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

No branches or pull requests

3 participants