Skip to content

Creating a new ticket does not update display #751

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

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

Creating a new ticket does not update display #751

gitblit opened this issue Aug 12, 2015 · 21 comments

Comments

@gitblit
Copy link
Collaborator

gitblit commented Aug 12, 2015

Originally reported on Google Code with ID 455

What steps will reproduce the problem?
1. Create a repository with tickets enabled and ensure ticket creation via the WebUI
is turned on in the properties file.
2. Create a new ticket (via /tickets/new/repo.git)
3. Observe that the page stays the same and does not navigate, clear, or do anything.
The ticket was successfully created, however.


What is the expected output? What do you see instead?
I would assume that the newly created ticket would be displayed.


What version of the product are you using? On what operating system?
Gitblit WAR 1.6.0 on Windows 7. Tested on Firefox 30 and IE11.

Please provide any additional information below.
The issue might be caused by the accept header in the request but might also be related
to markdown support. Below are the request and response during ticket creation. Firefox
displays "no element found" in the error console.

This problem also appears when modifying the ticket in any way (commenting, marking
as open, merging).

---------- Request 1 ----------
POST https://server/?wicket:interface=:6:editForm:description::IBehaviorListener:1:2&random=0.8723931005707541
HTTP/1.1
Accept: text/xml
Content-Type: application/x-www-form-urlencoded
Wicket-Ajax: true
Wicket-FocusedElementId: id5
Referer: https://server/tickets/new/~user%2Ftest.git
Accept-Language: en-US,en;q=0.7,ja;q=0.3
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko
Host: server
Content-Length: 17
DNT: 1
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: __utma=value; __utmz=value=(direct)|utmccn=(direct)|utmcmd=(none); Gitblit=value;
JSESSIONID=value

description=test&
---------- Response 1 ----------
HTTP/1.1 200 OK
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-cache, must-revalidate
Pragma: no-cache
Content-Type: text/xml;charset=UTF-8
Content-Length: 176
Date: Mon, 30 Jun 2014 20:29:11 GMT
Server: server

<?xml version="1.0" encoding="UTF-8"?><ajax-response><component id="id8" ><![CDATA[<div
class="markdown input-xxlarge" id="id8"><p>test</p></div>]]></component></ajax-response>



---------- Request 2 ----------
POST https://server/?wicket:interface=:6:editForm:description::IBehaviorListener:0:2&random=0.021873730315325745
HTTP/1.1
Accept: text/xml
Content-Type: application/x-www-form-urlencoded
Wicket-Ajax: true
Wicket-FocusedElementId: id9
Referer: https://server/tickets/new/~user%2Ftest.git
Accept-Language: en-US,en;q=0.7,ja;q=0.3
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko
Host: server
Content-Length: 17
DNT: 1
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: __utma=value; __utmz=value=(direct)|utmccn=(direct)|utmcmd=(none); Gitblit=value;
JSESSIONID=value

description=test&
---------- Response 2 ----------
HTTP/1.1 200 OK
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-cache, must-revalidate
Pragma: no-cache
Content-Type: text/xml;charset=UTF-8
Content-Length: 241
Date: Mon, 30 Jun 2014 20:29:11 GMT
Server: server

<?xml version="1.0" encoding="UTF-8"?><ajax-response><component id="id8" ><![CDATA[<div
class="markdown input-xxlarge" id="id8"><p>test</p></div>]]></component><evaluate><![CDATA[Wicket.Focus.setFocusOnId(null);]]></evaluate></ajax-response>




---------- Request 3 ----------
POST https://server/?wicket:interface=:6:editForm:create::IActivePageBehaviorListener:0:2&wicket:ignoreIfNotActive=true&random=0.7030693271605717
HTTP/1.1
Accept: text/xml
Content-Type: application/x-www-form-urlencoded
Wicket-Ajax: true
Wicket-FocusedElementId: id9
Referer: https://server/tickets/new/~user%2Ftest.git
Accept-Language: en-US,en;q=0.7,ja;q=0.3
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko
Host: server
Content-Length: 108
DNT: 1
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: __utma=value; __utmz=value=(direct)|utmccn=(direct)|utmcmd=(none); Gitblit=value;
JSESSIONID=value

