geodesicsolutions-community / geocore-community

GeoCore Community, open source classifieds and auctions software
MIT License
9 stars 6 forks source link

Stop the RSS "news" check from the old site #76

Closed jonyo closed 2 years ago

jonyo commented 2 years ago

There is a thing that shows "news" on the admin home page, it tries to load an RSS feed from the now shut down old website.

Remove the check. Maybe leave the parts that allow addons to add their own so that part still works.

vicos59 commented 2 years ago

src\admin\AJAXController\homeLicense.php

However, I don't see where it displays on the admin home page...Well, I don't see a placeholder for it were it working.

See also #120

jonyo commented 2 years ago

Looking at the old repo git history, it was commented out from the admin home page in 2016 and removed when they re-designed the admin home page in 2018.

But it was not a complete removal, the only part that was removed was where the results get inserted in the page. So essentially it is doing the extra work of attempting to get the news feed, then it just does nothing with the results.

I verified, when on the admin home it makes an ajax call to get the news, and it returns back a news section that is empty (since the RSS feed it tries to get does not exist).

Originally I was thinking we should still keep it if any addons make use of it. But since it has been out since 2016, probably not many 3rd party addon developers even used that ability. So we are safe to just remove it. (If you are a 3rd party developer that wants to use it, chime in!)

To remove it completely:

Note: We could remove all of the homeLicense stuff at once, but I thought removing the license part would be better to do on its own since it is more work - it is still shown on the admin home so we need to maybe reorganize the layout slightly so the admin home page still looks good.

vicos59 commented 2 years ago

This might be related to #111. Will have to look deeper. The 2 issues may need to be merged in to one.

vicos59 commented 2 years ago

it is doing the extra work of attempting to get the news feed, then it just does nothing with the results.

This may be the reason the admin home loads so sluggishly. It is also a potential security risk?

vicos59 commented 2 years ago

src\admin\AJAXController\homeLicense.php

2 applicable functions:

getNews() getLicenseData()

getNews calls http://geodesicsolutions.com/latest-software-news-blog.feed?type=rss

jonyo commented 2 years ago

it is doing the extra work of attempting to get the news feed, then it just does nothing with the results.

This may be the reason the admin home loads so sluggishly. It is also a potential security risk?

No, it's because the home page is showing so much info, that is a lot of queries. That is why it uses ajax to load them so the initial page loads, then all the parts come in with AJAX as they load.

vicos59 commented 2 years ago

Not sure if this should go here or a separate issue. They all seem related.

software downloads

The download access expires just shows current date.

When you click on the Refresh Downloads Status button, you end up on this URL:

http://localhost:8081/admin/index.php?clear_local_key_cache=1

which displays the Getting Started Checklist.

vicos59 commented 2 years ago

Coincidentally, right after I did the above, I noticed in my Github Desktop that src\_geocache\.htaccess had been deleted.

Hmmm

vicos59 commented 2 years ago

src\admin\rss_news_reader.php

calls:

return $tpl->fetch('rss_reader.tpl');

which is located at:

src\admin\templates\rss_reader.tpl

vicos59 commented 2 years ago

The Software Downloads block is defined in this template:

src\admin\templates\home\downloads.tpl

The Support block is defined in this template:

src\admin\templates\home\support.tpl