DataTables / DataTables/Responsive

Upgrade 3.0.2 to 3.0.3 creates TypeError

Open
#131 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
151
Forks
91
PR merge metrics
No merged PRs in 30d

Description

I packaged DataTables with the responsive module as a Jenkins DataTables Plugin so that Jenkins plugins can use DataTables in their views. The plugin deploys the following artifacts as a Jenkins plugin:

 "dependencies": {
    "datatables.net": "2.1.6",
    "datatables.net-bs5": "2.1.6",
    "datatables.net-buttons": "3.1.2",
    "datatables.net-buttons-bs5": "3.1.2",
    "datatables.net-colreorder": "2.0.4",
    "datatables.net-colreorder-bs5": "2.0.4",
    "datatables.net-responsive": "3.0.3",
    "datatables.net-responsive-bs5": "3.0.3",
    "datatables.net-select": "2.0.5",
    "datatables.net-select-bs5": "2.0.5",
    "datatables.mark.js": "2.1.0",
    "mark.js": "8.11.1",
    "luxon": "3.5.0"
  }

When I upgrade the dependency to datatables.net-responsive from 3.0.2 to 3.0.3 I get the following error:

jquery.min.js:2 jQuery.Deferred exception: Cannot read properties of undefined (reading '_responsiveMovesNodes') TypeError: Cannot read properties of undefined (reading '_responsiveMovesNodes')
    at a._resizeAuto (http://localhost:8080/static/4ac28f67/plugin/data-tables-api/js/dataTables.responsive.min.js:4:9609)
    at HTMLTableElement.<anonymous> (http://localhost:8080/static/4ac28f67/plugin/data-tables-api/js/dataTables.responsive.min.js:4:2584)
    at HTMLTableElement.<anonymous> (http://localhost:8080/static/4ac28f67/plugin/data-tables-api/js/dataTables.min.js:4:72080)
    at HTMLTableElement.dispatch (http://localhost:8080/static/4ac28f67/plugin/jquery3-api/js/jquery.min.js:2:40035)
    at v.handle (http://localhost:8080/static/4ac28f67/plugin/jquery3-api/js/jquery.min.js:2:38006)
    at Object.trigger (http://localhost:8080/static/4ac28f67/plugin/jquery3-api/js/jquery.min.js:2:70124)
    at HTMLTableElement.<anonymous> (http://localhost:8080/static/4ac28f67/plugin/jquery3-api/js/jquery.min.js:2:70726)
    at Function.each (http://localhost:8080/static/4ac28f67/plugin/jquery3-api/js/jquery.min.js:2:3129)
    at ce.fn.init.each (http://localhost:8080/static/4ac28f67/plugin/jquery3-api/js/jquery.min.js:2:1594)
    at ce.fn.init.trigger (http://localhost:8080/static/4ac28f67/plugin/jquery3-api/js/jquery.min.js:2:70701) undefined

An example of a Jenkins view with DataTables (with datatables.net-responsive 3.0.2) is visible in
https://ci.jenkins.io/job/Plugins/job/coverage-model/job/main/lastSuccessfulBuild/coverage/

When I downgrade to 3.0.2 then everything works again, so there seems to be an incompatible change in 3.0.3.

Please let me know when you need more details.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Jenkins view with datatables.net-responsive 3.0.3 and compare it with 3.0.2, using the stack trace as the entry point. Inspect the _resizeAuto path in dataTables.responsive.min.js and verify the change against the reported _responsiveMovesNodes error; done means the view loads without the TypeError on 3.0.3.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, jquery, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.