Fatal error: Call to a member function validate() on a non-object in /var/www/vhosts/XXX.com/httpdocs/sites/all/modules/views/includes/admin.inc on line 895

When adding a feed display, you see "Missing style plugin", but you can fix it. However, when you click "Save" above error occurs. Site breaks.

Version 6.x-2.6
Drupal 6.13

Comments

Anonymous’s picture

The included frontpage2 view has a pre-made Feed display. It works. But when you edit it and save that view, again the above error also occurs. All caches were cleared before testing this.

Anonymous’s picture

Status: Active » Needs review

The problem seems to be APC cache on my web server! This APC, I think, caches the Views form, but loses some data in the process. Not good, deactivating APC for now. Does someone have the same experience?

merlinofchaos’s picture

Status: Needs review » Active

needs review means there is a patch.

Anonymous’s picture

Status: Active » Closed (fixed)

Problem solved, this was the reason (my own fault):

I was experiencing problems with APC cache and some imagefield forms, so I built a custom module with:

/*
 * Cache forms, due to APC cache on server
 */
function mt_custom_form_alter(&$form, $form_state, $form_id) {
	$form['#cache'] = TRUE;
}

Thinking this would solve my problem, it breaks the inner workings of Views. It was related to this http://drupal.org/node/500646

digi24’s picture

Title: Cannot save Feed display, breaks » Cannot save View, breaks on validate
Version: 6.x-2.6 » 6.x-3.x-dev
Status: Closed (fixed) » Active

I am reopening this issue, although I do not know, who the culprit is. The combination of views and imagefield isn't that rare. Is anyone else experiencing these issues? I would like to find out, at which point to address this problem.

My observations:
1. Right now, imagefield does not work reliably without the cache set to true as mentioned in #500646: An unrecoverable error occurred. Form missing from server cache.

2. I actually do not see the connection to APC, I guess people are referring to the general caching mechanisms in Drupal. Excluding the probably relevant views files (views_ui, views/includes/admin.inc) from APC did not solve the problem.

3. Inserting debug output into imagefield_module_alter does not show that it is called before saving a view.

4. Reloading the error page multiple times successfully saves the view. This may be related to the spawning of a new php process or hitting a certain cache

digi24’s picture

Component: feed displays » Code
dawehner’s picture

Status: Active » Closed (duplicate)

Thanks