Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

RSS Feed contribution support thread


Ralph2

Recommended Posts

  • Replies 372
  • Created
  • Last Reply

Top Posters In This Topic

Great contribution! Thanks!

 

I installed it and it seems to b working, but whenever I click on the rss.php link, the pages is not displayed but a message pops up and tries to save it on the computer.

 

Does anybody know why is that? How can I fix it?

Link to comment
Share on other sites

I installed it and it seems to b working, but whenever I click on the rss.php link, the pages is not displayed but a message pops up and tries to save it on the computer.

As I wrote some postings above, I found that this is related to an installed template system. Do you have a template system like STS installed? Think there should be a simple fix for the problem, but I can not find it ;) <_<

Link to comment
Share on other sites

No.. I do not have a template system like STS installed.

 

It probably has something to do with the .htaccess, but I can not figure it out....

 

As I wrote some postings above, I found that this is related to an installed template system. Do you have a template system like STS installed? Think there should be a simple fix for the problem, but I can not find it ;) <_<
Link to comment
Share on other sites

Unfortunately I found another problem - UTF8 seems not to work in $rss_title. German Umlauts are not encoded correctly in the RSS title tag :huh:

f.e.

-> Armbänder

should be

-> Armbänder

 

Edit: When line 245 of rss.php

$rss_title =  utf8_encode (replace_problem_characters($rss_title));

is replaced with

$rss_title =  replace_problem_characters($rss_title);

it works :blink:

Edited by chiroptera
Link to comment
Share on other sites

Hi,

 

I have just installed the latest version 2 but I am having this error below. I am sure I have gone through everything but obviously missing something silly :-(

 

-------------------

Fatal error: Call to undefined function getallheaders() in /home/xxxxx/public_html/rss.php on line 259

 

-------------------

 

Anyone know what I have missed ?

 

Thanks

Link to comment
Share on other sites

Another thing... just tried to see if I can add the feed to feedburner.com.

 

I got this error:

 

The URL you entered does not appear to be a valid feed. We encountered the following problem: Error on line 2: The processing instruction target matching "[xX][mM][lL]" is not allowed.

 

Sorry

 

This feed does not validate.

 

*

 

line 2, column 0: XML parsing error: <unknown>:2:0: xml declaration not at start of external entity [help]

 

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

Link to comment
Share on other sites

Found a solution :-)

To get RSS Feeds 2.0 to work with STS open rss.php

FIND

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_RSS);

AFTER ADD

$sts->display_template_output = 0;

With the help of the coder of STS I found a much better solution that the above.

Here is how I got RSS 2.0 to work with STS:

In sts_default.php find

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "info_shopping_cart"))
  return ''; // We don't use template for these scripts

and replace with

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "rss")|| strstr($scriptbasename, "info_shopping_cart"))
  return ''; // We don't use template for these scripts

Hope this will help other RSS + STS users.

Link to comment
Share on other sites

Great contribution! Thanks!

 

I installed it and it seems to b working, but whenever I click on the rss.php link, the pages is not displayed but a message pops up and tries to save it on the computer.

 

Does anybody know why is that? How can I fix it?

 

Yes! What I did was the following:

 

FIND THIS LINE:

 

header('Content-Type: application/rss+xml; charset=UTF-8');

 

REPLACE WITH THIS:

 

header('Content-Type: application/xml; charset=UTF-8');

 

 

Done.

Link to comment
Share on other sites

THANKS! That worked.

 

However, now I get this error:

 

XML Parsing Error: xml declaration not at start of external entity

Location: http://www.site.com/rss.php?language=&cPath=21

Line Number 2, Column 1:<?xml version="1.0" encoding="UTF-8" ?>

^

 

How can I fix it?

 

 

 

 

Yes! What I did was the following:

 

FIND THIS LINE:

 

header('Content-Type: application/rss+xml; charset=UTF-8');

 

REPLACE WITH THIS:

 

header('Content-Type: application/xml; charset=UTF-8');

 

 

Done.

Edited by cardsup
Link to comment
Share on other sites

THANKS! That worked.

 

However, now I get this error:

 

XML Parsing Error: xml declaration not at start of external entity

Location: http://www.site.com/rss.php?language=&cPath=21

Line Number 2, Column 1:<?xml version="1.0" encoding="UTF-8" ?>

^

 

How can I fix it?

Are you using the ecommerce=X option? In other words are you calling the script like this?

 

www.somesite.com/rss.php?ecommerce=X

 

or like this?

 

www.somesite.com/rss.php

Link to comment
Share on other sites

I am not sure how to use the ecommerce=X option.

 

I have two rss links on the page.

 

http://www.somesite.com/folder/rss.php?lan...e=&cPath=21

