Results 1 to 10 of 10

Thread: Contact Advanced Search and Popup Search

  1. #1
    jcb23 is offline Sugar Community Member
    Join Date
    Sep 2007
    Posts
    70

    Default Contact Advanced Search and Popup Search

    Windows XP and Vista
    Sugar 5.2.0
    Apache 2.2.4
    PHP: 5.2.3-1ubuntu6.3
    MySQL Server: 5.0.45-1ubuntu3.3

    For some reason my contacts advanced search and my contacts popup search are reading the same file. Sometimes they both read the popupdefs.php file and sometimes they both read the searchdefs.php file. It switches back between the two when I use the "Quick Repair and Rebuild" function. I checked modules/Contacts/metadata/metafiles.php and its pointing to the correct files for popup and searchdefs. I even tried deleting the customizations I had done to those layouts and going back to the original layouts that came with sugar and it is still showing the same thing in both search screens.

    Has anyone else come across this problem?

    Jill

  2. #2
    crmsiva's Avatar
    crmsiva is offline A Sugar Hero
    Join Date
    Jan 2009
    Location
    Chennai, India
    Posts
    1,130

    Default Re: Contact Advanced Search and Popup Search

    Enable Developer Mode, so that deleting customizations will have a impact in the interface.

  3. #3
    jcb23 is offline Sugar Community Member
    Join Date
    Sep 2007
    Posts
    70

    Default Re: Contact Advanced Search and Popup Search

    Quote Originally Posted by crmsiva View Post
    Enable Developer Mode, so that deleting customizations will have a impact in the interface.
    I did that and it corrected the error. But if I unclick the box for Developer Mode the problem returns. Is this something that I can keep enabled long term without it causing any other issues?

  4. #4
    crmsiva's Avatar
    crmsiva is offline A Sugar Hero
    Join Date
    Jan 2009
    Location
    Chennai, India
    Posts
    1,130

    Default Re: Contact Advanced Search and Popup Search

    ohh strange. It is not advisable to leave the developer mode enabled all the time. Becoz, it will slow down the sugar performance. Check this to learn more about Developer Mode

  5. #5
    jcb23 is offline Sugar Community Member
    Join Date
    Sep 2007
    Posts
    70

    Default Re: Contact Advanced Search and Popup Search

    Quote Originally Posted by crmsiva View Post
    ohh strange. It is not advisable to leave the developer mode enabled all the time. Becoz, it will slow down the sugar performance. Check this to learn more about Developer Mode
    It appears that Developer Mode makes Sugar look at the files directly and not at the cache. So it appears that the problem happens when the cache files Popup.tpl and SearchForm_advanced are created. If I delete those files and click on the Advanced search than the fields from the advanced search portion of searchdefs.php show up in both places (Advanced Search and the Popup Search). If after deleting the files I click on a popup search first the fields in the popupdefs.php show up in both places. Is there anyway to prevent these two cache files from being created so that it always looks to the files directly? Will this significantly slow down work in these two search areas?

  6. #6
    crmsiva's Avatar
    crmsiva is offline A Sugar Hero
    Join Date
    Jan 2009
    Location
    Chennai, India
    Posts
    1,130

    Default Re: Contact Advanced Search and Popup Search

    If Developer Mode is enabled, the cache files will be regenerated every time the page is loaded. This applies to all modules. Moreover using cache files is global practice for SugarCRM. So better follow the same. Don't try to override the core functionality. Problem might be in some other area. Find it and fix it.

  7. #7
    jcb23 is offline Sugar Community Member
    Join Date
    Sep 2007
    Posts
    70

    Default Re: Contact Advanced Search and Popup Search

    Quote Originally Posted by crmsiva View Post
    If Developer Mode is enabled, the cache files will be regenerated every time the page is loaded. This applies to all modules. Moreover using cache files is global practice for SugarCRM. So better follow the same. Don't try to override the core functionality. Problem might be in some other area. Find it and fix it.
    That's the problem though. I can't find where the problem is. All I know is that when the cache files are being regenerated every time the page is loaded it works properly.

  8. #8
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Contact Advanced Search and Popup Search

    Create a view.list.php inside custom/modules/<ModuleName>/views/ folder and add this code inside the function display():

    PHP Code:
            require_once('modules/Administration/QuickRepairAndRebuild.php');
            
    $selected_actions = Array(=> 'clearTpls');
            
    $modules = Array(=> '<ModuleName>');
            
    $RepairAndClear = new RepairAndClear();
            
    $RepairAndClear->repairAndClearAll($selected_actions$modules$autoexecute=false$show_output=false); 
    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  9. #9
    jcb23 is offline Sugar Community Member
    Join Date
    Sep 2007
    Posts
    70

    Default Re: Contact Advanced Search and Popup Search

    I tried your suggested code andopes - but I ended up just getting a blank screen where the Contacts search should be.

  10. #10
    deoj is offline Senior Member
    Join Date
    Sep 2008
    Location
    Cebu City, Philippines
    Posts
    34

    Default Re: Contact Advanced Search and Popup Search

    hi,
    i also experienced this strange problem.
    i think the module's advanced search and popup search uses only
    one common template. if you open first the module's popup, both will use the popup search. and if you open first the advanced search, both will use the advanced search template.

    thanks to Andre, his code works, i just added
    PHP Code:
    parent::display(); 
    after the last line.
    i will try if the same fix will work in view.popup.php.

    my view.list.php
    PHP Code:
    <?php
    require_once('include/MVC/View/views/view.list.php');
    class 
    ContactsViewList extends ViewList{
         function 
    ContactsViewList(){
             
    parent::ViewList();
         }    
         function 
    display(){
                
    //from Andopes -START
                
    require_once('modules/Administration/QuickRepairAndRebuild.php');
                
    $selected_actions = Array(=> 'clearTpls');
                
    $modules = Array(=> 'Contacts');
                
    $RepairAndClear = new RepairAndClear();
                
    $RepairAndClear->repairAndClearAll($selected_actions$modules$autoexecute=false$show_output=false);
                
    //from Andopes -END    
                
    parent::display();           
         }
    }
    ?>
    thanks..

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Showing Contact Popup in Advanced Search???
    By veon in forum Developer Help
    Replies: 8
    Last Post: 2009-06-27, 10:42 AM
  2. Emails module contact search popup
    By Meex21 in forum Developer Help
    Replies: 0
    Last Post: 2009-01-19, 08:21 PM
  3. Search Contact Popup window
    By jadfreak in forum Japanese
    Replies: 2
    Last Post: 2007-05-31, 10:06 AM
  4. Edit Search Contact Popup
    By jadfreak in forum Help
    Replies: 1
    Last Post: 2007-05-30, 03:13 PM
  5. contact search UI in a popup?
    By sugarcare in forum Help
    Replies: 0
    Last Post: 2006-05-23, 02:21 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •