After installation of document, I click configure for the module configuration and the following error appears:

Warning: Parameter 1 to document_search_form() expected to be a reference, value given in drupal_retrieve_form()

The same error occurs when clicking Document from the home link

Comments

tim.hidalgo’s picture

Here is the error with file path

Warning: Parameter 1 to document_search_form() expected to be a reference, value given in drupal_retrieve_form() (line 770 of /Applications/MAMP/htdocs/drupal-7.2/includes/form.inc).

r_honey’s picture

Component: Documentation » Code
Assigned: Unassigned » r_honey
Status: Active » Needs review

Hmmm... I could not produce this issue in my testing, but I have committed a fix.

Can you please update from git or wait for 12 hours for the dev release to be re-build and then try again??

tim.hidalgo’s picture

Updated code, still throwing the error:

Error message
Warning: Parameter 1 to document_settings_form() expected to be a reference, value given in drupal_retrieve_form() (line 770 of /Applications/MAMP/htdocs/drupal-7.2/includes/form.inc).

tim.hidalgo’s picture

I also receive the following message when following: home->add content->document

Error message
Notice: Undefined property: stdClass::$nid in document_form() (line 171 of /Applications/MAMP/htdocs/drupal-7.2/sites/all/modules/document/document.module).

r_honey’s picture

Status: Needs review » Fixed

Hi tim, both of your issues should be fixed now. Either clone from git or wait 12 hours for the dev release to re-build.

slimandslam’s picture

I just cloned git (11:45pm CST, June 29th) and I still get this error:

"Warning: Parameter 1 to document_moderate_form() expected to be a reference, value given in drupal_retrieve_form() (line 772 of /funsite/includes/form.inc)."

Drupal 7.4

-J

r_honey’s picture

Hi, this is a confusing, if you check line 131 here:
http://drupalcode.org/project/document.git/blob/refs/heads/7.x-1.x:/docu...

you will see that the first parameter to document_moderate_form is a reference, can you please try downloading the latest dev release snapshot and try against it (clear your caches after updating the code).

Argus’s picture

Downloaded latest dev, after installing going to http://testsite/admin/structure/document I get:

Warning: Parameter 1 to document_settings_form() expected to be a reference, value given in drupal_retrieve_form() (line 770 of /var/aegir/drupal-7.2/includes/form.inc).

Christopher Riley’s picture

I just installed the module and as soon as I go to the configure screen I get the same error.

Snicers’s picture

I am getting the exact same error.

x86asm’s picture

I had the same error. I just changed line 5 of document.admin.inc from:

function document_settings_form(&$form_state) {

to:

function document_settings_form($form_state) {

The parameter isn't even used and no complaints were raised. It seems to be working fine for me now.

x86asm’s picture

And the same change on line 5 of document.search.inc.

tshakah’s picture

Also getting the same error, changing the line fixed it.

Status: Fixed » Closed (fixed)

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