Forums / General / Content Structure and Search module

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

eZ debug

Timing: Jan 18 2025 02:04:59
Script start
Timing: Jan 18 2025 02:04:59
Module start 'content'
Timing: Jan 18 2025 02:05:00
Module end 'content'
Timing: Jan 18 2025 02:05:00
Script end

Main resources:

Total runtime0.8392 sec
Peak memory usage4,096.0000 KB
Database Queries259

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0069 587.7266180.8359
Module start 'content' 0.00690.7044 768.5625891.5391
Module end 'content' 0.71130.1278 1,660.1016366.5625
Script end 0.8391  2,026.6641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.5115210.0002
Check MTime0.00170.1969210.0001
Mysql Total
Database connection0.00090.102110.0009
Mysqli_queries0.720285.81552590.0028
Looping result0.00230.27542570.0000
Template Total0.805396.020.4026
Template load0.00260.306220.0013
Template processing0.802795.648520.4013
Template load and register function0.00030.041710.0003
states
state_id_array0.00100.120510.0010
state_identifier_array0.00070.078020.0003
Override
Cache load0.00250.29481160.0000
Sytem overhead
Fetch class attribute can translate value0.00160.186270.0002
Fetch class attribute name0.00170.2022210.0001
XML
Image XML parsing0.00290.348370.0004
class_abstraction
Instantiating content class attribute0.00000.0055240.0000
General
dbfile0.00891.0605470.0002
String conversion0.00000.000830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
17content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
32content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
18content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 78
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs