Jump to content


web-johnny

Member Since 13 Oct 2011
Offline Last Active Dec 12 2019 10:09 AM
****-

#149220 How to upgrade Grocery CRUD Enterprise on Codeigniter framework?

Posted web-johnny on 26 June 2019 - 10:40 AM

As I am getting this question a lot and this is not documented anywhere, I will temporary provide the information of how to upgrade Grocery CRUD Enterprise when you are using Codeigniter framework.

 

In short you will need to copy the below folders to upgrade (click to the image): 

Screenshot from 2019-06-26 13-41-39.png

 

 

A more detailed version of the upgrade can be found below with steps:

 

First of all make sure that you've installed Grocery CRUD Enterprise from the following video tutorial: https://youtu.be/FC54Db7LOG0

Now for the upgrade you will basically need:
 

Step 1. Go to: https://www.groceryc..._latest_version and download with the button that says "With Codeigniter". For example currently that the latest version is the 2.7.6 you will need to download it with the button: "With Codeigniter 2.7.6"

Step 2. Unzip the downloaded zip file and go to: grocery-crud-demo

Step 3. Copy the assets folder to your project. You will probably get a notification that the assets folder already exist then press "Merge" if there is a notification
 

Step 4. Go to application folder and copy the folder libraries to your application/libraries. You will probably get a notification that the libraries folder already exist then press "Merge" if there is such a notification

This is actually it! You now have upgraded Grocery CRUD Enterprise :)

 

In some cases if you need to see some new configurations also check the configuration from the file: grocery-crud-demo/application/config/gcrud-enteprise.php

 

For example the latest version has two new configurations:

    // If open_in_modal is true then all the form operations (e.g. add, edit, clone... e.t.c.) will
    // open within a modal and we will have the datagrid on the background.
    // In case you would like however to have a standalone page for all the form operations change this to false.
    'open_in_modal' => true,

    // This is the hash symbol (#) that we have at the URL in order to have tha basic operations in the URL so you
    // can navigate back to the URL that you were. For example, when you click at edit form for the id 46, the
    // URL will also change to #/edit/46 so you can also share the link.
    // In case you would like to switch this functionality to off change this to false.
    'hash_in_url' => true,

Keep in mind that even if you don't get the latest configs Grocery CRUD Enterprise IS backward compatible as it is something very common that people are not updating their configurations

 

Regards

Johnny

Attached Thumbnails

  • Screenshot from 2019-06-26 13-41-39.png



#149195 Close modal on save: what is this for?

Posted web-johnny on 17 June 2019 - 07:04 AM

I would like to inform you that this is now scheduled for the next version. You can see the progress of the ticket from here: https://trello.com/c...nt-work-anymore by pressing the "Follow" button.

 

Thank you @dhyanan73 for reporting this

 

Regards

Johnny




#149192 Close modal on save: what is this for?

Posted web-johnny on 15 June 2019 - 06:46 AM

Hello @web-johnny, thanks for your answer.

Please also remember to enable the multilanguage for the caption text of the checkbox.

 

Regards,

Andrea

 

Hello Andrea,

 

The caption of the checkbox is in the translations. It is probably not translated in your language. You can go and change that at: application/libraries/GroceryCrudEnterprise/grocerycrud/enterprise/src/GroceryCrud/i18n/

For example if your language that you would like to translate it is Russian (just an example) then open the file: application/libraries/GroceryCrudEnterprise/grocerycrud/enterprise/src/GroceryCrud/i18n/Russian.php and search for: 'close_modal_on_save' string.

 

If they are lot of translations missing, then please also consider to share the new file with us if possible :)

Regards

Johnny




#149189 Close modal on save: what is this for?

Posted web-johnny on 14 June 2019 - 12:36 PM

In my experience this checkbox do nothing. Not even in the examples published on this website. Is it possible to delete/hide it to avoid confusion?

 

Hello @dhyanan73

 

The functionality is basically to keep the modal on the save but it seems that it doesn't work anymore! It is something that I've missed. I will try to fix that for the next version and keep you updated once this is done.

 

