Osclass Support Forums
Osclass theme support => Epsilon Osclass Theme => Topic started by: Vlad7 on May 24, 2022, 06:12:45 PM
-
Hello, why can't my location be determined. I allowed to determine the location, but it cannot determine, geolocation is also enabled on the smartphone, but the location does not determine.
-
No city found 200km around your location.
Or you do not have coordinates filled for your cities.
-
I have all the coordinates of the cities.
An error has occurred
[24-May-2022 20:14:33 Europe/Kiev] PHP Warning: Undefined array key "d_coord_lat" in /home2/ukagroco/public_html/oc-content/themes/epsilon/functions.php on line 635
[24-May-2022 20:14:33 Europe/Kiev] PHP Warning: Undefined array key "d_coord_long" in /home2/ukagroco/public_html/oc-content/themes/epsilon/functions.php on line 636
-
Need to check what is on those lines. ???
-
further errors occur :-\
[24-May-2022 20:30:17 Europe/Kiev] PHP Warning: <strong>SMTP Error: Could not authenticate.</strong><br />
in /home2/ukagroco/public_html/oc-includes/osclass/utils.php on line 562
[24-May-2022 20:30:23 Europe/Kiev] PHP Warning: <strong>SMTP Error: Could not authenticate.</strong><br />
in /home2/ukagroco/public_html/oc-includes/osclass/utils.php on line 562
[24-May-2022 20:36:58 Europe/Kiev] PHP Warning: Undefined array key "HTTP_USER_AGENT" in /home2/ukagroco/public_html/oc-content/themes/epsilon/functions.php on line 1004
[24-May-2022 20:36:58 Europe/Kiev] PHP Warning: Undefined array key "HTTP_USER_AGENT" in /home2/ukagroco/public_html/oc-content/themes/epsilon/functions.php on line 1005
[24-May-2022 20:36:58 Europe/Kiev] PHP Warning: Undefined array key "HTTP_USER_AGENT" in /home2/ukagroco/public_html/oc-content/themes/epsilon/functions.php on line 1006
[24-May-2022 20:36:58 Europe/Kiev] PHP Warning: Undefined array key "HTTP_USER_AGENT" in /home2/ukagroco/public_html/oc-content/themes/epsilon/functions.php on line 1007
-
@Vlad7
Thank you, all issues will be fixed in 1.0.7
These 2 are most probably related to mail server.
[24-May-2022 20:30:17 Europe/Kiev] PHP Warning: <strong>SMTP Error: Could not authenticate.</strong><br />
in /home2/ukagroco/public_html/oc-includes/osclass/utils.php on line 562
[24-May-2022 20:30:23 Europe/Kiev] PHP Warning: <strong>SMTP Error: Could not authenticate.</strong><br />
in /home2/ukagroco/public_html/oc-includes/osclass/utils.php on line 562
-
@Vlad7
Thank you, all issues will be fixed in 1.0.7
These 2 are most probably related to mail server.
[24-May-2022 20:30:17 Europe/Kiev] PHP Warning: <strong>SMTP Error: Could not authenticate.</strong><br />
in /home2/ukagroco/public_html/oc-includes/osclass/utils.php on line 562
[24-May-2022 20:30:23 Europe/Kiev] PHP Warning: <strong>SMTP Error: Could not authenticate.</strong><br />
in /home2/ukagroco/public_html/oc-includes/osclass/utils.php on line 562
Yes you are right. There were problems with mail
-
I have not been able to find the reason why I do not determine my location. Has anyone encountered such a problem?
-
I updated the theme to 1.0.7 and still the location is not detected automatically! What could be the reason for such a problem? I checked on your demo site, it works for you. I did a fresh installation on ocslas8.0.2+epsilon1.0.7 hosting and it doesn't work for me!
-
@Vlad7
What is your URL and what exactly is now problem? I remember we've fixed several issues reported. After update cleaning of cookies is needed.
Problem I remember was that in some actions, coordinates were not transfered into cookies.
-
Look please https://ukagro.com.ua/
-
@Vlad7
You are getting error on ajax request.
Try to enable error logging and check what is there:
https://ukagro.com.ua/index.php?ajaxRequest=1&ajaxFindCity=1&latitude=48.971678&longitude=21.7104383
-
@Vlad7
You are getting error on ajax request.
Try to enable error logging and check what is there:
https://ukagro.com.ua/index.php?ajaxRequest=1&ajaxFindCity=1&latitude=48.971678&longitude=21.7104383
Do you mean errors in the error.log file?
-
Yes, you have error 500 there, but it is not visible what cause it.
-
The file contains errors from two lags. Maybe I need to contact the technical support of my hosting?
-
Well you must enable error log to see what error it is.
-
cPanel has no errors for this site
-
Journal in Osclass?
-
Well you must enable error log to see what error it is.
Let me know am I on the right track? :(
-
When this is in functions.php it shows location but I am not able to put it in front.<?php
function get_client_ip()
{
$ipaddress = '';
if (isset($_SERVER['HTTP_CLIENT_IP'])) {
$ipaddress = $_SERVER['HTTP_CLIENT_IP'];
} else if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else if (isset($_SERVER['HTTP_X_FORWARDED'])) {
$ipaddress = $_SERVER['HTTP_X_FORWARDED'];
} else if (isset($_SERVER['HTTP_FORWARDED_FOR'])) {
$ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];
} else if (isset($_SERVER['HTTP_FORWARDED'])) {
$ipaddress = $_SERVER['HTTP_FORWARDED'];
} else if (isset($_SERVER['REMOTE_ADDR'])) {
$ipaddress = $_SERVER['REMOTE_ADDR'];
} else {
$ipaddress = 'UNKNOWN';
}
return $ipaddress;
}
$PublicIP = get_client_ip();
$json = file_get_contents("http://ipinfo.io/$PublicIP/geo");
$json = json_decode($json, true);
$country = $json['country'];
$region = $json['region'];
$city = $json['city'];
?>
-
functions.php <?php
function get_client_ip()
{
$ipaddress = '';
if (isset($_SERVER['HTTP_CLIENT_IP'])) {
$ipaddress = $_SERVER['HTTP_CLIENT_IP'];
} else if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else if (isset($_SERVER['HTTP_X_FORWARDED'])) {
$ipaddress = $_SERVER['HTTP_X_FORWARDED'];
} else if (isset($_SERVER['HTTP_FORWARDED_FOR'])) {
$ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];
} else if (isset($_SERVER['HTTP_FORWARDED'])) {
$ipaddress = $_SERVER['HTTP_FORWARDED'];
} else if (isset($_SERVER['REMOTE_ADDR'])) {
$ipaddress = $_SERVER['REMOTE_ADDR'];
} else {
$ipaddress = 'UNKNOWN';
}
return $ipaddress;
}
$PublicIP = get_client_ip();
$json = file_get_contents("http://ipinfo.io/$PublicIP/geo");
$json = json_decode($json, true);
$country = $json['country'];
$region = $json['region'];
$city = $json['city'];
?>
what is this? please explain.
-
@Vlad7
It determines clients ip country province and state ... put it in functions.php but i am not able to get it in search results yet..
<?php
function get_client_ip()
{
$ipaddress = '';
if (isset($_SERVER['HTTP_CLIENT_IP'])) {
$ipaddress = $_SERVER['HTTP_CLIENT_IP'];
} else if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else if (isset($_SERVER['HTTP_X_FORWARDED'])) {
$ipaddress = $_SERVER['HTTP_X_FORWARDED'];
} else if (isset($_SERVER['HTTP_FORWARDED_FOR'])) {
$ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];
} else if (isset($_SERVER['HTTP_FORWARDED'])) {
$ipaddress = $_SERVER['HTTP_FORWARDED'];
} else if (isset($_SERVER['REMOTE_ADDR'])) {
$ipaddress = $_SERVER['REMOTE_ADDR'];
} else {
$ipaddress = 'UNKNOWN';
}
return $ipaddress;
}
$PublicIP = get_client_ip();
$json = file_get_contents("http://ipinfo.io/$PublicIP/geo");
$json = json_decode($json, true);
$country = $json['country'];
$region = $json['region'];
$city = $json['city'];
?>
-
No, total fall.
-
I contacted my hosting provadur, they have no problem. Questions only to the developers of the theme template.
-
Error log included, see.
-
@Vlad7
Queries are OK, you had error 500 that represents some PHP errors.
https://docs.osclasspoint.com/debug-php-errors
-
If everything is in order, why doesn't it work for me!!!?
-
https://www.etutorialspoint.com/index.php/24-visitors-location (https://www.etutorialspoint.com/index.php/24-visitors-location)
I am trying to implement it myself and maybe MB Themes can help us on this...
-
I think we should stop here, step out, look on issue and start again.
...
...
...
Open this page:
https://ukagro.com.ua/index.php?ajaxRequest=1&ajaxFindCity=1&latitude=48.971678&longitude=21.7104383
If you enable error logging, instead "HTTP ERROR 500" you should see error details. We need those details.
-
hello, the magazine is on. Here is what I get
-
@Vlad7
It's database log, not php error log.
-
I turned everything on
-
try to disable OSC_DEBUG_LOG
-
OK
-
I am not sure if it works properly for you, as this link shows empty page instead of error:
https://ukagro.com.ua/index.php?ajaxRequest=1&ajaxFindCity=1&latitude=48.1467173&longitude=17.1385448
-
I follow the link and see this
-
Last time, its database query log visible to admin only, its is not error at all.
-
how can i enable what you want to see?
-
@Vlad7
Contact your hosting provider.
-
The hosting provider could not determine the reason for the error 500 on the page, recommended contacting the developer :'(
-
Lol. Host do not know how to get error behind 500. Leave such host. Until you do not have error, cannot help at all.
-
Usually they quickly helped me, for example, on the page in the topic with banner optimization for Adsense, there was also a 500 error and they fixed it. Why they can't now I don't understand.
What file should be here?
-
Its no help, just tells you error. You are not asking them for resolution.
-
Look, I got something here after removing the "welcome" plugin
-
@Vlad7
You should have this on line 15 in this file:
function wlc_param_update( $param_name, $update_param_name, $type = NULL, $plugin_var_name = NULL ) {
maybe you use older version.
-
the problem with determining my location turned out to be simple. Only in one city the coordinates were not registered.
I managed to determine this error only on version php7.4, which immediately, when searching for a location, determined only the city in which there were no registered coordinates. On the php8.0 version of the city, it simply did not determine any and there were no errors. By adding the coordinates everything worked.
-
@Vlad7
Did you have "null" there?
-
Yes, out of a large list of cities, only one city had empty latitude and longitude lines
-
@Vlad7
Thanks, SQL just need a bit of coalesce, will be implemented in next update ;)
-
Need to check what is on those lines. ???
Good day!
For the modification of the Epsilon theme to ensure that the
location' on each published display product card at the home page, premium box section and the search page has this format "city, region, country" just like the delta theme format.
Instead of the Epsilon theme default "city, country"
How much will it cost?
Thanks