cancel
Showing results for 
Search instead for 
Did you mean: 

RSS problem

morphinof
Champ in-the-making
Champ in-the-making
Hi,

I have a weird problem with RSS links list when i click on a RSS suscribe link :

Everything is fine in the editorial version.
On the live version the website name is missing in the article title link for each articles :

Links looks like this : http://mydomain/news/news1.html instead of http://mydomain/wcmqs/news/news1.html

Do you have any idea to solve this ?

Thanks a lot.
13 REPLIES 13

morphinof
Champ in-the-making
Champ in-the-making
Thanks a lot for this explanation of how RSS system works Smiley Happy

Well when i tried to found some explanation for this problem i got interested on one file : links-rss.get.rss.ftl


<item>
     <title>${link.title?html}</title>
     <link>${absurl(url.context)}/page/site/${site}/links-view?linkId=${link.name}</link>
     <description>URL:${link.url?html}</description>
</item>

I assume that it's where the asset's link is generated :

<link>${absurl(url.context)}/page/site/${site}/links-view?linkId=${link.name}</link>

and maybe the issue is in the ${site} var wich may be empty in the live context,  but how and why ? I can't say ^^

Others files like rssfeed.get.html and feed.get.rss.ftl seems to be ok and didn't help me to find any answers Smiley Sad

Another thing is when i print webSite.getContext() in any template on the live site, it prints the good context !

So


public String getWebsiteDomain(WebSite webSite)
{
        return "http://'+webSite.getHostName()+(webSite.getHostPort() == 80 ? "" : ":"+webSite.getHostPort()+"/"+webSite.getContext());
}
should be correct !

In fact it must be, in editorial it's working fine so i'm out of solutions there :s

bremmington
Champ on-the-rise
Champ on-the-rise
links-rss.get.rss.ftl is only used by Share - it is not used by the WQS RSS feed generation. In WQS, the RSS link generation is where I described.

I have tried this here, and it works as expected on both editorial and live. The only thing I can suggest if you are able to is to either attach a debugger to the webapp or add some log output around the areas of code that I described above to see if you can track it down.

morphinof
Champ in-the-making
Champ in-the-making
It's the first time that i look in the java side and i only found Abstract class or Interfaces in the website folder jars like here in alfresco-wcmqs-clientapi-3.4.0.jar :

package org.alfresco.wcm.client.util;

import org.alfresco.wcm.client.Asset;
import org.alfresco.wcm.client.Section;
import org.alfresco.wcm.client.WebSite;

public interface UrlUtils {

    public String getUrl(Asset asset);

    public String getUrl(Section sctn);

    public String getShortUrl(Asset asset);

    public String getLongUrl(Asset asset);

    public String getAssetIdFromShortUrl(String string);

    public String decodeResourceName(String string);

    public String getWebsiteDomain(WebSite ws);
}

or here in alfresco-wcmqs-webapp-3.4.0.jar :

package org.alfresco.wcm.client.webscript;

import java.io.IOException;

public class RssWebScript extends org.springframework.extensions.webscripts.AbstractWebScript {

    private static final String FEED_TYPE = "rss_2.0";
    private static final org.apache.commons.logging.Log log;
    private org.alfresco.wcm.client.util.UrlUtils urlUtils;
    private org.alfresco.wcm.client.CollectionFactory collectionFactory;

    public RssWebScript() {
        //compiled code
        throw new RuntimeException("Compiled Code");
    }

    public void execute(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.WebScriptResponse res) throws IOException {
        //compiled code
        throw new RuntimeException("Compiled Code");
    }

    public void setUrlUtils(org.alfresco.wcm.client.util.UrlUtils urlUtils) {
        //compiled code
        throw new RuntimeException("Compiled Code");
    }

    public void setCollectionFactory(org.alfresco.wcm.client.CollectionFactory collectionFactory) {
        //compiled code
        throw new RuntimeException("Compiled Code");
    }
}

Where is the code you mentionned ?

bremmington
Champ on-the-rise
Champ on-the-rise
The implementation of the getWebsiteDomain method that I mentioned above is in the Client API JAR (the same place as the interface that you listed above). It's in the "org.alfresco.wcm.client.util.impl" package.