function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Pardhu ThottempudiPardhu Thottempudi 

Failed to save mycontactlist.cmp: Invalid definition for null:mycontactlistcontroller: null: Source

They showing pop_up like FIELD INTEGRITY EXCEPTION 
Failed to save mycontactlist.cmp: Invalid definition for null:mycontactlistcontroller: null: Source.
when i trying so many same error coming in trailhead quick start:create a lightning component. kindly resolve the issue ASAP
Pardhu ThottempudiPardhu Thottempudi
Anybody can reply this answer.kindly, let us know us know if any
narpavi prabhunarpavi prabhu
I have got the same error it is due to the Apex controller is not available in the name "mycontactlistcontroller". Please check.
 
Colin Russell 7Colin Russell 7
You need to create the controller class. Create a new class and call it MyContactListController. You'll then need to add the code between the braces. It should look like this.

public class MyContactListController {
@AuraEnabled
public static List<Contact> getContacts(Id recordId) {
   return [SELECT Id, FirstName, LastName, Email, Phone FROM Contact WHERE AccountId = :recordId];
}     
}

Once saved, you should then be able to save your component.