EllisLab text mark
Advanced Search
2 of 23
2
   
v 1.3.3 grocery CRUD - an automatic Codeigniter CRUD
Posted: 18 April 2011 06:14 AM   [ Ignore ]   [ # 21 ]   [ Rating: 0 ]
Joined: 2010-11-27
30 posts

The error still there.

Look into error, i see that :

In the application/models/ion_auth_model.php have this line :

$this->db->select(array(
                
$this->tables['users'].'.*',
                
$this->tables['groups'].'.name AS '$this->db->protect_identifiers('group'),
                
$this->tables['groups'].'.description AS '$this->db->protect_identifiers('group_description')
                   )); 

Don’t know why the function protect_identifiers not work like normal, so

$this->db->protect_identifiers('group'

output : group and this is reserver word for mysql.

That’s very strange. I’ve also posted this issue on the IonAuth thread to see if Ben have

any suggestion.

Cheers.

 
Posted: 18 April 2011 06:44 AM   [ Ignore ]   [ # 22 ]   [ Rating: 0 ]
Avatar
Joined: 2010-12-18
244 posts
tieungao - 18 April 2011 10:14 AM

The error still there.

Look into error, i see that :

In the application/models/ion_auth_model.php have this line :

$this->db->select(array(
                
$this->tables['users'].'.*',
                
$this->tables['groups'].'.name AS '$this->db->protect_identifiers('group'),
                
$this->tables['groups'].'.description AS '$this->db->protect_identifiers('group_description')
                   )); 

Don’t know why the function protect_identifiers not work like normal, so

$this->db->protect_identifiers('group'

output : group and this is reserver word for mysql.

That’s very strange. I’ve also posted this issue on the IonAuth thread to see if Ben have

any suggestion.

Cheers.

I think I found what the error is. Codeigniter active record automatically uses protect_identifiers so to your select is used two times! try to do this I think it will solve your problem.

$this->db->select(array(
                
$this->tables['users'].'.*',
                
$this->tables['groups'].'.name AS ''group',
                
$this->tables['groups'].'.description AS ''group_description'
                   
)); 

And is secure there is not problem in this.

 Signature 

- grocery CRUD - a codeigniter CRUD library - user guide and download
- Web and Development - personal Blog

 
Posted: 18 April 2011 08:57 AM   [ Ignore ]   [ # 23 ]   [ Rating: 0 ]
Joined: 2010-11-27
30 posts

when i change to :

$this->tables['groups'].'.name AS  `group`'

This work like charm!

Thanks for your suggestion but im scare abit of change orgin IonAuth Code.

Btw, is anyway to deal with upload images and store filename at database?

Should i use callback_before_insert?

 
Posted: 18 April 2011 09:05 AM   [ Ignore ]   [ # 24 ]   [ Rating: 0 ]
Avatar
Joined: 2010-12-18
244 posts
tieungao - 18 April 2011 12:57 PM

when i change to :

$this->tables['groups'].'.name AS  `group`'

This work like charm!

Thanks for your suggestion but im scare abit of change orgin IonAuth Code.

Btw, is anyway to deal with upload images and store filename at database?

Should i use callback_before_insert?

Is on the future features. You can see many things that I will fix in the future by clicking to the link below :

Future features of grocery CRUD.

It’s a little bit complicated even to explain for how to do it. It’s not only the callback_before_add is the callback_field and you must change the form to multitype… etc etc. If you are a little bit patient I will inform you when I will added the uploading file. Thank you for you suggestions and I am glad to help you grin

 Signature 

- grocery CRUD - a codeigniter CRUD library - user guide and download
- Web and Development - personal Blog

 
Posted: 18 April 2011 09:08 AM   [ Ignore ]   [ # 25 ]   [ Rating: 0 ]
Joined: 2010-11-27
30 posts

Okie thank you so much!

Hope to hear any news about this powerful tool.

 
Posted: 18 April 2011 10:37 PM   [ Ignore ]   [ # 26 ]   [ Rating: 0 ]
Avatar
Joined: 2007-07-14
28 posts
web-johnny - 17 April 2011 11:51 PM

I create a new version of grocery CRUD v.1.0.1 for codeigniter 2.0.x . Actually this was a bug of codeigniter 2.0.2 (because I cannot include a config folder as module). But because we just need to do our job and keep going I create another way for the config files. The new version you will find it at google code hosting by clicking the below link

grocery CRUD version 1.0.1 for codeigniter 2.0.x

If you want just update your older files (from grocery CRUD v.1.0.0 to v.1.0.1) , just replace your old files with the new ones.

Hey… that’s cool! So I see that in order to fix it you moved all config files to application/config?
I spent some time myself trying to figure out what the problem was and I guess it is indeed a bug with 2.0.2 / Reactor!

If you edit system/core/Config.php around line 110/113 from

if ($found === FALSE)
{
    
continue;

.. to…

if ($found === FALSE)
{
    
continue;
}
else
{
    $found 
FALSE;

... it seems to solve it completely for v1.0.

I do not completely understand why those inner/outer loops are required in Config.php… but it just seems someone forgot to reset that $found var when exiting the inner loop… to prevent false positives from triggering the not found error. Maybe someone else can shed some light on this?

Have you submitted this error/request to Reactor codebase?

 Signature 

feedbleed.com - Saving music… one download at a time.
mmmmail.com - Disposable Email to RSS service.

 
Posted: 19 April 2011 02:47 AM   [ Ignore ]   [ # 27 ]   [ Rating: 0 ]
Avatar
Joined: 2010-12-18
244 posts

Actually I totally knew that was a codeigniter error . To all my friends programmers I advise them NOT to use 2.0.2 . It has other bugs to do with security libraries. Though many people just download the latest stable(!!) version so they need a library just to work fine with their codeigniter.I didn’t do anything to report it,  because at first I freak out why a so simple thing in my CRUD don’t play .  That’s why I created the new version . Hope that codeigniter 2.0.3 will be more stable .

Actually as you find where the error was , you can report it as an error and recommend your code.It will be good to report it.

 Signature 

- grocery CRUD - a codeigniter CRUD library - user guide and download
- Web and Development - personal Blog

 
Posted: 19 April 2011 03:56 AM   [ Ignore ]   [ # 28 ]   [ Rating: 0 ]
Avatar
Joined: 2007-07-14
28 posts

It seems it has been reported already… so let’s hope a merge happens soon.

https://bitbucket.org/ellislab/codeigniter-reactor/issue/200/environment-changes-break-config-with

If you know of other unreported bugs please report them!
Thank you.

 Signature 

feedbleed.com - Saving music… one download at a time.
mmmmail.com - Disposable Email to RSS service.

 
Posted: 19 April 2011 05:15 PM   [ Ignore ]   [ # 29 ]   [ Rating: 0 ]
Avatar
Joined: 2010-12-18
244 posts

Thanks to report it.
I think the most bugs has been reported. So I wish to a new version. I use packages a lot and I want to include my libraries/models and configs to a separate folder.

 Signature 

- grocery CRUD - a codeigniter CRUD library - user guide and download
- Web and Development - personal Blog

 
Posted: 19 April 2011 10:32 PM   [ Ignore ]   [ # 30 ]   [ Rating: 0 ]
Joined: 2010-01-13
10 posts

looks great Thanks

 
Posted: 20 April 2011 01:01 AM   [ Ignore ]   [ # 31 ]   [ Rating: 0 ]
Joined: 2010-11-27
30 posts

this is also good if can make new version to work with template (header, footer,..) and easy to merge with HMVC.

I love this plugin so much but difficult for me to enroll in HMVC.

 
Posted: 20 April 2011 01:30 AM   [ Ignore ]   [ # 32 ]   [ Rating: 0 ]
Avatar
Joined: 2010-12-18
244 posts
tieungao - 20 April 2011 05:01 AM

this is also good if can make new version to work with template (header, footer,..) and easy to merge with HMVC.

I love this plugin so much but difficult for me to enroll in HMVC.

Its really worth it to learn to write in MVC . In the beginning it’s a little difficult but after you learn it , there is no way back to write php scripts from the scratch again grin.

I have a suggestion for you . I do it in many projects that don’t use frameworks or use another framework like kohana, cakephp etc. You can create a folder to your project . For example “admin” and copy all your codeigniter code there. So you have your project that works fine and you also have your administrator in codeigniter. Its really really easy (espacially with CI 2.0.0 that there is no need to config anything). The only config that you will add is the database config and the CRUD. That’s it.

I think its simple.

PS. grocery CRUD has template at templates/frontend/default/template.php

 Signature 

- grocery CRUD - a codeigniter CRUD library - user guide and download
- Web and Development - personal Blog

 
Posted: 22 April 2011 12:35 AM   [ Ignore ]   [ # 33 ]   [ Rating: 0 ]
Joined: 2009-10-16
3 posts

Great work for u grad.. for mysql doing great on my application, but when i transfer to mssql default driver from ci i got blank white page when access the function ..

For mssql i got make change for SET NAMES = UTF8 (i don’t know how to replace on mssql ) and

SHOW Column , when looks select data type from tabel .... i make view on mssql with but i exec With EXEC SHOW COLUMN

Still Blank white in page ?...... any sugested what’s wrong in my styntac

 
Posted: 22 April 2011 03:14 AM   [ Ignore ]   [ # 34 ]   [ Rating: 0 ]
Avatar
Joined: 2010-12-18
244 posts
Joker - 22 April 2011 04:35 AM

Great work for u grad.. for mysql doing great on my application, but when i transfer to mssql default driver from ci i got blank white page when access the function ..

For mssql i got make change for SET NAMES = UTF8 (i don’t know how to replace on mssql ) and

SHOW Column , when looks select data type from tabel .... i make view on mssql with but i exec With EXEC SHOW COLUMN

Still Blank white in page ?...... any sugested what’s wrong in my styntac

The blank wepbage is because you have the error_reporting(0); Go to your index.php and change the error_reporting to E_ALL ( if you have 1.7.3 - 2.0.1) or define(‘ENVIRONMENT’, ‘development’); if you use 2.0.2 . Please do this first, because the error can be everywhere. If you are more specific I can help you. As you have seen ALL the code for the database is on the model. You are in the right place…

 Signature 

- grocery CRUD - a codeigniter CRUD library - user guide and download
- Web and Development - personal Blog

 
Posted: 22 April 2011 08:25 AM   [ Ignore ]   [ # 35 ]   [ Rating: 0 ]
Joined: 2011-04-22
1 posts

I just downloaded g-crud and now I have an error

Fatal error: Call to undefined method CI_Output::set_template() in C:\xampp\htdocs\test\application\controllers\crud.php on line 20

and line 20

$this->output->set_template('custom_cms'); 

how to solve it, any idea?

PS: I’m using CI 2.02

 
2 of 23
2