Jump to content

Resolved - ERROR in NEWS FEED in CubeCart Admin


bondimedical

Recommended Posts

I think it's because of the "new" source of these feeds.

I note that this skin is a CC5 admin skin, so maybe you are running CC5? If so, the RSS feed may be coming from:

https://forums.cubecart.com/forum/1-news-announcements/

CC6 is asking for the feed from:

https://forums.cubecart.com/forum/1-news-announcements.xml

which is basically the same, just a different format.

But CC6 also has a count limiter.

Therefore, I think the provider of the RSS feed no longer limits the list of items, and relies on CubeCart to limit itself.

Near line 248 in dashboard.index.inc.php, make the code look like:

	if ($data['version'] >= 2) {
		$i = 1;
		foreach ($data->channel->item as $item) {
			$news['items'][] = array(
				'title'   => (string)$item->title,
				'link'   => (string)$item->link,
			);
			if($i==5) break;
			$i++;
		}
	}
	$GLOBALS['smarty']->assign('NEWS', $news);

 

Link to comment
Share on other sites

I think it's because of the "new" source of these feeds.

I note that this skin is a CC5 admin skin, so maybe you are running CC5? If so, the RSS feed may be coming from:

https://forums.cubecart.com/forum/1-news-announcements/

CC6 is asking for the feed from:

https://forums.cubecart.com/forum/1-news-announcements.xml

which is basically the same, just a different format.

But CC6 also has a count limiter.

Therefore, I think the provider of the RSS feed no longer limits the list of items, and relies on CubeCart to limit itself.

Near line 248 in dashboard.index.inc.php, make the code look like:

	if ($data['version'] >= 2) {
		$i = 1;
		foreach ($data->channel->item as $item) {
			$news['items'][] = array(
				'title'   => (string)$item->title,
				'link'   => (string)$item->link,
			);
			if($i==5) break;
			$i++;
		}
	}
	$GLOBALS['smarty']->assign('NEWS', $news);

 

Thank you for your help Brian. The fix works perfectly

Link to comment
Share on other sites

This is because our forum software historically only returned five items. Since this new version it returns 25. I have asked the software provider to add a setting but they won't. I know how you guys feel now! :P

I'll have to hack the code again....

I have changed the News feed URL to https://forums.cubecart.com/rss/forums/1-cubecart-news-announcements/ in my CubeCart 5 store without Brian's fix and the issue fixed itself.

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
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...