In this for each example , I am trying to create a handler after successful creation of event and registering that event, But while referencing aura:handler tag,

I am getting this error :

Failed to save undefined: aura:handler must specify one and only one of name="…" or event="…": Source

I need solution for bubbling event example.

Here is the link which is giving some kind of solution bt I am not able to understand it.

    <aura:handler name="bubblingEvent" event="docsample:compEvent" action="{!c.handleBubbling}"/>

    <div class="grandchild">
        <docsample:eventBubblingEmitter />

working one

    <div class="grandchild">
        <docsample:eventBubblingEmitter bubblingEvent="{!c.handleBubbling}"/>

but eventBubblingChild component has the following code. and there , we are not copying any component tag.

What will be solution for below code ?

    <aura:handler name="bubblingEvent" event="docsample:compEvent" action="{!c.handleBubbling}"/>
    <div class="child">

Event is component type

  • Are you creating 2 different handlers with the same name and same event? It seems like that may be the issue. – Moshe Karmel Oct 9 '15 at 15:02
  • Can you have look once at developer.salesforce.com/trailhead/lightning_components/… for bubbling event example. I am trying to implement that only – Ankuli Oct 9 '15 at 15:07
  • @Doug B can you help me here ? – Ankuli Oct 9 '15 at 15:23
  • Are you running a Summer '15 or Winter '16 org? Trailhead has been updated for Winter '16 so you might want to try the sample code after your org has been updated for Winter '16. Event bubbling is new as per the release notes. – Diana Widjaja Oct 9 '15 at 19:27
  • 1
    @Ankuli, the Winter '16 release is happening over this weekend and next weekend. You'll see the new Winter '16 logo in your org when it's done. – Diana Widjaja Oct 10 '15 at 0:12

This is a known issue. I had the same problems with that code when I went through the module and eventually reported it to @apurkiss (Adam Purkiss) at Salesforce Trailhead via Twitter on 09/08/15. I included a screen shot of it to him showing the same error message you're speaking of.

IMO, there's no reason the code they provide for you as part of a module shouldn't work when entered into your org. Things have obviously changed since the module was originally written. I found the same issue frustrating myself as I also like to be able to work through the example code when going through a module.


Received a tweet from Chris Duarte, Managing Editor of Trailhead, that Winter 16 updates had accidently been released to Trailhead more than a month in advance which they didn't discover until after Dreamforce. I'm told the problems should be resolved with the release of Winter 16 this weekend and next weekend.

I saw issues beginning in late July/early August. For me, on some challenges, solutions that worked in my browser and SF1 would not pass the challenge. At the same time, old solutions posted many months earlier in the Trailhead Forum to the same challenges that wouldn't display in either my browser or SF1 passed the challenges. I've conveyed this information to Chris. Hopefully, there will be additional investigation and testing if the problems aren't resolved as the Winter 16 Update is released over the coming weekends.

  • That's good info for me..however if i want to give a try for event bubbling example . Can you give reference to any working code . would be helpful to me. – Ankuli Oct 9 '15 at 19:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.