Unable to create banners on all locales

VERIFIED FIXED in 1

Status

VERIFIED FIXED
6 years ago
3 years ago

People

(Reporter: rbillings, Unassigned)

Tracking

unspecified
x86
Mac OS X

Details

(Reporter)

Description

6 years ago
Users are only able to create banners on some locales.

Able to create banners:
en-US, pt-BR

Create banner page does not load:
pl, fr

Create banner page displays, but never completes banner creation:
de, nl, es
pl and fr is a known issue due to an error in l10n. Once the problem strings are updated, they should function again.

de, nl, and es seem to be raising the following traceback, which may be related to bug 787452:

Traceback (most recent call last):

  File "/data/www/affiliates-fb-dev.allizom.org/affiliates-app/vendor/src/django/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/data/www/affiliates-fb-dev.allizom.org/affiliates-app/apps/facebook/decorators.py", line 16, in inner
    return func(request, *args, **kwargs)

  File "/data/www/affiliates-fb-dev.allizom.org/affiliates-app/vendor/src/commonware/commonware/response/decorators.py", line 18, in _wrapped_view
    response = view_fn(request, *args, **kwargs)

  File "/data/www/affiliates-fb-dev.allizom.org/affiliates-app/apps/facebook/views.py", line 106, in banner_create
    if not form.is_valid():

  File "/data/www/affiliates-fb-dev.allizom.org/affiliates-app/vendor/src/django/django/forms/forms.py", line 121, in is_valid
    return self.is_bound and not bool(self.errors)

  File "/data/www/affiliates-fb-dev.allizom.org/affiliates-app/vendor/src/django/django/forms/forms.py", line 112, in _get_errors
    self.full_clean()

  File "/data/www/affiliates-fb-dev.allizom.org/affiliates-app/vendor/src/django/django/forms/forms.py", line 267, in full_clean
    self._clean_fields()

  File "/data/www/affiliates-fb-dev.allizom.org/affiliates-app/vendor/src/django/django/forms/forms.py", line 284, in _clean_fields
    value = field.clean(value)

  File "/data/www/affiliates-fb-dev.allizom.org/affiliates-app/vendor/src/django/django/forms/fields.py", line 163, in clean
    value = self.to_python(value)

  File "/data/www/affiliates-fb-dev.allizom.org/affiliates-app/vendor/src/django/django/forms/models.py", line 972, in to_python
    value = self.queryset.get(**{key: value})

  File "/data/www/affiliates-fb-dev.allizom.org/affiliates-app/vendor/src/django/django/db/models/query.py", line 351, in get
    % (self.model._meta.object_name, num, kwargs))

MultipleObjectsReturned: get() returned more than one FacebookBanner -- it returned 4! Lookup parameters were {'id': u'1'}
Assignee: nobody → mkelly
All locales except for fr should be working now. One of the fr localizers translated a variable name, which causes tracebacks on the banner creation page.

The string in question is https://localize.mozilla.org/fr/affiliates/LC_MESSAGES/messages.po/translate/?unit=1242043. It appears that a correction has already been suggested, so hopefully this will get fixed over the weekend. If not, we can handle it Tuesday morning.
(Reporter)

Comment 3

6 years ago
Verified able to create banners on all locales except /fr.
I just fixed and committed fr. It should be working once dev server updates localization files. I guess it's doing auto-updates every 15 mins, but I'm not 100% sure.
Looks like it's working fine now, thanks Milos!
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
(Reporter)

Comment 6

6 years ago
Verified able to create banners on all locales.
Status: RESOLVED → VERIFIED
(Reporter)

Updated

6 years ago
Assignee: mkelly → nobody
Component: affiliates.mozilla.org → Social Integration
Product: Firefox Affiliates → Firefox Affiliates Graveyard
You need to log in before you can comment on or make changes to this bug.