I am sorry for the confusion that this may caused.

 

Regars

Johnny




#149184 length input text fields not work in version enterprise

Posted web-johnny on 12 June 2019 - 05:20 AM

I am glad to inform you that this functionality is now scheduled for the next release :)  (version 2.7.6). In order to keep track of the progress you can press the "watch" button on the ticket here: https://trello.com/c...crud-enterprise

 

 

Regards

Johnny




#149178 Field type Hidden Not working in Grocery CRUD Enterprise v.2.7.4

Posted web-johnny on 11 June 2019 - 11:10 AM

Hi Everyone!

 

I would like to ask if you experience using fieldtype hidden and notice if it is functioning or not? See my sample below:

 

$crud->fieldType('fld_Name','hidden');

 

That API supposedly hides the specified field but now it does nothing in GroceryCRUD Enterprise v.2.7.4 

 

Thanks in advance!

 

-Lara

 

 

Hello Lara

It seems that the hidden field type is working but it is a bit different than the way that it works on community edition. More specifically it is good to combine it with callbackEditForm and callbackAddForm . For example if you have let's say the below code:
 

$crud->fieldType('category_id', 'hidden');

it will just hide the category_id on the add, edit, clone form.... e.t.c. however if you would like to add a value to this example you should do something like this:
 

$crud->callbackAddForm(function ($data) {
    $data['category_id'] = $_SESSION['category_id'];

    return $data;
});
$crud->callbackEditForm(function ($data) {
    $data['category_id'] = $_SESSION['category_id'];

    return $data;
});

I've tested that the above works fine for version 2.7.5 and for version 2.7.4 (just to confirm that it is not a version issue).

 

Can you please re-check and let me know if you are still having issues? What are you trying to do exactly? The most common mistake is when we have accidentally two types into the same field. For example the field is using setRelation AND is also hidden. Or for example you have a callbackEditField and is also hidden. Again this is something that it has two types (e.g. callback_field and hidden).

 

If this is the case this is a common issue that to be honest I am not sure yet the approach in order to solve that.

 

In any case if you let me know your exact problem maybe I can guide you to a better solution.

 

Regards

Johnny




#148888 Chrome autocomplete is overlapping date applet

Posted web-johnny on 21 December 2018 - 06:22 AM

You can also press the "Watch" button in order to get first the updates for this functionality ;-)

 

Step1. Open the card: https://trello.com/c...ping-datepicker
Step2. Press the Watch button (bottom right)

 

Screenshot 2018-12-21 at 08.21.13.png




#31495 Custom helper Laravel for connect GC to database

Posted web-johnny on 20 September 2018 - 08:45 PM

Thanks for sharing the code with us Josh, and thanks for the detailed explanation   :)




#16518 Bug in Unique Fields?

Posted web-johnny on 09 September 2018 - 04:52 AM

Hello all,

 

Just wanted to inform you that this bug was fixed and it is available for version 2.6.0 and higher  :D

 

Regards

Johnny




#16501 How to create DEPENDENT DROP-DOWNS in the enterprise edition?

Posted web-johnny on 23 August 2018 - 01:57 PM

I am very glad to inform you that the latest version of Grocery CRUD Enterprise (v 2.6.1) now includes the dependent dropdown list functionality 1f64c.png1f389.png for more about it check: https://www.grocerycrud.com/enterprise/api-and-function-list/set-dependent-relation

https://www.




#16432 How to create DEPENDENT DROP-DOWNS in the enterprise edition?

Posted web-johnny on 21 July 2018 - 06:12 AM

So far this is in development but you can see a GIF video of the (real) progress that I've made so far. We have plenty more things to do (such as the dropdown list to be searchable) but I guess this will give a bit more patient for people to wait:

 

ezgif-4-37c80bb740.gif

P.S. By the way I am spending the time that I have for holidays to release this functionality. I know this is tough for some people... but I like it to be honest :)




#16412 Bug in Unique Fields?

Posted web-johnny on 10 July 2018 - 09:11 AM