id7_hf_0=&title=Test2&topic=&description=test&type=1&responsible%3Aresponsible=&mergeto%3Amergeto=0&create=1
---------- Resposne 3 ----------
HTTP/1.1 200 OK
Content-Length: 0
Date: Mon, 30 Jun 2014 20:29:11 GMT
Server: server



Reported by gibwar on 2014-06-30 20:41:41

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Hmm.  I don't have this problem and I create, update, and merge tickets almost daily.
 Which server are you using?  Are there serer-side stacktraces?

Reported by James.Moger on 2014-06-30 20:48:15

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

I'm running the latest Gitblit 1.6.0 as a WAR package, on Tomcat 7.0.54 using JDK 7
update 55 running on Windows 7 Professional. Unfortunately there aren't any errors
on the server side that I can see. The operations do succeed as refreshing the page
will show the items created, it just doesn't happen live. The repositories I tested
with are user-based repositories with the ~ prefix. Attempting to clear the caches
doesn't seem to help either.

Reported by gibwar on 2014-06-30 20:58:09

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

These days I mostly work with Chrome/GO/Linux.  I often also run FF/GO/Windows.  I haven't
seen what you are describing.  The redirect can be slow, if it is not running locally
- but given a few seconds it always completes for me.

Does it behave the same with a root-level repository? I'm wondering if this is another
variation of my old friend (http://gitblit.com/faq.html#H10) since I see %2f references
in your posts.

Reported by James.Moger on 2014-07-01 14:40:19

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Yes, the problem did occur with a root level repository as well.

I have the following settings set:

  Tomcat has the following Java options set (prior to this ticket): 
    -Dcatalina.home=C:\tomcat
    -Dcatalina.base=C:\tomcat
    -Djava.endorsed.dirs=C:\tomcat\endorsed
    -Djava.io.tmpdir=C:\tomcat\temp
    -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
    -Djava.util.logging.config.file=C:\tomcat\conf\logging.properties
    -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
    -Xms1024M
    -Xmx1024M

  Relevant Gitblit parameters:
    web.mountParameters = true
    web.forwardSlashCharacter = /

I haven't tried the UTF-8 setting as we don't have filenames that use non-ASCII characters,
but I'll make the change and give it a shot.

Reported by gibwar on 2014-07-01 17:00:20

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Can you repeat your test with GO as well?  All you need to do is point GO to your baseFolder.

Reported by James.Moger on 2014-07-01 17:04:28

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Unfortunately, even after the changes, slashes still show as %2f and the problem persists.

Reported by gibwar on 2014-07-01 17:05:32

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Hm, when trying to run our repositories under GO, I encounter the following error while
attempting to generate the certificates (authority.cmd step):

  C:\Users\user\Downloads\gitblit-1.6.0>set JAVA_HOME
  JAVA_HOME=C:\java\jdk7

  C:\Users\user\Downloads\gitblit-1.6.0>set PATH
  Path=C:\java\jdk7\bin;C:\java\jdk7\jre\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\CCM;C:\Windows\System32\WindowsPowerShell\v1.0\

  C:\Users\user\Downloads\gitblit-1.6.0>where java
  C:\java\jdk7\bin\java.exe
  C:\java\jdk7\jre\bin\java.exe
  C:\Windows\System32\java.exe

  C:\Users\user\Downloads\gitblit-1.6.0>java -version
  java version "1.7.0_55"
  Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
  Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)

  C:\Users\user\Downloads\gitblit-1.6.0>java -cp gitblit.jar com.gitblit.authority.Launcher
--baseFolder c:\gitblit
  2014-07-01 11:14:13 [INFO ] Using JCE Standard Encryption Policy files, encryption
key lengths will be limited
  ${baseFolder} set to c:\gitblit
  Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
          at com.gitblit.authority.GitblitAuthority$7.actionPerformed(GitblitAuthority.java:589)
          at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
          at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
          at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
          at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
          at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
          at javax.swing.AbstractButton.doClick(AbstractButton.java:356)
          at com.gitblit.authority.GitblitAuthority.load(GitblitAuthority.java:334)
          at com.gitblit.authority.GitblitAuthority.initialize(GitblitAuthority.java:190)
          at com.gitblit.authority.GitblitAuthority$1.run(GitblitAuthority.java:160)
          at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
          at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
          at java.awt.EventQueue.access$200(EventQueue.java:103)
          at java.awt.EventQueue$3.run(EventQueue.java:694)
          at java.awt.EventQueue$3.run(EventQueue.java:692)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
          at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
          at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
          at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
          at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
          at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
          at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
          at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

