Unknown column 'source' in 'where clause' query: SELECT rid FROM path_redirect WHERE source = 'node/725' AND language IN ('', '') ORDER BY language DESC, source DESC, rid DESC in /usr/home/hoslo/public_html/sites/all/modules/path_redirect/path_redirect.module on line 437.

This occurred after updating to beta6

Comments

dave reid’s picture

Status: Active » Postponed (maintainer needs more info)

Be sure to run update.php.

superfedya’s picture

After the last update: path_redirect-6.x-1.0-beta6.tar
When I tried to edit a node I see this error:
user warning: Unknown column 'path' in 'where clause' query: SELECT rid FROM path_redirect WHERE path = 'madchronicles-27-1-dekabrya-2009-square-enix-uzhe-ne-vypuskaet-khitov' LIMIT 0, 1 in /home2/madfanbo/public_html/site/modules/pathauto/pathauto.inc on line 74.

How I can fix this? And how I can hide this module from node? (I wanna it see only in admin menu).

Thanks!

upd.
logs: Unknown column 'path' in 'where clause' query: SELECT rid FROM path_redirect WHERE path = 'madchronicles-27-1-dekabrya-2009-square-enix-uzhe-ne-vypuskaet-khitov' LIMIT 0, 1"

dave reid’s picture

@superfedya: See #647812: Update to code required for Path_Redirect compatability. Latest betas are undergoing major changes. Stick with beta5 until our official 1.0.

Starminder’s picture

Dave - I did run update and the update supposedly completed successfully with no errors. Having said that,the problem remains as written. Thanks!

Starminder’s picture

Status: Postponed (maintainer needs more info) » Active
CinemaSaville’s picture

I'm getting the same error message-

user warning: Unknown column 'path' in 'where clause' query: SELECT rid FROM path_redirect WHERE path = 'ideas/pizza-hut-spec-commercial-pre-viz-mockup' LIMIT 0, 1 in /home/***/public_html/sites/all/modules/pathauto/pathauto.inc on line 74.

I also ran update.php, but it remains. Thanks

dave reid’s picture

Status: Active » Postponed (maintainer needs more info)

@CinemaSaville: See #647812: Update to code required for Path_Redirect compatability. Latest betas are undergoing major changes. Stick with beta5 until our official 1.0.

@Starminder: Can you confirm that after you ran update.php you get the same error (from file path_redirect.module and not pathauto.inc)?

CinemaSaville’s picture

Dave- I went back to beta5, but was still getting funky messages (Was a while ago, so can't tell you exactly what it said.). I disabled the module, and uninstalled. So I'll wait for the official 1.0 Any idea on the ETA? Thanks for your good work.

Starminder’s picture

Dave - Yes, i copied and pasted the error. I'll roll back to b5 and see how it goes.

Tom Ash’s picture

I got the same error as CinemaSaville, *both* when upgrading and when installing beta6 fresh on a new install. Can you give some guidance on how to reinstall beta5 while keeping our existing redirects (of which there are hundreds :S )?

PS: As with superfedya, the error shows whenever I or my authors try editing nodes

Starminder’s picture

Dave - am now getting tons of : Unknown column 'path' in 'where clause' query: SELECT rid FROM path_redirect WHERE path = 'category/web-links/diy-products-and-tools-slot-cars' LIMIT 0, 1 in /usr/home/hoslo/public_html/sites/all/modules/pathauto/pathauto.inc on line 74.

From what I've read, rolling back to B5 may actually complicate the problem, not sure what to do here.

dave reid’s picture

Well the term 'rolling back' means you have to uninstall the module and then re-install the beta5. You can't just drop in a previous version of a module and expect it to work all hunky-dory since it may have made database schema changes, like in this case. If you do want to rollback without losing your data, all your really need to do is edit your site's database's path_redirect table and rename the source column to 'path'. You will also need to set the schema value in your system table for the path_redirect module to 6102.

All of you did see the 'beta' in the title right? That generally means to test before going into production. I'm posting a compatibility patch in pathauto shortly.

dave reid’s picture

Patches available as well as a drop-in replacement file for pathauto.inc posted in #647812-19: Update to code required for Path_Redirect compatability.

Tom Ash’s picture

If it helps anyone, here's the SQL for what Dave suggests at #12 (which has worked for me, touch wood):

alter table path_redirect change column source path varchar(255);
update system set schema_version = 6102 where filename LIKE '%path_redirect.mod%';

dave reid’s picture

Status: Postponed (maintainer needs more info) » Fixed
pkiff’s picture

Thanks for the MySQL, Thomas. Your SQL worked for me on several databases via a phpmyadmin interface on a multi-site install on an IIS 7 web server running MySQL 5.1.x

Before playing with the manual SQL table edits, I tried the suggested update to pathauto-6.x-1.x-dev. That removed some of the errors, but the redirects themselves were not functioning. Though when I tried to create a new, test redirect, it did seem to function correctly. Possibly the problem was related to some kind of server caching, but I emptied all the cache tables in the Drupal databases, so I don't think it was related to Drupal caching.

For others looking for an SQL solution to assist with rolling back to beta 5, another set of SQL statements is available in the thread, "user warning: Unknown column 'path' in 'where clause' query: SELECT rid FROM path_redirect WHERE path" [not tested by me].

And thanks for continuing to work on fixing this, Dave. The Path redirect module has been a fantastic and essential tool on all the sites we are running, and the beta versions were working so well for me, that I had stopped treating them as betas. Glad to hear that you are heading towards a 1.0 release. Can't wait!

Phil.

Tom Ash’s picture

Glad it helped...

Thanks to Dave for Path Redirect also.

sinasalek’s picture

#14 Worked for me too , thanks guys

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.