Content Structure and Search module

Author Message

Nate Biggs

Sunday 18 May 2008 3:47:18 pm

I have done numerous searches on the forums and it seems these two issues are related.. and are both occurring on my site.

I am currently communicating with my host to see if I am using FastCGI. I have also changed the method in search.tpl to post, and that has changed nothing.

Any other suggestions?

Bruce Morrison

Sunday 18 May 2008 9:22:41 pm

Hi Nate

I think you post is missing something...like what's wrong :)

cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Piotrek Karaś

Sunday 18 May 2008 10:05:05 pm

;)

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Nate Biggs

Monday 19 May 2008 11:36:21 am

Sorry,

my Content Structure isn't updating itself, it just sticks with the home page with no sub-structure. And my Search Module is missing.

Searching these forums, I found these two were occasionally tied together by using fastcgi.. which I'm still not sure I use, but I also read about a fix using site.ini, which I apparently don't have access to and am wondering if the same fix can be done using php.ini - which I have access to.

Nate Biggs

Monday 19 May 2008 11:42:34 am

Oh.. and my site index.php has a ? after it, which seems to be pertinent as well.

The eZ publish part of my site is currently located here
http://www.sporadicgamers.net/content/ezpublish-4.0.0/
until all of the bugs are sorted out, at which point I will create a new install and do all of the fixes initially.

Example of the search failure
http://www.sporadicgamers.net/content/ezpublish-4.0.0/index.php?SearchText=asda

I tried the forcevirtualhost in the site.ini, and that didn't work--it just messed up my pages.

I can live without the content tree, for now. The search module is my biggest concern, as thats something users will end up seeing.

Any ideas?

André R.

Monday 19 May 2008 1:48:28 pm

Yes!! Finally a case where I could use web developer toolbar's (Firefox addon) "Convert Form Methods -> GET to Post", and searching for gtaIV gave me 3 results (all images).
So you probably didn't change the correct template when you tried to change the form method, or you forgot to clear the template / template block cache.

As for content structure, there is a patch in a "content structure menu fastcgi" issue in the issue tracker created by me, try it out.

[TemplateSettings]
ShowUsedTemplates=disabled

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Nate Biggs

Monday 19 May 2008 2:52:24 pm

I changed, again, the method from get to post in all of the search.tpls (advancedsearch.tpl and search.tpl) in all of my template folders.. then went to the ACP and cleared all of my caches.. and it still doesn't seem to work.

\design\admin\templates\content\advancedsearch.tpl
\design\admin\templates\content\search.tpl
\design\base\templates\content\search.tpl
\design\standard\templates\content\advancedsearch.tpl
\design\standard\templates\content\search.tpl

Each had the line <form action={"content/search/"|ezurl} method="get">
which I changed to <form action={"content/search/"|ezurl} method="post">

I then went into the ACP and went to Setup, cleared Template Caches and cleared Content Caches.

And it still seems to not work..

am I missing something?

Also.. I downloaded your patch for the tree menu in fastcgi, but I'm not sure how to apply it.

André R.

Tuesday 20 May 2008 12:58:26 am

> then went to the ACP and cleared all of my caches
I guess you mean APC?
Any way, the cache I wanted you to clear is eZ Publish cache, in admin interface go to 'Setup'.

But I'm not convinced you edited the correct templates, since you are using ezflow these are the templates in use with search forms:
extension/ezflow/design/ezflow/templates/pagelayout.tpl
extension/ezwebin/design/ezwebin/templates/content/search.tpl
extension/ezwebin/design/ezwebin/templates/content/advancedsearch.tpl

> Also.. I downloaded your patch for the tree menu in fastcgi, but I'm not sure how to apply it.

It's a diff file, but the fix will most probably be part of 4.0.1 so you'll get it eventually.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Nate Biggs

Tuesday 20 May 2008 11:51:00 am

Both files
extension/ezwebin/design/ezwebin/templates/content/search.tpl
extension/ezwebin/design/ezwebin/templates/content/advancedsearch.tpl

have had their methods changed from get to post, I've cleared the caches in the Admin Control Panel, several times. I have double checked the files, and the change is there.

The advanced search in the Admin section works, but the regular search box does not work in Admin OR the main site.

I wasn't sure what to change in
extension/ezflow/design/ezflow/templates/pagelayout.tpl

I appreciate the help, but I'm not sure what I'm doing wrong at this point..

My web host has confirmed my site is running fastcgi, could that be causing problems?

André R.

Tuesday 20 May 2008 2:57:37 pm

The two files you changed are the forms/templates you get when you go to the search and advancesearch pages. The forms in the page layout is placed in..... pagelayout..
As for finding what you are looking for, searching for "content/search" in you editor probably helps(ctrl + f in most editors).

> could that be causing problems?
Yes, rewrite rules + cgi + get request are a bit trouble some.
The content structure menu currently use get request, thats why it doesn't work for cgi users.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Nate Biggs

Thursday 22 May 2008 11:07:26 am

I found the search box in the pagelayout.tpl, but I'm not sure what I'm supposed to change

<form action="{&quot;/content/search&quot;|ezurl}"><label for="searchtext" class="hide">Search text:</label>
{if eq( $ui_context, 'edit' )}<input id="searchtext" name="SearchText" value="" size="12" disabled="disabled" type="text" /><input id="searchbutton" class="button-disabled" value="{'Search'|i18n('design/ezwebin/pagelayout')}" alt="Submit" disabled="disabled" type="submit" />
{else}<input id="searchtext" name="SearchText" value="" size="12" type="text" /><input id="searchbutton" class="button" value="{'Search'|i18n('design/ezwebin/pagelayout')}" alt="Submit" type="submit" />
{if eq( $ui_context, 'browse' )}<input name="Mode" value="browse" type="hidden" />
{/if}
{/if}</form>

I feel like there isnt much else to do to fix this problem, I just need to know what else I have to do. I am still a bit confused.

Josh Apostolides

Thursday 22 May 2008 4:15:58 pm

I have the same problem with the whole ? in the normal url thing. I was able to get my search to show up using the "post" method as explained above by explicitly changing the method to "post" on the form tag in all the search templates, namely:

extension\ezwebin\design\ezwebin\templates\content\search.tpl
extension\ezwebin\design\ezwebin\templates\content\advancedsearch.tpl

and whatever pagelayout.tpl you happen to be using that has a search box. mine is
extension\ezodf\design\ezwebin\override\templates\pagelayout.tpl
that was after i created an override in the ACP. I believe the default location for pagelayout.tpl is
extension\ezwebin\design\ezwebin\templates\pagelayout.tpl
or
design\base\templates\pagelayout.tpl
but i could be wrong on either one.

*************************************** file:pagelayout.tpl **********************************

      <form action={"/content/search"|ezurl} method="post">
        {if eq( $ui_context, 'edit' )}
        <input id="searchtext" name="SearchText" type="text" value="" size="20" disabled="disabled" />
        <input id="searchbutton" class="button-disabled" type="submit" value="{'Search'|i18n('design/ezwebin/pagelayout')}" alt="Submit" disabled="disabled" />
        {else}
        <input id="searchtext" name="SearchText" type="text" value="" size="20" />
        <input id="searchbutton" class="button" type="submit" value="{'Search'|i18n('design/ezwebin/pagelayout')}" alt="Submit" />
            {if eq( $ui_context, 'browse' )}
             <input name="Mode" type="hidden" value="browse" />
            {/if}
        {/if}
</form>

**************************************************************************************************

don't forget to clear the cache afterwards. I find it quicker to delete any files under var/cache and var/[site]/cache. This will force ez publish to recompile the templates.
Now i have a new error. When i clear the cache then do a search for, lets say, "test" i get the results page like normal, but when i do consecutive searches i get results from my initial search of "test" which leads me to believe that it's a caching issue. Is there any way to control the cache for the search?

btw i am using normal cgi for php on IIS 6.

André R.

Thursday 22 May 2008 11:41:43 pm

Normally search isn't cached, so it might be that you have som custimations in the search template or a cache block around module_result.content in pagelayout?

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Josh Apostolides

Friday 23 May 2008 9:05:37 am

you are absolutely right, i forgot to close off a cache-block in pagelayout.tpl. Now search is working flawlessly like it should, thx for the tip. here's a link if you would like to see.

http://bbcs.josh.redclaycms.com/

Nate Biggs

Monday 26 May 2008 3:49:02 am

I still don't understand why my site search isnt working. I can't figure out what I'm missing. Its still not working.. and now I'm just frustrated.

Nate Biggs

Monday 26 May 2008 3:55:35 am

Forget it. I'm going to switch hosts, this one has a 15 day cancellation policy.. so I'm just going to transfer to a host who supports eZ from the get go.

Geert Lybaert

Tuesday 16 September 2008 2:22:18 pm

Hi for me it just worked fine after changing the three files mentioned by André.
Now I have an additional question. I see that in a search result a message is given 'try advanced search' but when i click on that link it returns an empty screen.

The url of my site is www.felixtimmermans.be

Can someone give me a tip on what else I should modify?

Thanks.
Geert

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.