hz-field-directive If a property is null or undefined and does not have filters transforming, exception is logged

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

Bug Description

hz-field-directive was developed using hz images panel where every single property had at least the no value filter applied. However, when using it with properties that don't have the no value filter applied and there is no value, we'll see the following in console.log

angular.js:12783 TypeError: Cannot read property 'then' of undefined
    at link (http://127.0.0.1:8005/static/framework/widgets/property/hz-field.directive.js:115:17)
    at http://127.0.0.1:8005/static/horizon/lib/angular/angular.js:9073:44
    at invokeLinkFn (http://127.0.0.1:8005/static/horizon/lib/angular/angular.js:9079:9)
    at nodeLinkFn (http://127.0.0.1:8005/static/horizon/lib/angular/angular.js:8566:11)
    at compositeLinkFn (http://127.0.0.1:8005/static/horizon/lib/angular/angular.js:7965:13)
    at compositeLinkFn (http://127.0.0.1:8005/static/horizon/lib/angular/angular.js:7968:13)
    at nodeLinkFn (http://127.0.0.1:8005/static/horizon/lib/angular/angular.js:8561:24)
    at delayedNodeLinkFn (http://127.0.0.1:8005/static/horizon/lib/angular/angular.js:8828:11)
    at compositeLinkFn (http://127.0.0.1:8005/static/horizon/lib/angular/angular.js:7965:13)
    at compositeLinkFn (http://127.0.0.1:8005/static/horizon/lib/angular/angular.js:7968:13) <hz-field config="ctrl.config" item="ctrl.item" class="ng-isolate-scope">(anonymous function) @ angular.js:12783(anonymous function) @ angular.js:9535invokeLinkFn @ angular.js:9081nodeLinkFn @ angular.js:8566compositeLinkFn @ angular.js:7965compositeLinkFn @ angular.js:7968nodeLinkFn @ angular.js:8561delayedNodeLinkFn @ angular.js:8828compositeLinkFn @ angular.js:7965compositeLinkFn @ angular.js:7968publicLinkFn @ angular.js:7845boundTranscludeFn @ angular.js:7983controllersBoundTransclude @ angular.js:8593ngRepeatAction @ angular.js:28080$watchCollectionAction @ angular.js:16066$digest @ angular.js:16203$apply @ angular.js:16467done @ angular.js:10852completeRequest @ angular.js:11050requestLoaded @ angular.js:10991
4angular.js:12783 TypeError: Cannot read property 'then' of null
    at link (http://127.0.0.1:8005/static/framework/widgets/property/hz-field.directive.js:115:17)
    at http://127.0.0.1:8005/static/horizon/lib/angular/angular.js:9073:44
    at invokeLinkFn (http://127.0.0.1:8005/static/horizon/lib/angular/angular.js:9079:9)
    at nodeLinkFn (http://127.0.0.1:8005/static/horizon/lib/angular/angular.js:8566:11)
    at compositeLinkFn (http://127.0.0.1:8005/static/horizon/lib/angular/angular.js:7965:13)
    at compositeLinkFn (http://127.0.0.1:8005/static/horizon/lib/angular/angular.js:7968:13)
    at nodeLinkFn (http://127.0.0.1:8005/static/horizon/lib/angular/angular.js:8561:24)
    at delayedNodeLinkFn (http://127.0.0.1:8005/static/horizon/lib/angular/angular.js:8828:11)
    at compositeLinkFn (http://127.0.0.1:8005/static/horizon/lib/angular/angular.js:7965:13)
    at compositeLinkFn (http://127.0.0.1:8005/static/horizon/lib/angular/angular.js:7968:13) <hz-field config="ctrl.config" item="ctrl.item" class="ng-isolate-scope">

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/357360

Changed in horizon:
assignee: nobody → Travis Tripp (travis-tripp)
status: New → In Progress
Changed in horizon:
milestone: none → newton-3
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/357360
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=210d420749124be951be55d6e02f332cf396300e
Submitter: Jenkins
Branch: master

commit 210d420749124be951be55d6e02f332cf396300e
Author: Travis Tripp <email address hidden>
Date: Thu Aug 18 11:08:40 2016 -0600

    hz-field-directive handle no value property

    hz-field-directive was developed using hz images panel where every
    single property had at least the no value filter applied. However,
    when using it with properties that don't have the no value filter
    applied and there is no value, we'll see the following in console.log

    angular.js:12783 TypeError: Cannot read property 'then' of undefined

    Change-Id: I14f8d56cc9086e7e25e11c081de34bc9d21389d0
    Closes-Bug: #1614630

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/horizon 10.0.0.0b3

This issue was fixed in the openstack/horizon 10.0.0.0b3 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.