Forum Discussion

domladden's avatar
9 years ago

Utterly stuck with component

Hi, I am seeing a very strange error which I cannot figure out.

I have 2 components that both work the same way, I have literally copied and pasted the same snippet into both components but I'm seeing an error on one.

I have

<#attempt>
<#assign msg_id = rest("/categories/id/${categoryName}/threads/style/blog/featured?page_size=3").threads.thread.id />
<p>Featured Article Present - ${msg_id}</p>
<#recover>
<#-- If no article featured, get the third article in the list -->
<#assign msg_id = CheckList.id />
<p>No Featured Article Present - ${msg_id}</p>
</#attempt>

The CategoryID variable is assigned and the call is pulling the first featured article in the category. If there is no featured content it pulls a different article.

The calls work fine, both when there is a featured content and without.

However, if I remove either <p> content I get an error.

The idea was that if there was no featured content present, the call would return an error, then the recover snippet would run and that never has an error.

But if I remove <p>Featured Article Present - ${msg_id}</p> I get an error, whether or not there is featured content present.

I have been banging my head on the wall for about 4 hours with this now, I cannot see why it wouldn't run, I have this in another component almost word for word the same without issue.

If you could help me out you would save me a stroke.

Thanks,

Dom

  • Hi domladden,

     

    can paste the error message here? It will make it easier to find the issue and a possible solution. :smileywink:

     

    Regards,

    Christian