I have exported my views to code. However, whe I try to override them (Edit and Save), the following error appears:
PDOException: in views_db_object->save_row() (line 2224 of \views\includes\view.inc)

In the 'recent log messages', the same error appears twice at the same time: once as type 'php', once as type 'views'.

I can't circumvent by cloning and saving the view, either.

Comments

johnv’s picture

Issue summary: View changes
johnv’s picture

Status: Active » Closed (works as designed)

I saw there was an update call and an insert call, hence the 2 messages.

After updating to current dev-version (7.x-3.7+14), the error has gone.

johnv’s picture

Status: Closed (works as designed) » Active

Nope. still occurs.
When I clone a view with 3 displays (including master display), all goes well: 1xinsert views_view (without field vid), 3xinsert views_display (with field vid)
When I edit & save an 'view in code', I get 1xinsert views_view (without field vid), 1xupdate views_display(with field vid).
The update generates the PDOxception.
Sometimes I get 1xinsert views_view + 1xinsert views_display (which seems OK), but still generates the error.

flocondetoile’s picture

Hi,

I met the same issue in exactly the same conditions. Have you found the reason of this ?

I have to delete my views in code and import them in views UI to be able to update them.

johnv’s picture

Hi flocondetoile, no, I haven't found reason or solution, yet.

johnv’s picture

Version: 7.x-3.6 » 7.x-3.7
Status: Active » Closed (duplicate)
Related issues: +#1123198: Error message when modifying filter criteria/saving View

IMO the problem is with the cache_views table, which is a copy/add-on of views_view and views_display. Apparently, cache_views is not properly emptied on cache flush. (Normally I use 'Flush all caches' from admin_menu. An alternative is /admin/config/development/performance )
One of my sites is now working properly after leaving it untouched for the holidays.

#1123198: Error message when modifying filter criteria/saving View contains code to circumvent this.