On the first page load of /project/drupal/issues, on a new and recently built drupal.org site, I received the following notice ... subsequent page loads did not exhibit the same behaviour:

Notice: Undefined index: in template_preprocess_project_issue_issue_link() (line 749 of sites/all/modules/project_issue/project_issue.module).


This was using the 7.x-2.x-dev version, with datestamp "1358214051" (packaged on 2013-01-15).

UPDATE: As mentioned in comment #2, I have a project_issue node in my dev site database with no metadata set. This results in PHP notices and the issue not appearing in the issue view.

Comments

jthorson’s picture

Title: Undefined index on first load of new drupal.org dev site » Undefined index on first load of issue listing after cache clear of new drupal.org dev site

Reproducible one time after each cache clear.

jthorson’s picture

Title: Undefined index on first load of issue listing after cache clear of new drupal.org dev site » Project Issue node on recent drupal.org dev site missing data, causing PHP notices.

Turns out, the undefined index error was due to an issue with no 'status' set ... In this case, node/1926294.

Visiting that page gives the following errors:

Notice: Undefined index: und in project_issue_preprocess_page() (line 683 of /var/www/dev/pift-drupal_7.redesign.devdrupal.org/htdocs/sites/all/modules/project_issue/project_issue.module).
Notice: Trying to get property of non-object in project_issue_set_breadcrumb() (line 674 of /var/www/dev/pift-drupal_7.redesign.devdrupal.org/htdocs/sites/all/modules/project_issue/project_issue.module).

Looking at the node object, $vars['node']->field_project is empty. As a result, $project does not resolve to anything, and the call to project_issue_set_breadcrumb() is not passed a project.

Not sure what caused the data corruption / missing data, but leaving this open with a new title to track.

jthorson’s picture

Issue summary: View changes

Updating issue summary

drumm’s picture

Assigned: Unassigned » drumm

DB reduction doesn't touch field_data_field_project, and the same error happens at http://git7site.devdrupal.org/node/1926294, so there is a decent chance it is a bug in the upgrade path.

drumm’s picture

Status: Active » Needs review

The cur_pid used from project_issue_migration_timeline is null: SELECT t.cur_pid FROM project_issue_migration_timeline t INNER JOIN node n ON n.vid = t.vid WHERE t.nid = 1926294;

project_issue_migration_timeline is populated in three passes: initial revision, other revisions, and comments. The second pass doesn't include pid handling. I think http://drupalcode.org/project/project_issue.git/commitdiff/ff011c9?hp=a3... will fix it up. We'll see on Thursday after a new upgrade starts.

drumm’s picture

Status: Needs review » Fixed

The notice is gone on http://7.devdrupal.org/node/1926294, and git7site will follow once it gets an updated DB.

drumm’s picture

(The snapshot process will be done in 6 hours, so fresh dev sites can have it then.)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Updating issue summary