Port removed from article link

  • [x] I’m using stock docker compose setup, unmodified.
  • [ ] I’m using docker compose setup, with modifications (modified .yml files, third party plugins/themes, etc.) - if so, describe your modifications in your post. Before reporting, see if your issue can be reproduced on the unmodified setup.
  • [ ] I’m not using docker on my primary instance, but my issue can be reproduced on the aforementioned docker setup and/or official demo.

I follow a feed that their links itens has a :port. Look, it is the link in feed, not the url to feed itself.

I post a similar feed entry here: https://pastebin.com/raw/D75yaNgi
Use this url as feed url. When tt-rss get an item the link will be without the :5000 port.
I subscribe to it in the official demo too and it reproduce as well.

  • Tiny Tiny RSS version (including git commit id): v23.04-0578bf80
  • Platform (i.e. Linux distro, Docker, PHP, PostgreSQL, etc) versions: Docker

I test it in Feed Parser (https://tt-rss.org/myfeedsucks/) and noticed this important point:

Link (raw):         http://192.168.1.2:5000/diff/8cf094db-3654-4b26-9929-e3565a6f1fde
Link (validated):   http://192.168.1.2/diff/8cf094db-3654-4b26-9929-e3565a6f1fde

I read some posts here in community but all about the feed itself is using a port not the article link.

So is it supposed to happen?
If so, how can I fix it on my side so can work without problem?

I’m open to supply any more information needed.

Thanks in advance.

Yes. Non-standard ports are not supported. For example:

If so, how can I fix it on my side so can work without problem?

You can’t. You have to persuade the owners of the feed put it on a standard port.

Thanks for the responde @shabble .

But it is about article link too? I was interpreting it like feed.com:5000/feed.xml isn’t allowed, but it isn’t the case here, the port is in a article link inside the feed content.

https://gitlab.tt-rss.org/tt-rss/tt-rss/-/merge_requests/3 commented my concerns here

we could continue the discussion either over there on itt

Thanks for bring this MR link here, @fox .

I commented there to because I agree it is a better place to discuss code changes.

So I can finish/close the issue topic here.

As a workaround, you could add and activate a custom plugin. Here’s a (quick and dirty) example:

plugins.local/restore_port/init.php:

<?php
class Restore_Port extends Plugin {

	function about() {
		return array(null,
			"Adds back a port number",
			"author");
	}

	function init($host) {
	}

	function get_js() {
		return <<<EOF
require(['dojo/_base/kernel', 'dojo/ready'], function(dojo, ready) {
	ready(function() {
		PluginHost.register(PluginHost.HOOK_HEADLINE_RENDERED, (headline_element) => {
			const a = headline_element.querySelector('a.title[href^="http://192.168.1.2/"]')
			if (a) {
				a.href = a.href.replace('http://192.168.1.2/', 'http://192.168.1.2:5000/');
			}
		});
	});
});
EOF;
	}

	function api_version() {
		return 2;
	}
}