Ticket #100 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

fetch_rss() is not called by update_rss_feed()

Reported by: maci Assigned to: fox
Priority: major Milestone: 1.2.2
Component: backend Version:
Keywords: magpierss xml-rpc Cc:

Description

With version 1.2.1, I tried to use xml-rpc to subscribe a RSS feed but I failed. There was no response. But I tried again, I got a message "Feed already exists in the database.".

So I added a few debug code to subscribe_to_feed() and update_rss_feed() in functions.php. And I found that fetch_rss() of rss_fetch.inc was not called by update_rss_feed(), line 280.

When I added the following code at the beginning of functions.php, fetch_rss was called and I got a message "Subscribed successfully." from xml-rpc. It worked fine.

require_once 'magpierss/rss_fetch.inc';

I think you'd better add the code somewhere in functions.php. (I don't know where is the correct place though...)

Testing environment: tt-rss 1.2.1
CentOS Linux 4.3
PHP 4.3.9
Apache 2.0.52
MySQL 4.1.12

Change History

08/19/06 10:08:35 changed by fox

Wait a second, what about functions.php line 15? Maybe you don't have RSS_BACKEND_TYPE set correctly?

08/19/06 17:05:18 changed by maci

At line 15 of function.php:

require_once 'magpierss/rss_utils.inc';

"Require" statement of rss_utils.inc does not enable fetch_rss(). Because fetch_rss() is defined in rss_fetch.inc, you need "require" statement of rss_fetch.inc. If rss_utils.inc contained "require" statement of rss_fetch.inc you were correct, but actually it doesn't.

Please find the README in magpierss directory, you can find the code below in it.

SYNOPSIS
	require_once(rss_fetch.inc);
	$url = $_GET['url'];
	$rss = fetch_rss( $url );

In addition, I'm sure to set RSS_BACKEND_TYPE correctly. Thank you for your attention.

08/19/06 17:11:15 changed by fox

  • status changed from new to assigned.
  • milestone set to 1.2.2.

Good point. Accepted.

08/19/06 18:29:41 changed by www-ttrss

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [1257]) [project @ load magpie/rss_fetch.inc in functions.php (closes #100)]