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

Problem with CJAX Controllers location #16

Open
HallofFamer opened this issue Aug 30, 2015 · 1 comment
Open

Problem with CJAX Controllers location #16

HallofFamer opened this issue Aug 30, 2015 · 1 comment

Comments

@HallofFamer
Copy link
Contributor

I tried to set the controllers location from the default /controllers to /controller/viewcontroller. But it will not work, I used this code: define('AJAX_CD', 'controller/viewcontroller'), but CJAX stops functioning. I thought it should be possible to change controller locations, or is this feature removed in recent releases? Or am I doing something wrong?

@HallofFamer
Copy link
Contributor Author

Fixed this myself, the issue is that I need to edit this line from ajax.php:

if(!defined('AJAX_CD')) {
//if you experience a file not found error, and AJAX_CD hasn't been defined anywhere
//enter a relateive path to the base directory where the controllers are.
define('AJAX_CD', 'controllers');
}

just to define AJAX_CD in the controller or view page does not suffice, since when an AJAX call is made, this value will not be available, and then CJAX will default to /controllers directory. I have to manually change the line above at ajax.php, I am not sure if this is mentioned in the documentation though.

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

1 participant