Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Empty rows inserted into database on page refreshs

  1. #1
    Ruskicowboy is offline Member
    Join Date
    Feb 2007
    Posts
    7

    Default Empty rows inserted into database on page refreshs

    I hope someone else has had this problem and can help. I concluded a fresh installation of Sugar Suite, went in to create a new account, and a blank one was already there. I refreshed the page and a new blank account had been created. I tried the contacts page, and new blank contacts are being created anytime the page is loaded. So, clicking around, I found that Leads, Opportunities, Cases, Bug Tracker, Documents, and Activities all create blank entries just by going to the page, and more entries are created everytime the page loads.

    I've removed the installation and installed fresh again twice with the same results. Here is the system information. I hope someone can help.

    Sugar version: 4.5.1RC / Sugar DB version: 4.5.1RC / Sugar flavor: OS
    Sugar Edition SugarSuite
    Category Interface
    Operating System Solaris 10 x86
    PHP Version 5.1.6 with Hardening-Patch 0.4.15
    Database MySQL 5.0.27
    Web Server Apache 2.2.0

  2. #2
    Ruskicowboy is offline Member
    Join Date
    Feb 2007
    Posts
    7

    Default Re: Empty rows inserted into database on page refreshs

    I've just reinstalled for the 3rd time, and one thing I keep noticing, though not neccesarily related, is that the install stops after the creation of the database, during the creation of the default users. It fails on a query adding in the admin user, saying that there was a duplicate record in place.

  3. #3
    andydreisch's Avatar
    andydreisch is offline Sugar Team Member
    Join Date
    Apr 2005
    Location
    San Jose
    Posts
    2,080

    Default Re: Empty rows inserted into database on page refreshs

    Hi Ruskicowboy, on the blank page thing, can you describe exactly the steps you used? I couldn't reproduce this here on a fresh install.

    Are you in the EditView when you do a refresh?

    Thanks,

    Andy
    Andy Dreisch
    Vice President, Online Team


    Check out our Podcasts!
    Sugar University for training
    Sugar Wiki for developer and user help
    SugarForge for modules, themes, lang packs
    SugarExchange for production-ready extensions
    Enter/view bugs via the Sugar bug tracker

  4. #4
    Ruskicowboy is offline Member
    Join Date
    Feb 2007
    Posts
    7

    Default Re: Empty rows inserted into database on page refreshs

    Actually, it isn't a blank page. It is a blank record. Pretty much on these tabs:

    Leads, Opportunities, Cases, Bug Tracker, Documents, Accounts, Contacts and Activities

    Anytime that I click on those tabs, a new blank entry is made into the database for whatever page I'm on (i.e. on Contacts, it creates a blank contact, on accounts, it creates a blank account). We've been doing some debugging and for some reason, the system is actually trying to insert the blank record 3 times, though only the first is actually succeeding since the primary key is the same on all three.

    Basically, the steps are:

    1) Log in as Admin
    2) Click on the account tab (or contact or any of the others listed).
    3) New blank record is inserted into the database.

  5. #5
    tranber is offline Junior Member
    Join Date
    Sep 2007
    Posts
    3

    Default Re: Empty rows inserted into database on page refreshs

    I'm having exactly the same problem, after a fresh install: blank records are inserted everytime the page loads (in Opportunities, Accounts...).
    Any solution for this problem ?

    Sugar version: 4.5.1e
    WebServer: IIS
    Database: SqlServer
    PHP version: 5.2.4

  6. #6
    tranber is offline Junior Member
    Join Date
    Sep 2007
    Posts
    3

    Default Re: Empty rows inserted into database on page refreshs

    I have found the reason for this strange problem.

    Sugar is using a cookie named 'uid'.
    But I already have a website on the same domain which sets a 'uid' cookie.
    As a consequence, Sugar retrieves this 'uid' cookie value, while it should simply not exist in this scenario.
    This triggers a MassUpdate each time a ListView is requested, resulting in a new blank record systematically inserted in database.

    The solution is to change the cookie name or the domain, and the problem just disappears !!

  7. #7
    andydreisch's Avatar
    andydreisch is offline Sugar Team Member
    Join Date
    Apr 2005
    Location
    San Jose
    Posts
    2,080

    Default Re: Empty rows inserted into database on page refreshs

    Hi tranber, this may go in the record books as one of the best detective stories ever written.

    Nice work!!

    I'll let the Dev team know of this but in the interim can you tell me what other site(s) use the cookie of the same name?

    Thanks,

    Andy
    Last edited by andydreisch; 2007-09-25 at 03:42 PM.
    Andy Dreisch
    Vice President, Online Team


    Check out our Podcasts!
    Sugar University for training
    Sugar Wiki for developer and user help
    SugarForge for modules, themes, lang packs
    SugarExchange for production-ready extensions
    Enter/view bugs via the Sugar bug tracker

  8. #8
    andydreisch's Avatar
    andydreisch is offline Sugar Team Member
    Join Date
    Apr 2005
    Location
    San Jose
    Posts
    2,080

    Default Re: Empty rows inserted into database on page refreshs

    I created bug # 15917 for this which can be tracked using the Bug Tracker.

    Andy
    Andy Dreisch
    Vice President, Online Team


    Check out our Podcasts!
    Sugar University for training
    Sugar Wiki for developer and user help
    SugarForge for modules, themes, lang packs
    SugarExchange for production-ready extensions
    Enter/view bugs via the Sugar bug tracker

  9. #9
    andydreisch's Avatar
    andydreisch is offline Sugar Team Member
    Join Date
    Apr 2005
    Location
    San Jose
    Posts
    2,080

    Default Re: Empty rows inserted into database on page refreshs

    By the way, tranber, you have some people here in Sugar scratching their heads trying to figure out what led you to look at cookies in the first place.

    Can you enlighten us as to your problem isolation process?

    Andy
    Andy Dreisch
    Vice President, Online Team


    Check out our Podcasts!
    Sugar University for training
    Sugar Wiki for developer and user help
    SugarForge for modules, themes, lang packs
    SugarExchange for production-ready extensions
    Enter/view bugs via the Sugar bug tracker

  10. #10
    tranber is offline Junior Member
    Join Date
    Sep 2007
    Posts
    3

    Default Re: Empty rows inserted into database on page refreshs

    Hi Andydreisch,

    The site using a cookie of the same name 'uid', is a web application I'm working on

    The full story :
    After a rapid investigation to understand which files were involved in this workflow, I quickly suspected some strange behaviour in the MassUpdate.php, because I was thinking this could be the only place where some new row is created when displaying the ListView.
    When looking at the MassUpdate.php file (handleMassUpdate method), the only possible path to create a new record is when $_REQUEST['uid'] is not empty.
    So I just watched _POST, _GET, and _COOKIES value for 'uid', and it appeared that _COOKIE["uid'] was set with a value I am very familiar with: the one I set for the userid in my own website.
    You can imagine how surprised I was ! But it could not be just a coincidence...

    Thinking about it, I think I was extremely lucky

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Empty page after successful login
    By alianzasoft in forum Help
    Replies: 7
    Last Post: 2007-05-23, 05:58 AM
  2. Repair Database does not
    By mmakowski in forum Help
    Replies: 1
    Last Post: 2007-01-03, 04:58 AM
  3. Replies: 0
    Last Post: 2006-07-17, 04:11 PM
  4. Serious issue with sugarcrm 3.5.1.c
    By wp.rauchholz in forum Help
    Replies: 17
    Last Post: 2005-12-01, 07:22 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
  •