0

I was looking in the error logs, and I realized that users cannot view submissions of webforms. I then realized that the webform views webform_analysis, webform_results, and webform_submissions were missing when looking at /admin/structure/views.

For reference, the code that errored out is in views/includes/admin.inc line 2117:

$test = views_get_view($view->name);
if (!$form_state['values']['name_override']) {
  if ($test && $test->type != t('Default')) {
    form_set_error('', t('A view by that name already exists; please choose a different name'));
  }
}
else {
  if ($test->vid) {            // ERROR HERE ($test is NULL)
    $view->vid = $test->vid;
  }
}

If I look on my development environment, they are there on that page. In addition, they are there in both development and production on the file system (the default views files are there, like webform\views\default_views\webform_analysis.inc and so on) and the webform module is enabled. I imported the views as a temporary fix. On production it says the views are in the "Database", while in dev it says "Database Overriding Code" after importing, while before it said "In Code".

I looked at a DB backup in dev from before I imported, and I do not see the issue I see in production. The views are there.

What could cause those (and only those 3) default views to suddenly be completely missing "in code" despite the files being there? And is there a way to get them back to being "in code" rather than in the database (since that's where they are after I imported them)?


Update: I don't have the problem anymore. Perhaps restarting PHP or nginx fixed it? I really have no idea. If anyone experiences the problem and can figure it out, definitely enlighten us.

  • Comparing to a t-string looks really odd to me. Why are you doing this? – leymannx Aug 9 at 16:53
  • This is in the views module source code. The error simply shows that is must not be finding the views. – mbomb007 Aug 9 at 21:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.