Opened 5 years ago

Last modified 3 years ago

#1018 in_progress defect

atom feed fails when untitled media is included

Reported by: ayleph Owned by: jsandoval
Priority: major Milestone:
Component: programming Keywords: feed, atom, title, bitesized
Cc: Parent Tickets:


Trying to view an atom feed which includes media without a title returns a server error. The log output is below.

Error - <type 'exceptions.ValueError'>: title is required
File '/path/to/mediagoblin/lib/python2.7/site-packages/Paste-', line 144 in __call__
  app_iter = self.application(environ, sr_checker)
File '/path/to/mediagoblin/lib/python2.7/site-packages/Paste-', line 203 in __call__
  return app(environ, start_response)
File '/path/to/mediagoblin/mediagoblin/', line 268 in __call__
  return self.call_backend(environ, start_response)
File '/path/to/mediagoblin/lib/python2.7/site-packages/Werkzeug-0.9.6-py2.7.egg/werkzeug/', line 588 in __call__
  return, start_response)
File '/path/to/mediagoblin/mediagoblin/', line 245 in call_backend
  response = controller(request)
File '/path/to/mediagoblin/mediagoblin/user_pages/', line 542 in atom_feed
  'type': 'text/html'}])
File '/path/to/mediagoblin/lib/python2.7/site-packages/Werkzeug-0.9.6-py2.7.egg/werkzeug/contrib/', line 144 in add
  self.entries.append(FeedEntry(*args, **kwargs))
File '/path/to/mediagoblin/lib/python2.7/site-packages/Werkzeug-0.9.6-py2.7.egg/werkzeug/contrib/', line 294 in __init__
  raise ValueError('title is required')
ValueError: title is required

So how do you get media without a title? Upload media, edit it, clear the title, and save changes. Maybe saving media with no title should not be allowed.


Change History (2)

comment:1 Changed 4 years ago by Ben Sturmfels

Keywords: bitesized added

Marking as "bitesized" since this is self-contained and should be fairly straightforward to fix. The feed should accommodate whatever is in the database as the title - we can't necessarily rely on input validation.

comment:2 Changed 3 years ago by jsandoval

Owner: set to jsandoval
Status: newin_progress
Note: See TracTickets for help on using tickets.