⚠ In case you've missed it we are migrating 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 forum is read-only and soon will be archived. ⚠


richb201

Member Since 30 Sep 2017
Offline Last Active Nov 22 2020 09:06 AM
-----

Topics I've Started

upgrading to Enterprise with or wo Composer

06 September 2020 - 09:45 AM

I am about to upgrade to enterprise. I have a license key but the question is to use composer or not? I have composer on my machine and doing a locate (I am in Ubuntu) is see at least 20 different composer.json files. Which one to update? Looking in my /app dir I see this one:

 

{
"require": {
"aws/aws-sdk-php": "^3.64",
"php-http/guzzle6-adapter": "1.1.1",
"php-http/httplug-bundle": "^1.18",
"koolreport/codeigniter": "^1.8",
"koolreport/core": "^4.7"
}
}

 

I don't see any mention of GC! Is it possible that when i initially installed GC Community, I did it without Composer (it was years ago!)? Bottom line is that I have years of effort in my code and I don't want to chance screwing it up. Is there any way to back out my upgrade if I screw it up? 

 

thx

 

 


Bootstrap 4?

31 July 2020 - 02:33 PM

I am using GC Community and ci-synchronicity and KoolReports. I am trying to use both ci-synch and Koolreports Amazing Template on the same page and am running into a conflict with ci-synch not displaying. Someone on another forum suggested that KoolReports uses Bootstrap 4 and GC doesn't as being the possible problem. Will switching over to Enterprise possibly solve this or does GC have nothing to do with the issue? 


more than one callback ?

23 July 2020 - 01:51 PM

Can I use $crud->callback_before_insert() and $crud->callback_after_upload() in the same CRUD function in the controller? How about two calls such as 

 $crud->callback_before_insert(a) 

 $crud->callback_before_insert(g)

??

 

 

 

 


I am having a problem with image crud (not grocery!)

19 June 2020 - 01:02 AM

When I use Example3 from the package, it fails. The reason is that set_relation_field causes it to fail. I traced through the logic with the debugger and it seems that the problem is in getState() where there is some crazy ifelse ladder. If set_relation_field is set, then the code calls right through to the bottom of getState() and then we die. Has anyone tried Examples3 with the Community version of GC and image_crud? Here is the logic ladder from getState(). Does anyone know why if the first "if" fails, none of the other elseif's are tested?

 

if(isset($rsegments_array[3]) && is_numeric($rsegments_array[3]))

{

$upload_url = site_url($rsegments_array[1].'/'.$rsegments_array[2].'/upload_file');
$ajax_list_url = site_url($rsegments_array[1].'/'.$rsegments_array[2].'/ajax_list');
$ordering_url = site_url($rsegments_array[1].'/'.$rsegments_array[2].'/ordering');
$insert_title_url = site_url($rsegments_array[1].'/'.$rsegments_array[2].'/insert_title');

$state = array( 'name' => 'list', 'upload_url' => $upload_url);
$state['ajax'] = isset($rsegments_array[3]) && $rsegments_array[3] == 'ajax_list' ? true : false;
$state['ajax_list_url'] = $ajax_list_url;
$state['ordering_url'] = $ordering_url;
$state['insert_title_url'] = $insert_title_url;

return (object)$state;
}
elseif(isset($rsegments_array[3]) && $rsegments_array[3] == 'upload_file')
{
#region Just rename my file
$new_file_name = '';
//$old_file_name = $this->_to_greeklish($_GET['qqfile']);
$old_file_name = $this->_convert_foreign_characters($_GET['qqfile']);
$max = strlen($old_file_name);
for($i=0; $i< $max;$i++)
{
$numMatches = preg_match('/^[A-Za-z0-9.-_]+$/', $old_file_name[$i], $matches);
if($numMatches >0)
{
$new_file_name .= strtolower($old_file_name[$i]);
}
else
{
$new_file_name .= '-';
}
}
$file_name = substr( substr( uniqid(), 9,13).'-'.$new_file_name , 0, 100) ;
#endregion

$results = array( 'name' => 'upload_file', 'file_name' => $file_name);
if(isset($rsegments_array[4]) && is_numeric($rsegments_array[4]))
{
$results['relation_value'] = $rsegments_array[4];
}
return (object)$results;
}
elseif(isset($rsegments_array[3]) && isset($rsegments_array[4]) && $rsegments_array[3] == 'delete_file' && is_numeric($rsegments_array[4]))
{
$state = array( 'name' => 'delete_file', 'id' => $rsegments_array[4]);
return (object)$state;
}
elseif(isset($rsegments_array[3]) && $rsegments_array[3] == 'ordering')
{
$state = array( 'name' => 'ordering');
return (object)$state;
}
elseif(isset($rsegments_array[3]) && $rsegments_array[3] == 'insert_title')
{
$state = array( 'name' => 'insert_title');
return (object)$state;
}

 


image crud needs install read.me

23 May 2020 - 09:44 AM

I have been fighting with this thing. There are no install directions and multiple copies of the code. For example at https://www.grocerycrud.com/image-crud and then also at https://github.com/s...rdis/image-crud. They are not the same. I could live with that as long as there were instructions for an install. I realize that this is free software, but common on. You could at least type up a simple instruction page! Super frustrating.