Problem/Motivation
Running Drupal 7.39 with PHP v 5.3.17 and database fully updated.
The problem: Cannot edit any nodes. Clicking EDIT triggers the PDOException error.
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.status' in 'field list': SELECT base.rid AS rid, base.hash AS hash, base.type AS type, base.uid AS uid, base.source AS source, base.source_options AS source_options, base.redirect AS redirect, base.redirect_options AS redirect_options, base.language AS language, base.status_code AS status_code, base.count AS count, base.access AS access, base.status AS status FROM {redirect} base WHERE (base.redirect = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => node/201 ) in DrupalDefaultEntityController->load() (line 198 of /srv/www/htdocs/includes/entity.inc).
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | 2578019-change-update-hook-numbers.patch | 753 bytes | reepy |
| #8 | redirect.xls | 48.5 KB | mattstein |
Comments
Comment #2
mattstein commentedDisabling the Redirect module has restored editing functionality to the rest of the site, but that's only a stop-gap measure (since I was using the redirect module for a reason).
Comment #3
dave reidCan you confirm that the status field actually exists in the redirect table? Were you testing or have applied any Redirect module patches previously?
Comment #4
mattstein commentedDave--
Thanks for responding. I recently ran a "drush up" so if there were any patches that would be applied through that automated process then the answer could be yes. But I didn't manually apply any patches. As for your status field question, I don't know. I don't have phpmyadmin privileges to the server, which is the one tool I'm familiar with for viewing the db tables. As you might have guessed from my response, I'm not a developer or sys admin so my skills and knowledge are limited.
Comment #5
johnennew commentedHi both,
I was getting this same error. As far as I could tell I had somehow missed the 7101 update - this may have been due to using earlier patches for the module, I am not sure.
Anyway, I reset the version of the redirect module back to an early state and the reran update db using the drush commands below. This allowed the 7101 update to run before 7102 and this time there were no errors.
Comment #6
xtfer commentedI had the same issue after running drush up. The solution in #5 fixed it. Possibly update 7101 is broken?
Comment #7
mayabutterfield commentedI'm getting the exact same error. I haven't done any updates to the redirect module, just a single install of 7.x-1.0-rc3.
It was working for a while, and then while the client was doing some content edits we suddenly got this error when trying to edit:
Fatal error: Class 'RedirectController' not found in /home/cocon4/public_html/ucsf/includes/common.inc on line 7963
I turned off redirect, and the site started to function again. But that's not a long-term solution. When I turn redirect back on, I get the error listed above in the initial bug report.
I do have PHPMyAdmin, and no, when I drill down into Redirect, there is no column called status. There's only status_code.
I hope this adds a few more clues!
Comment #8
mattstein commentedDave Reid: I found a way to access the database. I downloaded the site to my laptop and installed it via Acquia's Dev Desktop. The Dev Desktop framework provides PHPmyAdmin so I can look whatever you need. You just need to provide me with instructions since I'm not schooled in using PHPmyAdmiin.
I searched the db for "redirect" table so I exported it and just uploaded it "redirect.xls". Hope that helps.
Comment #9
mattstein commentedCeng: I tested your drush commands on my downloaded site and it worked so I ran them in production. It looks like they worked like a charm!
I was able to reactivate the Redirect module (restoring the functionality) and the site is functioning properly.
Thanks so much!!!!
Comment #10
MattHalo commentedConfirm #5 worked.
Comment #11
hamrant commentedceng, thank you, #5 worked!
Comment #12
Paul B commentedI get the same issue upgrading from7.x-1.0-rc1 to 7.x-1.0-rc3.
The updates don't run. The schema_version is -1 for some reason.
See also [1182804], [2515734], and [217533]
Comment #13
Paul B commentedI ran the database query in #5. After that the 7101 and 7102 updates would run.
Comment #14
xtfer commentedStruck this again today. Looks like 7101 never ran on the site in question.
Comment #15
dandaman commentedYeah, found my
schema_versionwas somehow set to-1, but once I changed it to7100, the update ran correctly and the status column was added. Not sure why the-1was set, though. Thanks for the help in troubleshooting the issue, everybody.Comment #16
hkovacs commented#5 worked for me. Thanks.
Comment #17
RAWDESK commented#5 worked, but only after disabling and re-enabling the Redirect module again.
Comment #18
Mugé commented#5 worked. Thanks to Ceng and OP!
I recently moved website to another host and thought perhaps there were some stuff in database misleading directions. Glad I found this post.
Comment #19
reepy commentedI just ran into this problem while upgrading this module for a distro. I confirmed on two separate sites coming from rc1 to rc3, this error occurs.
In rc1, the `schema_version` is `7101`.
In rc2 and rc3, `redirect_update_7101` is code to add the field. This never runs because it has previously been used.
Attached is a patch that simply bumps the build numbers. This will work if you are coming from <= rc1. I'm not sure what the solution is with a schema mismatch if you are already on rc3.
Comment #20
sidharthap#5 worked for me. Thank you
Comment #21
wylbur commentedClosing this as Outdated as Drupal 7 is EOL.