Results 1 to 6 of 6

Thread: Help, Email Checking Preventing Save

  1. #1
    jjwdesign's Avatar
    jjwdesign is offline Sugar Community Member
    Join Date
    Dec 2006
    Location
    Orlando, FL
    Posts
    503

    Default Help, Email Checking Preventing Save

    See attached image. SugarCRM 5.2 CE

    I've noticed recently that our Contacts, Leads and even Users can not be saved with email addresses - because the "check exsiting email" functionality is failing (or getting stuck / not processing). Has anyone experienced this problem?


    I'm trying to go back and revist everything I've done/added/changed in the past week or two.
    1. I've added some logic hooks.
    2. I've also added some custom controllers.
    3. Custom Studio views; imported.
    Any ideas? Jeff
    Attached Images Attached Images  
    Last edited by jjwdesign; 2010-02-05 at 03:58 PM.
    SugarForge Projects:
    JJWDesign Google Maps
    JJWDesign Tools and Reports

    Follow my blog postings at JJW Design.

  2. #2
    jjwdesign's Avatar
    jjwdesign is offline Sugar Community Member
    Join Date
    Dec 2006
    Location
    Orlando, FL
    Posts
    503

    Default Re: Help, Email Checking Preventing Save

    I'd almost bet that this has something to do with the Javascript cache and/or the mini-fied JavaScript files. I recall Rebuilding the Javascript files thru the Admin repair. This may have created the javascript problem. Perhaps it introduced an old bug. Jeff
    SugarForge Projects:
    JJWDesign Google Maps
    JJWDesign Tools and Reports

    Follow my blog postings at JJW Design.

  3. #3
    jjwdesign's Avatar
    jjwdesign is offline Sugar Community Member
    Join Date
    Dec 2006
    Location
    Orlando, FL
    Posts
    503

    Default Re: Help, Email Checking Preventing Save

    I went thru the InnoDB MySQL database setup to make sure that was working properly. I also setup logging of slow queries (2sec). Nothing showed up so far. I also rebooted.

    Copying the 'include' Directory?

    I've now got two instances of SugarCRM on the same server. One has this existing email checking issue (hangs), and the other words just fine. I'm considering copying the entire 'include' directory from the working instance to the non-working instance. I'll make a backup first, of course. Is there anything anyone can advise to be careful of?

    Thanks, Jeff
    SugarForge Projects:
    JJWDesign Google Maps
    JJWDesign Tools and Reports

    Follow my blog postings at JJW Design.

  4. #4
    jjwdesign's Avatar
    jjwdesign is offline Sugar Community Member
    Join Date
    Dec 2006
    Location
    Orlando, FL
    Posts
    503

    Default Re: Help, Email Checking Preventing Save

    Ok, well the coffee has kicked in. I'm posting this message so others will hopefully benefit from my experience. I tracked down the language ("Checking for existing email entry...") to a label "LBL_VERIFY_EMAIL_ADDRESS". This label is used in the Javascript in:

    /include/SugarEmailAddress/SugarEmailAddress.js

    Which uses an AJAX call to:

    index.php?module=Contacts&action=RetrieveEmail ...

    Trying to request this action results in a message of:

    "There is no action by that name."

    Removing my custom controller seems to fix the problem, resulting in a response:

    {"target":null}

    So, this brings me to my custom controller. I thought my custom controller would only extend the existing actions, but obviously I'm mistaken. I noticed that there's already a controller.php file. This is where the action and view is set for action_RetrieveEmail().

    /modues/Contacts/controller.php

    PHP Code:
    class ContactsController extends SugarController
    {
     function 
    action_Popup(){
      if(!empty(
    $_REQUEST['html']) && $_REQUEST['html'] == 'mail_merge'){
       
    $this->view 'mailmergepopup';
      }else{
       
    $this->view 'popup';
      }
     }
     
        function 
    action_ValidPortalUsername()
        {
      
    $this->view 'validportalusername';
        }
        function 
    action_RetrieveEmail()
        {
            
    $this->view 'retrieveemail'
        }
        function 
    action_ContactAddressPopup()
        {
      
    $this->view 'contactaddresspopup';
        }
     
        function 
    action_CloseContactAddressPopup()
        {
         
    $this->view 'closecontactaddresspopup';
        }    

    I fixed this problem by extending the existing module controller into my custom controller.

    require_once('modules/Contacts/controller.php');

    class CustomContactsController extends ContactsController {
    ...
    }


    Thanks, Jeff
    Last edited by jjwdesign; 2010-02-18 at 01:02 PM. Reason: updated
    SugarForge Projects:
    JJWDesign Google Maps
    JJWDesign Tools and Reports

    Follow my blog postings at JJW Design.

  5. #5
    416
    416 is offline Junior Member
    Join Date
    Dec 2010
    Posts
    2

    Default Re: Help, Email Checking Preventing Save

    Hi, Jeff

    Your post was very helpful for me. I have had the same issue and it was solved very easy.

    Thanks, Michael.

  6. #6
    williamconley is offline Junior Member
    Join Date
    Feb 2007
    Posts
    4

    Default Re: Help, Email Checking Preventing Save

    Very helpful. I traced the problem to SugarEmailAddress.js.

    This javascript function uses an ajax function to request data from index.php. The method of retrieval will cause only appropriate data reply, not an actual web page. I had altered index.php to show content below the SugarCRM page. This extra data was confusing the AJAX interpreter and it would then freeze and fail to complete.

    asyncRequest('GET','index.php?&module=Contacts&act ion=RetrieveEmail&target='+target.id+'&email='+tar get.value,

    So checking for "Retrieve" in the query string and disabling my extra code if it is present resolved the problem, but I'll be on the lookout for any other functions that have similar issues.

    This thread lead me directly to the issue. Thanks!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Checking email doesn't work
    By dabbish in forum Help
    Replies: 0
    Last Post: 2008-09-04, 07:04 AM
  2. checking email through sugarcrm
    By McGruber in forum Help
    Replies: 5
    Last Post: 2007-12-10, 06:41 PM
  3. Replies: 2
    Last Post: 2007-01-25, 01:30 AM
  4. Checking to see of a field is unique on save
    By aheuermann in forum Help
    Replies: 1
    Last Post: 2006-10-06, 01:30 PM
  5. very slow in checking email
    By antoniokra in forum Help
    Replies: 0
    Last Post: 2006-07-30, 10:06 AM

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
  •