Closed (won't fix)
Project:
Link
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Jun 2010 at 15:07 UTC
Updated:
14 Nov 2019 at 11:23 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
shawn dearmond commentedI'm getting this error too. In fact, when I first create a node with a link value, I get these three errors:
Comment #2
shawn dearmond commentedPatch fixed the issue in dan_liip's description.
Comment #3
nasa51 commentedApply patch from module directory
Comment #4
drewish commentedI don't think that patch is right. The $element variable is not used elsewhere in the function and not passed in as a parameter so it'll never be set and the code will never be executed. My guess is that the function used to get $element passed in and referred to the item as $element['#item']. At some point all the other references were changed but this one.
Comment #5
drewish commentedShawn DeArmond, i think the easiest way to fix your notices is to edit and resave the link fields on your nodes.
Comment #6
damienmckennaHere are two updated patches that cover other logic flaws through the module, one patch for v6.x-2.9 and one for the lasted DRUPAL-6--2 branch.
There's one remaining error that shows when the title field is disabled, upon saving the node the following error is displayed:
Notice: Undefined index: title in content_storage() (line 1071 of /sites/all/modules/contrib/cck/content.module).Comment #7
rbayliss commentedFor the undefined index: title, how about this?
Comment #8
naxoc commentedSubscribe
Comment #9
jonthomas83 commentedHi guys, there's so many patches on here, I was wondering if someone could point me in the right direction to the correct patch that will definitely solve this issue.
Any news on whether this will be ported into a new stable release of the module?
Comment #10
caktux commentedsubscribe
Comment #11
mikeytown2 commented@jonthomas83
#6 is the patch I'm using.
#6 is RTBC
Comment #12
jonthomas83 commentedthanks mikeytown2, much appreciated.
Comment #13
coltraneThere's also a notice in link.inc
Line 171 is referencing variable $element when it's not defined the that function that I can tell.
Edit: Oh, 2.x-dev patch in #6 handles this notice. +1 to #6 being RTBC.
Comment #14
srjoshMy experience with this is not quite RTBC, sadly. 2.9 patch fixed nearly all notices, but I am still getting:
Notice: Undefined index: validate_url in _link_sanitize() (line 395 of .../sites/all/modules/link/link.module)I'd rewrite the patch but I'm not sure exactly what that section is attempting to do.
Comment #15
esteewhy commentedAgree with @srjosh (14): patch didn't solve at least one notice in 2.x-dev
Comment #16
drewish commentedI found many of the warnings could be solved by editing and saving the widget and field settings.
Comment #17
damienmckenna@drewish: re-saving the settings won't fix small logic bugs in the code.
Comment #18
balabushka commentedThis is still active - waiting for a new release.
Comment #19
lambic commentedAny chance of getting a new release out soon to fix these notices?
Comment #20
wojtha commentedRerolled patch from #6 against current dev and bit extended.
Comment #21
wojtha commentedPatch in #20 is wrong during merge I probably accidentally change the line endings, so once again:
Rerolled patch from #6 against current dev and bit extended.
Comment #22
wojtha commented#1225690: PHP notice in _link_sanitize function marked as duplicate of this issue.
Comment #23
mikeytown2 commentedI did a simple merge of the patches from #21 and #6. Applies to the latest dev.
I also attached a fixed version of #21 as this patch didn't work for me.
Comment #24
d.clarke commentedThe patch in #23 (link-830432-23.patch) resolved the notices I was receiving. Can someone else confirm as well and then mark it as reviewed and tested by the community?
Thank you for everyone's work on this.
Comment #25
dqd++
Comment #26
13rac1 commentedNotices I was receiving were fixed by saving the fields again as described in #16. It seems some new settings were missing. Probably should be corrected in a install update function.
Notice: Undefined index: title in _link_sanitize() (line 495 of /var/www/sites/all/modules/contrib/link/link.module).Comment #27
dqdthanks for all your contribution and sorry for treating v6 as an orphan over the last weeks.
We had to hurry up with the d7 port, that's why. There was and is still a lot to do and so I jumped in the boat and got assigned to it to help / catch up getting ready for final d7 release. And I try as much as I can. Also with certain severity by stopping time wasting goose chases in the issue queue. (Not here) The custom link field module is an important contribution to Drupal custom fields I couldn't imagine to make any custom content type without it, and Jcfiala did awesome work already to make that happen. And thanks to many patch submissions we are close before final 7.
I will try to commit your contributions asap.
Comment #28
joedag32 commentedSaving the fields as in #16 worked for me as well.
Comment #29
csmiller commentedJust updated this module to 7.x-1.0-beta1 this morning and this error has appeared. (Notice: Undefined index: title in _link_sanitize() (line 495 of /home4/diamons0/public_html/sites/all/modules/link/link.module). I tried re-saving all of my link titles and URLs but the message persists.
Addition: I changed the widget settings in Content Types, and the messages are no longer present. Should have read comment #16 more closely :-)
Comment #30
dqdweird .. we need to flush this somehow ... I try to get some time for it next days ... I am sure it is something stupid like resetting a var ...
! EDIT:
Uhm ... but wait .... But U know that you are in a v6.x issue thread? Dont' you? right? :)
Comment #31
bulat commentedI have the same issue as @csmiller.
Comment #32
paulbeaney commentedThe cure in #16 works perfectly for the 7.x-1.0-beta1 release as well.
- paul
Comment #33
prston commentedApparently, it doesn't work if the link field already has some content inside. Just doing the #16 doesn't do anything in my case. I removed all nodes using this field (I can do it freely, it's a dev. version), then applied the #16 procedure and... magic, it worked. No need to mention that if you have plenty of content, it's a *bit* annoying :D@csmiller,
@paulbeaney:
Searching further brings me another errors, especially in the Views 'auto preview'.
So apparently the #16 doesn't fix everything on 7.x-1.0-beta1 (sorry, I just see we are on a 6.x issue).
Comment #34
okokokok commented@prston 7.x-1.x-dev (Sep-27) got rid of the warning on my site.
@Digidig I suggest releasing 7.x-1.0-beta2.
Comment #35
acbramley commented#16 actually worked for me! cheers
Comment #36
Prasad Shir commentedEditing & re-saving fields as described in #16 indeed worked for 7.x version
Comment #37
renat commentedFaced the same problem as in #29 (on D7 site, of course). Upgrade to link-7.x-1.x-dev (Sep-27) solved this, just like in #34.
Comment #38
alltooeasy commentedNotice: Undefined index: title in _link_sanitize() (line 495 of
So for D7 what is the suggested solution. Apologies this is in D6 thread was unable to find a D7 thread for it.
We have an aweful lot of fields to edit if that is the method. Any suggestions?
Comment #39
bschilt commentedthe solution in comment #16 worked for me.
These errors started happening to me when I upgraded to Link 7.x-1.0-beta1. I went into the Manage Fields for each of my custom content types and edited each filed and saved it without changing anything. The _link_sanitize() message I was getting is now gone.
Comment #40
renat commented@alltooeasy, you can upgrade Link module to latest -dev version, that helped me without editing any fields or widgets.
Comment #41
camorim commented#16 also worked for me. As I had only a few content types it was quick.
Hope it get's fixed on the next release.
Comment #42
dqdfolks, please ... 6.x only here!
( btw, link_sanitize() d7 issue has already to closed /dup and fixed issues )
Comment #43
dqdComment #44
lauggh commented#23 link-830432-23.patch worked for me only when I switched to the dev version of link module.
Comment #45
chromix commentedThis has been opened for a while and I'm kind of surprised no one has committed a fix for it. I tried #23 and it worked, but now I'm getting a different error:
Notice: Undefined index: title in content_storage() (line 1031 of drupal/sites/all/modules/contrib/cck/content.module).This is on a field with a static title. I went ahead and changed the CCK module and it fixed the problem. I posted a solution on CCK #1034428, so maybe we can assume the error isn't happening because of a problem with Link...? Not sure, based on what I saw.
Comment #46
drzraf commentedbug still present and patch does not apply anymore
anyway, I can't reproduce the notice using 6.x-2.x, but with 6.x-2.9 only.
Instead I got a
but after a clear-cache, using
6.x-2.xI confirm that I can't reproduce the notice.Comment #47
doitDave commentedSubscribing to the original issue, 6.x-2.9 here. Please don't forget the D6 branch yet. Thx!
Comment #48
strawberrybrick commentedNote, had constant following errors from every page upon update to 6.x-2.10
Comment #49
strawberrybrick commentedNote, had constant following errors from every page upon update to 6.x-2.10
call_user_func_array() expects parameter 1 to be a valid callback, function 'theme_link_formatter_default' not found or invalid function name in ..../includes/theme.inc on line 669.however, clearing the site cache seems to have fixed issue.
Comment #50
mikeytown2 commented#23 re-rolled against the latest dev. Note that without this patch I do not get any php notices so I'm not sure if any of this is needed.
Comment #51
dqd@jcfiala: can you chime in to look for the patch? Sry, I am not deep enough into link v6 code ATM and would love to see this fixed to clean up the issue queue.
Comment #52
damienmckennaThank you all for your efforts, but I'm sorry to say that the D6 version is no longer supported.
Comment #53
damienmckennaComment #54
dqdThanks for cleaning up the issue queue, Damien. Greetings from Berlin. *waves*
Comment #55
dqdposting error