When browsing the non-admin portion of my site, I have encountered a near WSOD page that states that an error has occurred. It provides no information about the error.

The Drupal log lists the following:

PDOException: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined: SELECT ml.has_children FROM {book} b INNER JOIN {menu_links} ml ON b.mlid = ml.mlid WHERE b.nid = :b.nid; Array ( [:b.nid] => 1 ) in _outline_child_pages_access() (line 65 of /Users/Bob/Sites/LuthierBuilt/LuthierBuilt-SUP/docroot/sites/all/modules/contrib/outline_designer/modules/outline_child_pages/outline_child_pages.module).

On disabling Outline Child Pages, browsing returns to normal behavior.

Note that the site in question is in the final stages of being upgraded from a source D6 site, and the D6 site made frequent use of Outline Designer and nested book pages. I.e., that content is in place and accessible in the new D7 site.

Please advise and thanks for your help,

Bob

Comments

btopro’s picture

Version: 7.x-2.0-alpha2 » 7.x-2.x-dev
Priority: Normal » Major

patches for this and moving outline designer beyond an alpha state are always welcome, don't have a lot of time for this project at the moment with semesters starting up soon.

Anonymous’s picture

I'd love to provide you a patch. Unfortunately, I am strictly a site builder, meaning I have zero PHP chops to bring to the table.

shaneforsythe’s picture

I changed

$has_children = db_query('SELECT ml.has_children FROM {book} b INNER JOIN {menu_links} ml ON b.mlid = ml.mlid WHERE b.nid = :b.nid', array(':b.nid' => $node->nid))->fetchField();

to

$has_children = db_query('SELECT ml.has_children FROM {book} b INNER JOIN {menu_links} ml ON b.mlid = ml.mlid WHERE b.nid = :nid', array(':nid' => $node->nid))->fetchField();

and it fixes the problem ie change :b.nid to :nid in two places
this is on line 65 of outline_designer/modules/outline_child_pages/outline_child_pages.module

btopro’s picture

Status: Active » Fixed

latest RC release fixes this

Anonymous’s picture

Thanks!

Status: Fixed » Closed (fixed)

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