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

Can not edit issue description after creation #4168

Closed
1 of 7 tasks
nr072 opened this issue Jun 7, 2018 · 18 comments · Fixed by #5516
Closed
1 of 7 tasks

Can not edit issue description after creation #4168

nr072 opened this issue Jun 7, 2018 · 18 comments · Fixed by #5516
Labels
Milestone

Comments

@nr072
Copy link

nr072 commented Jun 7, 2018

  • Gitea version (or commit ref): 1.3.0
  • Git version: 2.7.4
  • Operating system: Ubuntu 16.04 LTS
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

After an issue has been created, the issue description can not be edited ― regardless of whether there are texts in it or the description is empty. Clicking on the edit icon on the right opens the 'Write' box, and it can be written in. But after editing, neither the 'Save' nor the 'Cancel' button works. The 'Preview' button does not work either.

If page reload is attempted, no warning is displayed about unsaved changes. And if reloaded, the page returns to the 'view issue details' state.

Issue title can be edited, however. And issue can be assigned a label, a milestone, or an assignee. Only the description box does not work.

Screenshots

@jonasfranz
Copy link
Member

Could you reproduce that behaviour at try.gitea.io, since your version is no longer supported?

@fazlerabbi37
Copy link

issue can't be reproduced at try.gitea.io.

@nr072
Copy link
Author

nr072 commented Jun 7, 2018

@JonasFranzDEV
Do you reconmmend upgrading to the latest version (currently v1.4.2)?

@lafriks
Copy link
Member

lafriks commented Jun 8, 2018

@shortmotiv yes

@lafriks lafriks added the type/question Issue needs no code to be fixed, only a description on how to fix it yourself. label Jun 8, 2018
@exploide
Copy link

Can confirm the bug is present on latest stable 1.4.3.

However, we figured out that this depends on your permission level. Admins can edit their issue comments while regular users are affected by this bug.

@fazlerabbi37
Copy link

@exploide in my case all of the users were admin.

@ghost
Copy link

ghost commented Aug 2, 2018

Can confirm the bug is present on latest stable 1.4.3.

This issue should be tagged as bug.

Edit: Or regression since it used to work in past versions.

@exploide
Copy link

exploide commented Aug 7, 2018

Ok, I looked a bit further:

  • it's possible to edit the comment via the API, the problem only occurs when using the web ui
  • I'm only affected when I'm not added as a collaborator

@coolaj86
Copy link
Contributor

coolaj86 commented Aug 28, 2018

Reproducible on https://try.gitea.io (Gitea Version: 179123d)

https://try.gitea.io/kaeptmblaubaer1000/cpython/issues/9#

Uncaught ReferenceError: issuesTribute is not defined
    at HTMLAnchorElement.<anonymous> (index.js?v=1defe2eb62a33a98f1643bfb09d4ede7:608)
    at HTMLAnchorElement.dispatch (jquery.min.js:3)
    at HTMLAnchorElement.r.handle (jquery.min.js:3)

screen shot 2018-08-28 at 5 22 08 pm

@coolaj86
Copy link
Contributor

coolaj86 commented Aug 28, 2018

It appears that the error occurs when hitting the edit button.

In the released v1.5.0 I get a different error:

index.js?v=35c36e89ef751b74c7aa3b07d7e0f6b6:609

Uncaught ReferenceError: emojiTribute is not defined
    at HTMLAnchorElement.<anonymous> (index.js?v=35c36e89ef751b74c7aa3b07d7e0f6b6:609)
    at HTMLAnchorElement.dispatch (jquery.min.js:4)
    at HTMLAnchorElement.r.handle (jquery.min.js:4)

screen shot 2018-08-28 at 5 26 54 pm

@coolaj86
Copy link
Contributor

coolaj86 commented Aug 28, 2018

This is NOT a bug in v1.4.2

@coolaj86
Copy link
Contributor

coolaj86 commented Aug 29, 2018

Probable Problem / Solution

Dear people who are having issues with this:

tree gitea/custom/templates

(or find gitea/custom/templates if you don't have tree installed)

I think the culprit (which makes sense for https://try.gitea.io as well) is the use of custom templates.

You update a version of gitea and you'd think that all the things you aren't modifying would be fine. Certainly there shouldn't be javascript errors when you've only edited html templates... wrong!

The templates are very dirty - they mix and match script tag and full scripts rather than isolating the JavaScript from the template and consolidating it into a single file.

Classic front-end development probs.

@neuoy
Copy link

neuoy commented Dec 3, 2018

I have the "issuesTribute is not defined" error as well, when editing a comment on an issue, on gitea 1.6.0. I haven't customized anything. I don't think I even have a "custom" folder. I also had the same behavior on v1.4.2, though I haven't checked the javascript console output on that version.

@gfwing
Copy link

gfwing commented Dec 5, 2018

Description

same as @neuoy , and I test it for collaborator with admin, write, and read permission

the admin and write permission are fine.
the issue happened when read permission.

the collaborator can delete the comment but cannot edit the text.
this situation doesn't make sense.

@lunny lunny added type/bug and removed type/question Issue needs no code to be fixed, only a description on how to fix it yourself. labels Dec 11, 2018
@lunny
Copy link
Member

lunny commented Dec 11, 2018

I can confirm this is a bug, when a read permission user create an issue, then edit the issue will reproduce it.

@lunny
Copy link
Member

lunny commented Dec 11, 2018

@shortmotiv @coolaj86 @neuoy @gfwing please confirm #5516 fix your problem.

@gfwing
Copy link

gfwing commented Dec 12, 2018

Sorry late, I just confirm my situation with read/write/admin permission

  • [ok] v1.6.0 + pr-5516
  • [ok] fdec258 + pr-5516
  • [ok] 0bd802e (I found it already merge to master after I test)

thank you.

@fazlerabbi37
Copy link

Can confirm that it is fixed on current master release of Gitea Download section.

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants