Jump to content


Photo

Errors when importing custom module

customization sql

  • Please log in to reply
4 replies to this topic

#1 wegreen04

wegreen04

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 30 December 2013 - 05:26 PM

Greetings.

 

I'm realtively new to all of this, so hopefully my questions are extremely easy to answer.

 

I'm running Zurmo locally using a virtual machine on virtualbox (bitnami stack). The installation part was extremely easy that way. All of the standard Zurmo modules and features are working as expected. The problems I'm now running into happened when I tried to install a custom module. For practice, I just used the "Animals" module from Zurmo Zoo, but that is not working correctly. Here is what is happening.

I updated the Animals module to make sure it has the correct references (based on other forum users feedback - i.e. switch animal to animals where appropriate and switched accounts to animals as well). Then, I updated the perInstance.php config file to show:

 

$instanceConfig   = array(
        'modules' => array(
            'agents',
        ),
    );

 

I ran the ./zurmoc updateSchema command and cleared the cache int he application. All of that worked without a problem - no errors.

 

Now, however, I have a couple of issues. First, I am not able to see the module in the Main Menu on the left, nor in the Create drop-down. I played around with the tabMenuItems and shortcutsCreateMenuItems functions, and though it mirrors the other modules in Zurmo, it does not appear. The attached zip files show the configuration without the shortcutsCreateMenuItems information contained. Some users said that the resolution to this would be to create a new record on the custom module and it would cause it to appear.

 

That's where my second issue comes in. When I try to create a new Animal record, it gives me the following error message:

 

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'customfield_id' in 'field list'

 

I don't see where anything is calling for that id and throwing this PHP error. Can someone help me with this?

 

Maybe if someone even had just a bare bones custom module (just has one field on it) that I can use as a basis for understanding how to build a module in Zurmo - that would be fantastic! I'd much rather have a simple module that I can upload and customize using the Designer rather than build it all in PHP.

 

Thanks.

Attached Files



#2 Jason

Jason

    Administrator

  • Administrators
  • 864 posts
  • LocationChicago

Posted 31 December 2013 - 04:14 PM

A. I dont see any mention of the shortcut menu in AnimalsModule.php so that won't show up

B. Regarding the left side menu, if you reinstall with your new custom code, does it show up?

C. Regarding what you added to common.php, you said you put agents, which is different than the animals module


Jason Green
Zurmo Team
Need support? Upgrade now


#3 wegreen04

wegreen04

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 31 December 2013 - 04:25 PM

Thanks Jason for the help on the call today. I'll go through the updated wiki once it's available.

 

As for letter A in your response, you are correct. I left it out of this code. However, I've added it a few times, and it still doesn't appear.

 

As for letter B, a fresh install still doesn't resolve the issue.

 

As for letter C, you are correct. That's an error on my part in the forum post. I actually have it referenced as 'animals' in the code.

 

Hopefully, most of the issues will be resolved with the new fork. Thanks!



#4 scdzaak

scdzaak

    Member

  • Members
  • PipPip
  • 25 posts

Posted 07 March 2014 - 05:18 PM

I get the same error ' Column not found: 1054 Unknown column 'customfield_id' in 'field list' '  when I fill in new infromation in my own module HW custom (see elsewhere in this forum) .. I can not see where the error comes from !

 

Eric



#5 saigontechcom

saigontechcom

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 16 July 2016 - 04:15 AM

My solution is simple:

 

Some how I don't know, the system does not create the 2 fields customfield_id (after you resolve this issue, the next similar issue will come with another field). and currencyvalue_id field.

 

Why did I know that? 

 

Please come to the applicationapplication.log (zurmo_install_dir/app/protected/runtime) and read the log.

 

Then, to resole this, go to the database, and open the animal table, add these 2 fields with type int.

 

That's all, it works now!!!!







Also tagged with one or more of these keywords: customization, sql

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users