Closed (fixed)
Project:
Active Tags
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Mar 2011 at 20:56 UTC
Updated:
12 Oct 2011 at 18:21 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
3rdLOF commentedSame here.
Comment #2
sol roth commentedI also have this problem.
Comment #3
bryancasler commentedResolved this issue by removing my tags field and then re-adding it
Comment #4
bryancasler commentedI take that back, it seems to have fixed it for one field. Everything else is broke.
Comment #5
bryancasler commentedSeems to go away if certain conditions are met.
1: Taxonomy category has at least one term in it
2: Your content type has at least one node created
Comment #6
dragonwize commentedThis is simply a PHP Notice. It is not an error or warning and does not affect any functionality at all. In PHP is just there to help keep developers on their toes about uninitialized variables being used, which is perfectly valid and part of the point of using a dynamically typed language.
You are seeing this because Drupal 7 by default has them enabled. You can set your error display and logging settings at /admin/config/development/logging. Setting it to errors and warnings only will prevent you from seeing only real errors that would harm your site.
You can also save your field again so that the value is initialized and it should go away.
I will fix this by just running and isset test on the var but this is not on the top of my priorities because it is not in any way vital or even an error.
Comment #7
alduya commented@draginwize: Does this patch do what you intended?
Comment #8
3rdLOF commented@alduya That did it. Thanks
Comment #9
dragonwize commentedClose but not quite. The mode is required for use on the front end so the variable will need to be tested and if not there set to the default value. The drupal_add_js call should always happen.
Comment #10
alduya commented@dragonwize: And this?
Comment #11
dragonwize commentedCorrect. Very good. I will commit when I get a free moment near my code.
Comment #12
ranavaibhav#10 fixed the issue for me.
Comment #13
mariagwyn commentedpatch fixed error.
Comment #14
Anonymous (not verified) commented#10 worked for me
Comment #15
Anonymous (not verified) commentedPatch works, but I wonder why
$instance['widget']['settings'];does not include a ['mode'] by default?Comment #16
PI_Ron commentedNo I have both of these conditions and I am getting the notice.
I did however change the widget type on an existing term field, not create a new one with this widget.
Comment #17
PI_Ron commented#10 Patch works
Comment #18
backwardgraphics commentedI can confirm #10 takes care of this issue.
Comment #19
marcoka commentedpatch #10 works
Comment #20
Anonymous (not verified) commentedThe correct way to fix this bug is to include the default setting in the implementation of hook_field_widget_info() at the top of the module file. This saves having to check for the existence of the key, and it allows you to set the default for all widget instances that haven't been configured. (This is a common case here, because most of us are clicking the widget name in the field settings page of Field UI and simply changing the widget.)
So while #10 works, it is not the right way to fix this problem.
New patch attached.
Comment #21
JohnnyX commentedPatch #20 works for me (first short tests). Could it commited and a new release/ dev version created?
Comment #22
BeaPower commentedWill you commit this patch to the next release?
Comment #23
haydeniv commented#20 looks good, applies against dev, fixes problem.
Comment #24
dragonwize commentedCommitted. Thanks to all involved.