Page MenuHomePhabricator

[IABot] If site isn't in externallinks_paywall table, analyzing links from the site throws error
Closed, ResolvedPublic

Description

Sometimes when IABot analyzes a link from a new site, it fails to find the paywall_id for the site and then errors when it tries to insert a record into the externallinks_global table with a null paywall_id:

ERROR: 1048: Column 'paywall_id' cannot be null

It seems to work on subsequent tries, since at that point the site has a record in the externallinks_paywall table.

Event Timeline

This was already fixed. Download the new code.

@Cyberpower678: Unfortunately, @MusikAnimal's fix (https://github.com/cyberpower678/Cyberbot_II/commit/d49f916602c80ea50deaf83954a3d532ef6e3f5c) didn't actually fix this. I'm using the latest code, but still getting the error when starting with a clean database.

Actually, it looks like the problem is that it's only inserting a single row into externallinks_paywall each time it analyzes a page, regardless of how many new websites are on the page.

kaldari triaged this task as Medium priority.
kaldari edited projects, added Community-Tech-Sprint; removed Community-Tech.
kaldari moved this task from Ready to Needs Review/Feedback on the Community-Tech-Sprint board.
kaldari added a subscriber: Cyberpower678.