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

Gogs webhook form missing ContentType field #9504

Closed
2 of 7 tasks
russell opened this issue Dec 26, 2019 · 4 comments
Closed
2 of 7 tasks

Gogs webhook form missing ContentType field #9504

russell opened this issue Dec 26, 2019 · 4 comments
Labels
topic/ui Change the appearance of the Gitea UI type/bug
Milestone

Comments

@russell
Copy link

russell commented Dec 26, 2019

  • Gitea version (or commit ref): 1.11.0+dev-496-g3e166bd05
  • Git version:
  • Operating system: Linux (docker) docker.io/gitea/gitea@sha256:19fd040118804252e4d991b8279d84be965c12ab1fa02cbb51119e5475b69bb0
  • 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

There seems to be a field for content type missing from the page, when i submit the form to add a Gogs webhook, then i get a validation error, if i look in the gitea webhook add page there is an extra field.

Screenshots

Screenshot from 2019-12-26 17-26-33

@russell
Copy link
Author

russell commented Dec 26, 2019

after a bit more investigation, it looks like the field is hidden, so you can edit the page with the inspector to work around this for the time being

            <div class="field" style="display: none;">
			<label>POST Content Type</label>
			<div class="ui selection dropdown" tabindex="0">
				<input type="hidden" id="content_type" name="content_type" value="application/json">
				<div class="default text"></div>
				<i class="dropdown icon" tabindex="0"><div class="menu" tabindex="-1"></div></i>
				<div class="menu" tabindex="-1">
					<div class="item" data-value="1" tabindex="-1">application/json</div>
					<div class="item" data-value="2" tabindex="-1">application/x-www-form-urlencoded</div>
				</div>
			</div>
		</div>

@lunny lunny added type/bug topic/ui Change the appearance of the Gitea UI labels Dec 27, 2019
@jvstein
Copy link
Contributor

jvstein commented Feb 23, 2020

Thanks @russell. By setting value="1", taken from a working webhook, I was able to get the form to work.

@lunny
Copy link
Member

lunny commented Feb 23, 2020

Any one could you send a PR?

zeripath pushed a commit that referenced this issue Feb 28, 2020
The content_type value was defaulting to the string value of the
ContentType, not the integer value as expected by the backend.
@guillep2k
Copy link
Member

Fixed by #10456

zeripath pushed a commit to zeripath/gitea that referenced this issue May 17, 2020
go-gitea#10456)

The content_type value was defaulting to the string value of the
ContentType, not the integer value as expected by the backend.
@lafriks lafriks added this to the 1.11.6 milestone May 17, 2020
zeripath added a commit that referenced this issue May 17, 2020
… (#11461)

The content_type value was defaulting to the string value of the
ContentType, not the integer value as expected by the backend.

Co-authored-by: Jeff Stein <[email protected]>
@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
topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

No branches or pull requests

5 participants