Custom Query (1174 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (148 - 150 of 1174)

Ticket Resolution Summary Owner Reporter
#5415 fixed Server error when trying to access media with graveyards comments ayleph
Description

As a logged in user, if I try to access a media page with a graveyard comment, I get a server error with the text below in my log. If I'm not logged in, then the comments aren't displayed, so the error doesn't occur.

Error - <class 'jinja2.exceptions.UndefinedError'>: 'mediagoblin.db.models.Graveyard object' has no attribute 'get_actor'
URL: https://goblinrefuge.com/mediagoblin/u/sushibsd/m/dank-wats/
File '/path/to/mediagoblin/lib/python2.7/site-packages/Paste-1.7.5.1-py2.7.egg/paste/exceptions/errormiddleware.py', line 144 in __call__
  app_iter = self.application(environ, sr_checker)
File '/path/to/mediagoblin/mediagoblin/app.py', line 342 in __call__
  return self.call_backend(environ, start_response)
File '/path/to/mediagoblin/lib/python2.7/site-packages/Werkzeug-0.10.1-py2.7.egg/werkzeug/wsgi.py', line 591 in __call__
  return self.app(environ, start_response)
File '/path/to/mediagoblin/mediagoblin/app.py', line 276 in call_backend
  return self._finish_call_backend(request, environ, start_response)
File '/path/to/mediagoblin/mediagoblin/app.py', line 318 in _finish_call_backend
  response = controller(request)
File '/path/to/mediagoblin/mediagoblin/decorators.py', line 47 in wrapper
  return controller(request, *args, **kwargs)
File '/path/to/mediagoblin/mediagoblin/decorators.py', line 210 in wrapper
  return controller(request, media=media, *args, **kwargs)
File '/path/to/mediagoblin/mediagoblin/decorators.py', line 170 in wrapper
  return controller(request, page=page, *args, **kwargs)
File '/path/to/mediagoblin/mediagoblin/user_pages/views.py', line 170 in media_home
  context)
File '/path/to/mediagoblin/mediagoblin/tools/response.py', line 36 in render_to_response
  render_template(request, template, context),
File '/path/to/mediagoblin/mediagoblin/tools/template.py', line 144 in render_template
  rendered = template.render(context)
File '/path/to/mediagoblin/lib/python2.7/site-packages/Jinja2-2.7.3-py2.7.egg/jinja2/environment.py', line 969 in render
  return self.environment.handle_exception(exc_info, True)
File '/path/to/mediagoblin/lib/python2.7/site-packages/Jinja2-2.7.3-py2.7.egg/jinja2/environment.py', line 742 in handle_exception
  reraise(exc_type, exc_value, tb)
File '/path/to/mediagoblin/mediagoblin/templates/mediagoblin/media_displays/video.html', line 19 in top-level template code 
  {% extends 'mediagoblin/user_pages/media.html' %}
File '/path/to/mediagoblin/mediagoblin/templates/mediagoblin/user_pages/media.html', line 21 in top-level template code 
  {% from "mediagoblin/utils/pagination.html" import render_pagination %}
File '/var/lib/mediagoblin/templates/mediagoblin/base.html', line 64 in top-level template code 
  {% block mediagoblin_body %}
File '/var/lib/mediagoblin/templates/mediagoblin/base.html', line 203 in block "mediagoblin_body"
  {% block mediagoblin_content %}
File '/path/to/mediagoblin/mediagoblin/templates/mediagoblin/user_pages/media.html', line 136 in block "mediagoblin_content"
  <a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
File '/path/to/mediagoblin/lib/python2.7/site-packages/Jinja2-2.7.3-py2.7.egg/jinja2/environment.py', line 397 in getattr
  return getattr(obj, attribute)
UndefinedError: 'mediagoblin.db.models.Graveyard object' has no attribute 'get_actor'

The problematic code is in mediagoblin/templates/mediagoblin/user_pages/media.html.

      {% for comment in comments %}
        {% set comment_author = comment.get_actor %}
        <li id="comment-{{ comment.id }}"
          {%- if pagination.active_id == comment.id %}
            class="comment_wrapper comment_active">
            <a name="comment" id="comment"></a>
          {%- else %}
            class="comment_wrapper">
          {%- endif %}
          <div class="comment_author">
            <img src="{{ request.staticdirect('/images/icon_comment.png') }}" />
            <a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
                            user=comment_author.username) }}"
               class="comment_authorlink">
              {{- comment_author.username -}}
            </a>
            <a href="{{ request.urlgen('mediagoblin.user_pages.media_home.view_comment',
                            comment=comment.id,
                            user=media.get_actor.username,
                            media=media.slug_or_id) }}#comment"
               class="comment_whenlink">
              <span title='{{- comment.created.strftime("%I:%M%p %Y-%m-%d") -}}'>
                {%- trans formatted_time=timesince(comment.created) -%}
                  {{ formatted_time }} ago
                {%- endtrans -%}
              </span></a>:
          </div>

comment in comments appears to return graveyard comments as well, and these comments don't have a get_actor attribute.

#5414 fixed Login-validator arbitrary and capricious mi
Description

Using gmg adduser I created an account for myself named "mi". However, when I tried to login using it, I was told, the login-field must be between 3 and 30 characters long.

This is wrong on many levels: . The authenticator should not be verifying the length of submitted login and password at all. Such checks might be appropriate for a new account-creation, but I was logging-in, not creating account. . Even if you disagree with the above, gmg adduser should've rejected the name as too short instead. . Not only is the lower limit of 3 too high -- a family installation can easily have one-letter accounts, the upper limit of 30 is too low as well. Though over 30 is unusual for an account-name, an e-mail address can easily exceed 30 characters.

I was able to login using my e-mail address instead of username, but this needs fixing (along with tests/test_auth.py).

#5413 fixed Make models on clean database with alembic, not from models.py Jessica Tallon
Description

Currently, when there is a new database with nothing that has been done, we skip all the sqlalchemy-migrate migrations and just make the models based off models.py, we then run the alembic migrations. This actually causes problems when we start doing structural changes in alembic as they have already been done in models.py so when the alembic migrations run, they error.

One solution could be to skip all the alembic migrations, however, I think a better solution is to not make any models off models.py and instead make the initial alembic migration create all the models in the state they're in right now and use alembic migrations to change them in the future, removing all of the code to construct models from model.py.

Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.