Results 1 to 6 of 6

Thread: Can't add fields in Module Builder

  1. #1
    hiedenm is offline Member
    Join Date
    Feb 2009
    Posts
    5

    Default Can't add fields in Module Builder

    vardefs.php gets written twice when I try to save a new field in Module Builder. First time it's correct, the second time the new field is missing.

    Order of file writes after hitting the Save button:
    ---------------------
    1: cache/modules/ModuleBuilder/Uservardefs.php
    2: cache/modules/Users/Uservardefs.php
    3: cache/modules/ModuleBuilder/EmailAddressvardefs.php
    4: cache/modules/EmailAddresses/EmailAddressvardefs.php
    5: cache/modules/ModuleBuilder/Administrationvardefs.php
    6: cache/modules/Administration/Administrationvardefs.php
    7: custom/modulebuilder/packages/WBCRM/modules/haus/vardefs.php
    8: custom/modulebuilder/packages/WBCRM/modules/haus/config.php
    9: custom/modulebuilder/packages/WBCRM/modules/haus/vardefs.php
    10: custom/modulebuilder/packages/WBCRM/modules/haus/relationships.php
    11: custom/modulebuilder/packages/WBCRM/modules/haus/language/en_us.lang.php
    12: custom/modulebuilder/packages/WBCRM/modules/haus/language/ge_ge.lang.php

    I'm running SugarCRM 5.2.0a CE on i5/OS V5R4 with ZendCore 2.6 (Apache 2.2.6 PHP 5.2.6) and MySQL 5.0.45

    Regards,
    Martin

  2. #2
    rgtft is offline Senior Member
    Join Date
    Nov 2008
    Location
    East Lansing, MI
    Posts
    41

    Default Re: Can't add fields in Module Builder

    Check your webserver error log; see if you are getting a POST error complaining about variable limit exceeded. I had this happen to me a couple of days ago

  3. #3
    hiedenm is offline Member
    Join Date
    Feb 2009
    Posts
    5

    Default Re: Can't add fields in Module Builder

    Thanks for your quick reply. Unfortunately there seems to be no problem with the variable limit as my logs shows no POST errors.

  4. #4
    hiedenm is offline Member
    Join Date
    Feb 2009
    Posts
    5

    Default Re: Can't add fields in Module Builder

    Found out more about the problem. The problem is in modules/ModuleBuilder/MB/MBVardefs.php

    PHP Code:
        function load(){
            
    $this->vardef = array('fields'=>array(), 'relationships'=>array());
            if(
    file_exists($this->path '/vardefs.php')){
                include(
    $this->path'/vardefs.php');
                
    $this->vardef $vardefs;
            }
        } 
    The vardefs.php has the right contents after the first write but doesn't get read properly the second time. The problem is within the include function. It seems, it doesn't give back the file but something from the cache. So $vardefs doesn't contain the new field and therefore it isn't in the file after the second writing.

    So my guess is that the actual error is somewhere in my configuration. I'm also running Zend Platform which includes the Accelerator cache. Or is there a possibility that it misconfigured the php.ini? Or am I completely wrong?

  5. #5
    hiedenm is offline Member
    Join Date
    Feb 2009
    Posts
    5

    Lightbulb Re: Can't add fields in Module Builder

    Zend Accelerator was causing the troubles. Since blacklisting the custom/ModuleBuilder directory, it's working like a charm.

  6. #6
    bobosoft is offline Junior Member
    Join Date
    Jul 2009
    Posts
    1

    Default Re: Can't add fields in Module Builder

    Quote Originally Posted by hiedenm View Post
    Zend Accelerator was causing the troubles. Since blacklisting the custom/ModuleBuilder directory, it's working like a charm.
    I almost threw my machine out the window. Thank you for posting that solution.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. 5.1 Enterprise Module Builder won't save fields
    By Levementum in forum Developer Help
    Replies: 7
    Last Post: 2008-10-15, 06:19 PM
  2. Replies: 2
    Last Post: 2008-07-26, 04:01 PM
  3. Replies: 1
    Last Post: 2008-06-19, 10:36 AM
  4. Module Builder Relation fields
    By gugachiu in forum Developer Help
    Replies: 4
    Last Post: 2008-05-09, 02:49 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
  •