• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CI and Rapyd

#1
[eluser]johnsimpson[/eluser]
Hi All,

I hope someone can help me here as this is driving me insane. I have posted on the Rapyd forums as well but nobody has replied so hopefully someone here can help.

I am working on my first web app using CodeIgniter and its going great so far... well the CI part is anyway...

I am also trying to integrate Rapyd into CodeIgniter. My current version of CI is v1.7.1 (latest build at time of post) and I am using rapyd.sa.0.0.4.zip (latest build) - I have also tried the ci_1.6.3_rapyd_sa_svn_142.zip build as well.

Basically I have managed to get it integrated...ish but I am having a few issues.

I have managed to get Rapyd to work with the DataGrid and DataFilter examples and it is calling on my information from my database as it should. But when I come to add a edit button and direct to my edit page I keep getting errors.

I just use the code direct from the example and I receive this:
"Fatal error: Class 'dataedit' not found in c:/myfilename.php on line 128" - Which is referring to $dataedit = new dataedit($config);

My code is
Code:
function edit()
    {  
        $this->rapyd->load('datagrid');
      
        //edit
        $config = array    (
        'label'  => 'Manage Article',
        'source' => 'news',
        'back_url' => 'filteredgrid.php',
        'fields' => array (
            array (
              'type'  => 'input',
              'name'  => 'title',
              'label' => 'Title',
              'rule'  => 'trim|required',
            ),
        ),
        'buttons'  => array('modify','save','undo','back'),
        );
        $dataedit = new dataedit($config);
        $dataedit->build();
      
      
        //  $data['rapyd_head'] = $rapyd->head();
        $data['title'] = 'DataEdit';
        $data['content'] = $dataedit.'<br />';
        $data['code'] = highlight_string(file_get_contents(__FILE__), TRUE);
      
        //output
        $this->load->view('template/news_edit', $data);
    }

Has anyone else experienced this? Is it possible to Integrate CI with Rapyd as I have read a few places that it doesnt work properly?

Or if you have any better solutions/ideas for generating forms quickly similar to rapyd please let me know.

Hope you can help!

thanks
John

#2
[eluser]TheFuzzy0ne[/eluser]
Welcome to the CodeIgniter forums!

OK, I don't use Rapyd, and I never have done, although I think that the problem is not related as such so we may be able to help.

My initial thoughts on your error:

Why is the file in the root of C:\? Is this a path issue?
How is the class declared in this file? Could it be an issue with case sensitivity?
Where is the file you need included into the controller method? Is it included by Rapyd and declared in "datagrid"? If so, I suspect that it's an issue with paths/permissions, and it's not telling you that it can't be loaded.

Is the datagrid file to big to post in the forum? I'm interested in the top few lines including the class declaration, and whether there are multiple classes defined inside it. I'd also like to see your file/directory structure. If you can illustrate the structure, it would be a big help.

#3
[eluser]johnsimpson[/eluser]
Hi, thanks for your reply, a kind member from Rapyd has replied to my post and provided a working version for me of CI and Rapyd, if anyone would like the link it is here http://www.rapyd.com/forum/viewtopic.php?pid=1851#p1851

thanks
John


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.