[stage] Unable to register new users - 500 error

VERIFIED WORKSFORME

Status

--
blocker
VERIFIED WORKSFORME
6 years ago
6 years ago

People

(Reporter: mbrandt, Unassigned)

Tracking

other
2013-02-07

Details

(URL)

(Reporter)

Description

6 years ago
Staging environment only - I am unable to register new non-staff accounts. 

Note: I am able to successfully register an account that has a mozilla.com domain. I'm not sure if this is because I previously had a registered staff account on stage and deleted it before trying to reproduce the error.

Steps to reproduce:
1. goto stage
2. register a new non-staff account

Expected:
A new account is created

Actual:

Traceback (most recent call last):

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

  File "/data/www/mozillians.allizom.org/mozillians/apps/users/views.py", line 81, in register
    profile_form.save()

  File "/data/www/mozillians.allizom.org/mozillians/apps/phonebook/forms.py", line 159, in save
    self.instance.set_membership(Language, self.cleaned_data['languages'])

  File "/data/www/mozillians.allizom.org/mozillians/apps/users/models.py", line 149, in set_membership
    group = model.objects.create(name=g)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/src/django/django/db/models/manager.py", line 137, in create
    return self.get_query_set().create(**kwargs)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/src/django/django/db/models/query.py", line 377, in create
    obj.save(force_insert=True, using=self.db)

  File "/data/www/mozillians.allizom.org/mozillians/apps/groups/models.py", line 45, in save
    super(GroupBase, self).save(*args, **kwargs)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/src/django/django/db/models/base.py", line 463, in save
    self.save_base(using=using, force_insert=force_insert, force_update=force_update)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/src/django/django/db/models/base.py", line 565, in save_base
    created=(not record_exists), raw=raw, using=using)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/src/django/django/dispatch/dispatcher.py", line 172, in send
    response = receiver(signal=self, sender=sender, **named)

  File "/data/www/mozillians.allizom.org/mozillians/apps/groups/models.py", line 134, in create_alias
    alias=instance)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/src/django/django/db/models/manager.py", line 134, in get_or_create
    return self.get_query_set().get_or_create(**kwargs)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/src/django/django/db/models/query.py", line 449, in get_or_create
    obj.save(force_insert=True, using=self.db)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/src/django/django/db/models/base.py", line 463, in save
    self.save_base(using=using, force_insert=force_insert, force_update=force_update)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/src/django/django/db/models/base.py", line 551, in save_base
    result = manager._insert([self], fields=fields, return_id=update_pk, using=using, raw=raw)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/src/django/django/db/models/manager.py", line 203, in _insert
    return insert_query(self.model, objs, fields, **kwargs)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/src/django/django/db/models/query.py", line 1576, in insert_query
    return query.get_compiler(using=using).execute_sql(return_id)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/src/django/django/db/models/sql/compiler.py", line 910, in execute_sql
    cursor.execute(sql, params)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/src/django/django/db/backends/mysql/base.py", line 114, in execute
    return self.cursor.execute(query, args)

  File "/usr/lib64/python2.6/site-packages/MySQLdb/cursors.py", line 173, in execute
    self.errorhandler(self, exc, value)

  File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue

IntegrityError: (1452, 'Cannot add or update a child row: a foreign key constraint fails (`mozillians_stage`.`groups_languagealias`, CONSTRAINT `alias_id_refs_id_1052a804225f488a` FOREIGN KEY (`alias_id`) REFERENCES `groups_language` (`id`))')
Matt, I just registered a new non staff account on stage. Maybe you can give me the details you used to try again? Things like languages, skill, etc.

Thanks!
(Reporter)

Comment 2

6 years ago
:giorgos - very curious indeed, this must have simply been a spurious case. The ghost in the system is strong. Per comment 1, bumping to wfm
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WORKSFORME
(Reporter)

Comment 3

6 years ago
QA Verified worksforme
Status: RESOLVED → VERIFIED
Target Milestone: --- → 2013-02-07
You need to log in before you can comment on or make changes to this bug.