Purges gentags with invalid names from the tags table. Addresses #3390
(Searching certain metatags results in an empty paginator) by removing
metatags from the tags table.
Fixes a bug from 9a3824a. When an artist entry is saved, `ArtistUrl.normalize`
is called on every URL, which calls `Sources::Site.new(url)`. This
raised NoStrategyError when an artist entry contained URLs that weren't
recognized by any strategy.
This also caused `Fetch source data` to fail in certain cases when it
attempted to find the artist.
Due to missing || operators, for Pawoo/Tumblr/Artstation uploads the
source wasn't changed from the direct image URL to the html page URL
after upload.
Fixes an `undefined method `gsub' for nil:NilClass` exception when fetching source
data for this url:
* /uploads/new?url=https%3A%2F%2Fuiti-ukumo.tumblr.com%2Fpost%2F156157443158%2F2016-12
Bug introduced in 3c524aa5: `url` wasn't initialized due to `@url = url`
being removed from Sources::Site#initialize.
`forum_post_id` failed to save due to mass-assignment protection.
This caused alias approval messages ("The tag alias foo -> bar (forum #1234) has been approved.")
to not include the "(forum #1234)" bit because the forum id was nil.
On the uploads page, trigger `Fetch source data` automatically when the
user pastes an URL into the source field. Silently ignore invalid URLs
so that we don't trigger spurious errors when the user types in a source
manually.
On the uploads page, don't call /artist/finder.json to find the artist
on page load. Instead have `Fetch source data` fill in the artist using
the `artists` data returned by the `/source.json` call.
* In the `Fetch source data` box, list the Danbooru artist tag(s) that
were found beside the artist name.
* Unify `Fetch source data` code that was duplicated between the
uploads page and the post show page.