Forum Discussion

JustinBannister's avatar
JustinBannister
Contributor
12 years ago

Custom Component Issue When Moving To Production

When moving a custom blog component from stage to production, where the blog shows the most two recent articles on a "hot blogs" compoment, the move to production doesn't end up pulling any content like what it's pulling on stage.

 

Here's a snippet of the rest calls in the component:

 

It's working correctly in stage based on the view count, but not picking up the view counts or anything at all when we move it over to production.

 

<#assign now = (.now?long?number / 1000)?floor />
<#assign last = now - 2592000 />
<#assign blogs = [] />
<#assign blogs = blogs + [rest("/blogs/id/Ring_of_Death").board] />
<#assign blogs = blogs + [rest("/blogs/id/GamingNews").board] />
<#assign blogs = blogs + [rest("/blogs/id/best_living").board] />
<#assign output_blogs = [] />
<#list blogs as blog>
<#assign mes = [] />
<#list rest("${blog.@href}/search/messages/?q=date%3A%5B${last}%20TO%20${now}%5D&sort_by=-topicViews&collapse_discussion=false").messages.message as message>
<#if !((message.parent.@href)?has_content) >
<#assign img = rest("${message.@href}/images").images.image />
<#assign mes = mes + [{
"messageTitle": message.subject,
"messageUrl": message.@view_href,
"messageImg": img
}] />
<#if mes?size == 2 >
<#break>
</#if>
</#if>
</#list>
<#if mes?size != 0>
<#assign output_blogs = output_blogs + [{
"id": blog.id,
"title": blog.title,
"blogUrl": blog.@view_href,
"blogs": mes
}] />
</#if>
</#list>

2 Replies

  • JasonL's avatar
    JasonL
    Lithium Alumni (Retired)
    12 years ago
    Hi Justin,
    Just wondering if the blogs ids on production match the stage ... by any chance, have you confirmed that?
    --jason
  • JustinBannister's avatar
    JustinBannister
    Contributor
    12 years ago
    I believe one of our developers solved the issue. It had something to do with the rest call.