Noticed this after upgrading to 7.x-1.1 today -- happens when saving from the "Manage Display" tab on Content Types:
Notice: Undefined index: title_value in link_field_update_instance() (line 1305 of /var/www/foo/public/sites/all/modules/link/link.module)
This appears to fire once for each field regardless of whether or not it's a link. This is happening to me for content types that do not have link fields in them. The implementation of link_field_update_instance does not appear to do any testing to see if the field being modified is a link field.
This sounds similar to the bug at http://drupal.org/node/949604, but the error is happening in new code.
Comments
Comment #1
v.zhakov commentedHello!
I have the same issue.
After I have added this field, it shows twice:
(line 1305 in sites/all/modules/link/link.module)
I have Drupal 7.19.
Comment #2
facine commentedHello, attached patch.
Comment #3
jcfiala commentedA patch! Bless you. Can someone take a look at this?
Comment #4
luisortizramos commentedI've tested the patch and it seems to work.
Comment #5
peterjlord commentedThanks patch worked to me. Seemed to have occurred when I upgraded from Debian Squeeze to Debian Wheezy which is php 5.4.4-12
Comment #6
Gyver06 commentedPatch works for me too, thank you very much.
Comment #7
jneubert commentedThanks, works for me, too
Comment #8
weri commentedThe patch is working for me.
Comment #9
jcfiala commentedThanks folks, I'll try to get this into the dev branch as soon as possible, and do some more testing with i18n over the weekend to try and nail down any other problems that the latest version introduced.
Comment #10
czigor commented#2 works for me too.
Comment #11
7wonders commentedyep, works here too
Comment #12
mattlc commentedSeams to work too for me. Thanks !
Comment #13
Ted51 commentedThe notice still appears after the first "Save content type" when I create a new content type. For the others cases the patch works for me too. Thanks
Comment #14
ilrecidivo commented#2 Thanks!
Comment #15
opi#2 works great. Can't wait for this patch to be applied.
Comment #16
doitDave commentedSubscribing, please apply and roll out asap. Hopefully one day PHP will not allow uninitialized variables at all, because this is where that lazy typing stuff lead us to 8-(
Comment #17
navalogan commentedit's work for me too! thanks!
Comment #18
webadpro commentedPlease commit this patch.
Comment #19
jhodgdonI applied this patch on a site with i18n, and it works fine to remove the PHP notices, so another +1 for committing it from me.
Comment #20
g0blin79 commentedYes it works for me too! Include it in a new module version pleaze! :)
Comment #21
shaneonabike commentedWorks for me too can we not deploy this!
Comment #22
jawad.shah commentedref #2
Yes, patch works perfect.
Thanks facine.
zeropoint.IT
Comment #23
silkogelman commentedCommerce Kickstart uses Link 7.x-1.1
Got this notice when upgrading to Commerce Kickstart 2.4 right after running update.php (Drupal core 7.20)
Comment #24
ibarrajo commentedexcellent #2!
Comment #25
alexweber commentedI can haz commit?
Confirm that it works on a website (with i18n).
Thanks!
Comment #26
imagenews commentednot sure how to apply this patch, I'll need to load via cpanel because I don't know any other way, what file and where do I add this patch to? Thanks in advance.
Comment #27
herbiek commentedNot sure which permissions you have, depending on the method you want to use (manually or via command line interface) you can try following this description: http://drupal.org/patch/apply
Comment #28
alexweber commented@imagenews If you're using unix just follow these simple steps:
wget http://drupal.org/files/Fixed_title_value_in_link_field_update_instance_undefined-1914286-3.patchpatch -p1 < Fixed_title_value_in_link_field_update_instance_undefined-1914286-3.patchComment #29
maxplus commentedThanks!
#2 worked for me with current Drupal Commerce Kickstart 7.x-2.4 and Link 7.x-1.1
Comment #30
grkm2002 commenteddownloaded patch to link folder and ran the patch command. However I get "patch: **** strip count 1 is not a number"
Any help would be great. Hate having all those notices
Comment #31
alexweber commentedif the patch doesn't apply you're probably not using the latest stable release of the module.
Comment #32
jhodgdonRE #30 - you may have also used a lower-case L instead of a number 1 when you typed in the patch command in #28. It should be "patch minus lower-case-p number-one" in step 3 of #28. That is what the error looks like to me.
Comment #33
grkm2002 commentedThanks. It works. Was using a lower "L" instead of a the number 1.
Comment #34
kurtzhong commentedIt works well, thanks.
Comment #35
leanderl commentedThanks for the patch in #2! Works like a charm.
Comment #36
hedel commented@facine perfecto! gracias una vez más!
Comment #37
dimitriseng commentedI can confirm #2 resolves the issue, please commit, thank you.
Comment #38
flying dutchman commented#2 worked like a charm! Thanks @facine!
Comment #39
oana.hulpoi commentedThanks, @facine!
Comment #40
daniel wentsch commentedConfirming #2 working with i18n and domain_access. Thanks!
Comment #41
tusik commentedAfter applying patch #2 I get the following error message
Notice: Undefined index: in theme_field_ui_table() (line 256 of ../modules/field_ui/field_ui.admin.inc).
Warning: Invalid argument supplied for foreach() in element_children() (line 6370 of ../includes/common.inc).
Comment #42
Neli commented#2 worked, thanks facine.
Comment #43
gianfrasoft commented#2 worked for me too, thanks.
Comment #44
vacho commentedworks!!
Comment #45
wangqizhong commentedThanks for the patch, @facine
Comment #46
kingfisher64 commentedLovely, can this be committed asap?
Comment #47
eTech commentedApplied the patch manually and it works, thnx!
Comment #48
hswong3i commented#2 also works for me, which I had already apply it to DruStack as reference from Commerce Kickstart.
Comment #49
hswong3i commentedComment #50
jasom commentedWith #2 error disappear.
Comment #51
jaimecarrion commentedPatch worked like a charm. Thanks Alex!
Comment #52
stred commentedworked for me too!
Comment #53
jasom commented#42 #43 #44 #47 #50 #51 #52 :)
Comment #54
Anonymous (not verified) commentedworks for me too ;)
Comment #55
fayedrupal commentedThank you #2 facine, it worked
Comment #56
mxtPatch provided on #2 works very well.
Can this be committed please?
Comment #57
johantar commentedPatch provided on #2 worked for me. Thank you!
Comment #58
razkovnik commentedPatch works for me too! Cheers!
Comment #59
a.ross commentedI would prefer to test for widget type first and only then check the other conditions. But can this please be committed?
Comment #60
seyv commentedPatch in #2 fixes the annoying error. Please can this be commited?
Comment #61
raulmuroc commentedCome on!! Somebody commit it!
Comment #62
giorgosk#9 asks for i18n tests
#19, #25, #40 confirm it to be working on an i18n enabled site
I am also confirming i18n enabled site its working like a charm
please commit at least on the DEV version
Comment #63
Bison commentedIt works Indeed
Comment #64
aantonop commentedWorks on i18n with multiple enabled languages.
Comment #65
webadpro commentedI think this patch as been tested more than enough times and the dev should be committing this patch.
Comment #66
twooten commented#53 That's freakin hilarious!
Comment #67
kobee commented+1 for committing the patch.
Comment #68
kifuzzy commentedthx :) to #2 patch .. not very often have to patch and when only by hand .. it works :-) .. (like i had a message as thread opener, using drupal core 7.22)
Comment #69
elgris commentedHi!
This is my first patch, and I did it in mac terminal in a localhost beta site.
I got this message and I have to cancel because I don't know what is the best option.
--------------------------
|diff --git a/link.module b/link.module
|index 241066d..103cde6 100644
|--- a/link.module
|+++ b/link.module
--------------------------
I do this:
image_link_formatter USER$ patch -p1 < Fixed_title_value_in_link_field_update_instance_undefined-1914286-3.patch
I also get the last version of the module, because i downloaded today.
Any help?
Thanks!! have a great day!
Comment #70
facine commentedTest with: git apply -v Fixed_title_value_in_link_field_update_instance_undefined-1914286-3.patch
Comment #71
jcfiala commentedPatch merged into 7.x-1.x.
Please give the 7.x-1.x-dev version a test soon.
Comment #72
facine commentedPlease use proper attribution next time.
Comment #73
haphvn commented#2 it's works for me
many thanks
Comment #74
jcfiala commentedPlease use proper attribution next time
I used what's in the 'git instructions' tab for the module. If they want me to use other instructions, they should be linked to from there.
Comment #75
a.ross commentedtot me that commit looked good, but I'll recommend Dreditor anyway. It can create your commit messages for you from the information in a project issue.
Comment #76
facine commentedI agree, that should be included in git instructions tab...
But I recommend reviewing official Drupal documentation (http://drupal.org/node/7765), you seems to be somewhat outdated.
That same documentation also "forced" to include README.txt, CHANGELOG.txt, among other things, and debug your code in compliance with the standards. (http://ventral.org/pareview/httpgitdrupalorgprojectlinkgit-7x-1x)
In that same OFFICIAL Drupal documentation can find the link that referred to earlier: http://drupal.org/node/1146430
Anyway, thanks for maintain this module.
Comment #77
ricancie commentedHello everybody!
I have the same problem, but I have no idea how to apply a patch and no idea about git clone either (I am not an IT...). And I don't want to mess up... Is there any other way to solve the issue??
Thanks...
Comment #78
tuwebo commentedHi all,
Patch #2 is working fine for me. Thanks facine!
@ricancie you can read some doc about applying patches here https://drupal.org/patch/apply. You can download the file in comment #2 in sites/all/modules/contrib/link folder. Then go to that folder (command line) and execute
patch -p1 < Fixed_title_value_in_link_field_update_instance_undefined-1914286-3.patch.It should work. If you can´t you will probably have to wait for the next update version of the module.
Git is really good, you may want to read this tutorial http://gitimmersion.com/ it helped me a lot!
Comment #79
tgolding commentedThank you!
Comment #80
liza commentedany reason why this hasn't been committed yet? it's been almost 4 months since the patch was committed :\
Comment #81
moonray commentedSee #71. It should be committed to dev.
Comment #82
anybodyPerhaps it would make sense to release a new stable version to make this go away in the most installations? ;)
I think that would be nice, if the .dev is stable enough soon.
Comment #83
raulmuroc commentedCompletely agree with #82. A stable release would be needed because the patch was test&reviewed by community and committed long time ago.
Thank you :-) for such a nice work!
Comment #84
calbasi#28 (and, then #2) is working for me too ;-)
Comment #85
Gastonia commentedGEEZ people - unfollowing. Can we just get this committed and quit with this annoying thread of "Me Toos?"
Comment #86
a.ross commented@Gastonia: it was pretty hard to follow, but it has already been committed. :)
Next stable release should have it, whenever that will be.
Comment #87
raphar commented#2 works like a charm, thanx!
Comment #88
a.ross commented...
Comment #89
yookoala commentedHello. I'm using the 1.1 version of this module. Seems the patch is not yet applied. Any schedule to apply this patch to the release version?
Comment #90
a.ross commented7.x-1.1 was released months before this patch was committed. Either use the dev release or wait for 1.2
Comment #91
timothee.moulin commentedmore than 6 months after, the patch is not yet committed in the last version...
Comment #92
a.ross commentedI think you mean 1.2 hasn't been released yet. IMO this issue is sufficiently bad that a 1.2 release should be rushed.
Comment #93
manoloka commentedI am also confirming that 2# works in a i18n enabled site
thanks
Comment #94
ero.sante commented#2 worked for me as well. Thank you so much!
Comment #95
afoster commentedPatch #2 - working w/ Drupal 7.23 (Pressflow) + i18n 7.x-1.10
Comment #96
a.ross commentedComment #97
lee20 commentedComment #98
lee20 commentedThis is fixed in the dev version. My mistake.
Comment #99
Harald.Winzer commentedHello,
I have never seen anything like this.
Actually Drupal is a hobby and I work mainly with Unix and so on.
It worked, thanks I will remember this and will show it my local Drupal group.
This was for the Unix comand to apply the Patch.
Now everything is fine!
Comment #100
hass commentedAre you going to create a new release soon, please?
Comment #101
dr.osd commented#2 worked for me. Thank you!
Comment #102
mayan62 commentedHello
I am a beginner in Drupal and dont know where to add the patch, i have the same issue and want to fix it. Can somebody tell me where exactly ( file and Place in the file) i need to add it?
Thanks a lot Susanne
Comment #103
anybodyI don't think this is fixed in the latest .dev release, because the last release is 5 month ago. Furthermore this should be considered for a new stable release, I think. Could a maintainer have a look?
Comment #104
anybodyMy mistake. It is truely fixed. Here's the link to the commit:
http://drupalcode.org/project/link.git/commit/a464e9d
So it would make sense to create a new stable release perhaps.
Everyone who has a problem with the current stable version should test the current .dev though instead of using the patch (as answer to question #102 by mayan62 above).
Comment #105
hass commentedComment #106
a.ross commentedComment #107
jcfiala commentedSorry folks - balancing work, parenthood, and drupal has not been entirely successful. I'm going to put some time in and try to get a new release out soon - at the moment I'm trying to figure out where I am in the project currently and where to go next.
As always, testing and marking tickets reviewed & tested by community helps!