Admin --> Metadata Definition --> Update Associations Action Javascript console error.

Bug #1462577 reported by Travis Tripp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Ying Zuo

Bug Description

Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: resource_type in resource_types | filter:searchResource, Duplicate key: string:e, Duplicate value: e
http://errors.angularjs.org/1.3.7/ngRepeat/dupes?p0=resource_type%20in%20resource_types%20%20%7C%20filter%3AsearchResource&p1=string%3Ae&p2=e
    at REGEX_STRING_REGEXP (angular.js:63)
    at ngRepeatAction (angular.js:24474)
    at Object.$watchCollectionAction [as fn] (angular.js:14090)
    at Scope.$get.Scope.$digest (angular.js:14223)
    at Scope.$get.Scope.$apply (angular.js:14486)
    at HTMLInputElement.<anonymous> (angular.js:22945)
    at HTMLInputElement.jQuery.event.dispatch (jquery.js:5095)
    at HTMLInputElement.jQuery.event.add.elemData.handle (jquery.js:4766)(anonymous function) @ angular.js:11592$get @ angular.js:8542$get.Scope.$digest @ angular.js:14241$get.Scope.$apply @ angular.js:14486(anonymous function) @ angular.js:22945jQuery.event.dispatch @ jquery.js:5095jQuery.event.add.elemData.handle @ jquery.js:4766
jquery.js:7093 GET http://localhost:8005/static/dashboard/css/None 404 (NOT FOUND)curCSS @ jquery.js:7093jQuery.extend.cssHooks.opacity.get @ jquery.js:6952jQuery.extend.css @ jquery.js:7059Tween.propHooks._default.get @ jquery.js:9253Tween.cur @ jquery.js:9209Tween.init @ jquery.js:9200Tween @ jquery.js:9189deferred.promise.createTween @ jquery.js:8936tweeners.* @ jquery.js:8821createTween @ jquery.js:8884defaultPrefilter @ jquery.js:9175Animation @ jquery.js:8969jQuery.fn.extend.animate.doAnimation @ jquery.js:9305jQuery.extend.dequeue @ jquery.js:3948(anonymous function) @ jquery.js:3991jQuery.extend.each @ jquery.js:657jQuery.fn.jQuery.each @ jquery.js:266jQuery.fn.extend.queue @ jquery.js:3984jQuery.fn.extend.animate @ jquery.js:9316jQuery.each.jQuery.fn.(anonymous function) @ jquery.js:9442(anonymous function) @ horizon.tables_inline_edit.js:243jQuery.each.jQuery.event.special.(anonymous function).handle @ jquery.js:5460jQuery.event.dispatch @ jquery.js:5095jQuery.event.add.elemData.handle @ jquery.js:4766

Tags: angularjs
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/189000

Changed in horizon:
assignee: nobody → Travis Tripp (travis-tripp)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by David Lyle (<email address hidden>) on branch: master
Review: https://review.openstack.org/189000
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Revision history for this message
Rob Cresswell (robcresswell-deactivatedaccount) wrote :

Removed assignee due to inactivity. If you get more time to work on it, feel free to reassign.

Changed in horizon:
status: In Progress → Confirmed
importance: Undecided → Low
milestone: none → next
assignee: Travis Tripp (travis-tripp) → nobody
tags: added: angularjs
Ying Zuo (yingzuo)
Changed in horizon:
assignee: nobody → Ying Zuo (yingzuo)
Revision history for this message
Ying Zuo (yingzuo) wrote :

I traced down this error. In this case, ng-repeat is not using a particular field as the key for looping because the data from the server is in a complex data structure, an array of objects. In the error message, it refers to "string: e” as the key where ‘e’ is just one of the characters in the whole data string. We will need to add the "track by", suggested in the angular error message, and use $index added by ng-repeat.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/310071

Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/310071
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=3881095641347461a994e694b7f8a84bceb57f48
Submitter: Jenkins
Branch: master

commit 3881095641347461a994e694b7f8a84bceb57f48
Author: Ying Zuo <email address hidden>
Date: Mon Apr 25 15:46:34 2016 -0700

    Fix js error when updating associations of metadata

    Added track by to specify a unique key for ng-repeat to loop through
    the list of associations.

    Change-Id: Id44087ef0400188a76a459d383ace7cc6522e6d3
    Closes-bug: #1462577

Changed in horizon:
status: In Progress → Fix Released
Changed in horizon:
milestone: next → newton-1
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/horizon 10.0.0.0b1

This issue was fixed in the openstack/horizon 10.0.0.0b1 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.