Return to Project-GC

Welcome to Project-GC Q&A. Ask questions and get answers from other Project-GC users.

If you get a good answer, click the checkbox on the left to select it as the best answer.

Upvote answers or questions that have helped you.

If you don't get clear answers, edit your question to make it clearer.

+1 vote
1.4k views
Hello,
Sorry I am French, and poorly written English.
The Greasemonkey script (https://greasyfork.org/fr/scripts/9713-geocaching-com-project-gc) stopped working for several days. It is activated, appears well in the header, but all that is in the descriptive part of the cache no longer appears (the last log summary, virtual GPS, etc).
Probably because of the change in the structure of pages GeoCaching.com made a few days ago (and causing a malfunction c: geo well).
Thank you :-)
 
Screenshot ]
[ Mac OS X 10.11 / Chrome 47.0.2526.35 / Tampermonkey 3.11 / Geocaching.com + Project-GC 1.4.5 ]
in Bug reports by Jipem (1.7k points)

1 Answer

0 votes

You are correct, it's because of changes to Geocaching.com.

We have just released a new version (two new versions actually). Using the latest (1.4.7) should make it work.

by magma1447 (Admin) (241k points)
Hello,

1.4.8 version is partially functional. Most features working again.
But others, not (as yet it is enabled in the config):
- The virtual GPS no longer appear in the right column
- The "print and download" menu does not collapse
- No "Add links to PGC gallery"
- Etc.

Screenshot page: https://www.dropbox.com/s/vlc08g9l3bz1f6t/Capture%20d%27%C3%A9cran%202015-11-03%2010.40.53.png?dl=0

Screenshot config: https://www.dropbox.com/s/ajxullcmfd8l73o/Capture%20d%27%C3%A9cran%202015-11-03%2010.41.12.png?dl=0

All my other Greasemonkey scripts have been disabled to avoid conflicts, but similar result.

Thank you :-)

[Mac OS X 10.11 / Chrome 47.0.2526.35 / Tampermonkey 3.11 / Project + Geocaching.com-GC 1.4.8]
We will have to look into that closer. Works fine for me with Ubuntu 15.10, Chrome 45, Tampermonkey 3.11, PGC+GCCOM 1.4.8.

It's like that one of the functions fails, and then the script stops. You could try to disable everything except the "Add to VGPS" for example, to see if that one starts working then. If it does, you can enable functions one by one to see when it breaks again.
The problem is "collapse download links." When activated, some features are not displayed (see previous post). When it is off, everything works fine.
When "collapse download links" is activated, I have in console "Uncaught TypeError: Illegal invocation" : https://www.dropbox.com/s/rqcb3aekwdkrekb/Capture%20d%27%C3%A9cran%202015-11-03%2012.16.15.png?dl=0
When "collapse download links" is off, I do not have this error.
Great analyze, helps a lot. Could you do me one more favor? The code for this is just two lines. Could you check if it's the first or second that fails, by running these in the console?

$('<p style="cursor: pointer; margin: 0;" id="DownloadLinksToggle" onclick="$(\'#ctl00_divContentMain div.DownloadLinks, #DownloadLinksToggle .arrow\').toggle();"><span class="arrow">&#x25BA;</span><span class="arrow open">&#x25BC;</span>Print and Downloads</p>').insertAfter('#ctl00_ContentBody_CacheInformationTable div.LocationData');

$('#ctl00_divContentMain div.DownloadLinks, #DownloadLinksToggle .arrow.open').hide();

The visual effect of the two lines is that the first one adds the "Print and downloads" text, which can be clicked to later expand it. The second one hides the content.
In video:
- In the console, no error when "collapse download links" is disabled. But when that error is activated => https://drive.google.com/file/d/0B0wWVy8N2MqvQUJrYV9yVXI3VE0/view?usp=drivesdk
- With these two lines inserted in the console, no errors or for line 2 (hides) or line 1 (which shows). The result image => https://drive.google.com/file/d/0B0wWVy8N2MqvZ1dsZTRtQWw3SzA/view?usp=drivesdk
That's a bit of a surprise. So in short. It works when you do it manually, but it fails when TM does it. The only thing I noticed was that you ran the lines of code in the opposite order, but it really should not matter.

At least we can be glad that it's not a critical issue. It's probably one of the least needed functions.

To be honest I can't think about a solution right now. To me, it makes no sense that it works when you do it manually.

What might give more clues is to edit the script code that you actually use. Not sure how comfortable you are with that, but it can be edited through TamperMonkey. It's line 553-554 in version 1.4.8. Commenting out one by one could maybe tell us something. If it's the first line one could try to rewrite it, but then you need some JS experience.

I don't think this will matter, but in my development branch I have changed the end of 553 to:
.insert('#ctl00_divContentMain div.DownloadLinks');
It makes more sense to insert it before the div that it belongs to, than after a div that isn't related. But again, I can't imagine it being a fix for the issue itself.
I reassure you, me neither I do not understand the cause. Here I try to debug and understand.
If I move the "if (IsSettingEnabled ('collapseDownloads'))" last item of "Page_CachePage function ()" script all other features are displayed correctly. The "collapse download links" function so well is blocked from the rest, but putting that last no more discomfort.
As against the "print and download" does not automatically cache. I must click on it to close.
In short this is not a vital feature. But I like to understand and I will attempt to continue.
This is the line 554 "$('#ctl00_divContentMain div.DownloadLinks, #DownloadLinksToggle .arrow.open').hide();". causing the error "Uncaught TypeError: Illegal invocation". For if I only active 553 and disables it, the error does not appear.
Suddenly I have the same issue myself, which is good. Likely that I will be able to solve it then.

Have also found some other smaller issues which I have already commited changes for. Hoping for a new release later today.
1.4.9 was just released, should work better with that one.
All is ok with 1.4.9. Thanks ganja :-)
...