⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Community Edition to Enterprise



Anachronoa
  • profile picture
  • Member

Posted 25 July 2018 - 08:37 AM

Hi, I have a project written in PHP using codeigniter framework with Grocery Crud Community Edition and I'm trying to upgrade it with the Enterprise Version of Grocery Crud, unfortunately it seems that I'm having troubles and facing a lot of errors while doing this. 

 

Calling Config from community edition grocery_crud.php.

/**
* Pre loader language
* @return void
*/
public function sess_language()
{
if ($this->CI->session->userdata('lang')) {
$this->CI->config->set_item('language', $this->CI->session->userdata('lang'));
$this->CI->config->load('gcrud-enterprise');
$this->CI->config->set_item('default_language', $this->CI->session->userdata('lang'));
} else {
$this->CI->config->load('config');
$this->CI->session->set_userdata('lang_code', $this->CI->langCode[$this->CI->config->item('language')]);
$this->CI->config->load('gcrud-enterprise');
$this->CI->config->set_item('default_language', $this->CI->config->item('language'));
}
$this->CI->load->language('joeigniter');
$this->CI->load->language('ion_auth_lang');
$this->CI->load->language('auth_lang');
}

 

 

but the gcrud-enterprise.php is not written in config array

<?php
return [
// So far 34 languages including: Afrikaans, Arabic, Bengali, Bulgarian, Catalan, Chinese, Czech, Danish,
// Dutch, English, French, German, Greek, Hindi, Hungarian, Indonesian, Italian, Japanese, Korean,
// Lithuanian, Mongolian, Norwegian, Persian, Polish, Portuguese, Brazilian Portuguese, Romanian,
// Russian, Slovak, Spanish, Thai, Turkish, Ukrainian, Vietnamese
'default_language'  => 'English',

// This is the assets folder where all the JavaScript, CSS, images and font files are located
'assets_folder' => base_url() . 'assets/grocery-crud/',

// There are only three choices: "uk-date" (dd/mm/yyyy), "us-date" (mm/dd/yyyy) or "sql-date" (yyyy-mm-dd)
'date_format' => 'uk-date',

// The default per page when a user firstly see a list page
'default_per_page'  => 10,

// Having some options at the list paging. This is the default one that all the websites are using.
// Make sure that the number of grocery_crud_default_per_page variable is included to this array.
'paging_options' => ['10', '25', '50', '100'],

// The environment is important so we can have specific configurations for specific environments
'environment' => 'development',

// This is basically in order to have a php cache. Be aware that in case you disble the php cache
// things will get too slow
'backend_cache' => false,

'xss_clean' => false,

// The character limiter at the datagrid columns, zero(0) value if you don't want any character
// limitation to the column
'column_character_limiter' => 50,

// If you are not sure about how to use it, you can just change the ttl value (time to live) and
// the file path of the cache
'cache' => [
'adapter' => [
'name' => 'filesystem',
'options' => [
'namespace' => 'gcrud',
'ttl' => 3600 * 24 * 30 * 6,
'cache_dir' => realpath(__DIR__ . '/Cache/')
],
],
'plugins' => [
'exception_handler' => ['throw_exceptions' => false],
],
],
];

 

I tried to tailor fit the enterprise config file but i still face errors.

 

Anyone could help me or send me guides here aside from the basic one that we have from the site? Thanks in advance!