Closed bLaKgRaVy closed 5 years ago
Edit, Pants Party might seem to think that this is a result of new coding for achievement and trophy lists for the pending site update and the way the templates are pulled from your server. This is happening for both platforms but I don't know if Rx is updating the sites simultaneously. Just thought to pass on the information if that is indeed the issue.
@bLaKgRaVy hmm yeah I see it's broken. Thanks for the heads up... I'll take a look at it later today.
Hey Vy!
This was brought up on PST as well. I was going to try and get a local instance of the code running but I'm on my work PC and can't install PHP. I'm hoping I'll have some time tomorrow to set up so I could test it out to see if I can find what change was made that is causing the issue.
I have zero exposure to PHP, and I've only started to delve into JS... but I'm not able to see the issue at a glance.
Hey buddy, been a while!
The issue is that the simple_dom_html.php library isn't returning the DOM for a page. This spot: https://github.com/Vyrastas/bbcode_guide_template/blob/master/ps3t_game_list.php#L111
Since it doesn't pull in any HTML, there's no data in $html
for the rest of the script to crawl through. The game/trophy pages all look the same on the websites, so the rest of the code should be fine, it's just the initial data pull.
I don't know if simple_dom_html has stopped working because there was some kind of site update to prevent scraping, or if something changed in my web host's PHP implementation. I'm fairly certain there's nothing wrong with simple_dom_html because I host a copy on my website. But maybe I need a new scraper library, idk...
Feel free to try and figure it out... 😄 I haven't had a lot of free time these past few days to fix it.
Hey Vy! I was just about to report what I've come across.
I set up a local Apache instance using XAMPP and tossed your code on it. Initially, it was failing due to the simple_dom_html. I realized that the version you're hosting may not be up-to-date compared to the PHP I have installed (7.3.8). So I pulled the latest version of simple_dom_html (v1.9). It looks like it is properly pulling the HTML now. It is showing a few notice errors, but I imagine those can all disappear with the proper PHP log level set.
I'd check to see what version of PHP your web host has installed. It is indeed possible they updated it, which breaks the dom parser.
Awesome thank you sir. I uploaded the new version of simple_dom_html and while that didn't fix the game list generation, you can get the guide template itself perfectly.
If you hack the URL itself for a game, like this: http://www.vyrastas.com/ps3t_guide_template.php?site=ps3t&game=happy-dungeons
Or this: http://www.vyrastas.com/ps3t_guide_template.php?site=x360a&game=dad-beat-dads
You can get the game's template. I'll clean up the game list page later today... please let the peeps on PST know...
Great, thanks Vy!
This is fixed now. simple_dom_html in the project was updated to v1.9.
When we access the template on XboxAchievements.com, when we click on any letter for both PlayStation and Xbox platforms, the list is empty.