Earlopain / FoxTrove

E6 Upload Helper
GNU General Public License v3.0
6 stars 3 forks source link

Removing a scraper breaks the stats page #98

Closed faucetlol closed 1 year ago

faucetlol commented 1 year ago

Accidentally tested a scraper in my main instance instead of the dev one, then removed it so I wasn't unnecessarily running a half-broken scraper. It doesn't seem to cause any problems elsewhere, including with the submission files it scraped.

I don't really expect a fix as this is obviously user error - I can fix it myself by either taking those accidentally scraped records out of the database or finally completing the Boosty scraper and having it merged into main - but this could be a real future problem when a website/scraper inevitably becomes defunct.


NoMethodError exception raised

undefined method `manually_disabled?' for #<Sites::SimpleDefinition:0x00007f68f742ef20 @enum_value="boosty", @display_name="Boosty", @homepage="https://boosty.to", @gallery_templates=[#<Addressable::Template:0x49ac PATTERN:{prefix}boosty.to/{site_artist_identifier}{/remaining}{?remaining}{#remaining}>], @username_identifier_regex=/^[a-zA-Z0-9_.-]{3,50}$/, @image_domains=[], @download_headers={}>

Request

  "params": {
    "controller": "stats",
    "action": "index"
  },
  "referrer": "http://192.168.0.10:9000/artists",
  "user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36"
}

Stacktrace

app/views/stats/index.html.erb:15:in `each'
app/views/stats/index.html.erb:15
app/controllers/application_controller.rb:25:in `with_time_zone'
Earlopain commented 1 year ago

Give it a try, master should handle this now

faucetlol commented 1 year ago

Oh yeah, that works pretty well, thanks!

image It does still have "Enabled" as its status, despite not existing, but that's not a big deal.