Results 1 to 8 of 8

Thread: customised field does not show and Repair generating error messages

  1. #1
    brianwg07sugar is offline Senior Member
    Join Date
    Jun 2008
    Posts
    30

    Default customised field does not show and Repair generating error messages

    Hi,

    i used Sugar studio to create a custom field in the knowedge base, called knowledge category. It is a drop down field. I then edit the list view in the studio for the knowledge to show the field. However, the field does not appear in the system even after I refreshed my browser and or click the search button.

    I then went into the custom/modules/kBdocument/metadata and see two files, listviewdefs.php and listviewdefs.php.suckback. The newly created customized field can be found in the first file but not in the second file. I tried to manually added it to the second file but this still did not fix the problem.

    I then went to Admin/Repair and chose the Knowledge Base under Quick Repair and Rebuild. I clicked Repair in the hope that this may cleaned up the cache and solved the problem.

    The result was taht, the problem persisted and I now have a few sentences of error message (my display_error is turned on in php.ini). Please see below at the bottom. My questions are,

    1. how do I make the customised field show
    2. how do I solve the error message issues. I can turn off the error display in php.ini but I just wonder whether I have done something silly and should not have done in he first place. Should I use Repair with extreme caution? What will this do to my system? Do I need to do anything to fix the errors other than turn off the display?

    Thank you for your help

    Brian

    "
    Warning: VardefManager::include_once(cache/modules/Users/Uservardefs.php) [function.VardefManager-include-once]: failed to open stream: No such file or directory in /var/www/html/sugarcrm/include/SugarObjects/VardefManager.php on line 228

    Warning: VardefManager::include_once() [function.include]: Failed opening 'cache/modules/Users/Uservardefs.php' for inclusion (include_path='/var/www/html/sugarcrm/include/..:.:/usr/share/pear:/usr/share/php') in /var/www/html/sugarcrm/include/SugarObjects/VardefManager.php on line 228

    Warning: VardefManager::include(cache/modules/Users/Uservardefs.php) [function.VardefManager-include]: failed to open stream: No such file or directory in /var/www/html/sugarcrm/include/SugarObjects/VardefManager.php on line 100

    Warning: VardefManager::include() [function.include]: Failed opening 'cache/modules/Users/Uservardefs.php' for inclusion (include_path='/var/www/html/sugarcrm/include/..:.:/usr/share/pear:/usr/share/php') in /var/www/html/sugarcrm/include/SugarObjects/VardefManager.php on line 100

    Warning: VardefManager::include(cache/modules/Users/Uservardefs.php) [function.VardefManager-include]: failed to open stream: No such file or directory in /var/www/html/sugarcrm/include/SugarObjects/VardefManager.php on line 100

    Warning: VardefManager::include() [function.include]: Failed opening 'cache/modules/Users/Uservardefs.php' for inclusion (include_path='/var/www/html/sugarcrm/include/..:.:/usr/share/pear:/usr/share/php') in /var/www/html/sugarcrm/include/SugarObjects/VardefManager.php on line 100
    "

  2. #2
    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: customised field does not show and Repair generating error messages

    You must make sure the cache folder is recursively writable but the user under which apache is running.
    run the command as root:

    chown -R <the_user>.<the_group> /path/to/cache

    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.

  3. #3
    brianwg07sugar is offline Senior Member
    Join Date
    Jun 2008
    Posts
    30

    Default Re: customised field does not show and Repair generating error messages

    Hi Andopes:

    Thank you for your reply.

    I did run a check with the folllowing commands

    ls -la in the cache directory and can confirm that the directory's owner and group are apache:apache. It also has a 775 rights.

    In any case, I did run again the commands according to your suggestion;
    chown -R apache:apache cache
    chmod -R 775 cache.

    After this, stranglty, I no longer see any error message. This is great although I don't know why.

    My final question is:

    Why is the customised field created under studio for the knowledge base does not appear in the List view although I have added it to the list view? I also found that the tags in the Knowledge Base Admin does not expand when clicked. i suspect that there may be bugs under the knolwedge base.

    I created another customised field for the Lead module and it can appear in the list view with no problem.

    I am using 5.2.c.

    Thank you

    regards

    Brian

  4. #4
    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: customised field does not show and Repair generating error messages

    Hi Brian

    Try to reproduce this issue regarding "customised field created under studio for the knowledge base" in a fresh installation containing demo data.
    Let us know if you are able to reproduce that.

    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.

  5. #5
    kf6bbl2's Avatar
    kf6bbl2 is offline Sugar Community Member
    Join Date
    Jan 2008
    Posts
    24

    Default Re: customised field does not show and Repair generating error messages

    I am having some similar problems. I get the follwing messages showing up in various parts of teh brwser window:
    Warning: VardefManager::include_once(cache/modules...
    The rest depends on where I was. For example I was looking at the Schedular, and the cache/module/... was for a schedular related file. Also I was in the email module and was getting the same error related to a cache/module/InboundEmail file.

    If I look at all the files under /var/public/Sugar5/cache/modules, i see:

    Code:
    drwxrwxr-x 3 www-data www-data 4096 2009-04-28 14:39 Accounts
    drwxrwxr-x 3 www-data www-data 4096 2009-04-25 00:29 ACL
    drwxrwxr-x 3 www-data www-data 4096 2009-04-28 14:38 ACLActions
    drwxrwxr-x 3 www-data www-data 4096 2009-04-28 14:38 ACLRoles
    drwxrwxr-x 3 www-data www-data 4096 2009-04-28 14:38 Administration
    ...and so on
    However on the files mentioned in the warnings, the owner and permission of the files was not the same:
    Code:
    drwxrwxr-x 3 www-data www-data 4096 2009-04-28 14:39 Schedulers
    drwxrwxr-x 3 www-data www-data 4096 2009-04-28 14:39 SchedulersJobs
    -rw-rw---- 1 root     root     1973 2009-04-28 14:39 SchedulersJobvardefs.php
    drwxrws--- 3 www-data www-data 4096 2009-04-25 03:15 Studio
    I was able to correct it with chmod and chown commands.

    On my box, the original Apache instance is run as root, and it's child processes are run as www-data (partial output of ps -aux)
    Code:
    root     11890  0.0  0.4  24704 10176 ?        SNs  Apr26   0:00 /usr/sbin/apache2 -k start
    www-data 24788  0.0  0.5  25256 10496 ?        SN   12:18   0:09 /usr/sbin/apache2 -k start
    www-data 24824  0.1  0.4  25136  9332 ?        SN   12:27   0:10 /usr/sbin/apache2 -k start
    www-data 25174  0.1  0.5  25236 10448 ?        SN   13:49   0:06 /usr/sbin/apache2 -k start
    www-data 25234  0.1  0.4  25056  9300 ?        SN   14:06   0:04 /usr/sbin/apache2 -k start
    So that's the data. Any guesses as to how this is happening. Do you think it's how my apache process is launched? Does the original process do any of the work, or does it only let the child processes do work? Or is this dog barking up the wrong tree?

  6. #6
    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: customised field does not show and Repair generating error messages

    You need to run this command as root:

    chown -R www-data.www-data /var/public/Sugar5/
    chmod -R g+w /var/public/Sugar5/

    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.

  7. #7
    kf6bbl2's Avatar
    kf6bbl2 is offline Sugar Community Member
    Join Date
    Jan 2008
    Posts
    24

    Default Re: customised field does not show and Repair generating error messages

    Quote Originally Posted by andopes View Post
    chown -R www-data.www-data /var/public/Sugar5/
    chmod -R g+w /var/public/Sugar5/
    Yes, that's exactly what I did to fix it. If it stays this way then I am all set. However these files that were owned by root where changed at some point in the last 24 hours, because I had already changed owners and permissions (recursively) on the whole Sugar5 directory, so these ones had changed back. We shall see if it happens again.

  8. #8
    edg
    edg is offline Sugar Community Member
    Join Date
    Feb 2007
    Location
    Atlanta, GA
    Posts
    46

    Default Re: customised field does not show and Repair generating error messages

    I've been able to reproduce this issue pretty simply. Apparently a rebuild removes the files needed by scheduler. When cron runs, the files are recreated but the permissions are incorrect (in my case the owner and group are the same. This is due to my passwd file and user setup - and the fact that I'm on a system with Apache 1.3.

    The limitation with Apache 1.3 limitation is associated with user/group setup on operation. With 1.3, Apache runs as whatever is defined in the httpd.conf file. Changes to user and group are not allowed in the VirtualHost. To handle this, I made certain the group permissions on my Sugar install were the same as the httpd.conf file (nobody/apache). Then, in order to make certain I could access the files as the normal user, I had to add my user to the apache group. All was well...

    Then I added schedulers - and then a rebuild. Because cron was setup based on the user, it recreated the scheduler files with the user/group settings. Because 'nobody' is not a member of that group, it had no access to the files (permissions were set to 770/660).

    There are a couple of solutions to avoid this from recurring..
    1) Change the group for the user to apache (this was what I selected because it helps with some FTP permissions issues too).
    2) Add an entry to cron to run a script to check permissions and change them as necessary (not pretty but...)
    3) Upgrade to Apache 2 (would if I could) and use the correct user/group settings
    Last edited by edg; 2009-07-25 at 09:16 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 2008-12-22, 03:18 AM
  2. Urgent help regarding use of customised field
    By umairmumtazmalik in forum Help
    Replies: 2
    Last Post: 2008-01-30, 12:12 PM
  3. error messages
    By musicman in forum Installation and Upgrade Help
    Replies: 0
    Last Post: 2007-12-04, 10:19 AM
  4. Help with error messages
    By Barologist in forum Help
    Replies: 0
    Last Post: 2007-08-24, 05:35 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
  •