Gitea: Can not edit issue description after creation

Created on 7 Jun 2018  Â·  18Comments  Â·  Source: go-gitea/gitea

  • Gitea version (or commit ref): 1.3.0
  • Git version: 2.7.4
  • Operating system: Ubuntu 16.04 LTS
  • Database (use [x]):

    • [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

kinbug

Most helpful comment

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.

All 18 comments

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

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

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

@shortmotiv yes

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.

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

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.

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

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

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

This is NOT a bug in v1.4.2

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.

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.

  • Can you reproduce the bug at https://try.gitea.io: Gitea Version: fdec258

    • [x] Yes (https://try.gitea.io/gfPlay/orgRepo/issues/2#issuecomment-8810)

    • [ ] No

    • [ ] Not relevant

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.

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

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

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.

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

Was this page helpful?
0 / 5 - 0 ratings