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

DataTables images not rendering #5131

Closed
ChurchCRMBugReport opened this issue Jan 20, 2020 · 2 comments
Closed

DataTables images not rendering #5131

ChurchCRMBugReport opened this issue Jan 20, 2020 · 2 comments
Assignees
Milestone

Comments

@ChurchCRMBugReport
Copy link

Looks like datatables.min.css is using absolute paths in its url() functions when it should be using relative paths.

Observed in console:

GET http://example.com/DataTables-1.10.18/images/index.php net::ERR_TOO_MANY_REDIRECTS
_e @ jquery.min.js:2
css @ jquery.min.js:2
(anonymous) @ jquery.min.js:2
_ @ jquery.min.js:2
css @ jquery.min.js:2
(anonymous) @ datatables.min.js:41
each @ jquery.min.js:2
V @ datatables.min.js:41
Fa @ datatables.min.js:89
ha @ datatables.min.js:75
success @ datatables.min.js:116
c @ jquery.min.js:2
fireWith @ jquery.min.js:2
l @ jquery.min.js:2
(anonymous) @ jquery.min.js:2
load (async)
send @ jquery.min.js:2
ajax @ jquery.min.js:2
(anonymous) @ datatables.min.js:115
each @ jquery.min.js:2
each @ jquery.min.js:2
n @ datatables.min.js:110
h.fn.DataTable @ datatables.min.js:192
(anonymous) @ UserList.php:1110
e @ jquery.min.js:2
t @ jquery.min.js:2
setTimeout (async)
(anonymous) @ jquery.min.js:2
c @ jquery.min.js:2
fireWith @ jquery.min.js:2
fire @ jquery.min.js:2
c @ jquery.min.js:2
fireWith @ jquery.min.js:2
ready @ jquery.min.js:2
B @ jquery.min.js:2

GET http://example.com/DataTables-1.10.18/images/index.php net::ERR_TOO_MANY_REDIRECTS
(anonymous)	@	datatables.min.js:310
each	@	jquery.min.js:2
each	@	jquery.min.js:2
_resizeAuto	@	datatables.min.js:310
(anonymous)	@	datatables.min.js:299
dispatch	@	jquery.min.js:2
v.handle	@	jquery.min.js:2
trigger	@	jquery.min.js:2
(anonymous)	@	jquery.min.js:2
each	@	jquery.min.js:2
each	@	jquery.min.js:2
trigger	@	jquery.min.js:2
r	@	datatables.min.js:103
ua	@	datatables.min.js:76
ha	@	datatables.min.js:76
success	@	datatables.min.js:116
c	@	jquery.min.js:2
fireWith	@	jquery.min.js:2
l	@	jquery.min.js:2
(anonymous)	@	jquery.min.js:2
load (async)		
send	@	jquery.min.js:2
ajax	@	jquery.min.js:2
(anonymous)	@	datatables.min.js:115
each	@	jquery.min.js:2
each	@	jquery.min.js:2
n	@	datatables.min.js:110
h.fn.DataTable	@	datatables.min.js:192
(anonymous)	@	UserList.php:1110
e	@	jquery.min.js:2
t	@	jquery.min.js:2
setTimeout (async)		
(anonymous)	@	jquery.min.js:2
c	@	jquery.min.js:2
fireWith	@	jquery.min.js:2
fire	@	jquery.min.js:2
c	@	jquery.min.js:2
fireWith	@	jquery.min.js:2
ready	@	jquery.min.js:2
B	@	jquery.min.js:2
Collected Value Title Data
Page Name /UserList.php
Screen Size 1080x1920
Window Size 896x1230
Page Size 971x1230
Platform Information Linux ca72d0c49430 4.9.184-linuxkit #1 SMP Tue Jul 2 22:58:16 UTC 2019 x86_64
PHP Version 7.3.13
SQL Version 5.7.19
ChurchCRM Version 3.5.5
Reporting Browser Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36
Prerequisite Status All Prerequisites met
Integrity check status {"status":"success"}
Apache Modules core,mod_so,mod_watchdog,http_core,mod_log_config,mod_logio,mod_version,mod_unixd,mod_access_compat,mod_alias,mod_auth_basic,mod_authn_core,mod_authn_file,mod_authz_core,mod_authz_host,mod_authz_user,mod_autoindex,mod_deflate,mod_dir,mod_env,mod_filter,mod_headers,mod_mime,prefork,mod_negotiation,mod_php7,mod_reqtimeout,mod_rewrite,mod_setenvif,mod_status
@brimarq
Copy link

brimarq commented Jan 20, 2020

You can run the following command in a terminal from the churchcrm root directory as a temporary fix to replaces the absolute paths in url() functions within /skin/external/datatables/datatables.min.css with relative paths to the images; also, it saves a copy of the original file to /skin/external/datatables/datatables.min.css.bak just in case you need to revert:

sed -i.bak 's%url("/DataTables-1\.10\.18/images/%url("\./DataTables-1\.10\.18/images/%g' ./skin/external/datatables/datatables.min.css

This gets rid of the multiple redirects and correctly displays the sorting arrow images in the table column headings.

@crossan007 crossan007 added the bug label Jan 20, 2020
@crossan007 crossan007 self-assigned this Jan 20, 2020
@crossan007 crossan007 added this to the 4.0.0 milestone Jan 20, 2020
@crossan007
Copy link
Contributor

I confirm this is a 3.5.5 bug. I'm having trouble replicating it in 4.0.0 (not yet released), but I also don't see evidence that the bug has been fixed

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