md-systems / redirect

DEPRECATED: Redirect moved back to drupal.org, use the official repository.
https://www.drupal.org/project/redirect
21 stars 29 forks source link

Error thrown on Fix 404 page #89

Open rtrvrtg opened 8 years ago

rtrvrtg commented 8 years ago

Hey, I installed the latest version of Redirect and am trying it out. So far, looks alright, but noticed the Fix 404 Pages page threw the following error:

Drupal\Core\Database\DatabaseExceptionWrapper:
SQLSTATE[42703]: Undefined column: 7 ERROR: column "count" does not exist
LINE 1: SELECT count AS count, w.message AS message, w.variables AS ... ^:
SELECT count AS count, w.message AS message, w.variables AS variables, 
COUNT(wid) AS count, MAX(timestamp) AS timestamp FROM {watchdog} w 
LEFT OUTER JOIN {redirect} r ON w.message = r.redirect_source__path 
WHERE (r.rid IS NULL ) AND (w.type = :db_condition_placeholder_0) 
GROUP BY w.message, w.variables ORDER BY count DESC 
NULLS LAST LIMIT 25 OFFSET 0; 
Array ( [:db_condition_placeholder_0] => page not found ) 
in Drupal\redirect\Form\RedirectFix404Form->buildForm()
(line 96 of /path/to/site/root/modules/sandbox/redirect/src/Form/RedirectFix404Form.php).

Am guessing that first count AS count has crept in undetected and needs removing. Before I try and put together a PR to fix this, has anyone else spotted it yet?

Berdir commented 8 years ago

Are you using sqlite or postgresql? That page definitely has bugs at the moment, but I haven't seen that error.

Before you spend time on fixing this, see the discussion in #84. I think it would be better to spend time on #47 than fixing this page.

rtrvrtg commented 8 years ago

I'm using PostgreSQL in this particular case. I'll take a look at the two issues you recommend to see if they cover my particular case. Thanks for jumping on this so quickly, especially on a weekend.