Status: offline

dwl

Forum User
Junior
Registered: 01/05/11
Posts: 25
caffeinated
Good day,

I have created a portal block and supplied the requisite url. When the data is saved and the page is displayed, instead of a block of links, I am presented with a list of static text, no links.

Is there a plug-in, patch or hack for xml data to create the required links?


Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
This should all work automatically - no configuration or hacks required.

Can you give us the URL of the feed, please? It may have a problem or there may be a bug in our feed reader classes.

bye, Dirk

Status: offline

dwl

Forum User
Junior
Registered: 01/05/11
Posts: 25
Thanks for getting back to me Dirk. The feed in question is http://www dot totalbeauty dot com/feeds/totalbeauty dot xml (written that way for site spam guard was blocking this post)

It parses okay in readers or Firefox's live bookmarks, just not on the Geeklog portal feature. Looking at the xml, the tag for the url info is non-standard using guid. My alternative is create a block of PHP code using magpie or another solution. Trying magpie last night I was able to produce what I want. Is there a shorter solution timewise? I'm new to Geeklog and under a tight deadline.

Hope you can help,

dl


Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
That's actually an RSS 2.0 feed, not Atom.

Anyway, the problem is that it doesn't contain link elements and the guid elements do not have the isPermaLink attribute set.

I guess this is one case where Geeklog's feed parser could be more tolerant: If we don't have a link element but we do have a guid, then use the guid even if it's not marked as a permalink. Need to check with the specs first, though.

Can you please submit a feature request for this?

As a workaround, open system/classes/syndication/rss.feed.class.php and search for this piece of code:
Text Formatted Code
} elseif( $name == 'GUID' && $this->_permaLink ) {

Comment out the check for the _permaLink flag like so:
Text Formatted Code
} elseif( $name == 'GUID' /*&& $this->_permaLink*/ ) {


That did the trick for me with this particular feed. Not sure what it does when you have other feeds with a proper link element on the same site ...

bye, Dirk

Status: offline

dwl

Forum User
Junior
Registered: 01/05/11
Posts: 25
Thanks for this, Dirk. Your fix did the trick perfectly. Best of all, it did not break anything for the other feeds on the site I am working on.

Breathing easy - for now.:wink:
dwl

Quote by: Dirk

That's actually an RSS 2.0 feed, not Atom.

Anyway, the problem is that it doesn't contain link elements and the guid elements do not have the isPermaLink attribute set.

I guess this is one case where Geeklog's feed parser could be more tolerant: If we don't have a link element but we do have a guid, then use the guid even if it's not marked as a permalink. Need to check with the specs first, though.

Can you please submit a feature request for this?

As a workaround, open system/classes/syndication/rss.feed.class.php and search for this piece of code:

Text Formatted Code
} elseif( $name == 'GUID' && $this->_permaLink ) {

Comment out the check for the _permaLink flag like so:
Text Formatted Code
} elseif( $name == 'GUID' /*&& $this->_permaLink*/ ) {


That did the trick for me with this particular feed. Not sure what it does when you have other feeds with a proper link element on the same site ...

bye, Dirk

:wink: