Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

RSS Feed contribution support thread


Ralph2

Recommended Posts

I've been using this contribution for several years now and love it! The work is GREATLY appreciated! RSS helps with SEO for me, so this was a contribution was a nice add-on.

 

I do have a slight problem currently.

 

I recently moved my store to another host/server and I noticed the RSS feed is not working since I moved the site. I am getting the following error:

 

Fatal error: Call to undefined function getallheaders() in (address removed)

 

I moved the site by uploading all the files and imported the database.

 

It was mentioned in another post that an error like that could be whitespace in the code, but I am using files that worked fine before, I did not edit any code, so I don't see how they could be it.

 

I double checked the instructions, thinking maybe I missed a permission setting or something, but did not find anything.

 

What could I have missed in the move?

 

Any help would be appreciated so I can get this working again.

 

I've learned that since server is running as CGI, so I can not call headers, not even apache_request_headers. In checking php.net, some one posted a solution:

 

There is a simple way to get request headers from Apache even on PHP running as a CGI. As far as I know, it's the only way to get the headers "If-Modified-Since" and "If-None-Match" when apache_request_headers() isn't available. You need mod_rewrite, which most web hosts seem to have enabled. Put this in an .htacess file in your web root:

RewriteEngine on
RewriteRule .* - [E=HTTP_IF_MODIFIED_SINCE:%{HTTP:If-Modified-Since}]
RewriteRule .* - [E=HTTP_IF_NONE_MATCH:%{HTTP:If-None-Match}]

The headers are then available in PHP as
<?php
 $_SERVER['HTTP_IF_MODIFIED_SINCE'];
 $_SERVER['HTTP_IF_NONE_MATCH'];
?>

 

Which looks like my solution, but I am not much of a php coder, so I don't know how to work it into the script. Does any one else know? I'd be willing to pay some one a few bucks if they could show me how to use it.

 

This is one of two things I really need to get working. If any one is reading this knows how to make it work, could you PLEASE post. I am stuck with no where to go.

 

Never mind my pleadings :)

 

Smart people, unlike me, find a newer version of the mod and gee, things like this are already fixed. So DUH on me. But I am SO happy, my feed is working again!

 

SO.... take it from me, check for upgrades first.

Edited by ayeronnie
Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 372
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 month later...

Hello.

 

When I turn on GZIP compression ON , the RSS feed link is broken ( ERR_CONTENT_DECODING_FAILED browser error).

 

What is the relation between them and how can I use them both ?

 

Thanks for the help

Link to comment
Share on other sites

Hi, using the latest version I get this error:

XML Parsing Error: XML or text declaration not at start of entity
Location: https://www.mysite.com/rss.php?language=en
Line Number 2, Column 1:<?xml version="1.0" encoding="UTF-8"?>
^

 

I have been through every file in catalog/ and every file in includes/ and includes/classes and includes/functions there is no whitespace after the ?>

 

Did anyone have this problem and find a solution? or find a problematic file outside of those directories I checked?

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

Hello,

 

