Hi, excellent module

i cannot save the field when i select a search item, it gives me these errors:

Notice: Undefined index: A in taxonomy_field_validate() (line 1370 of
***/modules/taxonomy/taxonomy.module).
Notice: Trying to get property of non-object in taxonomy_field_validate() (line 1370 of ********************/modules/taxonomy/taxonomy.module).
Notice: Undefined index: 4 in taxonomy_field_validate() (line 1370 of ********************/modules/taxonomy/taxonomy.module).
Notice: Trying to get property of non-object in taxonomy_field_validate() (line 1370 of ********************/modules/taxonomy/taxonomy.module).
taxonomy_term_reference_illegal_value

thanks

Comments

arpieb’s picture

Assigned: Unassigned » arpieb
Status: Active » Needs review

Thanks for the bug report. Was the term reference field inside of a field collection by any chance? I just committed a fix for a bug in field collections when you try to add a new entry to a multi-value field collection.

The error I fixed was occurring because the field widget form elements were being run through the field validation callbacks outside of a normal form submission (AJAX partial form rebuild being the culprit when you click "Add another item") which resulted in the same error you reported.

The fix was just pushed, so it might be a few hours before it gets bundled up in the dev build. Fingers crossed that this fixes your problem as well. If not, could you provide some more information about the content type you're using the widget in?

Thanks!

alejandro_oses’s picture

Hi arpieb, thanks for the fast response.

Yes i am using field collection, field collection as i have seen has been a dependable module for any project and a lot of modules have problem with it, lot has to do with the ajax thing, i am trying your module because i am having a problem with hierarchical select from Wim but there is an issue with ajax when doing add another item and i cannot resolve this, so right now i am using your excellent module but having this issue.

Well to get in subject, i have installed hierarchical select on the project but i am not using it on a field collection , i am using it on the same form but not on a field collection, your module i am using it on a field collection and when i select a term which in this example is "Dominican (IL)" and do save i get this error:

Notice: Undefined index: D in taxonomy_field_validate() (line 1370 of ********************/modules/taxonomy/taxonomy.module).
Notice: Trying to get property of non-object in taxonomy_field_validate() (line 1370 of ********************/modules/taxonomy/taxonomy.module).
Notice: Undefined index: 3 in taxonomy_field_validate() (line 1370 of ********************/modules/taxonomy/taxonomy.module).
Notice: Trying to get property of non-object in taxonomy_field_validate() (line 1370 of ********************/modules/taxonomy/taxonomy.module).
taxonomy_term_reference_illegal_value
Notice: Undefined index: submit_handlers in _hierarchical_select_validate() (line 880 of ********************/sites/all/modules/contrib/hierarchical_select/hierarchical_select.module).

arpieb’s picture

Alejandro, are you still getting the same error with the latest dev release? I updated it last night, and it looks like it is available for download now. Please let me know if you are still having problems after updating to the latest dev release (should be dated Mar 26).

alejandro_oses’s picture

Hi aprieb, yes still having the same problem, i tested it today with your dev and master repo , the message that i sent i tried the latest version.

I am watching Taxonomy Term Reference Tree Widget, which is other module widget and the developer had like the same issue http://drupal.org/node/1092178, i am analizing the code.

Thanks aprieb.

alejandro_oses’s picture

Aprieb, i tried it on a normal field, no a field collection and i am getting this error: taxonomy_term_reference_illegal_value

So the error is not linked to field collection

arpieb’s picture

Alejandro,

I apologize for the bugs you're running into, but very much appreciate your patience and testing on a non-FC field as well. The problem is definitely somewhere in the Javascript as that is where the TIDs of the terms are built up in the form and sent to the module. The error you are seeing is pretty typical of early development errors I was seeing when the Javascript was not setting thata data up properly.

Monday afternoon a co-worker discovered I had left a JS console.log call in the code, which can severely disrupt JavaScript on any browser not running Firebug (which pretty much means anything but FF + Firebug). I've now tested the fixed code on IE9, FF11 and Chrome 17 and the widget appears to be working as expected both in normal fields and within field collections.

The fix is in the currently available dev build. Also, please make sure any cached Javascript has been purged after downloading the latest code.

If it's still acting up, could you please let me know what browser + version you are using, OS, and anything on your site that might be non-standard (additional term ref widgets or modules installed) so I can see if maybe there is a browser or module incompatibility?

Thanks!

alejandro_oses’s picture

Hi arpieb, sorry about the late response, still having the problem.

I am using ubuntu 11.1 with chrome, i have not tested on a sandbox without any module, let me check that today.

arpieb’s picture

Alejandro,

I just fired up a stock Ubuntu 11.10 Desktop instance with the latest Chrome and FF installs, and hit my D7 barebones test server with both - and sorry to say I cannot duplicate the error. Could you provide a list of the installed and enabled modules and their versions so I can see if maybe there is a conflict with another module? (If you have drush installed, drush pml will give me what I need.) With so many field hooks at work, it's very possible.

Also, if it's a site I can reach externally (and you feel comfortable about doing so), shoot me a URL and login credentials via PM that I can use to see if I can spot something in the widget markup and JS behavior that might tip off what is happening.

What I am beginning to suspect is something in the JS is getting messed up, and the select event handler is not getting fired properly. Could be a bug in another module's scripts or a conflict with this one in spite of all the JS namespaces.

Bear with me, we'll get this sorted out soon!

alejandro_oses’s picture

Thanks aprieb for the response, in here is the list of modules, if you want i can copy my installation to a url and get you the access.
You have been very helpful.

Access control Menu Per Role (menu_per_role) Module
Activity Activity (activity) Module
CCK CCK (cck) Module 7.x-2.x-dev
Chaos tool suite Chaos tools (ctools) Module 7.x-1.0-rc1+116-dev
Chaos tool suite Chaos Tools (CTools) AJAX Example (ctools_ajax_sample) Module 7.x-1.0-rc1+116-dev
Chaos tool suite Custom content panes (ctools_custom_content) Module 7.x-1.0-rc1+116-dev
Chaos tool suite Page manager (page_manager) Module 7.x-1.0-rc1+116-dev
Chaos tool suite Views content panes (views_content) Module 7.x-1.0-rc1+116-dev
Context Context (context) Module 7.x-3.0-beta2
Context Context layouts (context_layouts) Module 7.x-3.0-beta2
Context Context UI (context_ui) Module 7.x-3.0-beta2
Core Block (block) Module 7.12
Core Comment (comment) Module 7.12
Core Contact (contact) Module 7.12
Core Content translation (translation) Module 7.12
Core Contextual links (contextual) Module 7.12
Core Dashboard (dashboard) Module 7.12
Core Database logging (dblog) Module 7.12
Core Field (field) Module 7.12
Core Field SQL storage (field_sql_storage) Module 7.12
Core Field UI (field_ui) Module 7.12
Core File (file) Module 7.12
Core Filter (filter) Module 7.12
Core Help (help) Module 7.12
Core Image (image) Module 7.12
Core List (list) Module 7.12
Core Locale (locale) Module 7.12
Core Menu (menu) Module 7.12
Core Node (node) Module 7.12
Core Number (number) Module 7.12
Core Options (options) Module 7.12
Core Path (path) Module 7.12
Core PHP filter (php) Module 7.12
Core RDF (rdf) Module 7.12
Core Shortcut (shortcut) Module 7.12
Core Syslog (syslog) Module 7.12
Core System (system) Module 7.12
Core Taxonomy (taxonomy) Module 7.12
Core Text (text) Module 7.12
Core Toolbar (toolbar) Module 7.12
Core Trigger (trigger) Module 7.12
Core Update manager (update) Module 7.12
Core User (user) Module 7.12
Date/Time Date (date) Module 7.x-2.0-rc2+12-dev
Date/Time Date API (date_api) Module 7.x-2.0-rc2+12-dev
Date/Time Date Popup (date_popup) Module 7.x-2.0-rc2+12-dev
Date/Time Date Views (date_views) Module 7.x-2.0-rc2+12-dev
Display suite Display suite (ds) Module 7.x-1.5+6-dev
Display suite Extras (ds_extras) Module 7.x-1.5+6-dev
Display suite Forms (ds_forms) Module 7.x-1.5+6-dev
Display suite Search display (ds_search) Module 7.x-1.5+6-dev
Features Features (features) Module 7.x-1.0-beta6+9-dev
Features Private Group (private_group) Module 7.x-1.0
Features Video Presets (video_presets) Module 7.x-2.0
Fields Address Field (addressfield) Module 7.x-1.x-dev
Fields Computed Field (computed_field) Module 7.x-1.0-beta1+2-dev
Fields Content Taxonomy (content_taxonomy) Module 7.x-1.0-beta1
Fields Email (email) Module 7.x-1.x-dev
Fields Entity Reference (entityreference) Module 7.x-1.0-rc1
Fields Field collection (field_collection) Module 7.x-1.0-beta3
Fields Field Permissions (field_permissions) Module 7.x-1.0-beta2
Fields Fieldgroup (field_group) Module 7.x-1.1+12-dev
Fields Link (link) Module 7.x-1.0
Fields Node Reference (node_reference) Module 7.x-2.0+8-dev
Fields Node Reference URL Widget (nodereference_url) Module 7.x-1.12
Fields References (references) Module 7.x-2.0+8-dev
Fields Table (cck_table) Module 7.x-1.x-dev
Fields User Reference (user_reference) Module 7.x-2.0+8-dev
Fields View reference (viewreference) Module 7.x-3.2+3-dev
Form Elements Hierarchical Select (hierarchical_select) Module
Form Elements Hierarchical Select Small Hierarchy (hs_smallhierarchy) Module
Form Elements Hierarchical Select Taxonomy (hs_taxonomy) Module
Homebox Homebox (homebox) Module 7.x-2.x-dev
Mail HTML Mail (htmlmail) Module 7.x-2.63
Mail Mail System (mailsystem) Module 7.x-2.31
Mail Private messages (privatemsg) Module 7.x-2.x-dev
Mail Privatemsg Email Notification (pm_email_notify) Module 7.x-2.x-dev
Mail Privatemsg filter (privatemsg_filter) Module 7.x-2.x-dev
Mail Privatemsg Limits (privatemsg_limits) Module 7.x-2.x-dev
Mail Privatemsg Realname Integration (privatemsg_realname) Module 7.x-2.x-dev
Mail Privatemsg Rules Integrations (privatemsg_rules) Module 7.x-2.x-dev
Media File entity (file_entity) Module 7.x-1.0
Media Media (media) Module 7.x-1.0
Media Media Internet Sources (media_internet) Module 7.x-1.0
Media Media: Vimeo (media_vimeo) Module 7.x-1.x-dev
Media Media: YouTube (media_youtube) Module 7.x-1.0-beta3
Media Video (video) Module 7.x-2.4+55-dev
Media Video UI (video_ui) Module 7.x-2.4+55-dev
Media Video.js (videojs) Module 7.x-2.0-rc2
Messaging Messaging (messaging) Module 7.x-1.0-alpha2+0-dev
Messaging Messaging template (messaging_template) Module 7.x-1.0-alpha2+0-dev
Messaging Simple Mail (messaging_mail) Module 7.x-1.0-alpha2+0-dev
Multilingual Localization client (l10n_client) Module 7.x-1.x-dev
Multilingual Localization update (l10n_update) Module 7.x-1.0-beta3
Multilingual - Internationalization Block languages (i18n_block) Module 7.x-1.4+19-dev
Multilingual - Internationalization Contact translation (i18n_contact) Module 7.x-1.4+19-dev
Multilingual - Internationalization Facet API Translation (facetapi_i18n) Module 7.x-1.0-beta2
Multilingual - Internationalization Field translation (i18n_field) Module 7.x-1.4+19-dev
Multilingual - Internationalization Internationalization (i18n) Module 7.x-1.4+19-dev
Multilingual - Internationalization Menu translation (i18n_menu) Module 7.x-1.4+19-dev
Multilingual - Internationalization Multilingual content (i18n_node) Module 7.x-1.4+19-dev
Multilingual - Internationalization Multilingual select (i18n_select) Module 7.x-1.4+19-dev
Multilingual - Internationalization Panels translation (i18n_panels) Module
Multilingual - Internationalization String translation (i18n_string) Module 7.x-1.4+19-dev
Multilingual - Internationalization Synchronize translations (i18n_sync) Module 7.x-1.4+19-dev
Multilingual - Internationalization Taxonomy translation (i18n_taxonomy) Module 7.x-1.4+19-dev
Multilingual - Internationalization Translation redirect (i18n_redirect) Module 7.x-1.4+19-dev
Multilingual - Internationalization Translation sets (i18n_translation) Module 7.x-1.4+19-dev
Multilingual - Internationalization Variable translation (i18n_variable) Module 7.x-1.4+19-dev
Organic groups OG create permissions (og_create_perms) Module 7.x-1.0
Organic groups Organic groups (og) Module 7.x-1.3+47-dev
Organic groups Organic groups access control (og_access) Module 7.x-1.3+47-dev
Organic groups Organic groups context (og_context) Module 7.x-1.3+47-dev
Organic groups Organic groups field access (og_field_access) Module 7.x-1.3+47-dev
Organic groups Organic groups UI (og_ui) Module 7.x-1.3+47-dev
Other 404 Navigation (navigation404) Module 7.x-1.x-dev
Other Automatic Nodetitles (auto_nodetitle) Module 7.x-1.x-dev
Other Better Formats (better_formats) Module 7.x-1.x-dev
Other Block Class (block_class) Module 7.x-1.x-dev
Other Chain Menu Access API (chain_menu_access) Module 7.x-1.0
Other Comment notify (comment_notify) Module 7.x-1.x-dev
Other Custom Blocks for Tubeisbol (custom_blocks) Module 7.x-1.0
Other Custom media browser widget (media_widget_custom) Module 7.x-1.0
Other Custom user register validation (user_register_validation) Module 7.x-1.0
Other Disable Password Strength Check (disablepwstrength) Module 7.x-1.0
Other Elysia Cron (elysia_cron) Module 7.x-2.x-dev
Other Entity API (entity) Module 7.x-1.0-rc1+44-dev
Other Entity tokens (entity_token) Module 7.x-1.0-rc1+44-dev
Other Form block (formblock) Module 7.x-1.x-dev
Other Format Number API (format_number) Module 7.x-1.x-dev
Other Global Redirect (globalredirect) Module 7.x-1.x-dev
Other Job Applications Digest (job_applications_digest) Module 7.x-1.0
Other Libraries (libraries) Module 7.x-1.0
Other LoginToboggan (logintoboggan) Module 7.x-1.3
Other LoginToboggan Variable Integration (logintoboggan_variable) Module 7.x-1.3
Other MediaElement.js (mediaelement) Module 7.x-1.2
Other Menu attributes (menu_attributes) Module 7.x-1.0-rc1
Other Options element (options_element) Module 7.x-1.4
Other Page title on profile 2 (pagetitle_profile2) Module 7.x-1.0
Other Pathauto (pathauto) Module 7.x-1.0+1-dev
Other Profile2 (profile2) Module 7.x-1.2+5-dev
Other Profile2 Registration Path (profile2_regpath) Module 7.x-1.6+18-dev
Other Profile2 Registration Path Blocks (profile2_regpath_blocks) Module 7.x-1.6+18-dev
Other Quicktabs (quicktabs) Module 7.x-3.3
Other Quicktabs Styles (quicktabs_tabstyles) Module 7.x-3.3
Other Real name (realname) Module 7.x-1.0-rc2
Other Redirect (redirect) Module 7.x-1.x-dev
Other Remember me (remember_me) Module 7.x-1.0-rc1+2-dev
Other Select (or other) (select_or_other) Module 7.x-2.8
Other Select or Other Taxonomy (select_or_other_taxonomy) Module 7.x-0.9-dev
Other Solve hierarchical_select issues (solve_hs_issues) Module 7.x-1.0
Other Special menu items (special_menu_items) Module 7.x-1.x-dev
Other TableField (tablefield) Module 7.x-2.0-beta6
Other Token (token) Module 7.x-1.0-rc1
Other User registration mod (userregistermod) Module 7.x-1.0
Other Variable (variable) Module 7.x-1.1
Other Variable realm (variable_realm) Module 7.x-1.1
Other Variable store (variable_store) Module 7.x-1.1
Panels Mini panels (panels_mini) Module 7.x-3.0-alpha3
Panels Panel nodes (panels_node) Module 7.x-3.0-alpha3
Panels Panels (panels) Module 7.x-3.0-alpha3
Panels Panels In-Place Editor (panels_ipe) Module 7.x-3.0-alpha3
Rules Rules (rules) Module
Rules Rules UI (rules_admin) Module
Search Database search (search_api_db) Module 7.x-1.x-dev
Search Extended search pages (ext_search_page) Module 7.x-1.x-dev
Search Search API (search_api) Module 7.x-1.x-dev
Search Search API Facets Paths (search_api_facets_paths) Module 7.x-1.9
Search Search facets (search_api_facetapi) Module 7.x-1.x-dev
Search Search pages (search_api_page) Module 7.x-1.0-beta2
Search Toolkit Current Search Blocks (current_search) Module 7.x-1.0-rc4
Search Toolkit Facet API (facetapi) Module 7.x-1.0-rc4
SEO Page Title (page_title) Module 7.x-2.x-dev
Sharing ShareThis (sharethis) Module 7.x-2.2
Sharing ShareThis Block (sharethis_block) Module 7.x-2.2
Statistics Google Analytics (googleanalytics) Module 7.x-1.2
Styles File Styles (file_styles) Module 7.x-2.x-dev
Styles Styles (styles) Module 7.x-2.x-dev
Styles Styles UI (styles_ui) Module 7.x-2.x-dev
Taxonomy Taxonomy CSV import/export (taxonomy_csv) Module 7.x-5.10
Taxonomy Taxonomy Manager (taxonomy_manager) Module 7.x-1.0-beta2
Taxonomy Filter Context Menu (tf_context) Module 7.x-1.x-dev
Taxonomy Filter Count Results (tf_count) Module 7.x-1.x-dev
Taxonomy Filter Multi Term (tf_multi) Module 7.x-1.x-dev
Taxonomy Filter Taxonomy Filter (taxonomy_filter) Module 7.x-1.x-dev
Theme Tools Delta API (delta) Module 7.x-3.0-beta8
Theme Tools Delta Blocks (delta_blocks) Module 7.x-3.0-beta8
Theme Tools Delta UI (delta_ui) Module 7.x-3.0-beta8
Theme Tools Omega Tools (omega_tools) Module 7.x-3.0-rc3
User interface Lightbox2 (lightbox2) Module 7.x-1.x-dev
User interface Superfish (superfish) Module 7.x-1.8
User Relationships UR-Blocks (user_relationship_blocks) Module 7.x-1.0-alpha4
User Relationships UR-Defaults (user_relationship_defaults) Module 7.x-1.0-alpha4
User Relationships UR-Mailer (user_relationship_mailer) Module 7.x-1.0-alpha4
User Relationships UR-Private message integration (user_relationship_privatemsg) Module 7.x-1.0-alpha4
User Relationships UR-Rules (user_relationships_rules) Module 7.x-1.0-alpha4
User Relationships UR-UI (user_relationships_ui) Module 7.x-1.0-alpha4
User Relationships UR-Views (user_relationship_views) Module 7.x-1.0-alpha4
User Relationships User Relationships (user_relationships) Module 7.x-1.0-alpha4
Views Insert view (insert_view) Module 7.x-2.x-dev
Views Views (views) Module 7.x-3.3+47-dev
Views Views Bulk Operations (views_bulk_operations) Module 7.x-3.0-rc1+11-dev
Views Views node field (viewsnodefield) Module 7.x-1.0
Views Views PHP (views_php) Module 7.x-1.x-dev
Views Views UI (views_ui) Module 7.x-3.3+47-dev
Webform Webform (webform) Module 7.x-3.15
Webform Webform Localization (webform_localization) Module
XML sitemap XML sitemap (xmlsitemap) Module 7.x-2.x-dev
Other Tubeisbol (tubeisbol) Theme 7.x-3.0

arpieb’s picture

Alejandro,

Just wanted to let you know I haven't forgotten you! :) I was a bit slammed at work last week, so will dig into this more this week.

Thanks for the module list, it should help out.

alejandro_oses’s picture

No problem arpieb, tell me when you are with time. I can help you to grow up this module.

cheers

arpieb’s picture

OK, dug through that list and the only things I see that *might* affect it are

  • Fields Fieldgroup
  • CCK
  • Multilingual - Internationalization Internationalization (i18n)

Is the field by any chance in a fieldgroup or translated node? I'm going to try dropping these into my dev installation this weekend to see if they do have an impact.

I also just updated the code to alpha2 to fix some issues with term deletion and simplify the workflow of the widget, so that might be worth checking out as well...

arpieb’s picture

Status: Needs review » Postponed (maintainer needs more info)