search button dont work with greek campsite version 3.3.5
  • Vote Up0Vote Down johnjohn
    Posts: 7Member
    Hi Guys,

    the last two months i am working with campsite,

    its a very very flexible cms,

    i have bring campsite almost to the level that i want,

    however i am facing two problems ,

    i want to use campsite for two languages one of them is greek,

    as i said 90% is ready,

    the main problem that i have is with the 'search'
    is not working,

    i went on the admin section and add a new language greek, code:EL

    i change the publication to Greek and all the corresponding tree,

    all the index page was OK however when i hit a different section like sports all the greek characters was changing to strange symbols

    i solved that problem doing the following:
    {{php}}
    header('Content-Type: text/html; charset=UTF-8');
    {{/php}}

    i dont know how to get the search mechanism working:


    this is the search form:
    {{ search_form template="classic/search-result.tpl" submit_button="Search" button_html_code="class=\"submitbutton\"" }}
    {{ camp_edit object="search" attribute="keywords" html_code="class=\"text\"" }}
    {{* camp_select object="search" attribute="level" *}}
    {{* camp_select object="search" attribute="mode" *}}
    {{ /search_form }}


    and this is the receiver:
    {{ if $campsite->search_articles_action->defined }}

    {{ if $campsite->search_articles_action->is_error }}
    {{ $campsite->search_articles_action->error_message }}
    {{ /if }}

    {{ if $campsite->search_articles_action->ok }}

    {{ list_search_results name="results" length=9 }}
    {{ if $campsite->current_list->at_beginning }}
    <p>Found {{ $campsite->current_list->count }} articles matching the condition.</p>
    {{ /if }}
    <div class="teaserframe teaserframebig teaserframe-{{ $campsite->section->number }} teaserframebig-{{ $campsite->section->number }}">
    <div class="teaserframebiginner">
    <div class="teaserhead">
    <div class="teaserheadinner">
    </div><!-- .teaserheadinner -->
    </div><!-- .teaserhead -->
    <div class="teasercontent content">
    <h2 class="title title_big"><a href="{{ uri options="article template article.tpl" }}">{{ $campsite->article->name }}</a></h2>
    <p class="text">(Section <a href="{{ uri options="section template section.tpl" }}">{{ $campsite->section->name }}</a>, {{ $campsite->article->Date }} {{ $campsite->article->Time }}) {{ $campsite->article->Deck }}</p>
    </div><!-- .teasercontent content -->
    </div><!-- .teaserframebiginner -->
    </div><!-- .teaserframebig -->
    {{ local }}
    {{ unset_publication }}
    {{ unset_issue }}
    {{ unset_section }}
    {{ unset_article }}
    {{ include file="classic/tpl/pagination.tpl" }}
    {{ /local }}
    {{ /list_search_results }}

    {{ if $campsite->prev_list_empty }}
    <div class="error"><div class="errorinner">
    There were no articles found.
    </div></div>
    {{ /if }}
    {{ /if }}
    {{ /if }}


    can u please tell me where is the problem?

    i must configure something else?


    (congratulations for the new forum looks great)




  • 6 Comments sorted by
  • Hi John,

    Just tested your code in two different Campsite installations, two different boxes, and works ok. Please give us more details on what is happening to you. You say it does not work but we need to know, for example, what happens when you click on the search button, you get some error message? you get some message from your template code (for example, saying no records all the time)? you get a blank page? clicking the search button does not do anything at all?

    Best,


    /holman
  • Vote Up0Vote Down johnjohn
    Posts: 7Member
    Fatal error: SQL Error has occurred, please contact the administrator of the forum and have them review the forum's SQL query log in /var/www/fudforum/include/core.inc on line 201


    i was trying to post but i was getting the above error,

    Hi Holman,

    thank you for the fast reply,

    the code works ok with english, but not with greek,

    did u tryed with greek?

     i mean did u tryed to add new greek articles change the publication - issue languages to greek
    add new article and then search greek words?

    did u tryed to add a new language ?

    greek code EL

    i tried as well into two machines (if it makes any difference  linux boxes)

    but nothing,

    the error that i am getting is the following:

    There were no articles found.


    {{ if $campsite->prev_list_empty }}
    <div class="error"><div class="errorinner">
    There were no articles found.
    </div></div>

    but it doesn't make sense coz the articles are there and the keywords are correct,
    i mean i use keywords from the articles on line

    i've noticed that when i bring back english as the main language the code works

    publication - issue english all ok,

    but when i change to greek  no results,

    maybe it has to do with the encoding?


    100% sure that it doesn't work with greek words.

    sorry when i use greek it doesnt search for english words as well,

    what do u think?

    Από: john papas <john23qaz@yahoo.gr[/email]>
    Θέμα: search button dont work with greek
    Προς: campsite-support@lists.sourcefabric.org[/email]
    Ημερομηνία: Παρασκευή, 23 Απρίλιος 2010, 19:11
  • Vote Up0Vote Down johnjohn
    Posts: 7Member
    when i first switch languages to greek (i mean add new language - publication all the tree greek ) apart from the index page,
    all other sections articles was printing strange symbols instead on the articles,

    i resolved that problem by adding the following:
    {{php}}
    header('Content-Type: text/html; charset=UTF-8');
    {{/php}}

    and it worked ,

    so i am guessing its encoding thing,

    i hope it helped.
  • Hi John,

    It is clear now, thanks, so I am gonna run some tests as you suggest and will be back soon with some news.
    May you send me a backup from your database? it would be much better working with the same data, a dump containing Publications, Issues, Sections and Articles tables if not all would be ok.

    Best,
  • Hi John,

    Did you publish all these Greek language articles and the corresponding
    issue? You should also run the campsite-indexer manually if you don't want
    to wait for it to be run by cron (that's in case you're on Linux).

    Mugur

    On Mon, Apr 26, 2010 at 11:43 AM, john <
    campsite-support@lists.sourcefabric.org> wrote:

    > Fatal error: SQL Error has occurred, please contact
    > the administrator of the forum and have them review the forum's SQL query
    > log in /var/www/fudforum/include/core.inc on line 201
    >
    >
    > i was trying to post but i was getting the above error,
    >
    > Hi Holman,
    >
    > thank you for the fast reply,
    >
    > the code works ok with english, but not with greek,
    >
    > did u tryed with greek?
    >
    > i mean did u tryed to add new greek articles change the publication -
    > issue languages to greek
    > add new article and then search greek words?
    >
    > did u tryed to add a new language ?
    >
    > greek code EL
    >
    > i tried as well into two machines (if it makes any difference linux boxes)
    >
    > but nothing,
    >
    > the error that i am getting is the following:
    >
    > There were no articles found.
    >
    >
    > {{ if $campsite->prev_list_empty }}
    > <div class="error"><div class="errorinner">
    > There were no articles found.
    > </div></div>
    >
    > but it doesn't make sense coz the articles are there and the keywords are
    > correct,
    > i mean i use keywords from the articles on line
    >
    > i've noticed that when i bring back english as the main language the code
    > works
    >
    > publication - issue english all ok,
    >
    > but when i change to greek no results,
    >
    > maybe it has to do with the encoding?
    >
    >
    > 100% sure that it doesn't work with greek words.
    >
    > sorry when i use greek it doesnt search for english words as well,
    >
    > what do u think?
    >
    > Από: john papas <john23qaz@yahoo.gr>
    > Θέμα: search button dont work with greek
    > Προς: campsite-support@lists.sourcefabric.org
    > Ημερομηνία: Παρασκευή, 23 Απρίλιος 2010, 19:11
    >
    > Hi Guys,
    >
    > the last two months i am working with campsite,
    >
    > its a very very flexible cms,
    >
    > i have bring campsite almost to the level that i want,
    >
    > however i am facing two problems ,
    >
    > i want to use campsite for two languages one of them is greek,
    >
    > as i said 90% is ready,
    >
    > the main problem that i have is with the
    > 'search'
    > is not working,
    >
    > i went on the admin section and add a new language greek, code:EL
    >
    > i change the publication to Greek and all the corresponding tree,
    >
    > all the index page was OK however when i hit a different section like
    > sports all the greek characters was changing to strange symbols
    >
    > i solved that problem doing the following:
    > {{php}}
    > header('Content-Type: text/html; charset=UTF-8');
    > {{/php}}
    >
    > i dont know how to get the search mechanism working:
    >
    >
    > this is the search form:
    > {{ search_form template="classic/search-result.tpl" submit_button="Search"
    > button_html_code="class=\"submitbutton\"" }}
    > {{ camp_edit object="search" attribute="keywords"
    > html_code="class=\"text\"" }}
    > {{* camp_select object="search" attribute="level" *}}
    > {{* camp_select object="search" attribute="mode" *}}
    > {{ /search_form }}
    >
    >
    > and this is the receiver:
    > {{ if
    > $campsite->search_articles_action->defined }}
    >
    > {{ if $campsite->search_articles_action->is_error }}
    > {{ $campsite->search_articles_action->error_message }}
    > {{ /if }}
    >
    > {{ if $campsite->search_articles_action->ok }}
    >
    > {{ list_search_results name="results" length=9 }}
    > {{ if $campsite->current_list->at_beginning }}
    > <p>Found {{ $campsite->current_list->count }} articles matching the
    > condition.</p>
    > {{ /if }}
    > <div class="teaserframe teaserframebig teaserframe-{{
    > $campsite->section->number }} teaserframebig-{{ $campsite->section->number
    > }}">
    > <div class="teaserframebiginner">
    > <div class="teaserhead">
    > <div class="teaserheadinner">
    > </div><!-- .teaserheadinner -->
    > </div><!-- .teaserhead -->
    > <div class="teasercontent content">
    > <h2 class="title title_big"><a href="{{ uri options="article
    > template article.tpl" }}">{{ $campsite->article->name }}</a></h2>
    > <p class="text">(Section <a href="{{ uri options="section template
    > section.tpl" }}">{{ $campsite->section->name }}</a>, {{
    > $campsite->article->Date }} {{ $campsite->article->Time }}) {{
    > $campsite->article->Deck }}</p>
    > </div><!-- .teasercontent content -->
    > </div><!-- .teaserframebiginner -->
    > </div><!-- .teaserframebig -->
    > {{ local }}
    > {{ unset_publication }}
    > {{ unset_issue }}
    > {{ unset_section }}
    > {{ unset_article }}
    > {{ include file="classic/tpl/pagination.tpl" }}
    > {{ /local }}
    > {{ /list_search_results }}
    >
    > {{ if $campsite->prev_list_empty }}
    > <div class="error"><div class="errorinner">
    > There were no articles found.
    > </div></div>
    > {{ /if }}
    > {{ /if }}
    > {{ /if }}
    >
    >
    > can u please tell me where is the
    > problem?
    >
    > i must configure something else?
    >
    >
    > (congratulations for the new forum looks great)
    >
    >
    >
    >
    >

  • Vote Up0Vote Down johnjohn
    Posts: 7Member
    i send a sample db to Holman,

    i have publish everything, the articles is on air,
    with the corresponding issue,
    all the tree is correct

    as a far as the campsite-indexer,

    i didn't do that, but i don't see why the indexer is the problem,

    the search works with 'en' but now with greek,

    i think its encoding issue.