Results 1 to 9 of 9

Thread: Invalid Portal Name?

  1. #1
    DeBlois is offline Junior Member
    Join Date
    Jul 2008
    Posts
    4

    Default Invalid Portal Name?

    Edition: SugarCRM Enterprise (custom demo)
    Module: Contacts

    When I create a new contact, at the bottom of the form - Portal Information section, I am unable to provide a Portal Name for this contact. I can enter just about anything, the system will keep giving me the following error message: "Error: The Portal Name is already assigned to another contact". I even entered random characters to make sure I wasn't trying to create a portal name that was already in use, but still no luck. What am I doing wrong?

  2. #2
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Invalid Portal Name?

    We get the same issue. Anyone have any ideas?

  3. #3
    DeBlois is offline Junior Member
    Join Date
    Jul 2008
    Posts
    4

    Default Re: Invalid Portal Name?

    /bump

    I still don't have an answer to this issue. Steps to reproduce this:

    1. Access the custom demo of the 'Enterprise Edition' from http://www.sugarcrm.com/crm/demo/sugar-suite.html (although the same error appears on every edition I've tried).
    2. Log in as an admin user to the demo instance generated.
    3. Click on the 'Admin' link and access 'System Settings'
    4. Make sure the 'Customer Self-Service Portal' option is checked. Save the settings.
    5. Access the 'Contacts' tab.
    6. Click on 'Create Contact'
    7. Scroll to the bottom of the form, to the 'Portal Information' section.
    8. In the 'Portal Name' field, enter any string of characters, then tab to (or click on) a different field, such as the 'Portal Password' field.
    Expected: No error message appears.
    Actual: As soon as the Portal Name field loses focus, an error message appears below it in red text: "Error: The Portal Name is already assigned to another contact."

    I cannot make this error go away, no matter what value I enter in the field.

    Obviously this feature has been used before... is there anyone who might know why I'm getting this error?

    Thanks.

  4. #4
    peteunderwood is offline Sugar Community Member
    Join Date
    Jun 2006
    Posts
    20

    Default Re: Invalid Portal Name?

    Same exact problem. Any answers?

  5. #5
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Invalid Portal Name?

    Bug in the following code. It should check for contacts where deleted = 0

    PHP Code:
    class ContactsViewValidPortalUsername extends SugarView {
        
         function 
    ValidPortalUsername(){
             
    parent::SugarView();
         }
         
         function 
    process() {
            
    $this->display();
         }

         function 
    display(){
            if(!empty(
    $_REQUEST['portal_name'])) {
                
    $db = & PearDatabase::getInstance();
                
    $portalUsername $_REQUEST['portal_name'];
                
    $result $db->query("Select count(id) as total from contacts where portal_name = '$portalUsername'");
                
    $total 0;
                while(
    $row $db->fetchByAssoc($result)) {
                  
    $total $row['total'];
                }
                echo 
    $total;
            } else {
                echo 
    '0';
            }
         }    


  6. #6
    jayrb is offline Sugar Community Member
    Join Date
    Dec 2007
    Posts
    57

    Default Re: Invalid Portal Name?

    Same problem here, but this doesn't seem to solve it for me. Maybe I'm not doing it right.

    I went to view.validportalusername.php and tried 2 variations:
    1. added AND deleted=0 to the query
    2. removed check for portalName so it was just WHERE deleted=0

    The portal name can't be set to any value, as noted by DeBlois.

    Jay
    Last edited by jayrb; 2008-12-02 at 05:07 PM.

  7. #7
    Danke is offline Junior Member
    Join Date
    May 2006
    Posts
    3

    Default Re: Invalid Portal Name?

    Hi Friends,

    Anybody has any clue for above issue ?

    It gives following error irrespective of any portal name that I select

    Error: The portal name is already assigned to another contact.

    My sugarcrm version is
    SUGAR PROFESSIONAL
    Version 5.2.0 (Build 5380)

    Looking out for your thoughts.

  8. #8
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Invalid Portal Name?

    Yes, the clue is above where I post the bug and fix.

  9. #9
    Aeternum is offline Member
    Join Date
    Aug 2009
    Posts
    6

    Default Re: Invalid Portal Name?

    Okay, I have been banging my head on my desk and sacrificing a kitten daily to try and sort this issue out and finally it paid off. I'm running Sugar Enterprise 5.2.0f

    In my case, eggsurplus's solution was irrelevant.

    The message "Error: The Portal Name is already assigned to another contact." is coming from the javscript file: modules/Contacts/Contact.js.

    If you open this up, you'll see its been obscuficated. I'm not sure what the rules are on attaching code from Pro/Enterpriuse are here, so I won't attach it, but you can quickly run it though a web unobscuficator. If you look at line 97 of the unobscuficated version, you'll see the following code:

    Code:
    var callbackFunction = function success(data) {
          count = data.responseText;
          if(count != 0) {
             add_error_style('EditView', 'portal_name', SUGAR.language.get('app_strings', 'ERR_EXISTING_PORTAL_USERNAME'));
    So, the error is thrown when the variable count is not 0. Out of desperation, I added in the line
    Code:
    alert(count);
    right before the if statement.

    Much to my surprise, the resulting dialog box was not just a number like -1 or something, but a full HTTP request error - that was generated by the local proxy on my network, saying that the URL contained an invalid request (file is attached - error.txt).

    I'm not sure if this is a problem with Sugar or our proxy at the moment.

    The lesson: Don't develop behind a proxy.

    - Frederik Grunta
    Lemon Computing Ltd
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 2006-07-03, 09:54 AM
  2. 3.0 Portal Home (default page) Configuration
    By gatezone in forum General Discussion
    Replies: 3
    Last Post: 2005-06-16, 11:36 PM
  3. Multiple errors
    By amoslmeditabcom693427 in forum Help
    Replies: 0
    Last Post: 2004-11-11, 05:02 PM
  4. Errors when importing
    By amoslmeditabcom693427 in forum Help
    Replies: 0
    Last Post: 2004-11-09, 05:14 PM

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
  •