#1 September 27, 2023 6:39am

joeignition
Member
Registered: February 11, 2015
Posts: 14

404s not displaying

We're running big tree 4.5.7 on a couple sites. Client reported the Active 404s returned empty, possibly after th most recent update, I haven't been keeping an eye on this specifically.

Seems that there was a DB update at some point that failed to run, as our bigtree_404s table retained the "NULL" for redirect_url column.
DB structure:
CREATE TABLE `bigtree_404s` (
  `id` int UNSIGNED NOT NULL,
  `broken_url` varchar(1024) DEFAULT NULL,
  `get_vars` varchar(1024) DEFAULT NULL,
  `redirect_url` varchar(1024) DEFAULT NULL,
  `requests` int UNSIGNED NOT NULL DEFAULT '0',
  `ignored` char(2) NOT NULL DEFAULT '',
  `site_key` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

Ran the following queries not he DB table to correct:
// update existing records to avoid null values
UPDATE `bigtree_404s` SET `redirect_url` = '' WHERE `redirect_url` IS NULL;

// update structure to not have a null on that column
ALTER TABLE `bigtree_404s` CHANGE `redirect_url` `redirect_url` VARCHAR(1024) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL;

Just FYI in case someone else runs into this. Not sure why our production server would fail on this update.

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.