#wordpress 2023-04-30

2023-04-30 UTC
IWSlackGateway, doug_c_im, gRegor, fef, [marksuth], sebbu2, [jeremycherfas], sandworm7145, [schmarty], Loqi, [BinaryDigit], jeremycherfas, [Jo], [snarfed] and [chrisbergr] joined the channel
#
[chrisbergr]
Hey @GWG, I'm facing issues with the simple location page for map by year (2023/map). Unfortunately I can't get the debug.log to run, no idea what's going on there. In the source code I see '<img class="archive-map sloc-map" src="<https://christian-hockenberger.com/2023/map/%3C!DOCTYPE%20html%3E%3Chtml%20lang=|<!DOCTYPE html>>' followed by the source code for 'There has been a critical error on this website.' Error page.
#
[chrisbergr]
On my localhost I get the following in my debug.log: [30-Apr-2023 _20:02:29_ UTC] PHP Fatal error: Uncaught Error: Class "WP_Geo_Data" not found in C:\sites\localhost\chobz\wp-content\plugins\simple-location\includes\map\class-map-provider-geoapify.php:89
#
[chrisbergr]
But as I said, unfortunately I can't guarantee that it's the same problem as on the server. Do you have any ideas/suggestion for me?
#
GWG
[chrisbergr]: I thought I checked all the map providers when I changed the structure.
#
GWG
[chrisbergr]: I see the problem. I'd better check them all.
#
GWG
Give me a few.
#
GWG
WP_Geo_Data was split into 2 classes in version 5
#
[chrisbergr]
Cool, thank you
#
GWG
Only the Bing and the Geoapify were affected.
#
GWG
Pushed to Github
#
[chrisbergr]
I guess I bet on the wrong horse πŸ™‚
#
[chrisbergr]
Thank you, I'll geht the file from there πŸ™‚
#
GWG
[chrisbergr]: It is just the class-map-provider-geoapify. I'll release in the next version, but make sure it works
#
GWG
[chrisbergr]: Anything else about the plugin? Because I did have plans to redo the fallback system
#
[chrisbergr]
Now I get [30-Apr-2023 _20:45:49_ UTC] PHP Fatal error: Uncaught Error: Call to undefined method Geo_Data::bounding_box()
#
GWG
Let me see where I put bounding_box
#
GWG
There it is, I went global
#
GWG
Pushed a replacement
#
[chrisbergr]
Yes, now it works again πŸ™‚ Thank you for this super fast solution! GWG++
#
Loqi
GWG has 25 karma in this channel over the last year (62 in all channels)
#
GWG
[chrisbergr]: So, what other issues do you have? I just pushed a bunch of PHP8 related things to it
#
[chrisbergr]
Otherwise I have no problems with the plugin, everything runs great. I currently have problems with ownyourswarm, but I don't think it's because of Simple location. I need to get the debug running again, then I'll know more.
#
GWG
[chrisbergr]: I keep tweaking the plugin for my own need, and to stay ahead of API issues. That's why I wrote so many providers...things keep breaking without me doing anything.
#
GWG
MapQuest is malfunctioning agian
[TMichelleMoore] joined the channel
#
[TMichelleMoore]
Nice headshot [chrisbergr]! I have not used the simple location plugin. I will have to try it.
#
[chrisbergr]
In fact, I use location data only for checkins, all other posts are always without.
#
GWG
I need to post some pictures
#
[chrisbergr]
GWG: It's great to have so many providers. On one hand there is always the possibility for a fallback. On the other hand you don't need to open a new account on a new provider if you have already one by one of those providers
#
[TMichelleMoore]
@gwg I will add that to my tests and try it. Syndication-Links next.
#
GWG
[chrisbergr]: I put in a weather fallback mostly becauseI wanted to have a local provider and a remote one. I considered self-hosting a reverse geocoder for just my home region, but I'd need a fallback for other regions.
#
[chrisbergr]
[TMichelleMoore] A complete test of simple location will be extreme! So many 3rd party sites that you would have to deal with.
#
[chrisbergr]
But it would certainly be very helpful for GWG
#
GWG
[chrisbergr]: I test it every few months. I applied for test credentials for everything.
#
[TMichelleMoore]
[chrisbergr] OK, then I will have to keep it simple and maybe use one or two sites. I don’t know how to use it yet, so I will do what I have been doing: document the features listed on the plugin page, run through the settings, try to set it up for one or two, and figure out the test/feature. With your warning, I know that there might be some, β€œDidn’t test” in there.
#
GWG
I just looked at the code to determine region, so I can limit providers to certain regions, and realized it only goes by country, no smaller. Maybe I need subregion.
#
[chrisbergr]
[TMichelleMoore] I am curious about your results πŸ™‚
#
GWG
Simple Location is a labor of love..it is the geekiest plugin I wrote.
#
[chrisbergr]
@GWG I have seen that you also save the generated images of the map provider. But this is not a basic feature of the plugin, is it?
#
[chrisbergr]
In fact, it is really geeky πŸ˜„
#
[TMichelleMoore]
[chrisbergr] What 3rd party do you use? And did you have to get some kind of key or something to use it?
#
[chrisbergr]
I guess tey all require api keys. I'm using Geoapify, for me personally this was the easiest to set up
#
[chrisbergr]
And there are many nice map styles, even if I use a very boring one right now
#
[TMichelleMoore]
[chrisbergr] OK. This really should have been the first plugin that I tried because my photos are really location based. This seems likes its going to be the hardest one.
#
GWG
[chrisbergr]: I don't. I generate them.
#
Loqi
[preview] [dshanske] Static-Maps-API-PHP: A PHP app that renders static maps from tile hosting services
#
GWG
I took over this project from aaronpk, who folded the original into Atlas
#
[chrisbergr]
Oohh wow that's awesome! I think after my current client project I will also put a little effort into this, with that great blueprint.
#
[TMichelleMoore]
@gwg I am definitely going to have questions. :-) Hope you are enjoying your trip!
#
GWG
I do a lot of location work when I travel
#
GWG
Because that's when I use the code
#
[chrisbergr]
Do you also add location data to your media?
#
GWG
[chrisbergr]: I do. It is built in
#
GWG
[chrisbergr]: That's the location taxonomy. I'm guessing you have none. It should be created on a reverse geo lookup
#
[chrisbergr]
That new content type "venue" in my admin bar?
#
GWG
[chrisbergr]: Venue is a content type for venues. Location is a taxonomy for locality, region, and country.
#
GWG
Right now, they are auto-created by Own Your Swarm, but they can be created locally. I started a venue provider system
#
[chrisbergr]
tbh I don't know the difference between venue and location. The dictionary provides me the same list of translations for both...
#
GWG
[chrisbergr]: Wiki
#
GWG
What is a venue?
#
Loqi
πŸ“ A venue is a named location or address/geo that is typically used for checkins https://indieweb.org/venue
#
GWG
[chrisbergr]: A venue is a specific location
#
GWG
So, a URL on your site to represent the location
#
GWG
Like that
#
GWG
The location taxonomy is so I can show all the posts I did in an area
#
[chrisbergr]
Ah, slowly it starts to make sense for me πŸ™‚ As far as I remember does google name it just "place"
#
[TMichelleMoore]
@gwg Is the venue similar to a WordPress category/tag?
#
[chrisbergr]
You never left Berlin when you were in Germany?
#
GWG
[TMichelleMoore]: No, it is a CPT. Location is a taxonomy..so like a category
#
GWG
[chrisbergr]: I was there thrice for IWC
#
[chrisbergr]
I so regret not running POSSE or at least PESOS back in the days of Gowalla. So many checkins lost forever. So sad.
#
[chrisbergr]
But that does not belong here in this channel
#
GWG
We need another IWC for me to come to
#
[chrisbergr]
If another IWC takes place in Berlin, I will be present.
[aciccarello] joined the channel
#
GWG
[chrisbergr]: With this system, while I'm using own your swarm as a data source..it is all local.
#
[chrisbergr]
I normally use the Swarm app on my iPhone for checkins, and always upload pictures to it. Thanks to ownyourswarm, a checkin is created directly on my page, which I delete again to manually trigger the synchonisation, so that the images come with it.
#
[chrisbergr]
But recently only one picture comes across and the comments are missing as well as that it is no longer a post kind checkin.
#
GWG
[chrisbergr]: And this will create a linked local venue url from the checkin
#
[chrisbergr]
This is strange, but I still do not know why
#
GWG
The pictures should attach as a post update
#
[chrisbergr]
That never worked for me automatically.
#
GWG
[chrisbergr]: Then we should fix that
#
[chrisbergr]
First, the problem must be identified. This is actually very difficult for me.
#
GWG
[chrisbergr]: Sometimes me too. Too many moving parts.
#
[chrisbergr]
I have a suspicion that it's polylang. As long as there is no pll lang meta, the post is not displayed in the feed. Maybe I can just always automatically put en.
#
Loqi
[preview] [chrisbergr] #353 Error with ownyourswarm's Import Past Checkin
#
GWG
Isn't that a Simple Location bug, a Micropub bug, and a Indieweb Post Kinds bug?
#
GWG
The unknown cap is strange, those are all built-in caps.
#
[chrisbergr]
It looks like that my micropub endpoint also returns an error code, so ownyourswarm now says: "Your account is disabled - Your Micropub endpoint returned an error too many times in a row".
#
GWG
The ExifVersion is strange, unless someone is stripping those, but I should check for its existence.
#
GWG
I use Own Your Swarm...so I'm wondering that the difference is. But I'll add some error checks
#
[chrisbergr]
I use Smush pro to strip exif data from my images. Until I updated about 2 weeks ago from below 5.0 to most recent version of simple location, this was never a problem.
#
GWG
[chrisbergr]: I rewrote the code because of other errors, so I need it to check to ensure there is Exif data before trying to use it
#
[chrisbergr]
That sounds reasonable. Is the missing exif data also the reason for the following fatal error?
#
GWG
Similar failure to check for a null value.
#
GWG
Exif issue pushed to Simple Location file class-sloc-media-metadata
#
GWG
Checking for an empty media metadata array in Indieweb Post Kinds pushed as well.