Skip to content

Commit 316e2f2

Browse files
author
Mike Taylor
authored
Merge pull request #3035 from /issues/3033/1
Fixes #3033 - Include bugform.js on homepage for form-v2 experiment
2 parents 93cf30c + 7975fed commit 316e2f2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

webcompat/templates/index.html

+6
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,11 @@
2020
<script src="{{ url_for('static', filename='js/lib/models/label-list.js') }}"></script>
2121
<script src="{{ url_for('static', filename='js/lib/models/issue.js') }}"></script>
2222
<script src="{{ url_for('static', filename='js/lib/untriaged.js') }}"></script>
23+
{# Normally this file is in the webcompat bundle, but the form-v2 #}
24+
{# experiment does not include it. So include it here. #}
25+
{# this can be removed when https://github.com/webcompat/webcompat.com/issues/3034 is fixed. #}
26+
{% if ab_active('exp') == 'form-v2' %}
27+
<script src="{{ url_for('static', filename='js/lib/bugform.js') }}"></script>
28+
{% endif %}
2329
{%- endif -%}
2430
{%- endblock %}

webcompat/views.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def create_issue():
277277
elif request_type == 'create':
278278
# Check if there is a form
279279
if not request.form:
280-
log.info('POST request without form.')
280+
log.info('400: POST request without form.')
281281
abort(400)
282282
# Adding parameters to the form
283283
form = request.form.copy()
@@ -290,6 +290,7 @@ def create_issue():
290290
url=form['url'].encode('utf-8')))
291291
# Check if the form is valid
292292
if not is_valid_issue_form(form):
293+
log.info('400: POST request w/o valid form (is_valid_issue_form).')
293294
abort(400)
294295
if form.get('submit_type') == PROXY_REPORT:
295296
# Checking blacklisted domains
@@ -315,6 +316,7 @@ def create_issue():
315316
session['form'] = form
316317
return redirect(url_for('login'))
317318
else:
319+
log.info('400: Something else happened.')
318320
abort(400)
319321

320322

0 commit comments

Comments
 (0)