http://www.somesite.com/folder/rss.php?language=en

 

Both return the same error message. I tired calling manually a link

 

http://www.somesite.com/folder/rss.php?eco...e=&cPath=21

 

but it got the error too.

 

 

 

 

Are you using the ecommerce=X option? In other words are you calling the script like this?

 

www.somesite.com/rss.php?ecommerce=X

 

or like this?

 

www.somesite.com/rss.php

Link to comment
Share on other sites

I am not sure how to use the ecommerce=X option.

 

I have two rss links on the page.

 

http://www.somesite.com/folder/rss.php?lan...e=&cPath=21

http://www.somesite.com/folder/rss.php?language=en

 

Both return the same error message. I tired calling manually a link

 

http://www.somesite.com/folder/rss.php?eco...e=&cPath=21

 

but it got the error too.

The reason I asked was that when I enter this URL for my site:

 

Are you using the ecommerce=X option? In other words are you calling the script like this?

 

www.somesite.com/rss.php?ecommerce=X

 

I get this error:

XML Parsing Error: not well-formed

Location: http://www.mysitesurl.com/rss.php?ecommerce=X

Line Number 56, Column 113: <media:thumbnail url="http://www.mysitesurl.com/images/" border="0" alt="ROSE ELECTRONICS AT KEYBOARD & SERIAL MOUSE CABLES50 FT, DB25M T" title=" ROSE ELECTRONICS AT KEYBOARD & SERIAL MOUSE CABLES50 FT, DB25M T " width="100" height="80" style="float: left; margin: 0px 8px 8px 0px;">http://mysitesurl.com/images/" border="0" alt="ROSE ELECTRONICS AT KEYBOARD & SERIAL MOUSE CABLES50 FT, DB25M T" title=" ROSE ELECTRONICS AT KEYBOARD & SERIAL MOUSE CABLES50 FT, DB25M T " width="100" height="80" style="float: left; margin: 0px 8px 8px 0px;</media:thumbnail>

----------------------------------------------------------------------------------------------------------------^

 

When I dont use the ecommerce=x option I get the right XML.

Link to comment
Share on other sites

Bit of a long shot, but I was wondering if anybody knows how to get a feed to use new specials or specials products?

 

If you can, thanks in advance

 

Or I'll just wait quietly in the corner over here, next to the pringles...

Link to comment
Share on other sites

I have slow been trying to add this, but having problems..I will admit, I have a template, which I thought I modified all the code to work, but I am still a no go..

 

I am receiving this error...

Fatal error: Call to undefined function getallheaders() in /xxx/xxxx/xxxx/rss.php on line 258

 

Code on line 258:

$headers = getallheaders();

 

Any help would be awesome!

Thank you!

Link to comment
Share on other sites

Could any one can help me out of this, I have been tried almost one month, I am not success. I have been try the following mother.

 

who can't get the feeds created by rss.php to validate I have figured out how to fix the problem. If you get an error like this

[line 2, column 0: XML Parsing error: :3:0: xml declaration not at start of external entity]

then read the included text file to see how I fixed the problem.

 

Any advice or tips will be great appriciate.

Link to comment
Share on other sites

I have slow been trying to add this, but having problems..I will admit, I have a template, which I thought I modified all the code to work, but I am still a no go..

 

I am receiving this error...

Fatal error: Call to undefined function getallheaders() in /xxx/xxxx/xxxx/rss.php on line 258

 

Code on line 258:

$headers = getallheaders();

 

Any help would be awesome!

Thank you!

 

Can't help you, I'm afraid. But what I can tell you is that I don't get this error when hosted locally, but I do on the web. The only difference I can think of is SSL. I'll work on it.

Edited by zaphod71
Link to comment
Share on other sites

RE getallheaders

 

Can't help you, I'm afraid. But what I can tell you is that I don't get this error when hosted locally, but I do on the web. The only difference I can think of is SSL. I'll work on it.
Found this link: http://forums.digitalpoint.com/showthread.php?p=4768191:)

 

seems to be saying the problem is that php is not installed as an Apache Module. It did, however suggest an emulated function which worked for me:

 

on rss.php

 

After

 

$navigation->remove_current_page();

 

I added this line

 

function emu_getallheaders() { foreach($_SERVER as $name => $value) if(substr($name, 0, 5) == 'HTTP_') $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value; return $headers;}

 

I then replaced

 

function getallheaders()

 

with

 

function emu_getallheaders()

 

It seems to work fine.

 

I should point out your neighbours cat knows more about php than me, so I don't know how or why it works, or if it opens ip a flood of security problems or even a plague of locusts.

If someone does see a problem with it please let me know.

 

Also if anyone can sort out a specials only feed, please let me know (ask your neighbours cat)

Edited by zaphod71
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...