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

dawehner’s picture

Status: Active » Closed (works as designed)

When you update to a new version of views don't revert the version back.

Pieter Maes’s picture

Hi 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 ?

itserich’s picture

ouch. 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.

drnikki’s picture

If you're in a pickle and have no viable backup, running the following will remove the error and may return functionality.

ALTER TABLE views_view ADD is_cacheable tinyint;
ALTER TABLE views_view ADD view_php blob;

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. :)

dawehner’s picture

@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.

Pieter Maes’s picture

ok i'll try that, otherwise i'll have to start from scratch

thx very mutch

danny englander’s picture

Subscribing, same issue, #4 fixed it for me.

Pieter Maes’s picture

Hello again,

I solved my problem i replaced completely the views directory and everything works again apparantely i had a corrupt file somewhere...

itserich’s picture

I always delete the old file before installing updates, not sure if it helps.

Matt Giacomazzo’s picture

Had same error after updating to Views 6.x-2.12. #4 fixed it.

beschiak’s picture

ALTER 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 :)

danny englander’s picture

@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.)

dan_metille’s picture

Subscribing, same issue, #4 worked for me.
Is that safe?

beatnikdude’s picture

Subscribe

mastermtg’s picture

#4 & #12 helped me work this out on Views 6.12. Everything works perfectly now, thanks guys!

chinafaye’s picture

Thanks! #4 worked for me!

zazinteractive’s picture

Thanks drnikki, #4 worked

trickyricky26’s picture

#4 worked. much thanks drnikki!

maxasus123’s picture

thx very mutch

Ahmadaj88’s picture

Thank you very much #4 , worked for me :D

msathesh’s picture

#4 @drnikki thank you. This worked for me too:

ALTER TABLE views_view ADD is_cacheable tinyint;
ALTER TABLE views_view ADD view_php blob;
ayesh’s picture

Running an update.php sessions will fix some of the problems above, I guess.

cinetik’s picture

Title: unable to save views - error line 1722 » Update view

Sorry 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

giorgosk’s picture

Title: Update view » unable to save views - error line 1722

don't change title previous title is more general and appropriate for the whole issue
your title was very specific to your case

NickWebman’s picture

#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.