Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Notice: Undefined index: tid in hs_taxonomy_field_formatter_prepare_view() (line 402 of /modules/contrib/hierarchical_select/modules/hs_taxonomy.module).
Comment | File | Size | Author |
---|---|---|---|
#24 | 1.jpg | 67.67 KB | SkyFlame |
#22 | hierarchical_select-fix_selection_keys-2719141-22-7.x-3.x-dev.patch | 514 bytes | skylord |
#21 | hierarchical_select-fix_selection_keys-2719141-21-7.x-3.x-dev.patch | 537 bytes | skylord |
#20 | undefined_index_tid_in-2719141-20.patch | 778 bytes | Anas_maw |
#19 | undefined_index_tid_in-2719141-19.patch | 1.45 KB | sylus |
Comments
Comment #2
NancyDruReverting to beta3 solved the problem.
Comment #3
madan879 CreditAttribution: madan879 at Clarion Technologies commentedComment #4
madan879 CreditAttribution: madan879 at Clarion Technologies commentedHi @NancyDru,
I have checked 7.x-3.0-beta4 version as you mentioned issue. But I am not getting any error messages.
Could you please elaborate the scenario, how to got this issue. That will helpful to trace this issue and I will try to fix it..
Thanks
Comment #5
NancyDruI believe it was caused by a Rule that sends an Views email. I'll try to get more info from the guy who wrote it.
Comment #6
sistro CreditAttribution: sistro commentedI've got same issue, reverting to beta3 fixed also for me.
I don't know if I understand what you mean, but I'm using Rules too but i've got this error in a view without any rules.
Comment #7
NancyDru@sistro: Okay, maybe it's just a Views thing. Can you post your view, please, so the developer can test with it?
Comment #8
balajidharmaAble to replicate issue in Classified advertising distribution.
Comment #9
d0t101101 CreditAttribution: d0t101101 commentedI have just hit this bug too after upgrading from 7.x-3.0-beta2 to 7.x-3.0-beta6. May be rolling back to beta3 as a workaround. I've been unable to figure out when/where it occurs yet, seems intermittent, but will report any discovered details here.
Thanks!
Comment #10
JudyPJHsu CreditAttribution: JudyPJHsu commentedI'm on 7.x-1.0 and am getting the exact same error.
Comment #11
d0t101101 CreditAttribution: d0t101101 commented@catch & @stefan.r:
Fairly certain this patch introduced this problem with every version beyond beta3 (not sure about previous versions!). Initially the views which exhibited the issue in my DEV environment had time based caching enabled, which explains why it happened intermittently. After disabling views caching, I got this error consistently.
My temporary solution is to check that a tid is set in hs_taxonomy.module before continuing, like so:
I haven't seen any side effects of this, but can someone with deeper knowledge of this module, taxonomy and views please have a look?
.
Comment #12
d0t101101 CreditAttribution: d0t101101 commentedPatch attached.
Comment #13
d0t101101 CreditAttribution: d0t101101 commentedComment #14
NancyDruWith beta7:
The above patch makes no difference.
Comment #15
NancyDruThis is happening during node_save(). My code for invoking that is:
Comment #16
stefan.r CreditAttribution: stefan.r commentedDoes the patch in #12 fix this?
Comment #17
NancyDruNope, sorry.
Comment #18
travelvc CreditAttribution: travelvc commented[EDIT]
Sorry I have changed my position on this.
The patch in #11 doesn't work for me. When the cache is cleared the error returns even with the suggested fix from #11.
Comment #19
sylus CreditAttribution: sylus commentedAttaching an updated patch that applies for me.
Comment #20
Anas_maw CreditAttribution: Anas_maw at Vardot commentedPatch #19 does not works for me.
The main issue that this commit change the array index which will not be similar to items array.
I created a patch that solve this issue by getting array index from items array instead of selection array
Comment #21
skylord CreditAttribution: skylord commented+1 for #20 for issue investigation. I suggest to fix selection array indexes instead of deep key searching in items array (actually, array_search not needed there inside the loop). See patch attached.
Comment #22
skylord CreditAttribution: skylord commentedSorry, previous patch was a little wrong - try this please.
Comment #23
Anas_maw CreditAttribution: Anas_maw at Vardot commented@skylord
It's a good idea, I tested your patch and it's work well also.
Thanks.
Comment #24
SkyFlame CreditAttribution: SkyFlame commentedSome kind of this problem I've acquired while using Simplenews Module. It appears when I switch "Format of letter" (in settings of any "Newsletter category") to "HTML". With "Plain Text" it's OK because Hierarchical links (and any other links) don't work in this format of letter.
So the problem partly was solved by skylord's patch in message #22: the errors don't appear now, but in letters I send with Simplenews the Hierarchical links act like just text, not as links, and they stand in the end of letter: in node (on which based the letter) the Hierarchical links placed in the top of the node as should. Is that normal? Should they act like so? For me they damage an appearance of the letter being a text (they make no sense in this case).
UPD:
It is not for only Hierarchical links. It is for all links which are created with fields in type of content.
Comment #25
shi99 CreditAttribution: shi99 commentedThe patch in #22 worked for me with the latest dev.
Thanks
Comment #26
NancyDruPossibly related: #2831247: Undefined index
Patch in #22 (plus going to beta7) seems to fix both problems for me.
Comment #28
stefan.r CreditAttribution: stefan.r commentedCommitted and pushed to 7.x-3.x, thanks!