ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

setting up search results - simple

February 10, 2011 4:56pm

Subscribe [7]
  • #61 / Mar 04, 2011 3:45am

    narration

    773 posts

    Hi grounded. It’s late, so let me give you some thoughts you can read offline, to go with those of Travis, who answered you and who wrote much of Structure himself.

    - as Travis suggested, clearing the cache, all parts of it, is something that you _have_ to be able to do—it’s going to clear itself over time anyway in normal operation. And clearing it should cause absolutely no change in your EE site with or without Structure, except somewhat slower operation until the first few accesses have occurred and the cache is built up again.

    - I read the Structure forum you referenced, and found your note of earlier troubles while you were still trying to run Pages and Structure together. Indeed you apparently had some corrupted data. It’s possible that’s what bit you yesterday also.

    - Travis is recommending upgrading, but I would go slowly here—it may be best to stay with what you have.

    To give a little reasoning, EE is known by everyone to be in a transition recently, and the version you are running may be more stable than either the 2.1.3 current release, which has known problems, or the 2.1.4beta which fixes some of the problems so far but is unfinished. Also, to be candid, I have heard people having trouble with Structure lately as well, and I see in their forum that they are doing quick fixes for people to get rid of errors with 2.1.3. I don’t think Structure is released for 2.1.4beta EE at all.

    If Structure was working for you other than this cache-cleared issue, I think I might stick with your present release while you are working out current problems, unless it becomes very clear that you need to upgrade.

    - grounded, the one thing I think you really need to do is to have a staging site—a completely separate EE/Structure install that you work on and test until it is ready, for current problems, and for future development. You keep this separate from the working server which people are using daily.

    It’s professional, and it is the only way to safely work with complex software systems like this—especially when you have a large user community who wants to depend on it.

    Once you have a releasable result due to your comfort on the staging site, you make a careful transfer and reconfiguration to the live server, during off hours. Rinse and repeat as you are developing the site. You’ll learn a few things getting this down to practices, but then it will be very easy to make the tranfers—many of us do it all the time.

    - It’s on a staging site only that I am going to propose you work forward now, so that your live site isn’t disturbed. Clearly you have some issues with that ‘Listing’ construct which is supposed to deliver the personnel lists, etc.. As Travis says, it should be fault-free. Given the state you ended up with where Pages and Structure had been installed, according to your Structure support forum conversation, it does seem quite possible you have something awry with data in your database.

    Rather than try to correct this, I believe a wise plan would be to start with a clean, empty EE and Structure install, on an empty database - a fresh staging site. You should be able to copy/paste all your template text and so forth from screens editing the live site, so you won’t lose work. You can do the data entry once more into the staging system to get it clean and correct. Then do any troubleshooting needed to bring the results up fully, put in the search fixes outlined for you, etc.. Once you’ve done that, I think you’ll have a stable base to work with, and will be able to make dependable releases to the live server as you need to.

    - I imagine many people do staging servers something as I do. I put the data in a differently named database, from the same server. I use a subdomain of the main site for the EE install and web service—very easy to do, and keeps the path changes you need to make going live very minimal. A url like staging.onami.us may particularly help keep things straight.

    - I suspect you’ll find your staging server with the clean data to bring back that Listing ability of Structure with no further attention, or with minimal adjustments, since you had it working. You can and should test that clearing all four parts of the caching doesn’t interfere at all. Then you can go on to set your search working correctly, which is also easy to do as we’ve outlined above. Test. And then make an orderly transition of the database and file contents of this staging server to live, completely replacing what’s running now on the live.

    - last but not least, is a recommendation to follow Travis’s advice to the letter: Backup, backup, backup. You should have full copies for your live and staging site databases, taken often and at significant points. You should have matching copies of every file on the webserver part of the site. It’s very easy to do both with modern tools, and then you can always recover if any unexpected results occr.

    A practice I and others use during actual replacement of a site, as you will do in sending staged results to live, is to keep the old files available on server, by simply renaming rather than immediately deleting their directories to assure safe copy-over. This means that if your staging-to-live goes wrong, for example, you can get the site back up almost instantly with a recovery. You just name folders again so that the old ones are being used, then drop your database and restore from its older version. It will take about five minutes. Renaming doesn’t substitute for file backups; rather just gives you a quick-recovery ability.


    grounded, I think this will get you better into control. With the peace to work on a fresh-data staging server, it should go smoothly to verify that your Listing pages work, and to then get the complex searches operating the way they are supposed to, with EE’s automatic help that we found it has for your situation. Stay in touch, and advice will come when you need it.

    Regards,
    Clive

  • #62 / Mar 07, 2011 2:29pm

    grounded

    138 posts

    Thanks Clive for you help and suggestions.  A couple of posts back you had suggested that simply changing my ‘Search results path’ for my about channel to
    http://www.onami.us/index.php/about/

    Would yield the results I need. I have since changed it, and unfortunately my results have not changed. (tested on multiple machines) Any suggestions to what to try next?

  • #63 / Mar 07, 2011 8:17pm

    narration

    773 posts

    grounded, changing that one Search Results Path is only going to work for results items that are in the about channel, which are intended by you to be displayed by the about index page.

    Given a straightforward multichannel site, I think you’ll find that to make search results each work, you need to make the more general solution:

    1. identify the correct displaying template, in the Search Results Path for each channel.
    2. identify the correct Excerpt field for each channel, in its Administrative Preferences. 3. You do have to previously have marked that field to be Searchable, when you were setting it up, so that it will show as a menu choice.

    It does work here, this way. Run your ‘recent publications’ search yourself, take the link offered, which fails, and add the /about/ to it between index.php and recent_publications. That’s still showing correctly for me, just trying the sequence again. It’s the demonstration of principle.

    Regards,
    Clive

  • #64 / Mar 07, 2011 8:37pm

    narration

    773 posts

    one or two more thoughts:

    - if it’s not entirely clear, the demonstration of principle above just shows what should happen automatically when you put the Search Results URL with the /about/ in it.

    - I started using an extremely nice and very inexpensive add-on which cuts your time and error rate in moving a site between two servers to very little, and meant to tell you about it. This is Deeploy Helper, and you can find it here.

    C.

  • #65 / Mar 09, 2011 3:10pm

    grounded

    138 posts

    Thanks,

    SO, this is what I have setup tested:

    In my ‘About’ field group, I have the main body section set to ‘searchable’

    I ahve that field group connected to my ‘about’ channel

    In the ‘about’ channel preferences, in the ‘administrative preferences’ tab, I have the ‘main body’ section set to use as excerpt.

    In my path settings for ‘About’ channel, I have it set to :http://www.onami.us/index.php/About/

    Search results for ‘About’ channel only will not have working links. I’m not worried about the rest of the site yet, I just wanted to be able to get some results working to begin with, which I seem to not be able to do….

    Anyone else from EE have any advice on this matter?  Sue? Settings for simple search results?

    I appreciate all your input C…...

    Ed

  • #66 / Mar 09, 2011 3:55pm

    narration

    773 posts

    Ed, some points to check:

    - with the settings you’ve described, what does the actual link url look like, for the result label ‘Recent Publications’ on your Search Results page, when you search for ‘recent publications’? On the server I can access, it still looks the old way, without the /about/ in it: http://www.onami.us/index.php/recent_publications, which fails.

    - you mentioned several machines; are you configuring the machine you are testing? Such does happen to the best of us…

    - I would think the path needs to use /about/ rather than /About/, given you haven’t changed EE’s default of using lower case for short-name and internal names. This is a very good idea, since Linux or Unix hosts are case sensitive, and common practice is lower case. /About/ does seem to work from my end at the moment on that particular machine, but I wouldn’t use it as practice.

    Let’s see if things turn up well now.

    C.

  • #67 / Mar 09, 2011 5:08pm

    narration

    773 posts

    Edmond, I’ll have the chat up in a half hour, for the afternoon, if you want to talk over what exactly is happening.

    Maybe I’m not clear enough that it ‘should’ just work. I think we need to find out why it doesn’t, on your About channel, and I’m not aware of any further configuration that would affect this.

    But let’s see. Actually, I just had an idea, a somewhat obscure one, and I will test that when I get to where I’m going.

    Regards,
    Clive

  • #68 / Mar 09, 2011 7:02pm

    narration

    773 posts

    Ok, I tested around that idea, and my conclusion is that it is very hard to make this search results not work 😉.  I also looked through the Release Notes to see if there have been any related fixes or changes - not apparently. But of course we have something going on here.

    Edmond, I then went back to re-read this long thread, and something occurred to me. When the if-statements began being discussed, the code for results always included link elements like

    <a href="http://{title_permalink=research}">{title}</a>

    However, title_permalink, though it might actually operate in search, seems not documented as a legal variable for use in search. Also, it very likely does _not_ obey the path setting you believe you are making correctly, where you include the necessary /about/, in the channel’s Search Results URL.

    It’s even possible you still have some of that if-else code in what you call your search-results template, the one that displays the results with their links. Either could give the wrong results you still see.

    Could you please check that you are using a simple line like the following, to display those problem links in your search results template? No ifs.

    And please verify that it uses auto_path as in the example here, not title_permalink. auto_path is documented to give the results we are expecting.

    I took this line from your early search-results code, so it should be close to proper for the site layout.

    <td width="30%" valign="top"><b><a href="http://{auto_path}">{title}</a></b></td>

    Hoping this gets us somewhere!  Edmond, I am continuing as much as I can here, as Support moved the conversation to the Community Support area, and it’s not one they enter much, by forum policy.

    Regards,
    Clive

  • #69 / Mar 10, 2011 8:59pm

    grounded

    138 posts

    woohoo! That was the ticket man… nice, will tidy this up, and call it website. The {auto_path} made the difference.. badass, thanks Clive!

  • #70 / Mar 10, 2011 9:04pm

    narration

    773 posts

    Hey, great to hear, Edmond—and just in time for me to break for a webcast concert I want to hear 😉

    EE does work, when it does 😉—and then it can definitely feel amazing.

    I actually think that the way this multisource search automation works is a throwback to the really good days, and which are working out now to come again.

    Best, and I will peek at the site later. Have it good, Edmond.

    Clive

  • #71 / Mar 10, 2011 9:07pm

    grounded

    138 posts

    Thanks, will do, I appreciate you taking the time to post as much as you did….

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases