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

Map not loading in dashboard of multisite #77

Open
konus1 opened this issue May 4, 2016 · 6 comments
Open

Map not loading in dashboard of multisite #77

konus1 opened this issue May 4, 2016 · 6 comments

Comments

@konus1
Copy link

konus1 commented May 4, 2016

Hallo, I use wp-geo on an wordpress multisite with sites in subdirectories (no subdomains used):
www.dd4kids.de (site 1, german version)
www.dd4kids.de/en (site 2, english version)

Wordpress Version 4.5.1
WP-Geo Version 3.4
Browser: tested with Chrome and Firefox

After switching from http to https, I found the issue, that the map is not working in the dashboard of the article-editor on * site 2* only (site 1 is working!)

Reading all the postings regarding this issue, is looks like a problem with different urls in websites>settings siteurl and home, but I do not know how to debug this issue.

Here are my actual settings for site 2: (www.dd4kids.de/en):
2016-05-04 14-21-47_website bearbeiten_ dresden with children netzwerkverwaltung_ dresden fur kind
If I use
siteurl: https://www.dd4kids.de/en
Home: https://www.dd4kids.de/en
then the dashboard map is not working (showing "Loading Google map, please wait..." only).

However it is working with the following setting:
Home: http://www.dd4kids.de/en (remove the 's') OR
Home: https://www.dd4kids.de (remove the subdirectory)

Any hint to solve this problem is appreciated!

@konus1
Copy link
Author

konus1 commented May 4, 2016

Also on the frontend are no maps visible. In both cases it looks like the corresponding script code is not even loaded (and therefor can not send an error message)

@benhuson
Copy link
Owner

benhuson commented May 4, 2016

Thanks for your bug report.

I'll setup a multisite install with similar configuration to test.

@konus1
Copy link
Author

konus1 commented May 4, 2016

I investigated a bit more: in /include/wp-geo.php in line 750 there is a check with wpgeo_check_domain(). If I disable the check, everything is working fine.

The function wpgeo_check_domain() itself is defined in /include/functions.php - maybe it is to restrictive? I also see a http hardcoded there.

@benhuson
Copy link
Owner

benhuson commented May 5, 2016

Thanks. I'll focus on that function.

@benhuson
Copy link
Owner

benhuson commented May 5, 2016

In the wpgeo_check_domain() function can you try replacing that hardcoded http reference as follows:

$blog = preg_replace( "/(" . $http . "://[^\/])./", "$1", get_bloginfo( 'url' ) );

if that works, let me know and I'll release an update.

@konus1
Copy link
Author

konus1 commented May 6, 2016

Sorry, it did not work: My adress https://beta.dd4kids.de rendered to https://bta.dd4kids.de
After comparing to the original expression, I added to more asterisks at the end.
$blog = preg_replace( "/(" . $http . ":\/\/[^\/]*).*/", "$1", get_bloginfo( 'url' ) );
Now it works for my case.

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

2 participants