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

Empty ticket comment breaks ticket page #799

Closed
gitblit opened this issue Aug 12, 2015 · 17 comments
Closed

Empty ticket comment breaks ticket page #799

gitblit opened this issue Aug 12, 2015 · 17 comments

Comments

@gitblit
Copy link
Owner

gitblit commented Aug 12, 2015

Originally reported on Google Code with ID 503

Hello,

We accidentally proposed a ticket from the master branch. So the workflow went like
this:

1. working copy's on the master branch
2. local changes staged and commited to the master branch
3. git push origin HEAD:refs/for/new
4. ticket appears in the web UI
5. merge button pressed in the web UI
6. ticket page shows "Internal error" ever since

I checked the logs, it displays the attached NPE when navigating to the ticket on the
web.

What's the correct way to resolve this situation?

Reported by sundayfunday1234@outlook.com on 2014-09-17 13:29:15


- _Attachment: [npe.txt](https://storage.googleapis.com/google-code-attachments/gitblit/issue-503/comment-0/npe.txt)_
@gitblit gitblit self-assigned this Aug 12, 2015
@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

Are you running 1.6.0 release or a custom build?

Reported by James.Moger on 2014-09-17 13:31:47

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

I'm on 1.6.1-snapshot, is there an easy way to find out the commit hash which our instance
has been built from?

Reported by sundayfunday1234@outlook.com on 2014-09-17 13:33:51

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

Okay, I think I've found it in an earlier comment: 8c0c9ae48f.

Reported by sundayfunday1234@outlook.com on 2014-09-17 13:38:37

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

Unfortunately, it's not stamped - I've considered that just haven't done it.
Can you do `git show --quiet ` from the project root?

Reported by James.Moger on 2014-09-17 13:38:54

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

There have been commits since the merge, but I assume you want to see the merge, so
I attach the output of "git show 24d4b1".

Could the asterisk be a problem?

Reported by sundayfunday1234@outlook.com on 2014-09-17 13:50:27


- _Attachment: [gitshow.txt](https://storage.googleapis.com/google-code-attachments/gitblit/issue-503/comment-5/gitshow.txt)_

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

As a sidenote, I've already tried to clear the cache and to restart Gitblit, made no
difference.

Reported by sundayfunday1234@outlook.com on 2014-09-17 13:51:30

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

Hmm.  Can you send me the ticket json?
e.g. https://dev.gitblit.com/tickets/export/gitblit.git/177

Reported by James.Moger on 2014-09-17 13:57:09

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

Sure, here it is, somewhat obfuscated.

Reported by sundayfunday1234@outlook.com on 2014-09-17 14:05:17


- _Attachment: [json.txt](https://storage.googleapis.com/google-code-attachments/gitblit/issue-503/comment-8/json.txt)_

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

The problem is this entry:

{
  "date": "2014-09-17T12:33:12Z",
  "author": "john.smith",
  "comment": {
    "id": "a76b74207f077314f44d1d160f2ec8ea45e1ab45"
  },
  "fields": {
    "watchers": "+john.smith"
  }
}

There is no comment text.

I think your instance was built on or after after this commit:
https://github.com/gitblit/gitblit/commit/209dbdd49a89d6e3cebf61e860c779a1d8561dd9

but before this commit:
https://github.com/gitblit/gitblit/commit/cefac9ec81878dfdbbcb0d13843cb2c4430786bc

Reported by James.Moger on 2014-09-17 14:11:39

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

gitblit.jar has a timestamp of 26th of June, so I'm pretty sure the 8c0c9ae48f hash
is correct.

https://github.com/gitblit/gitblit/commit/8c0c9ae48fa9493ba2aa73fc9a5b3b0eae57258f

Reported by sundayfunday1234@outlook.com on 2014-09-17 14:21:04

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

Should I retry it with HEAD? Or should I wait till 1.6.1?

Reported by sundayfunday1234@outlook.com on 2014-09-17 14:21:36

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

I have to push a fix to handle the missing comment text.  I'll let you know when it's
up.

Reported by James.Moger on 2014-09-17 14:26:04

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

Thanks. To prepare for that I've already upgraded to the latest commit. Now it throws
an Internal error for every ticket, even for the ones that used to work previously.
I attach an example.

Reported by sundayfunday1234@outlook.com on 2014-09-17 15:28:32


- _Attachment: [morenpe.txt](https://storage.googleapis.com/google-code-attachments/gitblit/issue-503/comment-13/morenpe.txt)_

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

Pull & build.

Reported by James.Moger on 2014-09-17 16:22:58

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

Excellent, it seems to work flawlessly so far. Thank you very much for the incredibly
quick fix, James!

Reported by sundayfunday1234@outlook.com on 2014-09-17 16:31:30

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

Reported by James.Moger on 2014-09-17 18:05:56

  • Status changed: Queued
  • Labels added: Milestone-1.6.1

@gitblit
Copy link
Owner Author

gitblit commented Aug 12, 2015

v1.6.1 released

Reported by James.Moger on 2014-10-20 21:36:03

  • Status changed: Done

@gitblit gitblit closed this as completed Aug 12, 2015
@flaix flaix modified the milestone: 1.6.1 Dec 13, 2016
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