The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ajax call response
#1
So I have built 3 ajax scripts that return some values from my database.
However, whenever I run these ajax calls, they all return the same response:

data returned:
--------------
<script>
// Place analytics code here
</script>

Case 1:
If I don't set a response, a response is sent anyway with the above data.

Case 2:
If I set a response eg. echo "test"; then the following response is received:

data returned:
--------------
<script>
// Place analytics code here
</script>
test

Case 3:
If I don't include init.php then the ajax calls behave as they should.

Obviously something is wrong here, because the only file i'm including is init.php

Conclusion:
So I went to /users/helpers/us_helpers.php and commented out line 22:
//require_once $abs_us_root.$us_url_root.'usersc/includes/analytics.php';

And the problem looks fixed for now.
  Reply
#2
Hmm. That is extremely interesting.

Dang. I see it. I used php commenting out instead of html commenting out on that file. Can you see what happens if you change the commenting type or just delete line 24 on usersc/includes/analytics.php
  Reply
#3
I noticed this happened two when I was having Data Updated values returned to my browser. I ended up just taking everything out of the custom analytics and it fixed it, however, I think the above would help.
  Reply
#4
Yep. I can push that out for 4.1.8c.
  Reply
#5
Yep. I can push that out for 4.1.8c.
  Reply
#6


Quote:Can you see what happens if you change the commenting type or just delete line 24 on usersc/includes/analytics.php

Sorry for the delay in replying.
Neither of these 2 solutions seemed to work for me.

Anyway, it seems that you have already fixed it, although the downloads aren't working for some reason so I can't download the patch and see what changed.

Happy to help anyway Smile
  Reply
#7
Yeah. Sorry about that. I was doing the patch from the road and I goofed the link. It's all good now.
  Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)