Habitica: Challenge can't be updated more than twice (without reloading the page)

Created on 27 Apr 2019  路  13Comments  路  Source: HabitRPG/habitica

General Info

  • UUID: af1477b6-509a-4611-b851-d7a8e3a9c02a
  • Browser: Safari
  • OS: OS X

Description

Leader of Challenge cannot update it more than twice without reloading the page.
Also, after each update, some interface element disappears(Look at the screenshots)

Initial state | After the first update | After the second update.
------------|----------------------|----------------------
GitHub | GitHub | Github
Github | Github | Github

That's all. After the second update, You can't press the button Update Challenge

Alys asked to create this issue.

Console Errors

After several updates of a challenge:
1) TypeError: undefined is not an object (evaluating 'this.workingChallenge.group._id')
This error occurs here.
2) TypeError: t.trim is not a function. (In 't.trim()', 't.trim' is undefined)
This error occurs here.

help wanted medium section all section creating / editing

All 13 comments

Can confirm this issues exists ,

@HydeHunter2 when the update button jams after a couple of attempts can you confirm that the issue you see in the terminal is::-

Error in v-on handler: "TypeError: key.trim is not a function

@gautamz07 -- Thanks!
Yeah. There is the error in console.
I updated issue

Tested this locally seems to be caused by this line HERE.

Can somebody elaborate on what exactly is the purpose of the following lines of code ?

this.workingChallenge.group = this.workingChallenge.group._id; this.workingChallenge.categories = [];

this.workingChallenge.group is essentially an object and this.workingChallenge.group._id is just a string , this somehow does't make alot of sense .

this.workingChallenge.group seems to be
a string actually https://github.com/HabitRPG/habitica/blob/develop/website/client/components/challenges/challengeModal.vue#L367

Not very clear, I agree

@paglias when challenge inside computed() is console.logged I.E. console.log(this.$store.state.challengeOptions.workingChallenge); it gives this value see screenshot.

But if you console.log(this.challenge); inside setUpWorkingChallenge () , it gives this value , see screenshot , where exactly does the value of this.challenge change then ? i have scanned the whole component , but am a bit clueless about this still , can somebody shed some light on this ?

My conclusion is the below line of code needs to be removed completely , it makes no sense. sould i submit a pull with the same ?

this.workingChallenge.group = this.workingChallenge.group._id; this line.

Also group : '' ; might need to be changed to group : {} , line here

taughts ?

Hi folks!
@gautamz07 will you work on that?
@Alys can I take this one?

@gautamz07 I'm so sorry we never replied to you back in June! Are you still interested in doing a pull request for this? If so, I'll mark this issue as in progress for you.

(@Xaz16 Sorry about the delay but we'll see what @gautamz07 says first.)

Going to mark this as available for help, but @gautamz07 / @Xaz16 definitely jump in if you're still interested in your prior claim!

@SabreCat sure

About this one:
It looks like issue is not relevant anymore, I test in on Chrome and Safari on OSX. I edited challenge that not bound to guild or party, bound to guild, bound to party. It I edited in about 5 times without any errors.
Suggest to close it @paglias @Alys
One thing that I found: after editing short name it is not updated at all (nor first edit, nor second... etc)

Darnit, I logged a duplicate bug for this issue: https://github.com/HabitRPG/habitica/issues/11561. That was fixed in https://github.com/HabitRPG/habitica/pull/11591 so yes, this issue is no longer needed. Thanks @Xaz16 !

Was this page helpful?
0 / 5 - 0 ratings