Hello all,

 

I can reproduce this issue as well. This was working but I somehow accidentally remove this functionality. I will fix it as a first priority for the next release. By the way @larasmith I am working on depended dropdown list but as you can see other priorities are coming first :)

 

@Mugs321 it seems that you are not the only one having the frustration for the support so I will add a post to explaining in details about the support that I am offering. Usually it takes about 1-2 weeks for a reply(!!) and that's why I did create this forum so it can give the opportunity for people to get help from others as well while waiting for a reply.

 

Regards

Johnny




#16406 Custom Model Ruins the Filtering of Set Relation Data

Posted web-johnny on 09 July 2018 - 04:43 PM

Hello @larasmith,

 

Can you try the query but with a parenthesis? For example:
 

$select->where('(sig.sig_UId = '.$_SESSION['uid'].' OR sig.sig_IsShared = 1)');

Please let me know if that worked for you.

 

Regards

Johnny




#16319 How to create DEPENDENT DROP-DOWNS in the enterprise edition?

Posted web-johnny on 08 June 2018 - 04:21 AM

Hello @larasmith,

 

Unfortunately it is always a new feature coming first :(

For example currently I was having issues with latest PHP 7.2 version and MSSQL database.

 

Now my next feature request is multiple uploads. And till then I am also creating a documentation for Laravel.

 

I hope after multiple uploads that the depended relations will be next. I am seriously thinking to open a kickstarter just for depended dropdown list. It is the no1 request and... the most difficult one :( !

 

Thank you for you patient @larasmith you are really helping the community to grow

 

Regards

Johnny




#16301 Change default Join Type setRelation()

Posted web-johnny on 25 May 2018 - 04:40 AM

I think then I will update the documentation for custom model to also include custom models with search: https://www.groceryc...te-custom-model :) . I will let you know once this is done.

 

Till then I will try to explain you some complicated parts of the setRelation (and that's why I can't get you a straight answer).

 

Grocery CRUD Enterprise has as a first priority (with comparison from community edition) two things:
1. Performance

2. Security

So in order to have a much better performance for setRelation we are NOT using any JOIN if that is not necessary (wait what?). Yes! That's true :) I will explain you what I mean with a real example: 

Let's say that we have 1,000,000 rows in our datagrid and we have a simple relation like this:
 

$crud->setRelation('country', 'countries', 'name');

Then the query in our to get the first 10 rows from the database is the below:
 

SELECT `customers`.`customer_name` AS `customer_name`, `customers`.`country` AS `country` FROM `customers` ORDER BY `country` ASC LIMIT 10 OFFSET 0

Query execution time: 0.0020740032196s (for 1M rows with relation!!)

 

Now as you can see there is no JOIN anywhere and the country ids are getting filled with JavaScript as we already know their values :)

Now on the other hand if we do the same query in community edition you will take something like this (I am not coyping the real one as the community doesn't have a profiler that I can export the queries):

SELECT `customers`.`customer_id` AS `customer_id`, `customers`.`customer_name` AS `customer_name`, `customers`.`country` AS `country` 
    FROM `customers` 
LEFT JOIN `countries` ON `customers`.`country` = `countries`.`iso` LIMIT 10 OFFSET 0

Query execution time: 102.174100876s  (without indexing of country) (50,000X slower in comparison with grocery CRUD Enterprise)

And if I change the indexing to be correct in the database the same query will take:

Query execution time: 78.6532018185s (with indexing on country field)

 

So the difference here is huge that's the main reason that I am trying to not use any JOIN if it is not necessary. I hope this gave you a bit more guidance about what you would like to do and the approach that you would like to follow.  If you would like to investigate to the queries you can add a custom model that extends the Model and see the queries that they are actually being made:

Step1. Create a custom model that will look like this:

 

<?php

use GroceryCrud\Core\Model;

class CustomModel extends Model {

}

Step2. Enable profiler with  a code like this:

 

$model = new CustomModel($database);

$model->setDefaultProfiler();

$crud = new GroceryCrud($config);
$crud->setModel($model);

...