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

Ajax error on using list to filter calendar : error 500 #361

Closed
Draky50110 opened this issue Mar 28, 2022 · 3 comments
Closed

Ajax error on using list to filter calendar : error 500 #361

Draky50110 opened this issue Mar 28, 2022 · 3 comments
Assignees

Comments

@Draky50110
Copy link

What is the version of Jorani?

1.0 (master.zip)

Expected behavior

Load a popup to create and use filter by list on calendar view

Actual behavior

Gives an ajax error :

DataTables warning: table id=employeesOrgList - Ajax error. For more information about this error, please see http://datatables.net/tn/7

Steps to reproduce the behavior

Open a calendar view and select the icon to load a list of user to filter on calendar view...


Looking at Firefox web dev tools, it gives me a possible answer : an error 500 occurs when using this and JSON output gives :

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

@glitchlives
Copy link

Not sure how you went with this
modify the codeigniter core/Output.php
Output php accordingly and give it a shot if you are running php8

replace the current
OLD line 457
$output = str_replace(array('{elapsed_time}', '{memory_usage}'), array($elapsed, $memory), $output);

NEWline 457
$output = $output ? str_replace(array('{elapsed_time}', '{memory_usage}'), array($elapsed, $memory), $output): "";

@Draky50110
Copy link
Author

Sorry I don't remember how go to this issue.
I tested this software monthes ago and did not go further using it so...

Maybe this fix will help people.

@bbalet
Copy link
Owner

bbalet commented Apr 30, 2023

I'd bet rather that the user installed Jorani on a MySQL Server where functions are not available such as a shared web hosting env.
But I'll add the PHP code as it doesn't harm.

@bbalet bbalet self-assigned this Apr 30, 2023
@bbalet bbalet closed this as completed in 8983c52 May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants