Closed (fixed)
Project:
Google Fonts
Version:
7.x-1.4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
14 Dec 2010 at 17:55 UTC
Updated:
10 Jan 2011 at 08:00 UTC
When I go to the configuration page I get the following error and nothing else is displayed:
Warning: Parameter 1 to google_fonts_admin_settings_form() expected to be a reference, value given in drupal_retrieve_form() (line 766 of /home/username/public_html/includes/form.inc).
Thanks
Comments
Comment #1
BarisW commentedThanks for reporting, I'll have a look. I figure something has changed with Drupal7 since the release of 7.x-1.2 that broke this.
Comment #2
Aonoa commentedI'm experiencing this as well on D7 RC2 and latest google_fonts-7.x-1.x-dev.
Best regards,
Ao
Comment #3
BarisW commentedFixed in 7.x-1.3, thanks!
Comment #4
Aonoa commentedThank you, but is the 7.x-1.3 archive supposed to only contain the module file?
Best regards,
Ao
Comment #5
BarisW commentedSee #1003754: 7.x-1.3 - missing info file, I made a mistake with the release. Apologies, I've added a new one!
Comment #6
Aonoa commentedI am still getting this error with 7.x-1.4. To be sure, I re-installed D7 RC2 and installing/enabling this module was the first thing I did afterwards.
Best regards,
Ao
Comment #7
Aonoa commentedI can add that opening the "Add rules" tab gives this error as well:
Warning: Parameter 1 to google_fonts_ui_admin_settings_form() expected to be a reference, value given in drupal_retrieve_form() (line 766 of /var/www/example.com/demo/includes/form.inc).
Best regards,
Ao
Comment #8
jerrac commentedSame thing in 7.x-1.4. Fresh install of D7 RC3.
Comment #9
jerrac commentedOk, I'm a bit confused... In google_fonts.admin.inc I changed:
function google_fonts_admin_settings_form(&$form_state)To:
function google_fonts_admin_settings_form($form_state)And it shows the forms correctly.
Which shouldn't be correct since http://api.drupal.org/api/drupal/modules--node--node.api.php/function/ho... says to pass form_state by reference...
Same story for google_fonts_ui_admin_settings_form($form_state) in google_fonts_ui.admin.inc
Comment #10
izus commentedhello world
I just tested the module on drupal 7 rc 3 and got the same error:
Warning: Parameter 1 to google_fonts_admin_settings_form() expected to be a reference, value given in drupal_retrieve_form() (line 771 of /path/drupal7rc3/includes/form.inc).
Comment #11
BarisW commentedHmmm, strange. Even with all errors on (php settings) I am getting no errors.
However, I see that in Drupal 7, form functions expect a $form AND &$form_state.
For example: http://api.drupal.org/api/drupal/modules--comment--comment.admin.inc/fun...
So I think that if I change
function google_fonts_admin_settings_form(&$form_state) {}tofunction google_fonts_admin_settings_form($form, &$form_state) {}the error is gone. Same goes for google_fonts_ui_admin_settings_form
Would you please test if this works for you?
Comment #12
Aonoa commentedIndeed, it works when set to the following in google fonts and google fonts ui:
function google_fonts_admin_settings_form($form, &$form_state) {}Thank you.
Best regards,
Ao
Comment #13
serg2 commentedRunning RC3:
I had the warning on the Config page and was unable to use the module.
When adding "$form, " the module works and warning disappear.
This is a really nice module, now i have to pick my fonts!! :)
Comment #14
BarisW commentedFixed in 7.x-1.5. Thanks for helping me on this bug!