Fork me on GitHub

TNGz: problem with search  Bottom

  • I'm having a problem with the search function and the TNGz plugin. I'm always getting this error, and no search results:

    Code

    Error! Could not load items.Internal error: module TNGz returned false in search function 'search'


    Obviously, I could remove the TNGz search plugin, but I just wanted to give a heads-up about this.

    Any ideas?

    --
    David
    http://zikula.tv
  • David,
    Sorry for the delay. I'll start looking into this. I just checked my site and it works. So I'm not sure what is going on at the moment. So I will have to dig more. What level of Zikula are you running on?
    - Wendel

    --
    - Wendel
  • David,
    OK, this is acting like it can't find the TNG information. Assuming TNGz works everywhere else, I suspect it just isn't getting to the TNGz routines to load the TNG information. So let's try this..

    In the file pnsearchapi.php, function TNGz_searchapi_search about line 42, change

    Code

    pnModDBInfoLoad('Search');
    $pntable = pnDBGetTables();

    to

    Code

    pnModDBInfoLoad('Search');
    if( !pnModAPILoad('TNGz','user',true) ) {
        return false;
    }
     
    $pntable = pnDBGetTables();

    If this works for you, I will make the change permanent.

    --
    - Wendel
  • Wendel,

    I'm running 1.1.2-dev, with TNG 5.1.4.

    I'll make the changes you suggest and get back to you with feedback, thanks. icon_smile

    --
    David
    http://zikula.tv
  • Wendel,

    Shot in the dark here, but I wonder if that is the problem. Your module should be loaded. Maybe post the search code and we can help.

    Tim



    edited by: Paustian, Apr 18, 2009 - 12:38 AM
  • The source is in Cozi at http://code.zikula.org/tngz/browser/trunk/TNGz/modules/TNGz/pnsearchapi.php

    Just realize this is not pretty. TNGz has to work with the TNG database.
    My first guess was the error message was coming from line 75, which means that the TNG configuration file could not be loaded. But if that can be done elsewhere, then I'm guessing it was a problem with the call to GetTNGpaths. Hence the try at making sure the module API was loaded.

    But there are a couple of other _GETFAILED messages too.

    --
    - Wendel
  • OK, I took a look at the code. You are doing some interesting things. IF turning on debugging is not giving you a clear picture, the next thing I would try is adding some print "here";die; statements to your code and see how far you get before you fail. That will let you know where the first problem really is. Hope this helps.
  • Wendel,

    I tried the code you suggested. Unfortunately, still no joy. Entering a search term and clicking 'Submit' just returns you to a blank search form. Clicking on the 'recent searches' link produces this message:

    Code

    Error! Could not load items.Internal error: module TNGz returned false in search function 'search'Error! Could not load items.Internal error: module TNGz returned false in search function 'search'


    But if I go to the site admin panel, Search module, and disable the TNGz search plug-in then searches work OK...

    --
    David
    http://zikula.tv
  • David,
    I've updated a new version of the search file at
    http://code.zikula.o…NGz/pnsearchapi.php
    Look at the bottom to download the text file. This addes more to the error message so I can figure out which of the 3 places it is failing.

    It is still odd that the rest of the TNGz setup works. Since all the error messages are related to getting to the TNG data. Also, you are working on the newer Zikula. I'm still on 1.0.3. I'll see if I can get someone else try the search on Zikula 1.1.x

    --
    - Wendel
  • Hi Wendel, David,

    I'm running Zikula 1.1.1 and search works as expected. I don't have any problems.

    Perhaps 1.1.1 - 1.2.dev has some changes we have to evaluate?!

    Greetings
    Sven

    EDIT: I'm using TNG 7.0.3 - are there any changes in DB layout?



    edited by: hilope, Apr 20, 2009 - 06:18 AM

    --
    | scribite! | TNGz | piwik | zweet |
  • BINGO! Thanks Sven! Yes, there was an addition of a 'prefix' field in the TNG people table sometime between TNG v5.x and 7.0.3. Since this is not frequently used and not a major part of the name, I removed it. The new code is at
    http://code.zikula.o…NGz/pnsearchapi.php

    David, I believe this should fix the problem. Please try and let me know.

    --
    - Wendel
  • OK, no problem, I'll check it out in the next 24 hours or so. icon_smile

    --
    David
    http://zikula.tv
  • 0 users

This list is based on users active over the last 60 minutes.