magma1447 / greasemonkey-geocaching-projectgc

Adds links and data to Geocaching.com to make it collaborate with Project-GC.com
MIT License
18 stars 14 forks source link

Uncaught TypeError: result.data is undefined #98

Open capoaira opened 3 years ago

capoaira commented 3 years ago

grafik

        // VGPS form
        if (IsSettingEnabled('showVGPS')) {
            GM.xmlHttpRequest({
                method: "GET",
                url: pgcApiUrl + 'GetExistingVGPSLists?gccode=' + gccode,
                onload: function(response) {
                    var result = JSON.parse(response.responseText),
                        vgpsLists = result.data.lists, // here is result.data not defined
                        selected = result.data.selected,
                        existsIn = result.data.existsIn,
                        selectedContent,
                        existsContent,
                        html = '<li><img width="16" height="16" src="https://cdn2.project-gc.com/images/mobile_telephone_32.png"> <strong>Add to VGPS</strong><br />',
                        listId;
rteitelman commented 2 years ago

I don't see this error message at this time. and the 'Add to VGPS' window/menu on the cache page is showing all my lists in the window. Case closed?

magma1447 commented 2 years ago

Taking a guess here. Maybe it triggers a bug if no VGPS exists on the geocaching account. I can try to reproduce this next week. I will however need to use an alternative account since I don't want to remove the VGPS's I have myself.

capoaira commented 2 years ago

Taking a guess here. Maybe it triggers a bug if no VGPS exists on the geocaching account. I can try to reproduce this next week. I will however need to use an alternative account since I don't want to remove the VGPS's I have myself.

Yes, that makes sense. I've never really used the vgps

rteitelman commented 2 years ago

does the GM script run if you don't have a paid membership with Project-GC? ????? I thought the script only ran if you were a paid member.

magma1447 commented 2 years ago

It does run without. Most features don't work though, because they depend on server side things that depends on a paid membership.

The script knows if the user is a paying member, if it isn't it should not show Vgps stuff. I can't say if it does though, currently only on my phone.

capoaira commented 2 years ago

If it depends on the membership, we may be able to handel it client side. I am a non-paying member too.