Jahia Template Forum > Date range in advanced...

0 (0 Good)
0 (0 Bad)

Date range in advanced search not visible while logged out

by  mabouchacra »  2011/06/07 20:11

Hello,

We have a problem when we try to use the date range component (search:lastModified) in our template : the two input (from - to) are not visible when we are not logged in. It's working without problem while we are logged in.
When we are not logged in, we can see the labels quot;from
  • Date range in advanced search not visible while logged out
    2011/06/07 20:11

    mabouchacra Hello,<br/><br/>We have a problem when we try to use the date range component (search:lastModified) in our template : the two input (from - to) are not visible when we are not logged in. It's working without problem while we are logged in.<br/>When we are not logged in, we can see the labels quot;from

  • Number of messages  44
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Date range in advanced search not visible while logged out

    by  dsaulnier »  2011/06/07 20:11

    Hi Marc,

    This a very strange issue. Actually, it is a javascript issue. There's a javascript function called searchDateTypeToggle() which takes the select tag as parameter, and then retrieves the div displaying the 2 input fields, using the nextSibling property. As the div is supposed to be just after the select, it should work. But strangely, when you are unauthenticated, the div is not just immediately after, there's a newline character between. I have seen no reason in the code that could explain why we do not have exactly the same html fragment when we are authenticated or not, but it is probably the consequence of some code beautification at Tomcat level.
    It will be fixed in the next release, but in case you cannot wait, here is fix you can do:
    open WEB-INF/lib/jahia-taglib.jar , and update META-INF/tags/search/lastModified.tag according to the code below (you need to add the last line)
    remove the content from tomcat/work/ , and flush the caches in Jahia.

    [code:3aafd32q] function searchDateTypeToggle(dateType) {
    var range = dateType#46;nextSibling;
    if (range

    Damien Saulnier (dsaulnier)

    Number of messages  31
    Registration date
    0 (0 Good)
    0 (0 Bad)

    Re: Date range in advanced search not visible while logged out

    by  shyrkov »  2011/06/07 20:11

    Hello Marc,

    according to your description is seems that the required JavaScript is not included into the page with advanced search for not logged in users.

    I remember, we had this issue, because the GWT scripts were not included for quot;guest
  • Re: Date range in advanced search not visible while logged out
    2011/06/07 20:11

    shyrkov Hello Marc,<br/><br/>according to your description is seems that the required JavaScript is not included into the page with advanced search for not logged in users.<br/><br/>I remember, we had this issue, because the GWT scripts were not included for quot;guest

  • Number of messages  407
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Date range in advanced search not visible while logged out

    by  shyrkov »  2011/06/07 20:11

    By the way, the [url=http#58;//demo
  • Re: Date range in advanced search not visible while logged out
    2011/06/07 20:11

    shyrkov By the way, the [url=http#58;//demo

  • Number of messages  407
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Date range in advanced search not visible while logged out

    by  mabouchacra »  2011/06/07 20:11

    Hi there,

    Thanks for your reply.
    We've tried the first solution (Damien's one) whithout success. The second one worked fine.

    About the advanced search on the Jahia website, I was talking about the jahia.org website, not the demo one as you can see below.

    [attachment=0:3ll1i53b]ScreenShot030.png[/attachment:3ll1i53b]

    Cheers,
    Marc.
  • Re: Date range in advanced search not visible while logged out
    2011/06/07 20:11

    mabouchacra Hi there,<br/><br/>Thanks for your reply. <br/>We've tried the first solution (Damien's one) whithout success. The second one worked fine.<br/><br/>About the advanced search on the Jahia website, I was talking about the jahia.org website, not the demo one as you can see below.<br/><br/>[attachment=0:3ll1i53b]<!-- ia0 -->ScreenShot030.png<!-- ia0 -->[/attachment:3ll1i53b]<br/><br/>Cheers,<br/>Marc.

  • Number of messages  44
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Date range in advanced search not visible while logged out

    by  shyrkov »  2011/06/07 20:11

    Hello Marc,

    nice that it solved the problem! Thanks for the feedback!

    Kind regards
    Sergiy

    P.S. Yes, Jahiapedia pages are using quite an old version of template sets, where the gwtForGuest was not set.
  • Re: Date range in advanced search not visible while logged out
    2011/06/07 20:11

    shyrkov Hello Marc,<br/><br/>nice that it solved the problem! Thanks for the feedback!<br/><br/>Kind regards<br/>Sergiy<br/><br/>P.S. Yes, Jahiapedia pages are using quite an old version of template sets, where the gwtForGuest was not set.

  • Number of messages  407
    Registration date Jun 7, 2011
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page