I ve just added the addon RSS Feed 2.2 ( http://euroshop.bg/rss.php ) but I have problems with cyrillic encoding when I am trying to read the feed by readers?

 

The charset is utf-8 and there is no problems with the cyrillic on the website.

 

When I try to import the feed in facebook this mistake happen:

 

XML error: Reserved XML Name at line 2, column 38

 

Please help me, if you know the answer

 

Thank you

Link to comment
Share on other sites

  • 3 weeks later...
  • 7 months later...

Hello.. during the install I could not find this step in the categories.php in admin:

 

###Find:

 

if (tep_not_null($HTTP_POST_VARS)) {

$pInfo = new objectInfo($HTTP_POST_VARS);

$products_name = $HTTP_POST_VARS['products_name'];

$products_description = $HTTP_POST_VARS['products_description'];

$products_url = $HTTP_POST_VARS['products_url'];

} else {

$product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");

$product = tep_db_fetch_array($product_query);

 

 

###Replace with:

 

if (tep_not_null($HTTP_POST_VARS)) {

$pInfo = new objectInfo($HTTP_POST_VARS);

$products_name = $HTTP_POST_VARS['products_name'];

$products_description = $HTTP_POST_VARS['products_description'];

$products_url = $HTTP_POST_VARS['products_url'];

$products_to_rss = $HTTP_POST_VARS['products_to_rss'];

} else {

$product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id, p.products_to_rss from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");

$product = tep_db_fetch_array($product_query);

 

Anyone else have this problem???

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

I'm using RSS Feed v2.2(110211) on 2.2rc2a shop and its works beautifully in chrome and firefox, but not IE9.

 

In IE9, The feed loads, but then never seems to stop loading. The IE spinner just keeps spinning...

 

Anyone have a suggestion?

-Dave

Link to comment
Share on other sites

  • 5 months later...
  • 2 months later...

Hello,

 

I installed this contribution on a non English language site.

Clicking on the rss feed leads to an error page:

 

Content Encoding Error

The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.

Please contact the website owners to inform them of this problem.

This is the url: http://myurl.com/rss.php?language=

 

If I disable gzip compression and click the rss link, page reloads without error, and nothing happens.

 

Any ideas how to solve this issue?

Thanks.

Edited by altenter
Link to comment
Share on other sites

  • 3 weeks later...

I've recently installed Easy Call for Price 1.4.1 which replaces the products normal price display (site wide) with "Call for Price", for any product with the price set to $9,999.00. it works wonderfully.

 

I have one side effect I cant seem to resolve - the sites RSS feed is displaying the $9,999.00... uh-oh

 

Would anyone know how to adapt rss.php to also show the "Call for Price" rather that the catalog price

I am using RSS Feed v2.2 (110211)

 

Thank you in advance

-Dave

Link to comment
Share on other sites

  • 3 months later...

Hello,

 

I installed this contribution on a non English language site.

Clicking on the rss feed leads to an error page:

 

Content Encoding Error

The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.

Please contact the website owners to inform them of this problem.

This is the url: http://myurl.com/rss.php?language=

 

If I disable gzip compression and click the rss link, page reloads without error, and nothing happens.

 

Any ideas how to solve this issue?

Thanks.

 

Did you have any luck in finding a solution to this problem?

 

Thanx

Link to comment
Share on other sites

Hi,

 

I'm using RSS Feed v2.3 on 2.2rc2a shop, but it doesn't work for me. In IE I'm having this error:

 

invalid xml .

, line: 2, character: 3

 

<?xml version="1.0" encoding="UTF-8"?>

 

And when i try to vaidate my rss with the rss validator i have this message:

 

line 2, column 0: XML parsing error: <unknown>:2:0: XML or text declaration not at start of entity

 

Even if i change <?xml version="1.0" encoding="UTF-8"?> with <?xml version="1.0" encoding="iso-8859-1"?>

 

I'm having the same error. I suppose my problem has to be with my language, Spanish, which has accents ans special characters.

 

I'll be grateful if someone could help me.

 

Thanks

Link to comment
Share on other sites

  • 4 weeks later...

In 2.3.3, regarding the compression, as far as I've seen:

 

If gzip compression is ON in OSC it sends the compression header (Content-Encoding:gzip) but because the rss feed created by the php file is not compressed, the browser fails. I turned off gzip compression in OSC and the feed is received correctly by IE and FF.

 

It's a good idea to leave gzip compression ON. In my case, the server compresses the pages so they arrive compressed. No loss due to OSC not compressing them.

 

And the code had a few "> extra characters so it didn't display correctly, that's the problem sahilsaid had.

 

I have problems too with special characters like é è ô

Link to comment
Share on other sites

I solved the problems with the special characters commenting this:

 

//$name = utf8_encode($name);

//$desc = utf8_encode($desc);

$link = utf8_encode($link);

 

I suppose because in my case the data is already UTF-8, this is not necessary.

Link to comment
Share on other sites

  • 2 months later...
  • 3 months later...

The same prob. I think it is not working with OSC 2.3.3

 

 

Hello.. during the install I could not find this step in the categories.php in admin:

 

###Find:

 

if (tep_not_null($HTTP_POST_VARS)) {

$pInfo = new objectInfo($HTTP_POST_VARS);

$products_name = $HTTP_POST_VARS['products_name'];

$products_description = $HTTP_POST_VARS['products_description'];

$products_url = $HTTP_POST_VARS['products_url'];

} else {

$product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");

$product = tep_db_fetch_array($product_query);

 

 

###Replace with:

 

if (tep_not_null($HTTP_POST_VARS)) {

$pInfo = new objectInfo($HTTP_POST_VARS);

$products_name = $HTTP_POST_VARS['products_name'];

$products_description = $HTTP_POST_VARS['products_description'];

$products_url = $HTTP_POST_VARS['products_url'];

$products_to_rss = $HTTP_POST_VARS['products_to_rss'];

} else {

$product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id, p.products_to_rss from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");

$product = tep_db_fetch_array($product_query);

 

Anyone else have this problem???

Link to comment
Share on other sites

  • 1 month later...

Hello i have 2 problems:

I use RSS Feed v2.3 with this .sql:

INSERT INTO configuration( configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function )
VALUES (
'', 'RSS Articles', 'MAX_RSS_ARTICLES', '20', 'Number of articles displayed by the RSS feed', '3', '25', '2007-03-14 22:15:35', '2007-03-14 22:15:35', NULL , NULL
);

It's ok, but in admin/categories.php i have:

1054 - Unknown column 'p.products_to_rss' in 'field list'
select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_pdfupload, p.products_fileupload, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_sold, p.products_tax_class_id, p.manufacturers_id, p.products_sort_order, p.products_to_rss from products p, products_description pd where p.products_id = '1097' and p.products_id = pd.products_id and pd.language_id = '1'

and in rss.php

1054 - Unknown column 'p.products_to_rss' in 'where clause'
select p.products_id, p.manufacturers_id, p.products_model, p.products_price, p.products_image, p.products_date_added, pd.products_name, pd.products_description, m.manufacturers_name, cd.categories_name, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join specials s on p.products_id = s.products_id, products_to_categories p2c LEFT JOIN categories_description cd ON p2c.categories_id = cd.categories_id where p.products_status = '1' and p.products_to_rss='1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' GROUP BY p.products_id ORDER BY p.products_id DESC LIMIT 20
[TEP STOP]

 

My code in admin/categories.php:

$product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_pdfupload, p.products_fileupload, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_sold, p.products_tax_class_id, p.manufacturers_id, p.products_sort_order, p.products_to_rss from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");
 $product = tep_db_fetch_array($product_query);
 $pInfo->objectInfo($product);
} elseif (tep_not_null($HTTP_POST_VARS)) {
 $pInfo->objectInfo($HTTP_POST_VARS);
 $products_name = $HTTP_POST_VARS['products_name'];
$products_info = $HTTP_POST_VARS['products_info'];
 $products_description = $HTTP_POST_VARS['products_description'];
 $products_url = $HTTP_POST_VARS['products_url'];
}

---------------------------------------------
 $product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_info, pd.products_description, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_pdfupload, p.products_fileupload, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_sold, p.manufacturers_id, p.products_sort_order, p.products_to_rss from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");
 $product = tep_db_fetch_array($product_query);
------------------------------------------------
$products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_pdfupload, p.products_fileupload, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_sold, p2c.categories_id, p.products_sort_order, p.products_to_rss from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and pd.products_name like '%" . tep_db_input($search) . "%' order by pd.products_name");
} else {
 $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_pdfupload, p.products_fileupload, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_sold, p.products_sort_order, p.products_to_rss from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by pd.products_name");
}

 

I dont understand ...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...