When added to a profile entity (http://drupal.org/project/profile2), the $settings variable from the form_state is null. This patch will run field_info_instance if the form_state settings are null to ensure that settings are always loaded.

Comments

yched’s picture

Side note : Field API D7 has really simplified the widgets API, and the convoluted #process construct typically used in CCK D6 widgets is no longer required.

dqd’s picture

Version: 7.x-1.0-alpha3 » 7.x-1.x-dev
Status: Needs review » Needs work
+++ b/link/link.module
@@ -553,6 +553,12 @@ function _link_default_attributes() {
   $element['url'] = array(
     '#type' => 'textfield',
     '#maxlength' => LINK_URL_MAX_LENGTH,
@@ -867,4 +873,4 @@ function link_content_migrate_instance_alter(&$instance_value, $field_value) {

@@ -867,4 +873,4 @@ function link_content_migrate_instance_alter(&$instance_value, $field_value) {
       && $instance_value['widget']['type'] == 'link') {
     $instance_value['widget']['type'] = 'link_field';
   }
-}
\ No newline at end of file
+}

Regarding to this \ No newline at end of file and to the info of yched I sadly have to wake up this old dog. (needs work)

Sorry, I only maintain link module since the very end of Sommer 2011 and found this dusty patch tonight by cleaning the isseu queue. Reroll Anyone?

jyee’s picture

StatusFileSize
new658 bytes

Wow, I'd completely forgotten about this issue. I've attached a reroll without the newline junk at the end... but since the patch was for alpha3, I'm not sure how cleanly it will apply to the latest dev.

dqd’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)

I'll close this issue due to inactivity for 12 years and upcoming EOL of Drupal 7 in January 2025. While the project version for Drupal 7 will keep providing support for security issues and website breaking bug fixes for Drupal 7, we should try to minimize the open issues for Drupal 7 in the queue as much as possible. Thanks for the report and all the efforts in here. Feel free to re-open if you can provide a fix or found an additional related problem which increases the issue priority to "Critical" here.