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

offset not found issue on add_column #125

Closed
Ulterior opened this issue Jul 25, 2014 · 10 comments
Closed

offset not found issue on add_column #125

Ulterior opened this issue Jul 25, 2014 · 10 comments

Comments

@Ulterior
Copy link

after an upgrade, I get the error message when doing global search on virtually added column with add_column

the problem is in Databases.php file line 560 - index is being requested which should not!

somebody has to override
if ($this->input['columns'][$i]['orderable'] == "true") when using add_column function and not using the ordering, or offsets must be calculated correctly and filtering not used on them

bug dissapears when explicitely initializing

                            "columnDefs": [
                              { "orderable": false, "targets": 3 }
                            ],
@ktunkiewicz
Copy link

Is this fixed after latest code release?

@Ulterior
Copy link
Author

no, I am using the latest version

@ktunkiewicz
Copy link

I updated it a minute ago, please check if you have 1.4.2

@ktunkiewicz
Copy link

Works for me anyway... Can't reproduce your error.

@Ulterior
Copy link
Author

ok, I will check it later, thanks!

@Ulterior
Copy link
Author

so if you are using addColumn which has ordering enabled, does your search works without errors? BTW. I have server side processing enabled

@ktunkiewicz
Copy link

I just tested it and it works as expected - if you try to search or sort on virtual column the search/sort is not executed.
I don't know how this could work other way. The content of virtual/edited columns is added after reading database so filtering/ordering can't work on these columns.

This may be changed in future releases but this involves changing large amount of code to make it work other way.

@ktunkiewicz
Copy link

(please reopen this issue if you find it working other way than above)

@Ulterior
Copy link
Author

sure, thanks, I'll soon take a look again and post screenshots with version names and code if you would need any more information

@ktunkiewicz
Copy link

OK, thanks

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