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

Feature: AJAX filters don't work #2314

Closed
MGatner opened this issue Oct 9, 2019 · 1 comment
Closed

Feature: AJAX filters don't work #2314

MGatner opened this issue Oct 9, 2019 · 1 comment
Labels
missing feature Reported issue which is not a bug but needs to be implemented
Milestone

Comments

@MGatner
Copy link
Member

MGatner commented Oct 9, 2019

Describe the bug
According to the User Guide on $methods in app/Config/Filters.php:

In addition to the standard HTTP methods, this also supports two special cases: ‘cli’, and ‘ajax’.

However, I cannot find anywhere in the code that would run AJAX filters. Method is set in system/Filters/Filters with no clause for AJAX:

$method = strtolower($_SERVER['REQUEST_METHOD'] ?? 'cli');
if (array_key_exists($method, $this->config->methods))

Unless I've missed something, I think this isn't implemented, and my test Filter is definitely not firing on AJAX calls.

CodeIgniter 4 version
Latest develop

Affected module(s)
Controller Filters

@jim-parry jim-parry changed the title AJAX filters don't work 🐛 AJAX filters don't work Oct 16, 2019
@jim-parry jim-parry changed the title 🐛 AJAX filters don't work AJAX filters don't work Oct 16, 2019
@jim-parry jim-parry changed the title AJAX filters don't work Bug: AJAX filters don't work Oct 19, 2019
@jim-parry jim-parry added bug Verified issues on the current code behavior or pull requests that will fix them missing feature Reported issue which is not a bug but needs to be implemented and removed bug Verified issues on the current code behavior or pull requests that will fix them labels Oct 19, 2019
@jim-parry jim-parry changed the title Bug: AJAX filters don't work Feature: AJAX filters don't work Oct 22, 2019
@jim-parry
Copy link
Contributor

No mention of CLI or AJAX filters other than that one sentence in the user guide.
They make sense, and it sounds like they might have been planned, but overlooked in implementation :(
Something to add once stable :)

@lonnieezell lonnieezell added this to the 4.0.* milestone Oct 22, 2019
@MGatner MGatner closed this as completed in c6bbc6b May 5, 2021
MGatner added a commit that referenced this issue May 5, 2021
[ci skip] Remove ajax filter reference from docs. Fixes #2314
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
missing feature Reported issue which is not a bug but needs to be implemented
Projects
None yet
Development

No branches or pull requests

3 participants