0

Action failed: lightning:buttonIcon$controller$init [Invalid iconName attribute value standard:sales_path, lightning component 'buttonIcon' only support "utility" icons. e.g.: '' For more information about SLDS utility icons, visit this page: https://www.lightningdesignsystem.com/resources/icons/]

I keep getting this error. I understand what it is saying I formerly was using a standard icon but I've changed my code to the following and saved a hundred times, closed the org and re opened, then waited two days and came back and got the same error. What gives?

<aura:component implements="force:appHostable" controller="QuestionViewerController" >
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/> 
<aura:attribute name="title" type="String" required="true" default="Question Viewer"/>
<aura:attribute name="Questions" type="Question__c[]"/>
<aura:attribute name="currentQuestion" type="Question__c"/>
<aura:attribute name="index" type="Integer"/>

<lightning:card iconName="action:preview">
    <div class="slds-grid--verticle" >
        <div class="slds-col slds-no-flex slds-size slds-box slds-theme_alt-inverse">
            <lightning:formattedText class="slds-text-heading_medium slds-no-flex" title="{!v.currentQuestion.Name}" value="{!v.currentQuestion.body__c}"/>   
        </div>
        <div class="slds-col slds-no-flex slds-box slds-theme_info">
            <lightning:buttongroup >
                <lightning:buttonIcon iconName="utility:moneybag" onclick="" alternativeText=" "/>
                <lightning:buttonIcon iconName="utility:help" onclick="" alternativeText=" "/>
                <lightning:buttonIcon iconName="utility:frozen" onclick="" alternativeText=" "/>
                <lightning:buttonIcon iconName="utility:food_and_drink" onclick="" alternativeText=" "/>
                <lightning:buttonIcon iconName="utility:forward" onclick="{! c.nextQuestion }" alternativeText=" "/>
            </lightning:buttongroup>
        </div> 
    </div>
</lightning:card>

As you can see no where in my buttonIcons am I using standard:sales_path.

Controller:

({
doInit : function(component, event, helper) {
    var questionlist = component.get("c.getQuestionList");
    questionlist.setCallback(this, function(response){
        var state = response.getState();

        if(state == "SUCCESS"){
            component.set("v.Questions",response.getReturnValue());
        } 

    });

    component.set("v.index",0);

    $A.enqueueAction(questionlist);
},

nextQuestion : function(component, event, helper) {
    var i = component.get("v.index");
    var questionList = component.get("v.Questions");
    i = ++i;
    component.set("v.index",i);
    component.set("v.currentQuestion", questionList[i]);
}
})

It works now, not sure why but deleting the original and creating a new component magically fixed the problem.

3
  • can you show us your doInit method from your controller? do you get this error when attempting to save your component?
    – glls
    Dec 21, 2017 at 20:32
  • Damn, so I just tried creating a new component a copy the code over. I deleted the old the old file little did I know that it deletes the controller for you too and it looks like there isn't a recycle bin in Lighting.
    – MadMax
    Dec 21, 2017 at 20:42
  • The componnet saved ok, but when I would try to view it that error would show.
    – MadMax
    Dec 21, 2017 at 20:43

0

You must log in to answer this question.

Browse other questions tagged .