⚠ 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 is an archived forum. ⚠

  •     

profile picture

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



harshalone

harshalone
  • profile picture
  • Member

Posted 13 July 2019 - 13: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.com/admin/events?m=events

 

 

I dont understand how to resolve this now. 

 

Attached screenshot


harshalone

harshalone
  • profile picture
  • Member

Posted 13 July 2019 - 13: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.com/theme/assets/grocery-crud/js/jquery/jquery.js [b945c772b3edcbae25bae3b763eb6dc153255cdf] => https://www.bylde.com/theme/assets/grocery-crud/js/libraries/jquery-ui.js [565ee980b9b996004d51e3d67ff2303d7f4ad651] => https://www.bylde.com/theme/assets/grocery-crud/js/libraries/modernizr-custom.js [7df3e87b409196ae015ec1035463b452d4734e1a] => https://www.bylde.com/theme/assets/grocery-crud/js/build/grocery-crud-v2.7.8.a4867fc.js [741b6c1fbc47b9ca5c0c13d31debdd872a2f8551] => https://www.bylde.com/theme/assets/grocery-crud/js/build/load-grocery-crud.js ) [css_files] => Array ( [ed271fa94029e4746870e3b4e9a6ab7644c5b900] => https://www.bylde.com/theme/assets/grocery-crud/css/bootstrap/bootstrap.css [bae794f2a55eb2a5af7ac32bc4bf67947c6589d5] => https://www.bylde.com/theme/assets/grocery-crud/css/jquery-ui/jquery-ui.css [c7f86dda3c4e82b4ca5ed65332acd235cbc001b5] => https://www.bylde.com/theme/assets/grocery-crud/css/grocery-crud-v2.7.8.a4867fc.css ) )


harshalone

harshalone
  • profile picture
  • Member

Posted 13 July 2019 - 14: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);

web-johnny

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 13 July 2019 - 20: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