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.
Hi,
I am getting this message when browsing to /admin/reports/fields:
Notice: Undefined index: admin in _field_ui_bundle_admin_path() (line 288 of /Users/USERNAME/Sites/drupal7/modules/field_ui/field_ui.module).
Best regards,
sewid
Comment | File | Size | Author |
---|---|---|---|
#20 | field_ui_warnings-686938-20.patch | 2.09 KB | yched |
#15 | field_ui_warnings-686938-15.patch | 2.09 KB | yched |
#14 | drupal-686938-14.patch | 885 bytes | clemens.tolboom |
#1 | field_ui_warnings.patch | 1.86 KB | yched |
Comments
Comment #1
yched CreditAttribution: yched commentedThose warnings are caused by 'comment fields', because 'comment' as a fieldable entity currently provides no path for the Field UI pages.
I really hope we can get to an agreement and change this in #537750: Field UI for comments, but we should fix the code to handle the case of fieldable entities without UIs, because there could be other cases in contrib.
Comment #2
aspilicious CreditAttribution: aspilicious commentedI confirm that this is working.
Do not test this without doing a fresh install...
It breaks stuff...
So it only needs a code review :)
Comment #4
yched CreditAttribution: yched commentedEr ? It should be pretty harmless :-).
Comment #5
apadernoI have marked #686344: Undefined index admin as duplicate of this report.
Comment #7
aspilicious CreditAttribution: aspilicious commentedIt's green again, please someone review this code... :(
Comment #8
katriencI reproduced the bug on a fresh drupal 7.0-alpha1 install.
The patch on #1 works fine and solves the issue.
Comment #9
matt.nz CreditAttribution: matt.nz commentedPretty straight-forward patch. Works as expected!
Comment #10
matt.nz CreditAttribution: matt.nz commented#1: field_ui_warnings.patch queued for re-testing.
Comment #11
aspilicious CreditAttribution: aspilicious commented#692432: Warnings on Reports page (/#overlay=admin/reports/fields)
duplicate issue lets fix this issue
[Edited by kiamlaluno to remove a not pleasant word]
Comment #12
apadernoI have marked #692432: Warnings on Reports page (/#overlay=admin/reports/fields) as duplicate of this report.
Comment #13
dakalaI'm getting this same warning message when I go to admin/structure/types/manage/ and the proposed patch at #1 resolves this problem.
Issue #692432 has been closed although this issue is marked as a duplicate of that on.
I'm running Alpha-4.
Comment #14
clemens.tolboomPatch from #1 is not applicable anymore. New patch attached. That is the function moved from field_ui.admin.inc to field_ui.module
I got this error when installing cck-7.x.2.x-dev and enabled field group module. Saving the module configuration page again gives the error again.
Comment #15
yched CreditAttribution: yched commentedPatch #14 misses one hunk.
Reroll of patch #1 (didn't apply because of the $obj_type -> $entity_type rename that happened inbetween).
Additionally, removes a t() around a string that's already translated.
side note : fieldgroup module is not even remotely ported to D7.
Comment #17
yched CreditAttribution: yched commented#15: field_ui_warnings-686938-15.patch queued for re-testing.
Comment #19
clemens.tolboom@yched:
as I said in #14 the function was moved into field_ui.module ... what I should have said is the function _field_ui_bundle_admin_path is moved and already adapted according #1 ... so my guess is patch #14 is ok.
But I still wonder why this error now only showed up for cck fieldgroup. That is we only need to apply #14 for in this case installing cck fieldgroup. Is there an API change? Is the bundle['admin'] always set within core?
(Thanks for the side note about fieldgroup module.)
Comment #20
yched CreditAttribution: yched commentedre #19: sorry, I don't get what you mean.
Patch #1 modified :
- field_ui_fields_list() in field_ui.admin.inc
- _field_ui_bundle_admin_path() in field_ui.module
Both functions are still at the same place, and both still need the same changes, so yes, #14 misses a hunk.
#1 doesn't apply any more because of this hunk :
$obj_type is now $entity_type
This being said, I have no clue why the bot won't apply #15. It applies fine on my copy of HEAD.
Trying again.
Comment #21
yched CreditAttribution: yched commentedYes, in current HEAD, all fieldable entities now define an admin path for their fields UI. We're only fixing hypothetical contrib cases here.
And nothing relevant can be deduced from the current state of fieldgroup. It has no reason to work whatsoever, nor to fail in tale-telling ways :-).
Comment #23
klonosI still see it in the latest drupal 7.x-dev when enabling cck-7.x.2.x-dev Fieldgroup submodule (only the line reported is 315 in core field_ui.module).
I don't know if there are other implications other than the error message that are supposed to be solved, but the error message does go away after applying the patch in #20.
Comment #24
jalneal CreditAttribution: jalneal commentedsubscribing
Comment #25
klonosConfirming the what I've tested in #23 back in August with D7b2 and latest D7 dev. Where are we on this one? What else needs to be done?
Comment #26
shunting CreditAttribution: shunting commentedSecond report on #23 with D7b2.
Comment #27
apaderno#20: field_ui_warnings-686938-20.patch queued for re-testing.
Comment #28
yched CreditAttribution: yched commentedbump - we still need this.
That's an edge case, but some fieldable entities might not want to provide a UI for their fields (ideally, field in combofield entities will be managed on the Field UI pages of the main entity)
I'll be bold and push this to RTBC. It is really trivial and has been lingering for almost a year.
Comment #29
yched CreditAttribution: yched commentedComment #30
webchickI'd feel better having a test for this, but since it's just a notice error that can only possibly show up from contrib, I suppose we can let it slide... Hrm.
Committed to HEAD.
Comment #31
klonosConfirming fixed in latest d7 dev.
Comment #33
bfo CreditAttribution: bfo commentedI got this issue when using the recently released Drupal 7. (7.0)
I'm using it with sqlite
is there a way for me to fix it?
Comment #34
yched CreditAttribution: yched commented@bfo : this is issue is fairly old now, and should be fixed, so just 'me too' is a bit ambiguous / unspecific.
Can you specify the exact error message you get and the steps to reproduce (which page, which action...) ?
Comment #35
apadernoIf I remember, it was suggested to install Drupal 7 on MySQL because the support for other database engine was still buggy. Is this still true with Drupal 7.0?
Comment #36
bfo CreditAttribution: bfo commentedwhen I navigate to Administer - Reports - Field
I get the following errors
Notice: Undefined index: comment_node_event in _field_ui_bundle_admin_path() (line 310 of /mounts/sg400/home/cath/www/wi/modules/field_ui/field_ui.module).
Notice: Undefined index: comment_node_event in field_ui_fields_list() (line 25 of /mounts/sg400/home/cath/www/wi/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: event in _field_ui_bundle_admin_path() (line 310 of /mounts/sg400/home/cath/www/wi/modules/field_ui/field_ui.module).
Notice: Undefined index: event in field_ui_fields_list() (line 25 of /mounts/sg400/home/cath/www/wi/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: event in _field_ui_bundle_admin_path() (line 310 of /mounts/sg400/home/cath/www/wi/modules/field_ui/field_ui.module).
Notice: Undefined index: event in field_ui_fields_list() (line 25 of /mounts/sg400/home/cath/www/wi/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: event in _field_ui_bundle_admin_path() (line 310 of /mounts/sg400/home/cath/www/wi/modules/field_ui/field_ui.module).
Notice: Undefined index: event in field_ui_fields_list() (line 25 of /mounts/sg400/home/cath/www/wi/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: event in _field_ui_bundle_admin_path() (line 310 of /mounts/sg400/home/cath/www/wi/modules/field_ui/field_ui.module).
Notice: Undefined index: event in field_ui_fields_list() (line 25 of /mounts/sg400/home/cath/www/wi/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: event in _field_ui_bundle_admin_path() (line 310 of /mounts/sg400/home/cath/www/wi/modules/field_ui/field_ui.module).
Notice: Undefined index: event in field_ui_fields_list() (line 25 of /mounts/sg400/home/cath/www/wi/modules/field_ui/field_ui.admin.inc).
As for using SQLite, this is working with all the other things I need and only having as issue why i navigate here, it's not a HUGH issue as only I see it and as far as i know it's not causing trouble for anything else but thought it was better to report.
This may be due to something I have done or installed at some point as I have a second site using drupal 7.0 and SQLite also on the same server and it's not got the problem.
Thanks
bfo
Comment #37
bryancasler CreditAttribution: bryancasler commentedSimilar errors being thrown even with patch.
http://localhost/.../admin/reports/fields
Comment #38
jastraat CreditAttribution: jastraat commentedI received a similar error at admin/reports/fields while running the current official version of Drupal 7.
Notice: Undefined index: comment_node_blog in _field_ui_bundle_admin_path() (line 310 of /var/www/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: comment_node_blog in field_ui_fields_list() (line 25 of /var/www/public_html/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: blog in _field_ui_bundle_admin_path() (line 310 of /var/www/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: blog in field_ui_fields_list() (line 25 of /var/www/public_html/modules/field_ui/field_ui.admin.inc).
If I had to make a guess as to how to reproduce, enable the blog module then disable and uninstall the blog module. I notice that despite blog being uninstalled, two records (one for comment_body and one for body) still exist in the field_config_instance table and are associated with the blog type. Could the lack of instances being cleaned up after a content type is removed be the problem?
As a mention - these errors went away after I deleted the two rows above, deleted the row for blog in the node_type table, and cleared the cache.
Comment #39
Azol CreditAttribution: Azol commentedsubscribing
Comment #40
mefisto75 CreditAttribution: mefisto75 commentedUsing official d7.
Added file field to Article. Get this (and a bunch of other) error when trying to upload a file.
Using MySQL.
Complete list of errors:
* Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'node_form' was given in drupal_retrieve_form() (line 771 of /home/v/-/-/public_html/includes/form.inc).
* Notice: Undefined index: #node in comment_form_node_form_alter() (line 1190 of /home/v/-/-/public_html/modules/comment/comment.module).
* Notice: Trying to get property of non-object in comment_form_node_form_alter() (line 1207 of /home/v/-/-/public_html/modules/comment/comment.module).
* Notice: Undefined index: #node in menu_form_node_form_alter() (line 594 of /home/v/-/-/public_html/modules/menu/menu.module).
* Notice: Trying to get property of non-object in menu_form_node_form_alter() (line 594 of /home/v/-/-/public_html/modules/menu/menu.module).
* Notice: Undefined index: #node in menu_form_node_form_alter() (line 600 of /home/v/-/-/public_html/modules/menu/menu.module).
* Notice: Trying to get property of non-object in menu_form_node_form_alter() (line 600 of /home/v/-/-/public_html/modules/menu/menu.module).
* Notice: Undefined index: #node in translation_form_node_form_alter() (line 128 of /home/v/-/-/public_html/modules/translation/translation.module).
* Notice: Trying to get property of non-object in translation_form_node_form_alter() (line 128 of /home/v/-/-/public_html/modules/translation/translation.module).
* Notice: Undefined index: field_file1 in file_ajax_upload() (line 265 of /home/v/-/-/public_html/modules/file/file.module).
* Notice: Undefined index: #suffix in file_ajax_upload() (line 274 of /home/v/-/-/public_html/modules/file/file.module).
Comment #41
mefisto75 CreditAttribution: mefisto75 commentedI can't upload an image throws errors
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'node_form' was given in drupal_retrieve_form() (line 771 of /home/v/vmallru/.../public_html/includes/form.inc).
Notice: Undefined index: #node in comment_form_node_form_alter() (line 1190 of /home/v/vmallru/.../public_html/modules/comment/comment.module).
Notice: Trying to get property of non-object in comment_form_node_form_alter() (line 1207 of /home/v/vmallru/.../public_html/modules/comment/comment.module).
Notice: Undefined index: #node in menu_form_node_form_alter() (line 594 of /home/v/vmallru/.../public_html/modules/menu/menu.module).
Notice: Trying to get property of non-object in menu_form_node_form_alter() (line 594 of /home/v/vmallru/.../public_html/modules/menu/menu.module).
Notice: Undefined index: #node in menu_form_node_form_alter() (line 600 of /home/v/vmallru/.../public_html/modules/menu/menu.module).
Notice: Trying to get property of non-object in menu_form_node_form_alter() (line 600 of /home/v/vmallru/.../public_html/modules/menu/menu.module).
Notice: Undefined index: #node in translation_form_node_form_alter() (line 128 of /home/v/vmallru/.../public_html/modules/translation/translation.module).
Notice: Trying to get property of non-object in translation_form_node_form_alter() (line 128 of /home/v/vmallru/.../public_html/modules/translation/translation.module).
Notice: Undefined index: type in xmlsitemap_node_form_node_form_alter() (line 141 of /home/v/vmallru/.../public_html/sites/all/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.module).
Notice: Undefined index: nid in xmlsitemap_node_form_node_form_alter() (line 141 of /home/v/vmallru/.../public_html/sites/all/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.module).
Notice: Undefined index: uc_product_image in file_ajax_upload() (line 265 of /home/v/vmallru/.../public_html/modules/file/file.module).
Notice: Undefined index: #suffix in file_ajax_upload() (line 274 of /home/v/vmallru/.../public_html/modules/file/file.module).
Comment #42
mefisto75 CreditAttribution: mefisto75 commentedIt seems to be a Page manager module causing problems
http://drupal.org/node/1105624#comment-4271426
Comment #43
mortona2k CreditAttribution: mortona2k commentedI got these errors when I viewed fields in reports. I fixed them by deleting the unused tables, and the related rows in field_config and field_config_instance.
Comment #44
klonos...that's great, but please don't change the issue title.
Comment #45
yched CreditAttribution: yched commented(more of a note-to-self)
#686938: Undefined index: admin in _field_ui_bundle_admin_path() has similar reports with valuable info, but I'm not completely sure this is an actual duplicate. Leaving open for now.
Comment #46
klonos...title had a tab in the begging.
Comment #47
webankit CreditAttribution: webankit commented+1
Comment #48
klonos...related perhaps(?): #1079966: Notice: Undefined index: [custom_content_type_machine_name] in _field_ui_bundle_admin_path(), line 309 in field_ui.module
Comment #49
clemens.tolboomWhen this relates to #1105624: File/Image Upload Failure when Page Manager Installed,
#686938: Undefined index: admin in _field_ui_bundle_admin_path(),
#1079966: Notice: Undefined index: [custom_content_type_machine_name] in _field_ui_bundle_admin_path(), line 309 in field_ui.module
can we close this one then?
Note that the middle issue is _this_ issue ...
@yched: is that self note in #45 somehow wrong?
Comment #50
apadernoThe link in comment #45 is the link to this report.
#1079966: Notice: Undefined index: [custom_content_type_machine_name] in _field_ui_bundle_admin_path(), line 309 in field_ui.module is about a different variable; I doubt that resolving that issue resolves this issue too. Maybe the reports should have been merged, but it is not possible to merge them now, considering that this report has a patch.
Comment #51
clemens.tolboomI know that it is a self-reference. I just hope that @yched shed some light on that #45 ... pun intended :)
Comment #52
sun@mefisto75: Your issue seems to be completely unrelated. Please create a separate issue.
Reverting to normal.
Comment #53
davidsanger CreditAttribution: davidsanger commentedI have this problem now with Drupal 7.4 when I go to /admin/reports/fields:
ERROR
Notice: Undefined index: blog in _field_ui_bundle_admin_path() (line 309 of /home/allsaint/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: blog in field_ui_fields_list() (line 24 of /home/allsaint/public_html/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: blog in _field_ui_bundle_admin_path() (line 309 of /home/allsaint/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: blog in field_ui_fields_list() (line 24 of /home/allsaint/public_html/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: blog in _field_ui_bundle_admin_path() (line 309 of /home/allsaint/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: blog in field_ui_fields_list() (line 24 of /home/allsaint/public_html/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: media_gallery in _field_ui_bundle_admin_path() (line 309 of /home/allsaint/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: media_gallery in field_ui_fields_list() (line 24 of /home/allsaint/public_html/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: media_gallery in _field_ui_bundle_admin_path() (line 309 of /home/allsaint/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: media_gallery in field_ui_fields_list() (line 24 of /home/allsaint/public_html/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: media_gallery in _field_ui_bundle_admin_path() (line 309 of /home/allsaint/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: media_gallery in field_ui_fields_list() (line 24 of /home/allsaint/public_html/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: media_gallery in _field_ui_bundle_admin_path() (line 309 of /home/allsaint/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: media_gallery in field_ui_fields_list() (line 24 of /home/allsaint/public_html/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: media_gallery in _field_ui_bundle_admin_path() (line 309 of /home/allsaint/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: media_gallery in field_ui_fields_list() (line 24 of /home/allsaint/public_html/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: media_gallery in _field_ui_bundle_admin_path() (line 309 of /home/allsaint/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: media_gallery in field_ui_fields_list() (line 24 of /home/allsaint/public_html/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: media_gallery in _field_ui_bundle_admin_path() (line 309 of /home/allsaint/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: media_gallery in field_ui_fields_list() (line 24 of /home/allsaint/public_html/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: media_gallery in _field_ui_bundle_admin_path() (line 309 of /home/allsaint/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: media_gallery in field_ui_fields_list() (line 24 of /home/allsaint/public_html/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: media_gallery in _field_ui_bundle_admin_path() (line 309 of /home/allsaint/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: media_gallery in field_ui_fields_list() (line 24 of /home/allsaint/public_html/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: media_gallery in _field_ui_bundle_admin_path() (line 309 of /home/allsaint/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: media_gallery in field_ui_fields_list() (line 24 of /home/allsaint/public_html/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: media_gallery in _field_ui_bundle_admin_path() (line 309 of /home/allsaint/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: media_gallery in field_ui_fields_list() (line 24 of /home/allsaint/public_html/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: media_gallery in _field_ui_bundle_admin_path() (line 309 of /home/allsaint/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: media_gallery in field_ui_fields_list() (line 24 of /home/allsaint/public_html/modules/field_ui/field_ui.admin.inc).
Comment #54
clemens.tolboom@all error dumpers: please report just the index names and the modules ... or at least don't dump duplicate lines or already reported lines.
The issue getting a little long. The reported indexes until now are
admin
blog
comment_node_blog #537750: Field UI for comments
comment_node_event #537750: Field UI for comments
comment_node_poll #537750: Field UI for comments
event
field_file1
media_gallery
nid
type
uc_product_image
Does this help? Not sure but it reduces the search I hope.
(List generated with jQuery script on http://build2be.com/content/searching-issue-drupalorg-jquerygrep)
Comment #55
anthony.muller CreditAttribution: anthony.muller commentedHello,
This issue has been reported on January 16, 2010... Will it be fixed?
Cheers,
Anthony
Comment #56
drupalycious CreditAttribution: drupalycious commentedHello,
is there an updated version of the patch for Drupal core 7.8?
When I go to reports/fields I get the following error messages:
* Notice: Undefined index: comment_node_panel in _field_ui_bundle_admin_path() (line 320 of localhost/Drupal/modules/field_ui/field_ui.module).
* Notice: Undefined index: comment_node_panel in field_ui_fields_list() (line 35 of localhost/Drupal/modules/field_ui/field_ui.admin.inc).
Thank you for your help
Comment #57
yseki CreditAttribution: yseki commentedYou can do that to return a form to add a node
Comment #58
apadernoAt this point, the issue needs to first be fixed on Drupal 8.
Comment #59
njcheng CreditAttribution: njcheng commentedCan someone explain why this was moved to Drupal 8? It seems to be affecting many Drupal 7 modules in many contexts when a content or field is deleted (I'm sorry if some of these were referenced above):
http://drupal.org/node/1304664
http://drupal.org/node/1334522
http://drupal.org/node/1351506
http://drupal.org/node/1332872
http://drupal.org/node/1327038
http://drupal.org/node/1357792
Haven't done enough test to be sure, but this seems to be related to fields not being properly deleted when all content types that reference them are deleted. Does anyone know why that might be? Is there a way to list orphaned fields somewhere in D7? Manually deleting unused fields from field_config and/or field_config_instance seems to clear up the errors.
Comment #60
apadernoBugs are first fixed in the latest Drupal version, and then the code is back-ported to the previous versions. This is what is normally done in Drupal.
Comment #61
clemens.tolboomTaken from #59
#1304664: Notice: Undefined index: comment_node_panel in _field_ui_bundle_admin_path() (line 320 /modules/field_ui/field_ui.module).
#1334522: Notice: Undefined index: [field_name] in _field_ui_bundle_admin_path() (line 320 /modules/field_ui/field_ui.module).
#1351506: Disabling or uninstalling a node-type module (e.g. Forum), or removing a node type, results in "undefined index" notices
#1332872: Line 320 in function _field_ui_bundle_admin_path()
#1327038: Cannot disable Commerce modules completely; solved using drush per comment #5
#1357792: Field UI Notice of Undefined Index on line 320
@njcheng thanks for the list. Are those issues duplicates? If so close those issues without a patch and XRef those with [#issue-num] to this issue as this one has a patch and a lower issue #
Comment #62
njcheng CreditAttribution: njcheng commentedUnfortunately I'm not sure if they're duplicates or not. It seems they likely are duplicates, but they're filed in the issue queue of various different modules and core.
@kiamlaluno, thanks for explaining how that works - makes sense.
If there's anything else I can do to help, please let me know!
Comment #63
Anonymous (not verified) CreditAttribution: Anonymous commented#1375452: Renaming a content type bundle causes notices on manage fields page (test improvements) was just committed to D8, and will land in D7 shortly. i suspect it will fix many of the issues referenced here. not going to mark this as a duplicate yet, but would urge people effected in this issue to check the patch at #1375452: Renaming a content type bundle causes notices on manage fields page (test improvements).
Comment #64
sunI'm confident that all of the later reports here are actually caused by #1375452: Renaming a content type bundle causes notices on manage fields page (test improvements)
Thus, normally a duplicate, but apparently, there was a commit in #30, so reverting to closed.