⚠ 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 forum is read-only and soon will be archived. ⚠


Ooooops, something went wrong! If you can see this message, this is probably a misconfiguration in Grocery CRUD Enterprise!

bug error integration installation

  • Please log in to reply
3 replies to this topic

#1 harshalone

harshalone

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 13 July 2019 - 01:42 PM

I have followed your guide and looked into your installation video to integrate grocery crud into my CI project.

 

I have placed assets folder inside my theme folder and relatively set up the path also.

 

'assets_folder' => base_url() . 'theme/assets/grocery-crud/',

 

Error : https://www.bylde.co...events?m=events

 

 

I dont understand how to resolve this now. 

 

Attached screenshot

Attached Thumbnails

  • gc-bylde.png


#2 harshalone

harshalone

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 13 July 2019 - 01:44 PM

If you think the path is not correct let me tell you that if you copy paste any asset url whether it is a js file or css. They are all publically accessible. 

 

GroceryCrud\Core\Render\RenderAbstract Object ( [output] =>

Ooooops, something went wrong! If you can see this message, this is probably a misconfiguration in Grocery CRUD Enterprise!
 
 
...
Ok
 
 
 
 
 
 
 
 
 
 
 
 
 

[isJSONResponse] => [outputAsObject] => [js_files] => Array ( [c69319ced0fb3d6c48dce8da696b9a246a584427] => https://www.bylde.co...query/jquery.js [b945c772b3edcbae25bae3b763eb6dc153255cdf] => https://www.bylde.co...es/jquery-ui.js [565ee980b9b996004d51e3d67ff2303d7f4ad651] => https://www.bylde.co...rnizr-custom.js [7df3e87b409196ae015ec1035463b452d4734e1a] => https://www.bylde.co....7.8.a4867fc.js [741b6c1fbc47b9ca5c0c13d31debdd872a2f8551] => https://www.bylde.co...grocery-crud.js ) [css_files] => Array ( [ed271fa94029e4746870e3b4e9a6ab7644c5b900] => https://www.bylde.co...p/bootstrap.css [bae794f2a55eb2a5af7ac32bc4bf67947c6589d5] => https://www.bylde.co...i/jquery-ui.css [c7f86dda3c4e82b4ca5ed65332acd235cbc001b5] => https://www.bylde.co...7.8.a4867fc.css ) )



#3 harshalone

harshalone

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 13 July 2019 - 02:29 PM

Solution:

 

Step 1:

 

Make sure in your view you have file iterated via a loop like this

 
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <?php foreach($output->css_files as $file): ?>
        <link type="text/css" rel="stylesheet" href="<?php echo $file; ?>" />
    <?php endforeach; ?>
</head>
<body>
        <div style="padding: 20px 10px;">
            <?php print_r($output->output); ?>
        </div>
        <?php foreach($output->js_files as $file): ?>
            <script src="<?php echo $file; ?>"></script>
        <?php endforeach; ?>
</body>
</html>

 

 

 

 

Step 2: please include this before output

 

if (isset($data->output ->isJSONResponse) && $data->output->isJSONResponse) {
            header('Content-Type: application/json; charset=utf-8');
            echo $data->output->output;
            exit;
        }$this->load->view('test',$data);


#4 web-johnny

web-johnny

    grocery CRUD Author

  • Administrators
  • 1,166 posts

Posted 13 July 2019 - 08:53 PM

I am glad that you could find a solution to your problem and I am glad that the message "If you can see this message, this is probably a misconfiguration in Grocery CRUD Enterprise!" is helping many people to understand that this is just a misconfiguration and that you are very close to the solution :)

Thanks for sharing your solution :)

Regards

Johnny







Also tagged with one or more of these keywords: bug, error, integration, installation

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users