You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@roller.apache.org by Gaurav <ga...@gmail.com> on 2013/12/17 10:38:35 UTC

FrontPage theme not working

Hello,

I tried using the frontpage theme of roller, but it seems like this 
theme has some issue as It did not show up any data (no blogs, hottags, 
hot blogs etc.)
But when I tried searching in the search of that theme, then it shows 
the blogs. I am looking into this, just want to know Is anyone out there 
for whom this theme is working perfectly fine ?

-- 
Regards,
*Gaurav Saini*
/Developer, Digital Marketing and Pursuing B.Tech/
/Email: gauravsaini03@gmail.com/

Re: FrontPage theme not working

Posted by Gaurav <ga...@gmail.com>.
Hello Dave,

Thanks a lot. It worked now perfectly fine after enabling these two 
things. Also, the tags in frontpage theme give me an 404 error, as there 
is no tags.vm in frontpage theme same as basic theme also do not have 
tags page.

Thanks
Gaurav

On Tuesday 17 December 2013 07:12 PM, Dave wrote:
> Hi Guarav,
>
> The front-page theme is designed to be used on the weblog that is
> designated to be the front-page blog of a Roller site.  See the
> Server-Admin -> Configuration page and the "Weblog to serve as frontpage
> blog" option. You must also turn on the "Enable aggregated site-wide
> frontpage" option.
>
> If both of those are set, then the front-page blog should work fine. If
> not, then we may have a bug.
>
> The pinned-entry option is a way to "pin" a weblog entry to the top of the
> page. It was used by Sun to "pin" temporary announcements to the top of
> it's blog server so that everybody would see them.
>
> Hope that helps.
>
> - Dave
>
>
>
>
> On Tue, Dec 17, 2013 at 8:33 AM, Gaurav <ga...@gmail.com> wrote:
>
>> Hello,
>>
>> I am still not able to populate the results in frontpage theme. The
>> condition I see in this theme is different from other is this
>> [#foreach($pinnedEntry in $pinnedEntries)]. Can any one explain me what is
>> pinnedEntry here ? As in that theme we still use #foreach($entry in
>> $entries) for the search results, that is why I was saying search results
>> are coming fine.
>>
>> Thanks
>> Gaurav
>>
>>
>> On Tuesday 17 December 2013 03:29 PM, Greg Huber wrote:
>>
>>> It should work ok, the front page theme is for the initial front page
>>> weblog, right?
>>>
>>> Cheers Greg.
>>>
>>>
>>> On 17 December 2013 09:38, Gaurav <ga...@gmail.com> wrote:
>>>
>>>   Hello,
>>>> I tried using the frontpage theme of roller, but it seems like this theme
>>>> has some issue as It did not show up any data (no blogs, hottags, hot
>>>> blogs
>>>> etc.)
>>>> But when I tried searching in the search of that theme, then it shows the
>>>> blogs. I am looking into this, just want to know Is anyone out there for
>>>> whom this theme is working perfectly fine ?
>>>>
>>>> --
>>>> Regards,
>>>> *Gaurav Saini*
>>>> /Developer, Digital Marketing and Pursuing B.Tech/
>>>> /Email: gauravsaini03@gmail.com/
>>>>
>>>>


Re: FrontPage theme not working

Posted by Dave <sn...@gmail.com>.
Hi Guarav,

The front-page theme is designed to be used on the weblog that is
designated to be the front-page blog of a Roller site.  See the
Server-Admin -> Configuration page and the "Weblog to serve as frontpage
blog" option. You must also turn on the "Enable aggregated site-wide
frontpage" option.

If both of those are set, then the front-page blog should work fine. If
not, then we may have a bug.

The pinned-entry option is a way to "pin" a weblog entry to the top of the
page. It was used by Sun to "pin" temporary announcements to the top of
it's blog server so that everybody would see them.

Hope that helps.

- Dave




On Tue, Dec 17, 2013 at 8:33 AM, Gaurav <ga...@gmail.com> wrote:

> Hello,
>
> I am still not able to populate the results in frontpage theme. The
> condition I see in this theme is different from other is this
> [#foreach($pinnedEntry in $pinnedEntries)]. Can any one explain me what is
> pinnedEntry here ? As in that theme we still use #foreach($entry in
> $entries) for the search results, that is why I was saying search results
> are coming fine.
>
> Thanks
> Gaurav
>
>
> On Tuesday 17 December 2013 03:29 PM, Greg Huber wrote:
>
>> It should work ok, the front page theme is for the initial front page
>> weblog, right?
>>
>> Cheers Greg.
>>
>>
>> On 17 December 2013 09:38, Gaurav <ga...@gmail.com> wrote:
>>
>>  Hello,
>>>
>>> I tried using the frontpage theme of roller, but it seems like this theme
>>> has some issue as It did not show up any data (no blogs, hottags, hot
>>> blogs
>>> etc.)
>>> But when I tried searching in the search of that theme, then it shows the
>>> blogs. I am looking into this, just want to know Is anyone out there for
>>> whom this theme is working perfectly fine ?
>>>
>>> --
>>> Regards,
>>> *Gaurav Saini*
>>> /Developer, Digital Marketing and Pursuing B.Tech/
>>> /Email: gauravsaini03@gmail.com/
>>>
>>>
>

Re: FrontPage theme not working

Posted by Greg Huber <gr...@gmail.com>.
Gaurav,

<s:form action="createUser!save">

is a struts action:

app/src/main/resources/struts.xml

<action name="createUser!*" method="{1}"
            class="org.apache.roller.weblogger.ui.struts2.admin.CreateUser">
            <result name="input" type="tiles">.CreateUser</result>
</action>


So, Struts will call the save() method of
org.apache.roller.weblogger.ui.struts2.admin.CreateUser.

btw, anything after the ! (bang) is a method of the class.  Part of the
struts2 framework.

Cheers Greg



On 17 December 2013 14:18, Gaurav <ga...@gmail.com> wrote:

> Thanks a lot Greg, It really cleared me about the work flow of roller and
> how we get the results from database. I was really struggling understanding
> the roller flow, day by day I am becoming more familiar to the structure of
> roller.
> One thing I was having problem today was understanding the CreateUser
> form, for creating the new user we have form in which action marked is
> createUser!save. I did not find any servlet mentioned in web.xml for this
> and how its using CreateUser class.
>
> <s:form action="createUser!save">
> .
> .
> .
> </s:form>
>
> I will be very thankful to you if you can explain me how this struts form
> works ?
>
> Thanks
> Gaurav
>
> On Tuesday 17 December 2013 07:29 PM, Greg Huber wrote:
>
>> Gaurav,
>>
>> following through the logic:
>>
>> #set($pinnedEntries = $site.getPinnedWeblogEntries(5))
>>   #foreach($pinnedEntry in $pinnedEntries)
>>
>>
>> $site == org.apache.roller.weblogger.ui.rendering.model.SiteModel
>>
>> So if you check getPinnedWeblogEntries(..) of SiteModel:
>>
>> /**
>>       * Get pinned entries.
>>       * @param sinceDays Only consider weblogs updated in the last
>> sinceDays
>>       * @param length    Max number of results to return
>>       */
>>      public List getPinnedWeblogEntries(int length) {
>>          List results = new ArrayList();
>>          try {
>>              Weblogger roller = WebloggerFactory.getWeblogger();
>>              WeblogEntryManager wmgr = roller.getWeblogEntryManager();
>>              List weblogs = wmgr.getWeblogEntriesPinnedToMain(length);
>>              for (Iterator it = weblogs.iterator(); it.hasNext();) {
>>                  WeblogEntry entry = (WeblogEntry) it.next();
>>                  results.add(WeblogEntryWrapper.wrap(entry,
>> urlStrategy));
>>              }
>>          } catch (Exception e) {
>>              log.error("ERROR: fetching pinned weblog entries", e);
>>          }
>>          return results;
>>      }
>>
>> It retrieves a list worf weblogs:
>>
>> List weblogs = wmgr.getWeblogEntriesPinnedToMain(length);
>>
>> from method getWeblogEntriesPinnedToMain of
>>
>> org.apache.roller.weblogger.business.jpa.JPAWeblogEntryManagerImpl
>>
>>
>> public List getWeblogEntriesPinnedToMain(Integer max)
>>      throws WebloggerException {
>>          Query query = strategy.getNamedQuery(
>>                  "WeblogEntry.getByPinnedToMain&
>> statusOrderByPubTimeDesc");
>>          query.setParameter(1, Boolean.TRUE);
>>          query.setParameter(2, WeblogEntry.PUBLISHED);
>>          if (max != null) {
>>              query.setMaxResults(max);
>>          }
>>          return query.getResultList();
>>      }
>>
>> it will execute a named query:
>>
>> WeblogEntry.getByPinnedToMain&statusOrderByPubTimeDesc
>>
>> from:
>> app/src/main/resources/org/apache/roller/weblogger/pojos/
>> WeblogEntry.orm.xml
>>
>> <named-query
>> name="WeblogEntry.getByPinnedToMain&amp;statusOrderByPubTimeDesc">
>>              <query>SELECT w FROM WeblogEntry w WHERE w.pinnedToMain = ?1
>> AND w.status = ?2 ORDER BY w.pubTime DESC</query>
>> </named-query>
>>
>> Is this OK?
>>
>> Cheers Greg
>>
>>
>>
>>
>> On 17 December 2013 13:33, Gaurav <ga...@gmail.com> wrote:
>>
>>  Hello,
>>>
>>> I am still not able to populate the results in frontpage theme. The
>>> condition I see in this theme is different from other is this
>>> [#foreach($pinnedEntry in $pinnedEntries)]. Can any one explain me what
>>> is
>>> pinnedEntry here ? As in that theme we still use #foreach($entry in
>>> $entries) for the search results, that is why I was saying search results
>>> are coming fine.
>>>
>>> Thanks
>>> Gaurav
>>>
>>> On Tuesday 17 December 2013 03:29 PM, Greg Huber wrote:
>>>
>>>  It should work ok, the front page theme is for the initial front page
>>>> weblog, right?
>>>>
>>>> Cheers Greg.
>>>>
>>>>
>>>> On 17 December 2013 09:38, Gaurav <ga...@gmail.com> wrote:
>>>>
>>>>   Hello,
>>>>
>>>>> I tried using the frontpage theme of roller, but it seems like this
>>>>> theme
>>>>> has some issue as It did not show up any data (no blogs, hottags, hot
>>>>> blogs
>>>>> etc.)
>>>>> But when I tried searching in the search of that theme, then it shows
>>>>> the
>>>>> blogs. I am looking into this, just want to know Is anyone out there
>>>>> for
>>>>> whom this theme is working perfectly fine ?
>>>>>
>>>>> --
>>>>> Regards,
>>>>> *Gaurav Saini*
>>>>> /Developer, Digital Marketing and Pursuing B.Tech/
>>>>> /Email: gauravsaini03@gmail.com/
>>>>>
>>>>>
>>>>>
>

Re: FrontPage theme not working

Posted by Gaurav <ga...@gmail.com>.
Thanks a lot Greg, It really cleared me about the work flow of roller 
and how we get the results from database. I was really struggling 
understanding the roller flow, day by day I am becoming more familiar to 
the structure of roller.
One thing I was having problem today was understanding the CreateUser 
form, for creating the new user we have form in which action marked is 
createUser!save. I did not find any servlet mentioned in web.xml for 
this and how its using CreateUser class.

<s:form action="createUser!save">
.
.
.
</s:form>

I will be very thankful to you if you can explain me how this struts 
form works ?

Thanks
Gaurav

On Tuesday 17 December 2013 07:29 PM, Greg Huber wrote:
> Gaurav,
>
> following through the logic:
>
> #set($pinnedEntries = $site.getPinnedWeblogEntries(5))
>   #foreach($pinnedEntry in $pinnedEntries)
>
>
> $site == org.apache.roller.weblogger.ui.rendering.model.SiteModel
>
> So if you check getPinnedWeblogEntries(..) of SiteModel:
>
> /**
>       * Get pinned entries.
>       * @param sinceDays Only consider weblogs updated in the last sinceDays
>       * @param length    Max number of results to return
>       */
>      public List getPinnedWeblogEntries(int length) {
>          List results = new ArrayList();
>          try {
>              Weblogger roller = WebloggerFactory.getWeblogger();
>              WeblogEntryManager wmgr = roller.getWeblogEntryManager();
>              List weblogs = wmgr.getWeblogEntriesPinnedToMain(length);
>              for (Iterator it = weblogs.iterator(); it.hasNext();) {
>                  WeblogEntry entry = (WeblogEntry) it.next();
>                  results.add(WeblogEntryWrapper.wrap(entry, urlStrategy));
>              }
>          } catch (Exception e) {
>              log.error("ERROR: fetching pinned weblog entries", e);
>          }
>          return results;
>      }
>
> It retrieves a list worf weblogs:
>
> List weblogs = wmgr.getWeblogEntriesPinnedToMain(length);
>
> from method getWeblogEntriesPinnedToMain of
>
> org.apache.roller.weblogger.business.jpa.JPAWeblogEntryManagerImpl
>
>
> public List getWeblogEntriesPinnedToMain(Integer max)
>      throws WebloggerException {
>          Query query = strategy.getNamedQuery(
>                  "WeblogEntry.getByPinnedToMain&statusOrderByPubTimeDesc");
>          query.setParameter(1, Boolean.TRUE);
>          query.setParameter(2, WeblogEntry.PUBLISHED);
>          if (max != null) {
>              query.setMaxResults(max);
>          }
>          return query.getResultList();
>      }
>
> it will execute a named query:
>
> WeblogEntry.getByPinnedToMain&statusOrderByPubTimeDesc
>
> from:
> app/src/main/resources/org/apache/roller/weblogger/pojos/WeblogEntry.orm.xml
>
> <named-query
> name="WeblogEntry.getByPinnedToMain&amp;statusOrderByPubTimeDesc">
>              <query>SELECT w FROM WeblogEntry w WHERE w.pinnedToMain = ?1
> AND w.status = ?2 ORDER BY w.pubTime DESC</query>
> </named-query>
>
> Is this OK?
>
> Cheers Greg
>
>
>
>
> On 17 December 2013 13:33, Gaurav <ga...@gmail.com> wrote:
>
>> Hello,
>>
>> I am still not able to populate the results in frontpage theme. The
>> condition I see in this theme is different from other is this
>> [#foreach($pinnedEntry in $pinnedEntries)]. Can any one explain me what is
>> pinnedEntry here ? As in that theme we still use #foreach($entry in
>> $entries) for the search results, that is why I was saying search results
>> are coming fine.
>>
>> Thanks
>> Gaurav
>>
>> On Tuesday 17 December 2013 03:29 PM, Greg Huber wrote:
>>
>>> It should work ok, the front page theme is for the initial front page
>>> weblog, right?
>>>
>>> Cheers Greg.
>>>
>>>
>>> On 17 December 2013 09:38, Gaurav <ga...@gmail.com> wrote:
>>>
>>>   Hello,
>>>> I tried using the frontpage theme of roller, but it seems like this theme
>>>> has some issue as It did not show up any data (no blogs, hottags, hot
>>>> blogs
>>>> etc.)
>>>> But when I tried searching in the search of that theme, then it shows the
>>>> blogs. I am looking into this, just want to know Is anyone out there for
>>>> whom this theme is working perfectly fine ?
>>>>
>>>> --
>>>> Regards,
>>>> *Gaurav Saini*
>>>> /Developer, Digital Marketing and Pursuing B.Tech/
>>>> /Email: gauravsaini03@gmail.com/
>>>>
>>>>


Re: FrontPage theme not working

Posted by Greg Huber <gr...@gmail.com>.
Gaurav,

following through the logic:

#set($pinnedEntries = $site.getPinnedWeblogEntries(5))
 #foreach($pinnedEntry in $pinnedEntries)


$site == org.apache.roller.weblogger.ui.rendering.model.SiteModel

So if you check getPinnedWeblogEntries(..) of SiteModel:

/**
     * Get pinned entries.
     * @param sinceDays Only consider weblogs updated in the last sinceDays
     * @param length    Max number of results to return
     */
    public List getPinnedWeblogEntries(int length) {
        List results = new ArrayList();
        try {
            Weblogger roller = WebloggerFactory.getWeblogger();
            WeblogEntryManager wmgr = roller.getWeblogEntryManager();
            List weblogs = wmgr.getWeblogEntriesPinnedToMain(length);
            for (Iterator it = weblogs.iterator(); it.hasNext();) {
                WeblogEntry entry = (WeblogEntry) it.next();
                results.add(WeblogEntryWrapper.wrap(entry, urlStrategy));
            }
        } catch (Exception e) {
            log.error("ERROR: fetching pinned weblog entries", e);
        }
        return results;
    }

It retrieves a list worf weblogs:

List weblogs = wmgr.getWeblogEntriesPinnedToMain(length);

from method getWeblogEntriesPinnedToMain of

org.apache.roller.weblogger.business.jpa.JPAWeblogEntryManagerImpl


public List getWeblogEntriesPinnedToMain(Integer max)
    throws WebloggerException {
        Query query = strategy.getNamedQuery(
                "WeblogEntry.getByPinnedToMain&statusOrderByPubTimeDesc");
        query.setParameter(1, Boolean.TRUE);
        query.setParameter(2, WeblogEntry.PUBLISHED);
        if (max != null) {
            query.setMaxResults(max);
        }
        return query.getResultList();
    }

it will execute a named query:

WeblogEntry.getByPinnedToMain&statusOrderByPubTimeDesc

from:
app/src/main/resources/org/apache/roller/weblogger/pojos/WeblogEntry.orm.xml

<named-query
name="WeblogEntry.getByPinnedToMain&amp;statusOrderByPubTimeDesc">
            <query>SELECT w FROM WeblogEntry w WHERE w.pinnedToMain = ?1
AND w.status = ?2 ORDER BY w.pubTime DESC</query>
</named-query>

Is this OK?

Cheers Greg




On 17 December 2013 13:33, Gaurav <ga...@gmail.com> wrote:

> Hello,
>
> I am still not able to populate the results in frontpage theme. The
> condition I see in this theme is different from other is this
> [#foreach($pinnedEntry in $pinnedEntries)]. Can any one explain me what is
> pinnedEntry here ? As in that theme we still use #foreach($entry in
> $entries) for the search results, that is why I was saying search results
> are coming fine.
>
> Thanks
> Gaurav
>
> On Tuesday 17 December 2013 03:29 PM, Greg Huber wrote:
>
>> It should work ok, the front page theme is for the initial front page
>> weblog, right?
>>
>> Cheers Greg.
>>
>>
>> On 17 December 2013 09:38, Gaurav <ga...@gmail.com> wrote:
>>
>>  Hello,
>>>
>>> I tried using the frontpage theme of roller, but it seems like this theme
>>> has some issue as It did not show up any data (no blogs, hottags, hot
>>> blogs
>>> etc.)
>>> But when I tried searching in the search of that theme, then it shows the
>>> blogs. I am looking into this, just want to know Is anyone out there for
>>> whom this theme is working perfectly fine ?
>>>
>>> --
>>> Regards,
>>> *Gaurav Saini*
>>> /Developer, Digital Marketing and Pursuing B.Tech/
>>> /Email: gauravsaini03@gmail.com/
>>>
>>>
>

Re: FrontPage theme not working

Posted by Gaurav <ga...@gmail.com>.
Hello,

I am still not able to populate the results in frontpage theme. The 
condition I see in this theme is different from other is this 
[#foreach($pinnedEntry in $pinnedEntries)]. Can any one explain me what 
is pinnedEntry here ? As in that theme we still use #foreach($entry in 
$entries) for the search results, that is why I was saying search 
results are coming fine.

Thanks
Gaurav

On Tuesday 17 December 2013 03:29 PM, Greg Huber wrote:
> It should work ok, the front page theme is for the initial front page
> weblog, right?
>
> Cheers Greg.
>
>
> On 17 December 2013 09:38, Gaurav <ga...@gmail.com> wrote:
>
>> Hello,
>>
>> I tried using the frontpage theme of roller, but it seems like this theme
>> has some issue as It did not show up any data (no blogs, hottags, hot blogs
>> etc.)
>> But when I tried searching in the search of that theme, then it shows the
>> blogs. I am looking into this, just want to know Is anyone out there for
>> whom this theme is working perfectly fine ?
>>
>> --
>> Regards,
>> *Gaurav Saini*
>> /Developer, Digital Marketing and Pursuing B.Tech/
>> /Email: gauravsaini03@gmail.com/
>>


Re: FrontPage theme not working

Posted by Greg Huber <gr...@gmail.com>.
It should work ok, the front page theme is for the initial front page
weblog, right?

Cheers Greg.


On 17 December 2013 09:38, Gaurav <ga...@gmail.com> wrote:

> Hello,
>
> I tried using the frontpage theme of roller, but it seems like this theme
> has some issue as It did not show up any data (no blogs, hottags, hot blogs
> etc.)
> But when I tried searching in the search of that theme, then it shows the
> blogs. I am looking into this, just want to know Is anyone out there for
> whom this theme is working perfectly fine ?
>
> --
> Regards,
> *Gaurav Saini*
> /Developer, Digital Marketing and Pursuing B.Tech/
> /Email: gauravsaini03@gmail.com/
>