Hello -
I ran into a problem today where Views could not be saved. It would appear to be created fine, but upon saving displayed a Page Not Found Error and the View was not saved.
Watchdog displays: Unknown column 'view_php' in 'field list' query: INSERT INTO views_view (name, description, tag, view_php, base_table, is_cacheable) VALUES ('Products', 'Products', '', '', 'node', 0) in /home/sx1skoy/public_html/sites/all/modules/views/includes/view.inc on line 1722.
I have been getting other Watchdog errors but this is the first one I could tie to a specific event.
It was working earlier today so I am restoring to a previous state.
Also, this is my first attempt at an Ubercart related View, in case that is relevant.
Comments
Comment #1
dawehnerWhen you update to a new version of views don't revert the version back.
Comment #2
Pieter Maes commentedHi there i seem to be stuck with the same problem. And if i upgrade again to the latest version i get
/modules/views/includes/view.inc on line 1649
My major problem is that i do not have a backup that is good.
It looks like i should adapt my sql tabels, anyone got a working query ?
Comment #3
itserich commentedouch. i have no idea.
you might want to open up a new issue, or open this one, closed issues may not get much attention.
good luck.
Comment #4
drnikki commentedIf you're in a pickle and have no viable backup, running the following will remove the error and may return functionality.
it worked perfectly on a client's site. He updated to 3.0-alpha3, then deleted the whole folder and re-downloaded 2.11. This removed
"user warning: Unknown column 'view_php' in 'field list' query: UPDATE views_view SET name = 'marketing_insights', description = '', tag = '', view_php = '', base_table = 'node', is_cacheable = 0 WHERE vid = 31 in /sites/all/modules/views/includes/view.inc on line 1722."
as well as
require_once(sites/all/modules/views/includes/admin.inc) [function.require-once]: failed to open stream: No such file or directory in /includes/menu.inc on line 346.
good luck. backup often. :)
Comment #5
dawehner@4
There was NEVER something in views2 which used this two columns so you don't loose something when you remove it.
BUT once you have removed it from the table you cannot go to previous code versions, so if you go back to views2 please go back to the dev version of views2.
Comment #6
Pieter Maes commentedok i'll try that, otherwise i'll have to start from scratch
thx very mutch
Comment #7
danny englanderSubscribing, same issue, #4 fixed it for me.
Comment #8
Pieter Maes commentedHello again,
I solved my problem i replaced completely the views directory and everything works again apparantely i had a corrupt file somewhere...
Comment #9
itserich commentedI always delete the old file before installing updates, not sure if it helps.
Comment #10
Matt Giacomazzo commentedHad same error after updating to Views 6.x-2.12. #4 fixed it.
Comment #11
beschiak commentedALTER TABLE views_view ADD is_cacheable tinyint;
ALTER TABLE views_view ADD view_php blob;
where to put this 2 lines i don't get it
please somebody explain it for total noob :)
Comment #12
danny englander@beschiak -- you need to run that code as a mysql query either in PHPmyAdmin or whatever other database utility you use. Be sure to backup everything first before you run this query!
If you are in phpmyadmin, choose the database that applies and then click on the "SQL" tab. You will see a text box come up and you can copy and paste the query in there. Then click "go". (Note you can do your backup from phpmyadmin as well.)
Comment #13
dan_metille commentedSubscribing, same issue, #4 worked for me.
Is that safe?
Comment #14
beatnikdude commentedSubscribe
Comment #15
mastermtg commented#4 & #12 helped me work this out on Views 6.12. Everything works perfectly now, thanks guys!
Comment #16
chinafaye commentedThanks! #4 worked for me!
Comment #17
zazinteractive commentedThanks drnikki, #4 worked
Comment #18
trickyricky26 commented#4 worked. much thanks drnikki!
Comment #19
maxasus123thx very mutch
Comment #20
Ahmadaj88 commentedThank you very much #4 , worked for me :D
Comment #21
msathesh commented#4 @drnikki thank you. This worked for me too:
Comment #22
ayesh commentedRunning an update.php sessions will fix some of the problems above, I guess.
Comment #23
cinetik commentedSorry I haven't read the whole thread.
Had the same problem, updated with the latest version of views and that solved it (plus I now have a wonderful new view UI).
cheers
Comment #24
giorgoskdon't change title previous title is more general and appropriate for the whole issue
your title was very specific to your case
Comment #25
NickWebman commented#22 was super helpful for me.
I'm modifying an old d6 site. I tried the sql query and mysql said "naa, those tables already exist"... so it turns out I forgot to run update.php years ago when I built this site.
This has to be like the 100th time I've been mad at past-me for developing like a jerk. Live and learn, I suppose.