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.

PHP Error in Search module

December 20, 2010 5:16pm

Subscribe [10]
  • #1 / Dec 20, 2010 5:16pm

    grrramps

    2219 posts

    I’m getting a PHP error when doing a search as Administrator (not as regular user):

    A PHP Error was encountered
    Severity: Notice
    Message: unserialize() [function.unserialize]: Error at offset 0 of 256 bytes
    Filename: search/mod.search.php
    Line Number: 388
    The following errors were encountered
    The search path contains an error. Please contact the system administrator.

    The error doesn’t show up for regular non-logged in users. Same error shows up using Advanced Search, too.

    EE 2.1.2 20101215, PHP 5.2.11

    Template Debugging is OFF
    Debug Preference set to ‘1’.

  • #2 / Dec 21, 2010 10:15am

    Sue Crocker

    26054 posts

    Hi, grramps.

    See http://ellislab.com/expressionengine/user-guide/cp/admin/content_admin/channel_edit_preferences.html

    Have you set the value of:

    Search Results URL

    The full URL where you would like search results from this channel to be pointed. The URL should include the Template Group and Template. For example, if you wish that links off the search results page point to your “comments” Template you might use: http://example.com/index.php/channel/comments/

    Also, are you still on EE2.1.2, or did you go ahead and upgrade to EE 2.1.3?

  • #3 / Dec 21, 2010 10:31am

    grrramps

    2219 posts

    Have you set the value of:

    Search Results URL

    The full URL where you would like search results from this channel to be pointed. The URL should include the Template Group and Template. For example, if you wish that links off the search results page point to your “comments” Template you might use: http://example.com/index.php/channel/comments/

    It’s set properly. It worked fine in EE 1.7.x.

    Also, are you still on EE2.1.2, or did you go ahead and upgrade to EE 2.1.3?

    Updated to 2.1.3. Still get the error. It’s only for Administrator, not regular users. Search functions OK for regular non-logged in users.

  • #4 / Dec 22, 2010 3:24am

    John Henry Donovan

    12339 posts

    grrramps,

    Can you share your search tags and your results tags please so we can try and replicate.
    Also what your search URL looks like, thank you.

  • #5 / Dec 22, 2010 3:38am

    grrramps

    2219 posts

    Here’s the error:

    A PHP Error was encountered
    Severity: Notice
    Message: unserialize() [function.unserialize]: Error at offset 0 of 256 bytes
    Filename: search/mod.search.php
    Line Number:388
    The following errors were encountered
    The search path contains an error. Please contact the system administrator.

    Here’s the Simple Form tags:

    {exp:search:simple_form channel="{site-channel-name}" search_in="everywhere" where="any" results="20" result_page="search/results"}
    <label for="keywords"></label>
    <input type="text" name="keywords" id="keywords" value="" size="36" maxlength="120" />
    <input type="submit" id="gobutton" value="Search for App Reviews" class="submit" />
    {/exp:search:simple_form}

    Here’s the Search Results tag:

    {exp:search:search_results switch="resultRowOne|resultRowTwo"}
    <tr>
    <td class="{switch}" width="26%" valign="top"><strong><a href="http://{auto_path}" title="Link to: {title}">{title}</a></strong></td>
    <td class="{switch}" width="50%" valign="top">{excerpt}</td>
    <td class="{switch}" width="12%" valign="top">{author}</td>
    <td class="{switch}" width="12%" valign="top">{entry_date format="%M %j, %Y"}</td>
    </tr>
    {/exp:search:search_results}

    Here’s the Search Results URL (for each entry):

    <a href="http://mysite.com/index.php/mysite/comments/name-of-entry-here">http://mysite.com/index.php/mysite/comments/name-of-entry-here</a>

    Here’s the Search Results URL in Channel Preferences:

    <a href="http://mysite.com/index.php/mysite/comments/">http://mysite.com/index.php/mysite/comments/</a>

    Here’s the URL to the Search Results page:

    <a href="http://mysite.com/index.php/search/results/b916a50de915a15aa24be6c3feb6fa6b/">http://mysite.com/index.php/search/results/b916a50de915a15aa24be6c3feb6fa6b/</a>

    Does that help?

    Again, the error only occurs to logged in SuperAdmin, not to site visitors.

  • #6 / Dec 22, 2010 5:17pm

    Barry Cogan

    291 posts

    Hi Grrramps,

    Thank you for getting that information to us. We are working to figure out what is causing this issue.

    Could you please also let us know if and which third-party add-ons you are running?

    Also, what custom field types are being used on the channel that is being searched?

    Sincerely,

    Barry Cogan

  • #7 / Dec 22, 2010 5:35pm

    grrramps

    2219 posts

    Thank you for getting that information to us. We are working to figure out what is causing this issue.

    It’s not a deal breaker because it only displays the errors when running as Super Admin.

    Could you please also let us know if and which third-party add-ons you are running?

    Only Plugins:

    Allow EECode, Char Limit, Randomizer, Trunchtml, Word Limit, and TextLinkAds.

    Also, what custom field types are being used on the channel that is being searched?

    No custom field types. Extra fields were added but all are Textareas.

  • #8 / Dec 27, 2010 9:10am

    Sue Crocker

    26054 posts

    Sean Smith is having a similar issue with unserialize() [function.unserialize]. We may need to get login details in a bit. Thanks in advance for your patience.

    Is this a new install, or an upgrade from 1.x? MSM or not, forum install or not? If either of these, which ones, version wise?

  • #9 / Jan 09, 2011 1:28am

    Sue Crocker

    26054 posts

    Hi, grramps. Any more news on this? Waiting to hear back from you about if this was a new install, or an upgrade?

  • #10 / Jan 20, 2011 4:57pm

    Trevor Davis

    39 posts

    I was getting that same PHP error on EE 2.1.3 (which was originally an upgrade from 1.x). I deinstalled the module, then reinstalled it, and it seemed to fix the problem.

  • #11 / Jan 21, 2011 9:25am

    Ingmar

    29245 posts

    Very glad to hear it. So, everybody up and running? Where are you with this, grramps?

  • #12 / Jan 21, 2011 10:50am

    ErwinVanLun

    235 posts

    We had the same PHP error after upgrading to 2.1.3, and reinstalling the Search module helped.

  • #13 / Jan 21, 2011 3:31pm

    narration

    773 posts

    Thanks: yes, deinstall then reinstall on the Search module corrects this bug’s result.

    However, be sure that you Clear Caches also, and refresh the page you are searching from, or other errors will appear as among other things, the action code for search will change.

    Reported this as bug so it will get fixed: 15075.

    Regards,
    Clive

  • #14 / Jan 22, 2011 4:20pm

    Greg Salt

    3988 posts

    Thanks Erwin and Clive. Have you tried reinstalling the module grrramps?

    Cheers

    Greg

  • #15 / Jan 31, 2011 1:20pm

    eeart

    257 posts

    We keep getting this PHP error and “The search path contains an error”. I have reinstalled the module several times, and initially it seems to have fixed it but then the error comes back anyway. I also get “The action you have requested is invalid.” sometimes. Emptying cache gets rid of this.

    Search is terrible since upgrading to 2.1.3.

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

ExpressionEngine News!

#eecms, #events, #releases