{"record":{"id":"05fca3f185ae523d","repo":"nopSolutions/nopCommerce","slug":"no-configuration-found-with-the-specified-id","errorCode":null,"errorMessage":"No configuration found with the specified id","messagePattern":"No configuration found with the specified id","errorType":"exception","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"src/Plugins/Nop.Plugin.Widgets.FacebookPixel/Controllers/FacebookPixelController.cs","lineNumber":253,"sourceCode":"    {\n        var configuration = await _facebookPixelService.GetConfigurationByIdAsync(id);\n        if (configuration == null)\n            return RedirectToAction(\"Configure\", \"FacebookPixel\");\n\n        //delete configuration\n        await _facebookPixelService.DeleteConfigurationAsync(configuration);\n\n        _notificationService.SuccessNotification(await _localizationService.GetResourceAsync(\"Admin.Plugins.Saved\"));\n\n        return RedirectToAction(\"Configure\", \"FacebookPixel\");\n    }\n\n    [HttpPost]\n    [CheckPermission(StandardPermission.Configuration.MANAGE_WIDGETS)]\n    public virtual async Task<IActionResult> CustomEventList(CustomEventSearchModel searchModel)\n    {\n        var configuration = await _facebookPixelService.GetConfigurationByIdAsync(searchModel.ConfigurationId)\n            ?? throw new ArgumentException(\"No configuration found with the specified id\", nameof(searchModel.ConfigurationId));\n\n        var customEvents = (await _facebookPixelService.GetCustomEventsAsync(configuration.Id, searchModel.WidgetZone)).ToPagedList(searchModel);\n        var model = new CustomEventListModel().PrepareToGrid(searchModel, customEvents, () =>\n        {\n            //fill in model values from the configuration\n            return customEvents.Select(customEvent => new CustomEventModel\n            {\n                ConfigurationId = configuration.Id,\n                EventName = customEvent.EventName,\n                WidgetZonesName = string.Join(\", \", customEvent.WidgetZones)\n            });\n        });\n\n        return Json(model);\n    }\n\n    //ValidateAttribute is used to force model validation\n    [HttpPost]","sourceCodeStart":235,"sourceCodeEnd":271,"githubUrl":"https://github.com/nopSolutions/nopCommerce/blob/64bdf2ff08c8b39e65717bcf974fb43dc2ef68f2/src/Plugins/Nop.Plugin.Widgets.FacebookPixel/Controllers/FacebookPixelController.cs#L235-L271","documentation":"Thrown by FacebookPixelController.CustomEventList when _facebookPixelService.GetConfigurationByIdAsync(searchModel.ConfigurationId) returns null. The action expects an existing Facebook Pixel configuration row; a missing row means the grid request references a configuration that does not exist.","triggerScenarios":"The custom-events grid is loaded for a ConfigurationId that was deleted, never existed, or was passed incorrectly (query string tampering, stale admin link).","commonSituations":"Admin opens an old bookmarked/tab after the configuration was deleted; concurrent admin deletion while another browses the grid; ConfigurationId of 0 or default sent by a malformed request.","solutions":["Reload the parent configuration list to get a valid ConfigurationId.","Guard the grid action to return an empty result (or NotFound) instead of throwing for a missing configuration.","Ensure the configuration is created before navigating to its custom-events tab."],"exampleFix":"// before\nvar configuration = await _facebookPixelService.GetConfigurationByIdAsync(searchModel.ConfigurationId)\n    ?? throw new ArgumentException(\"No configuration found with the specified id\", nameof(searchModel.ConfigurationId));\n\n// after — graceful empty grid instead of 500\nvar configuration = await _facebookPixelService.GetConfigurationByIdAsync(searchModel.ConfigurationId);\nif (configuration is null)\n    return Ok(new { Data = Array.Empty<CustomEventModel>(), RecordsTotal = 0, RecordsFiltered = 0, Draw = searchModel.Draw });","handlingStrategy":"validation","validationCode":"var configuration = await _facebookPixelService.GetConfigurationByIdAsync(searchModel.ConfigurationId);\nif (configuration is null) return EmptyGrid(searchModel);","typeGuard":null,"tryCatchPattern":"try { return await CustomEventList(searchModel); }\ncatch (ArgumentException ex) when (ex.Message.Contains(\"No configuration found\"))\n{ return NotFound(); }","preventionTips":["Refresh the configuration list before navigating to a configuration's child grid.","Return an empty grid (not a 500) for a missing configuration.","Prevent deletion of a configuration while admins may have it open."],"tags":["facebook-pixel","not-found","admin-controller","nopcommerce"],"backgroundTag":null,"analyzedSha":"64bdf2ff08c8b39e65717bcf974fb43dc2ef68f2","analyzedAt":"2026-08-13T21:19:38.062Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}