Cannot activate Redirection
-
Hello,
I am unable to use Redirection due to a couple errors. I believe this started when I updated to WordPress 5.1.1, and updated Redirection to 4.2.3. I was prompted to up upgrade the Redirection database, which upgraded without issue. However, following this, I am unable to add new redirects, receiving the following error when I attempt to do so:
Unable to add new redirect (41): Incorrect integer value: ” for column ‘regex’ at row 1
Plugin: 4.2.3
WordPress: 5.1.1 (multi)
PHP: 7.2.17
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0
JavaScript: https://www.website.com/subsite/wp-content/plugins/redirection/redirection.js
REST API: https://www.website.com/subsite/wp-json/Error: Unable to add new redirect (41): Incorrect integer value: ” for column ‘regex’ at row 1
Action: redirection/v1/redirect/ POST
Params: {“id”:0,”url”:”/source”,”title”:””,”match_data”:{“source”:{“flag_regex”:false,”flag_trailing”:false,”flag_case”:false,”flag_query”:”exact”}},”match_type”:”url”,”action_type”:”url”,”position”:0,”group_id”:1,”action_code”:301,”action_data”:{“url”:”https://www.website.com/target”}}
Code: 400 Bad Request
Raw: {“code”:”redirect”,”message”:”Unable to add new redirect”,”data”:{“status”:400,”error_code”:41,”wpdb”:”Incorrect integer value: ” for column ‘regex’ at row 1″}}Accompanied by an error in the server log:
PHP message: WordPress database error Incorrect integer value: ” for column ‘regex’ at row 1 for query INSERT INTO
wp_5_redirection_items(regex,match_type,url,match_url,title,group_id,position,action_type,action_code,action_data,status) VALUES (”, ‘url’, ‘/source’, ‘/source’, ”, ‘1’, ‘3’, ‘url’, ‘301’, ‘https://www.website.com/target’, ‘enabled’) made by Red_Item::create” while reading response header from upstream, client: 130.111.28.84, server: http://www.website.com, request: “POST /subsite/wp-json/redirection/v1/redirect/?_wpnonce=3bb5ca08e7 HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php-fpm/php-fpm.sock:”, host: “www.website.com”, referrer: “https://www.website.com/subsite/wp-admin/tools.php?page=redirection.php”If I try to uninstall and reinstall the plugin, it will prompt me to complete Redirection setup to finish installation. Trying to “Finish Setup” (setup makes it past initial options & REST API check) produces the following error:
Database problem
Failed to perform query “CREATE TABLE IF NOT EXISTS
wp_redirection_items(idint(11) unsigned NOT NULL AUTO_INCREMENT,urlmediumtext NOT NULL,match_urlvarchar(2000) DEFAULT NULL,match_datatext,regexint(11) unsigned NOT NULL DEFAULT ‘0’,positionint(11) unsigned NOT NULL DEFAULT ‘0’,last_countint(10) unsigned NOT NULL DEFAULT ‘0’,last_accessdatetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,group_idint(11) NOT NULL DEFAULT ‘0’,statusenum(‘enabled’,’disabled’) NOT NULL DEFAULT ‘enabled’,action_typevarchar(20) NOT NULL,action_codeint(11) unsigned NOT NULL,action_datamediumtext,match_typevarchar(20) NOT NULL,titletext, PRIMARY KEY (id), KEYurl(url(191)), KEYstatus(status), KEYregex(regex), KEYgroup_idpos(group_id,position), KEYgroup(group_id), KEYmatch_url(match_url(191)) ) DEFAULT CHARACTER SET utf8mb4 COLLATE=utf8_general_ci”Message: Failed to perform query “CREATE TABLE IF NOT EXISTS
wp_redirection_items(
idint(11) unsigned NOT NULL AUTO_INCREMENT,
urlmediumtext NOT NULL,
match_urlvarchar(2000) DEFAULT NULL,
match_datatext,
regexint(11) unsigned NOT NULL DEFAULT ‘0’,
positionint(11) unsigned NOT NULL DEFAULT ‘0’,
last_countint(10) unsigned NOT NULL DEFAULT ‘0’,
last_accessdatetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
group_idint(11) NOT NULL DEFAULT ‘0’,
statusenum(‘enabled’,’disabled’) NOT NULL DEFAULT ‘enabled’,
action_typevarchar(20) NOT NULL,
action_codeint(11) unsigned NOT NULL,
action_datamediumtext,
match_typevarchar(20) NOT NULL,
titletext,
PRIMARY KEY (id),
KEYurl(url(191)),
KEYstatus(status),
KEYregex(regex),
KEYgroup_idpos(group_id,position),
KEYgroup(group_id),
KEYmatch_url(match_url(191))
) DEFAULT CHARACTER SET utf8mb4 COLLATE=utf8_general_ci”
Installed: –
Next: 4.1
Debug:COLLATION ‘utf8_general_ci’ is not valid for CHARACTER SET ‘utf8mb4’
Table “wp_redirection_items” is missing
Table “wp_redirection_groups” is missing
Table “wp_redirection_logs” is missing
Table “wp_redirection_404” is missing
Stage: create_tablesIf anyone can offer some tips on solving this issue, it would be much appreciated.
Thanks,
Zach
The topic ‘Cannot activate Redirection’ is closed to new replies.