If I run the authority step without the --baseFolder option it launches fine, but configures
the data directory instead.

Reported by gibwar on 2014-07-01 17:21:45

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

The authority is optional.  Skip it.

Reported by James.Moger on 2014-07-01 17:26:27

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

It has worked when hosting with GO. Below are the relevant HTTP request and responses.
The missing item in Tomcat is the final redirect ajax-response (response #3).

---------- Request 1 ----------
POST https://server/?wicket:interface=:22:editForm:description::IBehaviorListener:1:2&random=0.5444413814450537
HTTP/1.1
Accept: text/xml
Content-Type: application/x-www-form-urlencoded
Wicket-Ajax: true
Wicket-FocusedElementId: id57
Referer: https://server/tickets/new/~user%2Ftest.git
Accept-Language: en-US,en;q=0.7,ja;q=0.3
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko
Host: server
Content-Length: 18
DNT: 1
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: __utma=value; __utmz=value; Gitblit=value; JSSESSIONID=value

description=test4&

---------- Response 1 ----------
HTTP/1.1 200 OK
Content-Type: text/xml; charset=UTF-8
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-cache, must-revalidate
Pragma: no-cache
Content-Length: 179
Server: Jetty(9.1.4.v20140401)

<?xml version="1.0" encoding="UTF-8"?><ajax-response><component id="id5a" ><![CDATA[<div
class="markdown input-xxlarge" id="id5a"><p>test4</p></div>]]></component></ajax-response>



---------- Request 2 ----------
POST https://server/?wicket:interface=:22:editForm:description::IBehaviorListener:0:2&random=0.3572275767529181
HTTP/1.1
Accept: text/xml
Content-Type: application/x-www-form-urlencoded
Wicket-Ajax: true
Wicket-FocusedElementId: id5b
Referer: https://server/tickets/new/~user%2Ftest.git
Accept-Language: en-US,en;q=0.7,ja;q=0.3
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko
Host: server
Content-Length: 18
DNT: 1
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: __utma=value; __utmz=value; Gitblit=value; JSSESSIONID=value

description=test4&

---------- Response 2 ----------
HTTP/1.1 200 OK
Content-Type: text/xml; charset=UTF-8
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-cache, must-revalidate
Pragma: no-cache
Content-Length: 244
Server: Jetty(9.1.4.v20140401)

<?xml version="1.0" encoding="UTF-8"?><ajax-response><component id="id5a" ><![CDATA[<div
class="markdown input-xxlarge" id="id5a"><p>test4</p></div>]]></component><evaluate><![CDATA[Wicket.Focus.setFocusOnId(null);]]></evaluate></ajax-response>o



---------- Request 3 ----------
POST https://server/?wicket:interface=:22:editForm:create::IActivePageBehaviorListener:0:2&wicket:ignoreIfNotActive=true&random=0.015634629971723324
HTTP/1.1
Accept: text/xml
Content-Type: application/x-www-form-urlencoded
Wicket-Ajax: true
Wicket-FocusedElementId: id5b
Referer: https://server/tickets/new/~user%2Ftest.git
Accept-Language: en-US,en;q=0.7,ja;q=0.3
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko
Host: server
Content-Length: 110
DNT: 1
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: __utma=value; __utmz=value; Gitblit=value; JSSESSIONID=value

id59_hf_0=&title=test4&topic=&description=test4&type=1&responsible%3Aresponsible=&mergeto%3Amergeto=0&create=1

---------- Response 3 ----------
HTTP/1.1 200 OK
Ajax-Location: ../../tickets/~user%2Ftest.git/7
Content-Type: text/xml; charset=ISO-8859-1
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-cache, must-revalidate
Pragma: no-cache
Content-Length: 105
Server: Jetty(9.1.4.v20140401)

<ajax-response><redirect><![CDATA[../../tickets/~user%2Ftest.git/7]]></redirect></ajax-response>



---------- Request 4 ----------
GET https://server/tickets/~user%2Ftest.git/7 HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
Referer: https://server/tickets/new/~user%2Ftest.git
Accept-Language: en-US,en;q=0.7,ja;q=0.3
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko
Accept-Encoding: gzip, deflate
Host: server
DNT: 1
Connection: Keep-Alive
Cookie: __utma=value; __utmz=value; Gitblit=value; JSSESSIONID=value

---------- Response 4 ----------
HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
Content-Language: en-US
Link: <https://server/?wicket:bookmarkablePage=:com.gitblit.wicket.pages.TicketPage&r=~user/test.git&h=7>;
rel="canonical"
Pragma: no-cache
Cache-Control: no-cache, max-age=0, must-revalidate
Content-Length: 24580
Server: Jetty(9.1.4.v20140401)

... snip page HTML content ...


Reported by gibwar on 2014-07-01 19:07:20

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Thanks for the detailed investigation.  I have created a ticket for this issue.
https://dev.gitblit.com/tickets/gitblit.git/136

Reported by James.Moger on 2014-07-04 15:50:54

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

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Tomcat is throwing an exception trying to normalize the relative redirect "../../something".
 Wildfly and Jetty both operate correctly.  My solution was to specify the complete
url for redirection rather than relying on relative urls.

Reported by James.Moger on 2014-09-30 12:12:15

  • Status changed: Queued

@gitblit
Copy link
Collaborator 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
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Hi,

While this fix has worked. Same fix needs to get extended to other links in tickets
page.. like "Comment", Edit, changing values in dropdowns like status, responsible,
milestone, etc.

All those functionalities work.. but they do not get reflected in page until we force
refresh the page.

Reported by dharapvj on 2014-11-10 11:44:28

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

The fix for this issue has been applied for the other ticket page elements.  Thanks
to github/krulls for submitting a PR.

Reported by James.Moger on 2015-02-26 15:34:56

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

This is still not fixed for me with Tomcat.

Reported by steffen@steffen-gebert.de on 2015-02-26 21:40:26

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

This is still not fixed for me with Tomcat.

Reported by steffen@steffen-gebert.de on 2015-02-26 21:40:30

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

I just re-tested with Tomcat 8.0.9 and it's working correctly.


You'll have to provide more detailed information of the failure.

Reported by James.Moger on 2015-02-26 22:23:17

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

And I just re-tested Tomcat 7.0.59 for good measure.  Works fine.

Reported by James.Moger on 2015-02-26 22:30:39

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Attached are the errors I get.

Reported by steffen@steffen-gebert.de on 2015-02-26 22:38:22


- _Attachment: [catalina.out.txt](https://storage.googleapis.com/google-code-attachments/gitblit/issue-455/comment-19/catalina.out.txt)_ - _Attachment: Screen Shot 2015-02-26 at 23.35.15.png
![Screen Shot 2015-02-26 at 23.35.15.png](https://storage.googleapis.com/google-code-attachments/gitblit/issue-455/comment-19/Screen Shot 2015-02-26 at 23.35.15.png)_ - _Attachment: Screen Shot 2015-02-26 at 23.34.41.png
![Screen Shot 2015-02-26 at 23.34.41.png](https://storage.googleapis.com/google-code-attachments/gitblit/issue-455/comment-19/Screen Shot 2015-02-26 at 23.34.41.png)_

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Are you sure you are running the build?  Did you delete the expanded war was removed?

The failure in Tomcat normalizes relative paths like /../../.  The latest Gitblit generates
absolute URLs to avoid Tomcat's failure.

Would also be helpful to know the exact Tomcat version you are running.
http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tomcat/tomcat-catalina/7.0.57/org/apache/catalina/connector/Response.java#1762

Reported by James.Moger on 2015-02-26 22:57:33

@gitblit
Copy link
Collaborator Author

gitblit commented Aug 12, 2015

Hi, yes, I am. I tried both the master (1.6.3) as well as the development branch (1.7.0).

We're running Tomcat 7.0.28 from Debian Wheezy.

Maybe could it be part of the problem that we're running Gitblit as root application?

Reported by steffen@steffen-gebert.de on 2015-03-01 19:14:39

@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