1 (edited by carlo_politi 28-07-2015 13:07:59)

Topic: "Option fieldname not found" error

Good day... today a client of mine reported this error in all pages of submit observations:

    Notice: Undefined index: fieldname in get_user_profile_hidden_inputs() (line 300 of /var/www/drupal-7.36/sites/all/modules/iform/client_helpers/prebuilt_forms/includes/form_generation.php).
    Notice: Undefined index: fieldname in get_user_profile_hidden_inputs() (line 300 of /var/www/drupal-7.36/sites/all/modules/iform/client_helpers/prebuilt_forms/includes/form_generation.php).
    Notice: Undefined index: fieldname in get_user_profile_hidden_inputs() (line 300 of /var/www/drupal-7.36/sites/all/modules/iform/client_helpers/prebuilt_forms/includes/form_generation.php).
    Notice: Undefined index: fieldname in get_attribute_html() (line 76 of /var/www/drupal-7.36/sites/all/modules/iform/client_helpers/prebuilt_forms/includes/form_generation.php).
    Notice: Undefined offset: -1 in get_attribute_html() (line 77 of /var/www/drupal-7.36/sites/all/modules/iform/client_helpers/prebuilt_forms/includes/form_generation.php).
    Notice: Undefined offset: -2 in get_attribute_html() (line 79 of /var/www/drupal-7.36/sites/all/modules/iform/client_helpers/prebuilt_forms/includes/form_generation.php).

Option fieldname not found

Nothing else is shown... i tried to create a new Indicia page but nothing changed... i get only these errors...

Any idea what could be? Thanks

Carlo Politi - Software Engineer
QuestIT s.r.l.
Home page: www.quest-it.com
E-Mail: politi@quest-it.com - Skype: carlo.politi.questit

2

Re: "Option fieldname not found" error

Hi Carlo,

If these pages did work and have now stopped working, what was changed?

If that question cannot be answered then it may be helpful to inspect the attributes that are causing the error.

I'm guessing that code execution is aborted when you hit the exception in form_generation.php around line 82. You could try to get more information by changing

throw new exception('Option fieldname not found');

to

throw new exception('Option fieldname not found for attribute ' . print_r($attribute, TRUE);

Jim Bacon

3

Re: "Option fieldname not found" error

I get this:

Array (
[caption] => Tipo di segnalazione
[outer_structure_block] => Other Information
[inner_structure_block] =>
[data_type] => L
[control_type] =>
[termlist_id] => 4
[multi_value] => f
[website_id] => 2
[restrict_to_survey_id] => 2
[signature] => 27|L|4
[default_text_value] =>
[default_int_value] =>
[default_float_value] =>
[default_date_start_value] =>
[default_date_end_value] =>
[default_date_type_value] =>
[validation_rules] =>
[deleted] => f
[website_deleted] => f
[restrict_to_sample_method_id] =>
[system_function] =>
[id] => smpAttr:27
[untranslatedCaption] => Tipo di segnalazione
[default] =>
[attributeId] => 27
)

Carlo Politi - Software Engineer
QuestIT s.r.l.
Home page: www.quest-it.com
E-Mail: politi@quest-it.com - Skype: carlo.politi.questit

4

Re: "Option fieldname not found" error

For the record, Carlo resolved this himself by restoring data_entry_helper.php from a backup.