[Solved] Problem in Image locations of rss feeds

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
euphoria360
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 13 Jun 2014, 13:07

[Solved] Problem in Image locations of rss feeds

Postby euphoria360 » 13 Jun 2014, 13:20

Hi.
I have setup tt-rss on my VPS and everything is working great. Feeds are getting parsed and everything is OK.
Also I checked the mark to cache images locally for every rss feed i had entered. So when I log in and I'm looking at my feeds, all images are locally cached. This is really helpful since my country censors most of my news sources and this way I can catch up with them and see even the images.

The problem is that I'm using an RSS reader on my phone and I have imported rss links of my news feeds to it too. But in feeds all images are still from my news source site and not the ones cached locally, so I am missing all images there.
For example this is one of my news sources:
http://euph.ml/news/public.php?op=rss&i ... ac152adf6e
If I look at this source directly from tt-rss, images shown are the cached ones, but as you can see from above, the rss feed of the same source has its images on the main site!

Can someone help me on solving this?

Update: It is solved now thanks to fox for fixing the bug.

For fixing it, go to your tt-rss root and edit classes/handler/public.php:
find "$content = sanitize($line["content"], false, $owner_uid);" and comment it out, then add this under it:

Code: Select all

$content = sanitize($line["content"], false, $owner_uid,
$feed_site_url);


So it should be like:

Code: Select all

                                //$content = sanitize($line["content"], false, $owner_uid);
                                $content = sanitize($line["content"], false, $owner_uid,
                                        $feed_site_url);


also the bug has been fixed on GIT master branch:
fox wrote:https://github.com/gothfox/Tiny-Tiny-RSS/commit/4b19d4ac9154ab123a0d6f0efe78f23cce4ac4da
Last edited by euphoria360 on 18 Jun 2014, 23:31, edited 2 times in total.

SOV
Bear Rating Trainee
Bear Rating Trainee
Posts: 15
Joined: 13 Jun 2014, 02:41

Re: Problem in Image locations of rss feeds

Postby SOV » 13 Jun 2014, 22:42

I may be wrong...

But without sounding like an asshole, the issue may be with your RSS App. If the web portal works fine, then it seems the app is just getting the links and downloading the images and information second hand.

I hope someone else can help.

If I'm understanding wrong let me know.

Latimer
Bear Rating Master
Bear Rating Master
Posts: 131
Joined: 17 Mar 2013, 19:35

Re: Problem in Image locations of rss feeds

Postby Latimer » 13 Jun 2014, 23:11

I hope the "key" parameter in your URL is not something that's supposed to be confidential.

euphoria360
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 13 Jun 2014, 13:07

Re: Problem in Image locations of rss feeds

Postby euphoria360 » 18 Jun 2014, 13:34

SOV wrote:I may be wrong...

But without sounding like an asshole, the issue may be with your RSS App. If the web portal works fine, then it seems the app is just getting the links and downloading the images and information second hand.

I hope someone else can help.

If I'm understanding wrong let me know.

Thanks for your reply.

No. It's not the issue of my RSS reader(s). Well if you check the link I provided (which is the generated RSS link of my TT-RSS) you will notice that image links are not from my host.


Latimer wrote:I hope the "key" parameter in your URL is not something that's supposed to be confidential.

Thanks for stating it, but it doesnt matter. I'll change it after I'm done here.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Problem in Image locations of rss feeds

Postby fox » 18 Jun 2014, 14:56


euphoria360
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 13 Jun 2014, 13:07

Re: Problem in Image locations of rss feeds

Postby euphoria360 » 18 Jun 2014, 19:23

fox wrote:https://github.com/gothfox/Tiny-Tiny-RSS/commit/4b19d4ac9154ab123a0d6f0efe78f23cce4ac4da


Wow! Is that fixed now!
That was FAST!

So I just need to change the lines you edited in my "classes/handler/public.php"? Or I need to clone it from git?

euphoria360
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 13 Jun 2014, 13:07

Re: Problem in Image locations of rss feeds

Postby euphoria360 » 18 Jun 2014, 19:38

euphoria360 wrote:
fox wrote:https://github.com/gothfox/Tiny-Tiny-RSS/commit/4b19d4ac9154ab123a0d6f0efe78f23cce4ac4da


Wow! Is that fixed now!
That was FAST!

So I just need to change the lines you edited in my "classes/handler/public.php"? Or I need to clone it from git?


I did it. Deleted the line in red and added the green ones. It's working now. Thanks!

martywd
Bear Rating Trainee
Bear Rating Trainee
Posts: 26
Joined: 04 Feb 2013, 20:47
Location: Texas

Re: Problem in Image locations of rss feeds

Postby martywd » 18 Jun 2014, 21:49

euphoria360 wrote:...
I did it. Deleted the line in red and added the green ones. ...


Rather than 'delete' code, I'd suggest commenting out the 'old' line(s) with '//' and then adding the amended code to the file you're updating. If you really want to be anal add the link to the forum thread (like I do) as a reference, alternately a link to the 'git' if you prefer.

Something like the following:

Code: Select all

                                // http://tt-rss.org/forum/viewtopic.php?t=3036&p=17912#p17912 
                                //$content = sanitize($line["content"], false, $owner_uid);
                                $content = sanitize($line["content"], false, $owner_uid,
                                        $feed_site_url);



Much safer then 'delete'.
.

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: Problem in Image locations of rss feeds

Postby sleeper_service » 18 Jun 2014, 22:30

martywd wrote:Much safer then 'delete'.
.

and yet, 'delete' is exactly what would been the result if he'd done a git clone to be running the current version.

euphoria360
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 13 Jun 2014, 13:07

Re: Problem in Image locations of rss feeds

Postby euphoria360 » 18 Jun 2014, 23:19

martywd wrote:
euphoria360 wrote:...
I did it. Deleted the line in red and added the green ones. ...


Rather than 'delete' code, I'd suggest commenting out the 'old' line(s) with '//' and then adding the amended code to the file you're updating. If you really want to be anal add the link to the forum thread (like I do) as a reference, alternately a link to the 'git' if you prefer.

Something like the following:

Code: Select all

                                // http://tt-rss.org/forum/viewtopic.php?t=3036&p=17912#p17912 
                                //$content = sanitize($line["content"], false, $owner_uid);
                                $content = sanitize($line["content"], false, $owner_uid,
                                        $feed_site_url);



Much safer then 'delete'.
.


Forum is all sexy! Full of ass and hole and other substitutes!!! :D


Return to “Support”

Who is online

Users browsing this forum: No registered users and 3 guests