The last_status field, which weblinks checker uses to store the most recent url status value, is defined as 4 characters. However, I have received status values of -1002 for example, when there is no url to test. This is clearly a faulty weblink but drupal_write_record() cannot store this value, so no status is recorded and the fact that the link is bad never gets stored.
The simple solution is to increase the field to 5 characters. I've tried this, and it works fine, the value of -1002 is recorded, and in due course the link gets unpublished as intended. Patch to follow
Comments
Comment #1
jonathan1055 commentedPatch against 7.x-1.0-alpha1+6
I could not get any return value from the call to db_change_field(), so cannot give any useful message. But we need to pass back something otherwise it looks like the update failed.
To retest the update, you can use:
Comment #2
gstegemann commentedWill test your patch next week.
But wouldn't it be better to increase the length of the last_status field right away to 6 characters to cover also 5 digit status codes?
Comment #3
jonathan1055 commentedYes you are probably right. It's not a great overhead to have six chars. Here's an updated patch.
Comment #4
gstegemann commentedPatch tested.
Comment #6
jonathan1055 commentedThanks for testing. Committed.
This has added weblinks_update_7001()