jQuery-datatable-server-side-net-core icon indicating copy to clipboard operation
jQuery-datatable-server-side-net-core copied to clipboard

Null reference in LoadTable method

Open al3xmeister opened this issue 4 years ago • 5 comments

Line 43 (dtparameters.Order reference) and 37 (dtParameters.Search reference) leave null references. Happy to do a PR and contribute if you'd like me to give a hand. Well done on setting 3.1 up.

al3xmeister avatar Aug 01 '20 14:08 al3xmeister

Hi Alex, thanks for your comments, you can do a PR whenever you want, it's open and everyone can collaborate.

DavidSuescunPelegay avatar Aug 01 '20 20:08 DavidSuescunPelegay

Hi, I've been trying to solve the bug you issued, but I've not been able to reproduce it.

Please, could you try some of the tips below and, if the bug continues, you can send me screenshots or a small video and I'll research the bug more deeply:

  • Delete bin and obj cache folders
  • Clear NuGet cache
  • Clean and Rebuild the project several times
  • Try different build setups (IIS Express or custom)
  • Update your NuGet Packages using this command Update-Package -reinstall
  • Enable NuGet package restore

DavidSuescunPelegay avatar Aug 12 '20 20:08 DavidSuescunPelegay

Hi David,

Sorry I've been exceptionally busy but been meaning to reply. The error I was getting was the dtParameters being null, this was caused by the version of Jquery I was using, but is quite a common error as seen https://stackoverflow.com/questions/59327018/asp-net-core-3-1-controller-method-always-recieves-null-parameter-from-httppost.

I was suggesting either adding a null check against dtParameters .search or .Order references, or adding some sort of comment for the developers in the same position as I was to be aware dtParameters should never be null and if that is the case the implementation of dataTables failed somewhere.

Best regards

al3xmeister avatar Sep 22 '20 17:09 al3xmeister

Ok, I'll review the issue and if possible, a new version will be published in a few days.

DavidSuescunPelegay avatar Sep 22 '20 19:09 DavidSuescunPelegay

Hi @al3xmeister, I've just uploaded a new release 3.3.2, your issue should be solved now.

DavidSuescunPelegay avatar May 17 '23 18:05 DavidSuescunPelegay