When I click on an issue (my first and only issue), I get this error:

Fatal error: Cannot use object of type stdClass as array in /sites/all/modules/project_issue/includes/issue_node_form.inc on line 117

Comments

dww’s picture

Category: bug » support
Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

I can't reproduce this, neither creating a new issue, previewing a new issue, editing an existing issue, or previewing the edit of an existing issue. In all cases, $form_state['node'] really is an array, as the code expects. I'm on PHP 5.2.

Can you please provide more details about your environment and steps to reliably reproduce the error? Otherwise, I can't really help you.

Cheers,
-Derek

drupalshrek’s picture

StatusFileSize
new31.29 KB

I'm on
* PHP Version 5.2.6
* Apache 2.0 Handler

See attachment for a screenshot of where I click to make it happen.

I'm working with a fresh install of your module.

I am a programmer so maybe able to help a bit, but I don't know Drupal too well.

drupalshrek’s picture

StatusFileSize
new30.72 KB
new31.15 KB

I've thrown a few "watchdog" statements into the code:

// In the case of an issue preview, get our defaults from the submitted form.
  // TODO: do we want to #tree our form so we don't need this hack?
  if (isset($form_state['node'])) {
  	watchdog("_project_issue_form()", "defaults=$defaults");
    foreach ($defaults as $default) {
      watchdog("_project_issue_form()","default=$default");
      if (isset($form_state['node'][$default])) {
        $node->project_issue[$default] = $form_state['node'][$default];
      }
    }
  }

And I notice that the array index doesn't seem to be a numeric but instead "rid" (see attachment). Is that what's happening?

I see too that the URL is not numeric (see other attachment). Is that as planned?

Hope this helps.

johne’s picture

Version: 6.x-1.0-alpha4 » 6.x-1.0-alpha5
Category: support » bug
Status: Postponed (maintainer needs more info) » Active
StatusFileSize
new9.58 KB

I'm seeing this exact same problem with 6.x-1.0-alpha5 (and did with alpha4). To get around the WSOD, since this code seems to set some defaults, for now I've commented out lines 114-122 of includes/issue_node_form.inc
Just trying to view an existing issue, saving a new issue, etc. creates this problem. However, at one point this module worked fine for me. So, I tried tracking back to see what the difference was.

We're rendering the issue in a panel (I've attached the panel variant export). If I disable this the issue node displays fine. Testing further I found it was the content pane "node being viewed comment form" that's causing the problem. if I disable just that pane, everything is fine.

BTW, I changed status and category of this ticket.

johne’s picture

Version: 6.x-1.0-alpha5 » 6.x-1.x-dev

Since there was no link to download a dev version I didn't think to try it. Just did and I see the same issue exists in HEAD.