Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change in behavior breaks existing applications #256

Open
recursivetree opened this issue Jan 25, 2024 · 6 comments
Open

Change in behavior breaks existing applications #256

recursivetree opened this issue Jan 25, 2024 · 6 comments

Comments

@recursivetree
Copy link

Problem

The commit added in 24d3cb9 makes it so that if the ajax.url option is set to an empty string, no data is loaded. This is a breaking change compared to the old behavior where it would just load the data from the current page.

We used this extensively to serve html when the page was queried via GET, but return the data when it is queried with POST.

Suggested Fix

Either revert the commit in question, or provide an option to disable the new behavior.

@recursivetree recursivetree changed the title Change in Behaviour breaks existing applications Change in Behavior breaks existing applications Jan 25, 2024
@recursivetree recursivetree changed the title Change in Behavior breaks existing applications Change in behavior breaks existing applications Jan 25, 2024
@AllanJard
Copy link
Contributor

Hi - thanks for noting this. I'll add to the release notes for v2 that this is a breaking change. What to do is:

ajax: {
  url: window.location.pathname,
  type: 'POST'
}

instead of having url: ''.

@recursivetree
Copy link
Author

I am not aware that we ever upgraded to version 2. We are using packagist to pull the latest version, see https://packagist.org/packages/datatables.net/datatables.net. Internally, this seems to pull from https://github.com/DataTables/Dist-DataTables. Packagist shows no version labels, but the npm packages linked in the Dist-DataTables repo seem to have version 1.13.8 as the latest version.

Therefore, my question is whether packagist is supposed to serve version 2 or not?

@AllanJard
Copy link
Contributor

DataTables 2 hasn't been released yet (I was mildly surprised to see you were using DT2 your bug report came in!).

The nightly builds have DT2 available, which pulls from the repo you link to, but the current release version of 1.13.8 doesn't have the change noted. It would appear that packagist is using the latest code in git rather than working with the release versions. I don't understand why that is - looking at what references I can find about it, it should be picking up the tags such as 1.13.8.

I'm going to have to ask the packagist folks about this - apologies.

@AllanJard AllanJard reopened this Jan 25, 2024
@AllanJard
Copy link
Contributor

Actually I think I've got it - it is because I've got an explicit version tag in the composer.json file, which I shouldn't! Damn sorry - working on a fix for that atm.

@AllanJard
Copy link
Contributor

Opened this issue to see if we can get release tags added.

@recursivetree
Copy link
Author

We are using dev-master as the dependency version since packagist doesn't show any other version, so it does indeed pull from master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants