Hi! I am struggling with a feed which I really need.
I’m sure that the feed maintainer has messed things up, but from our political situation the only outcome which I can achieve by contacting them is that the feed will be stopped completely. So please help me.
From the plaintext XML view the feed looks good, but it causes problems with tt-rss.
I wrote a plugin and it helped for some time, but since September 12 something got broken and I am receiving corrupt articles again.
The feed I am dealing with is election committee.
The “Test your feed with tt-rss parser” page says it is completely okay and parses correct articles.
But when I load this feed into my ttrss, I get corrupt article links: http://mosgorizbirkom.ru/web/guest/http://mosgorizbirkom.ru/main?p_p_id=101&p_p_lifec...
As you see, all the links which can be seen correct in RSS XML source get loaded into tt-rss preceeded with this strange http:// mosgorizbirkom.ru/web/guest/
Where does it come from? Why is it here? I got no idea but it was there for years as I’ve been using tt-rss.
Okay, in July I wrote a plugin which replaced double http header with single one and it worked until September 08, but it is broken now. They changed the way they mess links but now I fixed my plugin.
Now I see both right and wrong URLs in my database.
Articles loaded after my fix have correct links.
How does that work? Why is the plugin not replacing links?
Does the plugin not fix previoulsy loaded articles?
Is there a good way to fix broken ones in the database?
Should I develop and run UPDATE in docker exec -it ttrss-docker_db_1 psql -U postgres or is there a better way?
I checked all the boxes at the debugger page, still no changes in database.
Questions aggregated:
Why are the article links broken?
Does the plugin not change repaired links for previoulsy loaded articles?
What has to be there? Unescaped http://url instead of this http:// ?
Is there a good way to fix links for articles already downloaded in the database?
I have no access to the server config. Do you think that my approach to change $article["link"] = str_replace( "http://mosgorizbirkom.ru/web/guest/http://mosgorizbirkom.ru/", "http://mosgorizbirkom.ru/", $article["link"] );
is good enough?
Which type of script do you mean? An SQL UPDATE query in Psql database?
My str_replace HOOK_ARTICLE_FILTER works fine as it corrects new articles, but older ones still stay corrupt.
I can perfectly deal with decoding.
Could you please respond: is there a good way to update links for loaded articles without going to the database?
Articles can get updated, yes? Links, no?
Thank you very much for your help!
Now I understand what’s going on.
The backup and UPDATE ttrss_entries set link=REPLACE(link, 'http://mosgorizbirkom.ru/web/guest/http://mosgoriz', 'http://mosgoriz' ) where link like '%guest/http%';
statement fixed everything that was wrong.